KR100396031B1 - Method for diagnostic automatic in mobile switch center - Google Patents

Method for diagnostic automatic in mobile switch center Download PDF

Info

Publication number
KR100396031B1
KR100396031B1 KR10-2000-0087456A KR20000087456A KR100396031B1 KR 100396031 B1 KR100396031 B1 KR 100396031B1 KR 20000087456 A KR20000087456 A KR 20000087456A KR 100396031 B1 KR100396031 B1 KR 100396031B1
Authority
KR
South Korea
Prior art keywords
execution code
procedure
data
execution
message
Prior art date
Application number
KR10-2000-0087456A
Other languages
Korean (ko)
Other versions
KR20020057181A (en
Inventor
이광민
홍정기
박종주
Original Assignee
주식회사 하이닉스반도체
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 하이닉스반도체 filed Critical 주식회사 하이닉스반도체
Priority to KR10-2000-0087456A priority Critical patent/KR100396031B1/en
Publication of KR20020057181A publication Critical patent/KR20020057181A/en
Application granted granted Critical
Publication of KR100396031B1 publication Critical patent/KR100396031B1/en

Links

Landscapes

  • Debugging And Monitoring (AREA)

Abstract

본 발명은 교환기 시험 절차를 TDL(Test Description Language)에서 제시하는 문법에 맞춰 프로그램을 작성하고, 컴파일러(compiler)를 통해 번역하여 수행코드를 획득한 후 에뮬레이터(emulator)를 이용하여 교환기 시험을 자동으로 수행하도록 한 교환기 자동 진단방법에 관한 것으로서, 이러한 본 발명은, 시험자가 시험절차를 TDL(Test Description Language)문법에 맞춰 프로그램을 작성하여 입력한 상태에서, 자동 진단이 시작되면 컴파일러에서 수행코드를 획득하고 이를 파일로 만들어 에뮬레이터에 전송해주며, 상기 에뮬레이터에서 수행코드 파일을 읽어 패턴 정보, 수행코드, 프로시저 정보를 부분별로 저장하고, 수행코드만을 처리하는 런쓰레드(RunThread) 루틴을 실행시켜 교환기를 자동 진단한다.The present invention writes a program according to the grammar suggested by the TDL (Test Description Language), translates through a compiler to obtain the execution code, and then automatically performs an exchange test using an emulator. The present invention relates to a switch automatic diagnosis method for performing the present invention. In the present invention, a tester writes a program in accordance with a TDL (Test Description Language) syntax and inputs a test procedure. It converts it into a file and sends it to the emulator, reads the execution code file from the emulator, stores pattern information, execution code, and procedure information for each part, and executes a runthread routine that processes only the execution code. Auto diagnosis.

또한, 진단 결과 수신 데이터가 메시지 출력 데이터일 경우에는 출력 메시지를 토큰(Token)별로 분류한 후 PRN(Printout Reference Number)을 추출하고, 추출한 PRN이 패턴 정보 영역에 존재하는지를 체크하고, 상기 추출한 PRN이 패턴 정보 영역에 존재할 경우에는 패턴 정보에 기록된 추출정보를 이용하여 데이터를 추출하며, 패턴 정보에 등록되어 있는 프로시저 ID를 추출하고, 대기중인 런쓰레드를 활성화시킨다.In addition, when the diagnosis result received data is message output data, the output message is classified by token, and then a PRN (Printout Reference Number) is extracted, and whether the extracted PRN exists in the pattern information area is checked, and the extracted PRN is If present in the pattern information area, data is extracted using the extraction information recorded in the pattern information, a procedure ID registered in the pattern information is extracted, and a waiting run thread is activated.

Description

교환기 자동 진단방법{Method for diagnostic automatic in mobile switch center}Method for diagnostic automatic in mobile switch center}

본 발명은 교환기(특히, 이동통신 교환기 : MSC) 자동 진단에 관한 것으로, 특히 교환기 시험 절차를 TDL(Test Description Language)에서 제시하는 문법에 맞춰 프로그램을 작성하고, 컴파일러(compiler)를 통해 번역하여 수행코드를 획득한 후 에뮬레이터(emulator)를 이용하여 교환기 시험을 자동으로 수행하도록 한 교환기 자동 진단방법에 관한 것이다.The present invention relates to an automatic diagnosis of an exchange (especially a mobile communication exchange (MSC)), and in particular, a program is written according to a grammar suggested by a test description language (TDL) and translated by a compiler. The present invention relates to a method for automatically diagnosing an exchanger to automatically perform an exchange test using an emulator after acquiring a code.

상기에서 TDL은 시험절차, 즉 MMC(Man-Machine Communication) 명령어를 입력하고 출력 메시지를 분석하며 이를 가공하여 재처리될 수 있도록 고안된 언어로서, 출력 메시지로부터 추출 대상을 선언하는 PATTERN part, 전역변수와 프로시저의 prototype을 선언하는 GLOBAL part, MMC 명령어를 기술하는 MMC part, 수행문을 기술할 수 있는 EXECUTE part, Procedure Declaration part로 구성되어 있다.In the above, TDL is a language designed to input test procedures, ie, man-machine communication (MMC) commands, analyze output messages, process them, and reprocess them. It consists of a GLOBAL part that declares a prototype of a procedure, an MMC part that describes an MMC instruction, an EXECUTE part that can describe an execution statement, and a Procedure Declaration part.

또한 컴파일러는 고수준 언어로 기록된 프로그램을 어셈블러 언어 또는 기계어로 번역하는 프로그램을 말하며, 상기 고수준 언어로서는 PL/1, CHILL, COBOL, FORTRAN, ALGOL 등이 있다.The compiler also refers to a program for translating a program recorded in a high level language into an assembler language or a machine language. The high level languages include PL / 1, CHILL, COBOL, FORTRAN, ALGOL, and the like.

일반적으로 교환기(특히, 이동통신 교환기)에서 일반 기능들을 검증하기 위해서는 시험자가 직접 여러 단계에 걸쳐 MMC(Man-Machine Communication) 명령어를 입력하고 그 출력 메시지를 분석하여 교환기의 상태를 판단하였다.In general, in order to verify general functions in an exchange (especially a mobile communication exchange), a tester directly inputs a man-machine communication (MMC) command through several steps and analyzes the output message to determine the state of the exchange.

따라서 확인 절차가 복잡하다는 문제가 있었으며, 또한 확인 절차가 단순한경우에는 동일한 절차를 여러 번 반복해야하므로 기능 검증에 많은 인력과 시간이 투자되는 단점이 있었다.Therefore, there was a problem that the verification procedure was complicated. Also, if the verification procedure was simple, the same procedure had to be repeated several times.

이에 본 발명은 상기와 같은 종래 교환기의 기능 검증시 발생하는 제반 문제점을 해결하기 위해서 제안된 것으로서,Accordingly, the present invention has been proposed to solve various problems that occur when verifying the function of the conventional exchange as described above,

본 발명의 목적은 교환기 시험 절차를 TDL(Test Description Language)에서 제시하는 문법에 맞춰 프로그램을 작성하고, 컴파일러(compiler)를 통해 번역하여 수행코드를 획득한 후 에뮬레이터(emulator)를 이용하여 교환기 시험을 자동으로 수행하도록 한 교환기 자동 진단방법을 제공하는 데 있다.An object of the present invention is to write a program in accordance with the grammar suggested by the TDL (Test Description Language), translate through a compiler to obtain the execution code and then perform an exchange test using an emulator. The present invention provides a method for automatically diagnosing exchanges to be performed automatically.

상기와 같은 목적을 달성하기 위한 본 발명은,The present invention for achieving the above object,

시험자가 시험절차를 TDL(Test Description Language) 문법에 맞춰 프로그램을 작성하고, 컴파일러를 통해 수행코드를 얻은 후 에뮬레이터를 이용하여 시험을 자동으로 수행함으로써, 기능 검증에 필요한 인적 및 시간적인 자원을 절약하도록 한다.The tester writes the test procedure in accordance with the TDL (Test Description Language) grammar, obtains the execution code through the compiler, and automatically executes the test using the emulator to save the human and time resources required for functional verification. do.

이를 위한 본 발명의 "교환기 자동 진단 방법"은,For this purpose, the "exchange automatic diagnostic method" of the present invention,

시험자가 시험절차를 TDL(Test Description Language)문법에 맞춰 프로그램을 작성하여 입력한 상태에서, 자동 진단이 시작되면 컴파일러에서 수행코드를 획득하고 이를 파일로 만들어 에뮬레이터에 전송해주는 단계와;In the state in which the tester writes and inputs a test procedure in accordance with TDL (Test Description Language) syntax, when the automatic diagnosis starts, acquiring the execution code from the compiler, making it into a file, and transmitting it to the emulator;

상기 에뮬레이터에서 수행코드 파일을 읽어 패턴 정보, 수행코드, 프로시저 정보를 부분별로 저장하고, 수행코드만을 처리하는 런쓰레드(RunThread) 루틴을 실행시키는 단계와;Reading an execution code file in the emulator, storing pattern information, execution code, and procedure information for each part, and executing a runthread routine that processes only the execution code;

상기 런쓰레드 실행 후 수신 시그널이 교환기내 프로세서(ATMP)에서 클라이언트로 전송된 시그널(BatchMsgToClientSig)일 경우, 수신 데이터가 명령어 검사 결과 데이터인지를 체크하고, 그 결과 수신 데이터가 명령 체크 결과일 경우에는 명령어 검사 결과에 대응하는 동작을 수행시키는 단계와;If the received signal after the run thread execution is a signal (BatchMsgToClientSig) transmitted from the ATMP processor to the client, it is checked whether the received data is the command check result data, and if the result is the command check result, the command Performing an operation corresponding to a test result;

상기 수신 데이터가 명령어 검사 결과 데이터가 아닐 경우에는, 상기 수신 데이터가 메시지 출력 데이터인지를 판단하고, 그 판단 결과 메시지 출력 데이터일 경우에는 출력 메시지를 토큰(Token)별로 분류한 후 PRN(Printout Reference Number)을 추출하는 단계와;If the received data is not the command check result data, it is determined whether the received data is message output data. If the received data is the message output data, the output message is classified by token and then a printout reference number (PRN). Extracting c);

상기 추출한 PRN이 패턴 정보 영역에 존재하는지를 체크하고, 상기 추출한 PRN이 패턴 정보 영역에 존재할 경우에는 패턴 정보에 기록된 추출정보를 이용하여 데이터를 추출하는 단계와;Checking whether the extracted PRN exists in the pattern information area, and extracting data using the extraction information recorded in the pattern information when the extracted PRN exists in the pattern information area;

상기 패턴 정보에 등록되어 있는 프로시저 ID를 추출하고, 대기중인 런쓰레드를 활성화시키는 단계를 실행하여, 교환기를 자동으로 진단한다.A procedure ID registered in the pattern information is extracted, and a step of activating a waiting run thread is executed to automatically diagnose an exchange.

도 1은 본 발명에 의한 교환기 자동 진단방법을 개념적으로 보인 개념도이고,1 is a conceptual diagram conceptually showing a switch automatic diagnosis method according to the present invention,

도 2는 본 발명에 의한 교환기 자동 진단방법을 보인 흐름도이고,2 is a flowchart illustrating a switch automatic diagnosis method according to the present invention;

도 3은 도 3에서 "RunThread" 루틴의 상세 흐름을 보인 흐름도이고,3 is a flowchart illustrating a detailed flow of a "RunThread" routine in FIG. 3,

도 4는 도 3에서 분석된 수행코드가 JSR(Jump Sub Routine)일 경우 이를 처리하는 과정을 보인 흐름도이다.FIG. 4 is a flowchart illustrating a process of processing the execution code analyzed in FIG. 3 when it is a JSR (Jump Sub Routine).

<도면의 주요 부분에 대한 부호의 설명><Explanation of symbols for the main parts of the drawings>

100 ..... 교환기 자동 진단부100 ..... Exchange Auto Diagnostics

110 ..... 시험절차 입력부110 ..... Test procedure input

120 ..... TDL 번역부120 ..... TDL Translation

130 ..... 에뮬레이터130 ..... emulator

200 ..... 교환기200 ..... Exchanger

210 ..... MMS(Man-Machine Subsystem)210 ..... Man-Machine Subsystem

이하 상기와 같은 기술적 사상에 따른 본 발명의 바람직한 실시 예를 첨부한 도면에 의거 상세히 설명하면 다음과 같다.Hereinafter, a preferred embodiment of the present invention according to the technical spirit as described above will be described in detail with reference to the accompanying drawings.

첨부한 도면 도 1은 교환기 자동 진단방법을 개념적으로 보인 개념도이다.1 is a conceptual diagram conceptually showing a switch automatic diagnosis method.

여기서 참조부호 100은 교환기의 기능을 자동으로 시험하기 위한 교환기 자동 진단부를 나타내고, 참조부호 200은 상기 교환기를 나타낸다.Reference numeral 100 denotes an exchange automatic diagnosis section for automatically testing the function of the exchange, and reference numeral 200 denotes the exchange.

여기서 교환기 자동 진단부(100)는 사용자가 TDL 문법에 맞추어 작성한 시험 절차 프로그램을 입력받는 시험절차 입력부(110)와, 상기 시험절차 입력부(110)에서 입력된 프로그램을 TDL 컴파일러로 번역하여 수행 코드를 획득하는 TDL 번역부(120)와, 상기 TDL 번역부(120)에서 획득한 수행코드에 따라 상기 교환기(200)를 자동으로 시험하는 에뮬레이터(130)를 포함한다.Here, the switch automatic diagnosis unit 100 translates a test procedure input unit 110 for receiving a test procedure program written by a user according to the TDL grammar, and a program inputted from the test procedure input unit 110 to a TDL compiler to perform an execution code. And an emulator 130 for automatically testing the exchanger 200 according to the obtained TDL translation unit 120 and the execution code obtained by the TDL translation unit 120.

또한 상기 교환기(200)는 상기 교환기 자동 진단부(100)와 데이터를 인터페이스하고 입력되는 명령어에 따라 각 블록의 기능을 시험한 후 그 결과 데이터를 상기 교환기 자동 진단부(100)에 전송해주는 MMS(Man-Machine Subsystem)(210)을 포함한다.In addition, the switch 200 interfaces the data with the switch automatic diagnosis unit 100 and tests the function of each block according to an input command and transmits the result data to the switch automatic diagnosis unit 100. Man-Machine Subsystem) 210.

상기 도 1을 참조하여 본 발명의 개념을 간략히 설명하면, 먼저 사용자가 TDL 문법에 맞추어 시험절차 프로그램을 작성하고, 교환기 자동 진단부(100)내의 시험절차 입력부(110)에서 상기 사용자가 작성한 시험절차 프로그램을 입력받는다.Referring briefly to the concept of the present invention with reference to FIG. 1, first, a user writes a test procedure program according to the TDL grammar, and the test procedure written by the user in the test procedure input unit 110 in the switch automatic diagnosis unit 100. Get the program.

그런 후 TDL 번역부(120)에서 상기 입력받은 시험절차 프로그램을 번역하여 수행 코드를 획득한다.Then, the TDL translation unit 120 translates the received test procedure program to obtain a performance code.

여기서 TDL 번역부(120)에 의해 획득되는 수행 코드의 파일 구조는 아래의 [표1]과 같다.The file structure of the execution code obtained by the TDL translation unit 120 is shown in Table 1 below.

수행코드 파일 구조Executable Code File Structure Pattern 정보Pattern Information InstructionInstruction Procedure 정보Procedure Information Constant string 정보Constant string information

상기 [표1]에서 패턴(Pattern) 정보는 패턴 Part에 정의된 내용들로 패턴을 추출해야 하는 메시지의 PRN(Printout Reference Number), 추출 형태, 추출 대상, 추출 후 불려질 프로시저의 id에 대한 정보를 나타낸다.In [Table 1], the pattern information includes information on a printout reference number (PRN), a form of extraction, an object to be extracted, and an id of a procedure to be called after extraction of a message to be extracted from the contents defined in the pattern part. Indicates.

다음으로 Instruction은 실제 수행 코드를 나타내며, 프로시저 정보는 디폴트(Default) 라이브러리 정보, 프로그래머가 정의한 프로시저들의 이름, 프로시저 ID, 인스트럭션 시작 주소에 대한 정보를 나타내며, 상수 기호열(Constant string) 정보는 double quote(")사이에 존재하는 문자열들에 대한 정보를 나타낸다.Next, Instruction represents the actual execution code. Procedure information indicates default library information, programmer-defined procedure name, procedure ID, instruction start address, and constant string information. Indicates information about strings between double quotes (").

한편, 상기와 같은 수행 코드를 획득하면 에뮬레이터(130)는 교환기(200)내의 MMS(210)와 데이터 인터페이스를 통해 교환기(200)를 자동으로 시험하고, 그 결과 데이터를 분석하게 된다.Meanwhile, when acquiring the execution code as described above, the emulator 130 automatically tests the switch 200 through the data interface with the MMS 210 in the switch 200, and analyzes the result data.

여기서 에뮬레이터(130)에서 실제 수행 코드를 이용하여 교환기(200)를 시험하고, 그 결과를 출력해주는 일 예는 다음과 같다.Here, an example of testing the exchanger 200 using the actual execution code in the emulator 130 and outputting the result is as follows.

예) 입출력 포트의 상태를 알아보기 위해 "DIS-IO-PORT;" 명령어를 입력하고 출력 메시지로부터 포트 번호와 상태를 추출하여 화면에 출력하는 내용이다.Ex) To check the status of I / O port, "DIS-IO-PORT;" Enters a command and extracts the port number and status from the output message.

시험파일의 내용Test file contents

PATTERN {PATTERN {

PRN := MO501;PRN: = MO501;

TYPE := FIELD, FIELDLN;TYPE: = FIELD, FIELDLN;

PROCEDURE := M0501_PROC;PROCEDURE: = M0501_PROC;

FIELD := "LOC", "=", ptn_Loc;FIELD: = "LOC", "=", ptn_Loc;

FIELDLN := ("PORT", ptn_Port), ("STS", ptn_Sts);FIELDLN: = ("PORT", ptn_Port), ("STS", ptn_Sts);

}}

EXECUTE {EXECUTE {

ExeMmcCommand("DIS-IO-PORT;");ExeMmcCommand ("DIS-IO-PORT;");

printf("\n Test End");printf ("\ n Test End");

}}

M0501_PROC : PROC()M0501_PROC: PROC ()

DCL i INT;DCL i INT;

DCL csLoc STRING;DCL csLoc STRING;

DCL csPort, csSts STRING ARRAY[20];DCL csPort, csSts STRING ARRAY [20];

GetPatternData(ptn_Loc, csLoc);GetPatternData (ptn_Loc, csLoc);

printf("\n Location = %s", csLoc);printf ("\ n Location =% s", csLoc);

DO FOR(i := 0; i < 20; i +:= 1)DO FOR (i: = 0; i <20; i +: = 1)

IF GetPatternData(ptn_Port, csPort[i]) < 0 THENIF GetPatternData (ptn_Port, csPort [i]) <0 THEN

BREAK;BREAK;

FI;FI;

GetPatternData(ptn_Sts, csSts[i]);GetPatternData (ptn_Sts, csSts [i]);

%s", csPort[i}, csSts[i]);% s ", csPort [i}, csSts [i]);

OD;OD;

END;END;

수행코드 파일의 내용Contents of the executable

P P_START 0 /*PATTERN 정보*/P P_START 0 / * PATTERN Info * /

P P_PRN M0501P P_PRN M0501

P P_TYPE 11P P_TYPE 11

P P_PROCEDURE 0 LOC 0P P_PROCEDURE 0 LOC 0

P P_FIELD 0 = 0P P_FIELD 0 = 0

P P_FIELD 0 ptn_Loc 1P P_FIELD 0 ptn_Loc 1

P P_FIELDLN PORT ptn_PortP P_FIELDLN PORT ptn_Port

P P_FIELDLN STS ptn_StsP P_FIELDLN STS ptn_Sts

P P_ENDP P_END

I 26 -1 0 11I 26 -1 0 11

L 0 1L 0 1

I 2 32 0 13 /* ExeMmcCommand("DIS-IO-PORT;")에 대한 코드 */I 2 32 0 13 / * Code for ExeMmcCommand ("DIS-IO-PORT;") * /

I 1 1 0 13I 1 1 0 13

I 27 0 0 13I 27 0 0 13

I 30 0 0 13I 30 0 0 13

I 2 45 0 15 /* printf("\nTest End"); */I 2 45 0 15 / * printf ("\ nTest End"); * /

I 1 1 0 15I 1 1 0 15

I 27 1 0 15I 27 1 0 15

I 26 -1 0 16I 26 -1 0 16

S 00S 00

I 2 0 0 22I 2 0 0 22

I 7 4 1 1I 7 4 1 1

I 2 1 0 25 /* GetPatternData(ptn_Loc, csLoc); */I 2 1 0 25 / * GetPatternData (ptn_Loc, csLoc); * /

I 9 4 1 25I 9 4 1 25

I 1 2 0 25I 1 2 0 25

I 27 4 0 25I 27 4 0 25

I 30 0 0 25I 30 0 0 25

I 2 56 0 27 /* printf("\n Location = %s", csLoc); */I 2 56 0 27 / * printf ("\ n Location =% s", csLoc); * /

I 3 4 1 27I 3 4 1 27

I 1 2 0 27I 1 2 0 27

I 27 1 0 27I 27 1 0 27

I 1 0 0 29I 1 0 0 29

I 5 0 1 29I 5 0 1 29

I 26 26 0 29 /* DO FOR */I 26 26 0 29 / * DO FOR * /

I 26 0 0 29I 26 0 0 29

I 26 0 0 29I 26 0 0 29

I 26 26 0 29I 26 26 0 29

I 3 0 1 29I 3 0 1 29

I 1 20 0 29I 1 20 0 29

I 17 0 0 29I 17 0 0 29

I 25 23 0 29I 25 23 0 29

I 26 24 0 29I 26 24 0 29

L 25 31L 25 31

I 1 1 0 29I 1 1 0 29

I 38 19 0 29I 38 19 0 29

I 5 0 1 29I 5 0 1 29

/* 중략 *// * Omit * /

... ... ...... ... ...

... ... ...... ... ...

F ExeMmcCommand 0 -1 /* Default library에 대한 정보 */F ExeMmcCommand 0 -1 / * Information about the default library * /

F printf 0 -1F printf 0 -1

..........................

..........................

F IsMsgCompleted 0 -1F IsMsgCompleted 0 -1

F sleep 0 -1F sleep 0 -1

F M0501_PROC 1 9 /* M0501_PROC에 대한 프로시저 정보 */F M0501_PROC 1 9 / * Procedure information for M0501_PROC * /

S 1 168S 1 168

C 84 /* constsnt string에 대한 정보 */C 84 / * Information about constsnt strings * /

0:ptn_Loc_0:ptn_Port_0:ptn_Sts_DIS_IO_PORT;_0: ptn_Loc_0: ptn_Port_0: ptn_Sts_DIS_IO_PORT; _

Test End_Test End_

Location = %s_Location =% s_

%s_% s_

다음으로 에뮬레이터(130)는 상기와 같은 수행 코드 파일을 읽어 각 부분별로 정보를 저장하고, 수행코드(instruction)만을 처리하는 RunThread를 시작시킨 후, RunThread와 MMS(210)로부터의 시그널을 기다린다. 상기 RunThread로부터의 명령어 수행요구를 수신하면 명령어를 교환기내 프로세서(ATMP)에서 클라이언트로 신호를 전송하기 위한 시그널(BatchMsgToClientSig)에 실어 MMS(210)로 보내고, 이에 대한 응답이 오면 대기중인 RunThread를 활성화시켜 다음 작업을 진행할 수 있도록 한다. 또한 상기 MMS(210)로부터 출력 메시지가 도착하면 출력 메시지를 토큰(Token : 문자열 구분자에 의해 분리된 문자열 하나)으로 분리하고, 이 메시지의 PRN(Printout Reference Number)을 추출, 패턴 정보에 등록된 PRN인지 검사하여 등록된 PRN일 경우 패턴 정보에 기록된 추출정보를 이용하여 데이터를 추출하고 불려질 프로시저 ID를 패턴 정보에서 꺼내 대기중인 RunThread를 활성화시킨다. 상기 RunThread가 모든 수행코드를 수행하고, ThreadEnd signal을 보내면 각 부분별로 할당했던 메모리를 해제한 뒤 종료한다.Next, the emulator 130 reads the execution code file as described above, stores information for each part, starts the RunThread processing only the execution code, and waits for a signal from the RunThread and the MMS 210. When receiving a request to execute a command from the RunThread, the command is loaded into a signal (BatchMsgToClientSig) for transmitting a signal from an ATMP processor to a client and sent to the MMS 210. When a response is received, the waiting RunThread is activated. Allow you to do the following: When the output message arrives from the MMS 210, the output message is divided into tokens (Token: one string separated by a string delimiter), and a PRN (Printout Reference Number) of the message is extracted and the PRN registered in the pattern information. In the case of the registered PRN, the data is extracted using the extraction information recorded in the pattern information, and the procedure ID to be called is extracted from the pattern information to activate the waiting RunThread. When RunThread executes all execution codes and sends a ThreadEnd signal, it releases the memory allocated to each part and ends it.

도 2는 상기와 같은 에뮬레이터에서 자동 진단 과정을 보인 흐름도이다.2 is a flowchart illustrating an automatic diagnosis process in the emulator as described above.

이에 도시된 바와 같이, 단계 S101에서는 수행코드 파일을 읽어 패턴 정보, 수행코드, 프로시저 정보를 부분별로 저장하고, 단계 S102에서는 수행코드만을 처리하는 런쓰레드(RunThread) 루틴을 실행시킨다.As shown therein, in step S101, the execution code file is read to store pattern information, execution code, and procedure information for each part, and in step S102, a runthread routine for processing only the execution code is executed.

단계 S103에서는 런쓰레드와 MMS(210)로부터의 시그널을 기다린다.In step S103, a signal from the run thread and the MMS 210 is waited for.

아울러 단계 S104에서는 수신 시그널이 BatchMsgToClientSig인지를 판단하고, 그 결과 수신 시그널이 BatchMsgToClientSig이 아닐 경우에는 단계 S114에서 수신 시그널이 런쓰레드로부터의 명령어 수행 요구인지를 판단한다.In addition, in step S104, it is determined whether the received signal is BatchMsgToClientSig. As a result, if the received signal is not BatchMsgToClientSig, it is determined in step S114 whether the received signal is a command execution request from the run thread.

그 결과 수신 데이터가 명령 수행 요구일 경우에는 단계 S115에서 명령어를 BatchMsgToClientSig에 실어 상기 MMS(210)로 전송하고, 그에 대한 응답이 오면 대기중인 런쓰레드를 활성화시켜 다음 작업을 진행할 수 있도록 한다.As a result, if the received data is a command execution request, in step S115, the command is loaded on the BatchMsgToClientSig and transmitted to the MMS 210, and when a response is received, the waiting run thread is activated to proceed with the next task.

또한 상기 수신 시그널이 명령 수행 요구가 아닐 경우에는, 단계 S116에서 수신 시그널이 런쓰레드 종료 데이터인지를 확인하고, 그 결과 수신 시그널이 런쓰레드 종료 데이터일 경우에는 단계 S117에서 각 부분별로 할당했던 메모리를 해제한 뒤 종료한다.If the received signal is not a command execution request, it is checked in step S116 whether the received signal is run thread end data. As a result, if the received signal is run thread end data, the memory allocated to each part in step S117 is deleted. Release and exit.

한편, 상기 단계 S104의 확인 결과 수신 시그널이 BatchMsgToClientSig일 경우, 단계 S105에서는 수신 데이터가 명령어 검사 결과 데이터인지를 체크하고, 그 결과 수신 데이터가 명령 체크 결과일 경우에는 단계 S106에서 명령어 검사 결과에 대응하는 동작을 수행한다.On the other hand, if the received signal of the check result of step S104 is BatchMsgToClientSig, in step S105 it is checked whether the received data is the command check result data, and if the received data is the result of the command check result in step S106 corresponding to the command check result Perform the action.

이와는 달리 상기 수신 데이터가 명령어 검사 결과 데이터가 아닐 경우에는, 단계 S107에서 상기 수신 데이터가 메시지 출력 데이터인지를 판단한다. 그 결과 수신데이터가 메시지 출력 데이터일 경우에는 단계 S108에서 출력 메시지를 토큰(Token)별로 분류한 후 PRN(Printout Reference Number)을 추출한다.In contrast, when the received data is not the command check result data, it is determined in step S107 whether the received data is message output data. As a result, when the received data is message output data, in step S108, the output message is classified by token, and then a PRN (Printout Reference Number) is extracted.

그런 후 단계 S109에서는 상기 추출한 PRN이 패턴 정보 영역에 존재하는지를체크하고, 상기 체크결과 추출한 PRN이 패턴 정보 영역에 존재할 경우에는 단계 S110에서 패턴 정보에 기록된 추출정보를 이용하여 데이터를 추출한다.Thereafter, in step S109, it is checked whether the extracted PRN exists in the pattern information area. If the extracted PRN exists in the pattern information area, data is extracted using the extraction information recorded in the pattern information in step S110.

아울러 단계 S111에서는 상기 패턴 정보에 등록되어 있는 프로시저 ID를 추출하고, 대기중인 런쓰레드를 활성화시킨다.In addition, in step S111, a procedure ID registered in the pattern information is extracted, and a waiting run thread is activated.

만약, 상기 추출한 PRN이 패턴 정보 영역에 존재하지 않을 경우에는 단계 S112로 이동하여 메시지 출력 완료 여부를 체킹하고, 그 결과 메시지 출력이 완료된 경우에는 단계 S113에서 MMC 전송 카운트를 감소시키고, 상기 시그널 입력 대기 단계인 S103으로 이동하게 된다.If the extracted PRN does not exist in the pattern information area, go to step S112 to check whether the message output is completed. If the message output is completed, the MMC transmission count is decreased in step S113, and the signal input waits. The process moves to step S103.

한편, 시험자가 시험하고자 하는 내용들은 수행코드로 변환되어 수행코드화일내에 저장되었다가 에뮬레이터에 의해 InstTbl이라는 전역 변수에 할당된 후 RunThread에 의해 처리된다.On the other hand, the content to be tested by the tester is converted into execution code, stored in the execution code file, assigned to a global variable called InstTbl by the emulator, and processed by RunThread.

도 3은 상기 Runthread가 InstTbl에 들어 있는 수행코드 처리 과정을 보인 흐름도이다.3 is a flowchart illustrating an execution code processing process in which the Runthread is included in InstTbl.

이에 도시된 바와 같이, 단계 S201에서 수행코드 포인터 및 MMC 전송 카운터를 초기화시키고, 단계 S202에서는 수행코드 포인터(IP)가 0보다 작은지를 체크한다.As shown therein, the execution code pointer and the MMC transfer counter are initialized in step S201, and in step S202 it is checked whether the execution code pointer IP is less than zero.

그 결과 수행코드 포인터(IP)가 0보다 클 경우에는 단계 S203에서 MMC 전송 카운트값이 0보다 큰지를 확인한다. 상기 확인 결과 MMC 전송 카운트값이 0보다 작을 경우에는 단계 S204에서 에뮬레이터로 쓰레드 종료 메시지를 전송한다.As a result, when the execution code pointer IP is larger than zero, it is checked in step S203 whether the MMC transmission count value is larger than zero. If the MMC transmission count value is less than zero as a result of the check, the thread termination message is transmitted to the emulator in step S204.

이와는 달리 상기 MMC 전송 카운트가 0보다 클 경우에는 단계 S205에서 출력 메시지를 대기하고, 단계 S206에서 수행코드 포인터를 저장하고, 단계 S207에서 프로시저 ID를 통해 해당 프로시저를 탐색한다.On the contrary, if the MMC transmission count is greater than zero, the output message is awaited in step S205, the execution code pointer is stored in step S206, and the procedure is searched through the procedure ID in step S207.

그런 후 해당 프로시저가 탐색되거나 상기 단계 S202에서의 판단 결과 수행코드 포인터(IP)가 0보다 작을 경우에는 단계 S208에서 수행코드 포인터를 1증가시켜 다음 수행코드로 설정한다(Next IP).Then, if the procedure is searched or if the execution code pointer IP is less than 0 as a result of the determination in step S202, the execution code pointer is increased by 1 and set to the next execution code (Next IP).

그리고 단계 S209에서는 수행코드의 종류를 분석하고, 단계 S210에서는 상기 분석된 수행코드에 대응하는 쓰레드를 실행시켜 시험 루틴을 실행한다. 이후 수행코드에 대한 쓰레드가 종료되면, 단계 S211에서 수행코드 포인터를 다음 수행코드 포인터(Next IP)로 설정하고, 상기 단계 S202로 리턴한다.In step S209, the type of execution code is analyzed, and in step S210, a test routine is executed by executing a thread corresponding to the analyzed execution code. When the thread for the execution code ends, the execution code pointer is set to the next execution code pointer (Next IP) in step S211, and the process returns to step S202.

한편, 상기 수행코드의 종류를 분석한 후, 그 수행코드가 JSR(Jump Sub Routine)일 경우 도 4와 같은 과정을 통해 JSR(Jump Sub Routine)을 처리한다.On the other hand, after analyzing the type of the execution code, if the execution code is JSR (Jump Sub Routine) processes the JSR (Jump Sub Routine) through the process as shown in FIG.

이에 도시된 바와 같이, 단계 S301에서 수행코드가 MMC를 수행하기 위한 코드(ExeMmcCommand)인지를 체크한다. 상기 체크 결과 수행코드가 MMC를 수행하기 위한 코드(ExeMmcCommand)일 경우에는, 단계 S302에서 파리미터로 전달된 명령어 문자열을 에뮬레이터로 전송한다.As shown therein, in step S301, it is checked whether the execution code is a code (ExeMmcCommand) for performing MMC. When the check result execution code is a code for executing MMC (ExeMmcCommand), the command string transmitted to the parameter in step S302 is transmitted to the emulator.

그리고 단계 S303에서는 에뮬레이터가 활성화될 때까지 대기한다.In step S303, the device waits for the emulator to be activated.

이후 에뮬레이터가 명령어를 MMS(210)로 전송하고, 그 결과를 받아 런쓰레드를 활성화시키면, 단계 S304에서 전송한 명령어에 오류가 발생하였나를 체크한다. 그 결과 전송한 명령어에 오류가 발생하였으면 처음 단계로 리턴을 하고, 이와는 달리 전송한 명령어에 오류가 없으면, 단계 S305에서 명령어 전송 카운트를 1증가시키고, 단계 S306에서 출력 메시지가 수신되기를 기다린다.After the emulator sends a command to the MMS 210, and receives the result to activate the run thread, it is checked whether an error has occurred in the command sent in step S304. As a result, if an error occurs in the transmitted command, the process returns to the first step. Otherwise, if there is no error in the transmitted command, the command transmission count is increased by 1 in step S305, and the process waits for an output message to be received in step S306.

아울러 단계 S307에서 수신 메시지가 도착하면 수행코드 포인터를 저장하고,단계 S308에서 프로시저 ID를 통해 해당 프로시저를 탐색한다. 그런 후 프로시저가 탐색되면 수행코드를 처리하도록 한다.In addition, when the received message arrives in step S307, the execution code pointer is stored, and the procedure is searched through the procedure ID in step S308. Then, when the procedure is found, it processes the executable code.

즉, 에뮬레이터가 수신한 출력 메시지를 토큰별로 분류하고 패턴 데이터를 추출한 뒤 런쓰레드를 활성화시키면, 런쓰레드는 현재 진행중인 수행코드 포인터를 저장하고, 에뮬레이터가 넘겨준 프로시저 ID를 통해 프로시저의 수행코드 시작주소를 수행코드 포인터에 할당하여 프로시저의 수행코드가 처리될 수 있도록 한다. 또한 프로시저가 리턴되면 저장된 수행코드 포인터를 인출하여 프로시저로 점프하기 이전의 작업이 계속 진행될 수 있도록 한다.That is, if the emulator classifies the output message received by token, extracts the pattern data, and activates the run thread, the run thread stores the execution code pointer that is currently in progress and executes the procedure code through the procedure ID passed by the emulator. Assign the start address to the executable code pointer so that the executable code of the procedure can be processed. Also, when the procedure returns, the stored executable code pointer is fetched so that the work before the jump to the procedure can continue.

런쓰레드는 모든 수행코드가 처리되었더라도 도착할 출력 메시지가 있으면 종료하지 않고 대기하고 있다가 활성화되면 해당 메시지의 프로시저가 처리될 수 있도록 한다.The run thread waits without terminating if there is an output message to arrive even though all the execution code has been processed, and when activated, the procedure of the message can be processed.

한편, 단계 S301의 결과 수행코드가 MMC를 수행하기 위한 코드(ExeMmcCommand)가 아닐 경우에는 단계 S309에서 수행코드가 다른 디폴트 라이브러리(LIB)인지를 체크하고, 그 결과 수행코드가 다른 디폴트 라이브러리일 경우에는 단계 S310에서 디폴트 라이브러리를 저장한다. 이와는 달리 수행코드가 다른 디폴트 라이브러리도 아닐 경우에는 단계 S311에서 수행코드 포인터를 저장하고, 처음 단계로 리턴을 한다.On the other hand, if the result execution code of step S301 is not a code for executing MMC (ExeMmcCommand), it is checked in step S309 whether the execution code is another default library (LIB), and as a result, if the execution code is another default library, In step S310 the default library is stored. On the other hand, if the execution code is not another default library, the execution code pointer is stored in step S311, and the process returns to the first step.

상기 Runthread는 수행코드의 op-code에 부합하는 동작을 수행한다. 예를 들어, "nValue : = nValue + 10;"인 수행문이 있고, 이 문장이 다음과 같은 수행코드로 번역된다면 Runthread는 nValue의 변수 값에 10을 더해 그 값을 다시 nValue변수에 저장한다.The runthread performs an operation corresponding to the op-code of the execution code. For example, if you have a statement with "nValue: = nValue + 10;" and this statement is translated to the following code, Runthread adds 10 to the value of nValue and stores it back in nValue:

LDC 10 0 1 : 상수 10을 value stack에 pushLDC 10 0 1: push constant 10 to value stack

LDV 10 20 1 : 블록 ID가 10인 프로시저의 베이스 어드레스에서 오프셋(offset)이 20인 곳의 변수 값을 value stack에 push.LDV 10 20 1: Pushes the value of the variable where the offset is 20 from the base address of the procedure with block ID 10 to the value stack.

ADD 0 0 1 : value stack에서 두 번 pop을 하여 그 값을 더한 후 value stack에 다시 pushADD 0 0 1: Pop twice in value stack, add the value and push it back to value stack

STV 10 20 1 : value stack에서 pop하여 그 값을 블록 ID가 10인 프로시저의 베이스 어드레스에서 오프셋이 20인 곳에 저장.STV 10 20 1: Pop in the value stack and store the value at offset 20 at the base address of the procedure with block ID 10.

상기 Runthread는 수행코드를 처리하는 동안 op-code가 JSR(Jump Sub Routine)이고, 프로시저 ID를 의미하는 operand1이 ExeMmcCommand이면 파라미터로 전달된 명령어 문자열을 에뮬레이터(130)에게 전송하고, 에뮬레이터(130)가 활성화시킬 때까지 대기한다.The runthread transmits the command string passed as a parameter to the emulator 130 when the op-code is a JSR (Jump Sub Routine) while the execution code is processed, and operand1 representing the procedure ID is ExeMmcCommand, and the emulator 130 Wait until is activated.

에뮬레이터(130)가 명령어를 MMS(210)로 전송하고 그 결과를 받아 Runthread를 활성화시키면, Runthread는 전송한 명령어가 오류가 있었는지 확인하고 오류가 없었으면 출력 메시지가 올 때까지 대기한다.When the emulator 130 transmits a command to the MMS 210 and receives the result, and activates Runthread, Runthread checks whether the transmitted command has an error and waits for an output message if there is no error.

이후 에뮬레이터가 수신한 출력 메시지를 토큰별로 분류하고, 패턴 데이터를 추출한 뒤 Runthread를 활성화시키면, 상기 Runthread는 현재 진행중인 수행코드 포인터를 저장하고, 에뮬레이터가 넘겨준 프로시저 ID를 통해 프로시저의 수행코드 시작주소를 수행코드 포인터에 할당하여 프로시저의 수행코드가 처리될 수 있도록 하고, 프로시저가 리턴되면 저장된 수행코드 포인터를 꺼내 프로시저로 점프하기전의 작업이 계속 진행될 수 있도록 한다.After that, if the emulator classifies the output message by token, extracts the pattern data, and activates the runthread, the runthread stores the currently executing execution code pointer and starts the execution code of the procedure through the procedure ID passed by the emulator. By assigning an address to the execution code pointer, the procedure's execution code can be processed. When the procedure returns, the stored execution code pointer is retrieved so that the work before the jump to the procedure can continue.

상기 Runthread는 모든 수행코드가 처리되었더라도 도착할 출력 메시지가 있으면 종료하지 않고 대기하고 있다가 활성화되면 해당 메시지의 프로시저가 처리될 수 있도록 한다.The Runthread waits without terminating if there is an output message to arrive even though all execution codes have been processed, and when activated, the procedure of the message can be processed.

한편, TDL은 교환기의 기능 시험 절차(MMC 명령어를 입력하고 수행결과 메시지를 분석하여 그 결과에 따라 다음 단계의 테스트를 진행)를 프로그래밍할 수 있도록 고안된 언어로서 출력 메시지로부터 추출 대상을 선언하는 패턴부, 전역변수와 프로시저의 전형을 선언하는 글로벌(GLOBAL) 파트, MMC 명령어를 기술하는 MMC 파트, 수행문을 기술할 수 있는 EXECUTE부, 프로시저 선언부로 구성되어 있다.On the other hand, TDL is a language designed to program the functional test procedure of the exchange (entering MMC command and analyzing the result message and proceeding to the next test according to the result). It consists of a global part that declares global variables and procedures, an MMC part that describes MMC instructions, an EXECUTE section that describes an execution statement, and a procedure declaration section.

여기서 패턴 부분은 어떤 메시지에서 어느 부분을 데이터로 추출할 것인지, 추출 후 어느 프로시저를 호출해야 하는 지를 선언하는 부분으로 문법은 다음과 같다.Here, the pattern part declares which part of the message to extract as data and which procedure to call after extraction. The syntax is as follows.

<pattern_part> ::='PATTERN''{'<pattern_part> :: = 'PATTERN' '{'

<ptn_type_dcl><ptn_type_dcl>

<ptn_prn_dcl><ptn_prn_dcl>

[<ptn_procedure_dcl>][<ptn_procedure_dcl>]

{<ptn_field_dcl>}{<ptn_field_dcl>}

[<ptn_fieldln_dcl>][<ptn_fieldln_dcl>]

'}''}'

<ptn_type_dcl><ptn_type_dcl>

::='TYPE'':='(['FIELD']{'FIELD']{',''FIELDLN'}│'NONE')',':: = 'TYPE' ': =' (['FIELD'] {'FIELD'] {',' 'FIELDLN'} │'NONE ')', '

<ptn_prn_dcl> ::='PRN'':=' <prn>{','<prn>}','<ptn_prn_dcl> :: = 'PRN' ': =' <prn> {',' <prn>} ','

<ptn_procedure_dcl> ::='PROCEDURE' ':='<ident>','<ptn_procedure_dcl> :: = 'PROCEDURE' ': =' <ident> ','

<ptn_field_dcl> ::='FIELD' ':=' (<string>│<ident>)<ptn_field_dcl> :: = 'FIELD' ': =' (<string> │ <ident>)

{',' (<string>│<ident>) }','{',' (<string> │ <ident>)} ','

<ptn_fieldln_dcl> ::='FIELDLN' ':=' '('<string>',<ident>')'<ptn_fieldln_dcl> :: = 'FIELDLN' ': =' '(' <string> ', <ident>') '

{',' '('<string> ',' <ident>')'} ','{',' '(' <string> ',' <ident> ')'} ','

<prn> ::=('A'│'F'│'S'│'M'│'P')<digit><digit><digit><digit><prn> :: = ('A'│'F'│'S'│'M'│'P') <digit> <digit> <digit> <digit>

아울러 타입(TYPE)은, 추출 데이터들의 패턴 형태를 선언하는 부분으로, "FIELD", "FIELDLN", "NONE"을 선언할 수 있다. "FIELD"가 선언되어 있을 경우 이후에 FIELD Part가 나타날 수 있으며, "FIELDLN"이 선언되어 있을 경우 이후에 FIELDLN Part가 나타날 수 있다. "NONE"은 패턴에 의한 데이터 추출을 하지 않는다는 것을 의미한다. 다음은 선언 예 이다.In addition, the type TYPE is a part of declaring a pattern form of extracted data, and may declare “FIELD”, “FIELDLN”, or “NONE”. If "FIELD" is declared, FIELD Part may appear later. If "FIELDLN" is declared, FIELDLN Part may appear later. "NONE" means no data extraction by pattern. The following is an example declaration.

- TYPE := FIELD;TYPE: = FIELD;

- TYPE := FIELD, FIELDLN;TYPE: = FIELD, FIELDLN;

- TYPE := FIELD, FIELDLN, FIELDLN;TYPE: = FIELD, FIELDLN, FIELDLN;

- TYPE := NONE;TYPE: = NONE;

또한 PRN은 추출될 메시지의 출력(Print-out) 기준 넘버를 선언하는 부분이며, 선언 예는 다음과 같다.In addition, PRN is a part that declares the print-out reference number of the message to be extracted.

- PRN := M0100;PRN: = M0100;

- PRN := M0351, M0352;PRN: = M0351, M0352;

- PRN := P0001;PRN: = P0001;

또한, 프로시저는 해당 메시지(PRN에 선언)가 출력된 후 불리워질 프로시저를 선언하는 부분으로서, 다음과 같다.In addition, a procedure is a part of declaring a procedure to be called after a corresponding message (declared in the PRN) is output.

PATTERN{PATTERN {

..............

PROCEDURE := M0353_PROC;PROCEDURE: = M0353_PROC;

}}

..........

M0353_PROC : PROC()M0353_PROC: PROC ()

/* M0353 메시지에 대한 처리를 기술한다 *// * Describe the handling of message M0353 * /

END;END;

또한, 필드는 출력 메시지의 각 라인에서 특정 문자열들의 일부를 데이터로 추출하기 위해 선언하는 부분이다. 출력 메시지의 각 라인 중에 "RESULT = OK"에서 "OK"를 데이터로 추출하기 위해 필드를 선언한 예는 다음과 같다.(ptn_Result의 값은 GetPatternData()library를 이용하여 인출할 수 있다).Also, the field is the part that declares to extract some of the specific strings as data in each line of the output message. An example of declaring a field to extract "OK" from "RESULT = OK" as data in each line of the output message is as follows. (The value of ptn_Result can be retrieved using GetPatternData () library).

- FIELD := "RESULT", "=", ptn_Result;FIELD: = "RESULT", "=", ptn_Result;

또한 FIELDLN은 메시지를 컬럼(Column)단위로 나누었을 때 특정 문자열의 위치와 동일한 곳을 데이터로 추출하기 위해 패턴을 선언하는 부분이다.In addition, FIELDLN is a part that declares a pattern in order to extract data as the location of a specific string when dividing a message into columns.

다음은 밑줄친 부분을 데이터로 추출하기 위해 FIELDLN Part를 기술한 예이다.The following is an example of describing the FIELDLN Part to extract the underlined part as data.

MOKDONG_SSP 1999-03-04 14:34:37 THU ON rshMOKDONG_SSP 1999-03-04 14:34:37 THU ON rsh

M6610 DISPLAY SWITCH NETWORK LINKM6610 DISPLAY SWITCH NETWORK LINK

ASSHWY CLIA-ACLIA-BTSW-A TSW-B LLIA-A LLIA-B ASS HWY CLIA-A CLIA-B TSW-A TSW-B LLIA-A LLIA-B

ASP0000 STD-BYACTIVEACTIVE STD-BY STD-BY ACTIVE ASP00 00 STD-BY ACTIVE ACTIVE STD-BY STD-BY ACTIVE

ASP0101 STD-BYACTIVESTD-BY ACTIVE STD-BY ACTIVE ASP01 01 STD-BY ACTIVE STD-BY ACTIVE STD-BY ACTIVE

ASP0202 STD-BYACTIVESTD-BY ACTIVE STD-BY ACTIVE ASP02 02 STD-BY ACTIVE STD-BY ACTIVE STD-BY ACTIVE

ASP0303 ACTIVESTD-BYACTIVE STD-BY ACTIVE STD-BY ASP03 03 ACTIVE STD-BY ACTIVE STD-BY ACTIVE STD-BY

ASP0404 STD-BYACTIVE****** ****** ****** ****** ASP04 04 STD-BY ACTIVE ****** ****** ****** ******

ASP0505 STD-BYACTIVE****** ****** ****** ****** ASP05 05 STD-BY ACTIVE ****** ****** ****** ******

ASP0606 STD-BYACTIVE****** ****** ****** ****** ASP06 06 STD-BY ACTIVE ****** ****** ****** ******

COMPLETEDCOMPLETED

- FIELDLN :=("ASS", ptn_AssNum),("CLIA-B", ptn_C:iaB);FIELDLN: = ("ASS", ptn_AssNum), ("CLIA-B", ptn_C: iaB);

이렇게 FIELDLN 파트를 기술했을 경우 "ASS"와 동일한 위치의 데이터는 ptn_AssNu에, "CLIA-B"와 동일한 위치의 데이터는 ptn_CliaB에 저장된다. "ASS", "CLIA-B"와 같이 데이터 추출의 기준점이 되는 문자열들이 여러 라인에 걸쳐 출력되면 라인 수만큼 타입 파트에 FIELDLN이 선언되어야 한다. 다음은 그 예이다.When the FIELDLN part is described in this way, data at the same position as "ASS" is stored in ptn_AssNu, and data at the same position as "CLIA-B" is stored in ptn_CliaB. If strings that are the reference point of data extraction such as "ASS" and "CLIA-B" are output over several lines, FIELDLN should be declared in the type part as many lines as the number of lines. Here is an example:

MOKDONG_SSP 1999-03-04 14:34:37 THU ON rshMOKDONG_SSP 1999-03-04 14:34:37 THU ON rsh

Mxxxx FIELDLN SAMPLE DATAMxxxx FIELDLN SAMPLE DATA

Field_A Field_B Field_C Field_DField_A Field_B Field_C Field_D

Field_E Field_FField_E Field_F

Data_A1 Data_B1 Data_C1 Data_D1Data_A1 Data_B1 Data_C1 Data_D1

Data_E1 Data_F1Data_E1 Data_F1

Data_A2 Data_B2 Data_C2 Data_D2Data_A2 Data_B2 Data_C2 Data_D2

Data_E2 Data_F2Data_E2 Data_F2

COMPLETEDCOMPLETED

- TYPE := FIELDLN, FIELDLN;TYPE: = FIELDLN, FIELDLN;

- FIELDLN := ("Field_A", ptn_FieldA),("Field_F",ptn_FieldF);FIELDLN: = ("Field_A", ptn_FieldA), ("Field_F", ptn_FieldF);

"Field_A", "Field_F"가 2라인에 걸쳐 출력되었기 때문에 타입에 FIELDLN이 2번 나온 것을 볼 수 있다.Since "Field_A" and "Field_F" were printed over two lines, you can see that FIELDLN appears twice in the type.

다음으로 문자열 구분자('', '\t', '\n', '=', '/')에 대해서 살펴보면, 출력 메시지는 문자열 구분자들에 의해 문자열들로 나뉘어 지고, 그 문자열들이 어떤 패턴과 일치되는지 분석된 후 데이터 저장 여부가 결정된다. 다음은 출력 내용별로 문자열들을 나열한 것이다.Next, looking at the string delimiters ('', '\t', '\n', '=', '/'), the output message is divided into strings by the string delimiters, and the strings After the match is analyzed, it is determined whether to save the data. The following is a list of strings by output.

- "RESULT=OK"-"RESULT = OK"

==> 문자열 : "RESULT","=","OK"==> string: "RESULT", "=", "OK"

- "LOCATION=ASP00/SIDE=A"-"LOCATION = ASP00 / SIDE = A"

==> 문자열 : "LOCATION", "=", "ASP00", "/", "SIDE", "=", "A"==> String: "LOCATION", "=", "ASP00", "/", "SIDE", "=", "A"

- "RSLT=ASP00(SIDE:A)"-"RSLT = ASP00 (SIDE: A)"

==> 문자열 : "RSLT", "=", "ASP00(SIDE:A)"==> String: "RSLT", "=", "ASP00 (SIDE: A)"

또한 GLOBAL 파트는 전역 상수, 전역 변수 및 프로시저의 Proto-type을 선언하는 부분으로서, 문법은 다음과 같다.In addition, the GLOBAL part declares the prototype of global constants, global variables, and procedures. The syntax is as follows:

<global_part> ::= 'GLOBAL' '{'<global_part> :: = 'GLOBAL' '{'

{(<syn_dcl>│<var_dcl>│<procedure_def>)}{(<syn_dcl> │ <var_dcl> │ <procedure_def>)}

'}''}'

<syn_dcl> ::='SYN'<ident>':="<arithmetic_expression>';'<syn_dcl> :: = 'SYN' <ident> ': = "<arithmetic_expression>'; '

<var_dcl> ::='DCL'<ident>{','<ident>}<var_type>[<array_dcl>]','<var_dcl> :: = 'DCL' <ident> {',' <ident>} <var_type> [<array_dcl>] ','

<var_type> ::='INT'│'STRING'<var_type> :: = 'INT'│'STRING'

<array_dcl> ::='ARRAY'{'['<arithmetic_expression>']'}1<array_dcl> :: = 'ARRAY' {'[' <arithmetic_expression> ']'} 1

<procedure_def><procedure_def>

::=<ident>',''PROC''('[<parameter_lists_def>]')'['('<var_type>')']',':: = <ident> ', `` PROC' '(' [<parameter_lists_def>] ')' ['(' <var_type> ')'] ','

<parameter_lists_def>::=<parameter_list> {','<parameter_list>}<parameter_lists_def> :: = <parameter_list> {',' <parameter_list>}

<parameter_list> ::=[<ident>{','<ident>}]<var_type>['LOC']<parameter_list> :: = [<ident> {',' <ident>}] <var_type> ['LOC']

여기서 SYN은 상수형 변수를 선언하는 부분이며 변수에 대입할 수 있는 값들은 정수, 문자열, 상수형 변수, 수식이다(수식에는 상수형 변수를 포함할 수 있다)Here, SYN is a part of declaring a constant variable, and the values that can be assigned to the variable are integers, strings, constant variables, and expressions (the formula may include constant variables).

- SYNg_cnMaxAsp:=32;SYNg_cnMaxAsp: = 32;

- SYNg_cnMaxCmd:=100;SYNg_cnMaxCmd: = 100;

- SYNg_csDisIoPortCmd:="DIS-IO-PORT;";SYNg_csDisIoPortCmd: = "DIS-IO-PORT;";

- SYNg_cnMaxLoopCnt:=g_cnMaxAsp/16;SYNg_cnMaxLoopCnt: = g_cnMaxAsp / 16;

DCL은 변수를 선언하는 부분으로 변수에 integer 혹은 string type으로 선언될 수 있으며 최대 5차원까지의 어레이(array)로도 선언할 수 있다.DCL is a part that declares a variable. It can be declared as an integer or string type and can also be declared as an array of up to 5 dimensions.

* integer type : -214783648 ~ 2147483647 구간의 정수 값* integer type: Integer value between -214783648 and 2147483647

* string type : double quote(")로 둘러싸인 문자열 예) "word", "124",* string type: string surrounded by double quote (") ex)" word "," 124 ",

* Array의 인덱스는 0부터 array size-1까지이다.* The index of the array is from 0 to array size-1.

DCLg_nStartAspNo,g_nEndAspNo INT ;DCLg_nStartAspNo, g_nEndAspNo INT;

DCLg_sCmdName STRING ARRAY[g_cnMaxAsp][g_cnMaxCmd];DCLg_sCmdName STRING ARRAY [g_cnMaxAsp] [g_cnMaxCmd];

그리고 프로그래머가 구현한 프로시저는 GLOBAL 부분에 파라미터 타입 및 리턴 타입을 GLOBAL 부분에 명시해야만 한다. 이때 파라미터의 이름은 생략 가능하며 리턴 값이 없을 경우 리턴 타입 역시 생략할 수 있다.Programmer-implemented procedures must specify parameter types and return types in the GLOBAL section. At this time, the name of the parameter can be omitted. If there is no return value, the return type can also be omitted.

-AddString : PROC(first STRING, second STRING)(STRING);AddString: PROC (first STRING, second STRING) (STRING);

-AddString : PROC(first, second STRING)(STRING);AddString: PROC (first, second STRING) (STRING);

-AddString : PROC(STRING, STRING)(STRING);AddString: PROC (STRING, STRING) (STRING);

위의 문장들은 AddString 프로시저가 2개의 스트링 타입 파라미터를 받아서 스트링 타입의 값을 변환하는 프로시저임을 정의하는 동일한 문장이다.The above statements are the same statement that defines that the AddString procedure takes two string type parameters and converts a string type value.

또한, MMC Part는 수행 하고자 하는 MMC 명령어를 직접 기술하는 부분이다.Also, MMC Part is a part that directly describes the MMC instruction to be executed.

PATTERN{PATTERN {

..........

}}

GLOBAL{GLOBAL {

..........

}}

DIS_IO_PORT; /*MMC part*/DIS_IO_PORT; / * MMC part * /

DIS_PRCS_STS:HMP; /*MMCpart*/DIS_PRCS_STS: HMP; / * MMCpart * /

또한, Execution Part는 수행문을 기술할 수 있는 부분으로, 문법은 다음과 같다.In addition, Execution Part is a part that can describe Execution statement. The syntax is as follows.

<exec_part>::='EXXCUTE''{'<exec_part> :: = 'EXXCUTE' '{'

{<statements>}{<statements>}

다음은 예이다.Here is an example:

PATTERN{PATTERN {

..........

}}

GLOBAL{GLOBAL {

..........

}}

(1) EXECUTE {(1) EXECUTE {

g_nStartAspNo:=0;g_nStartAspNo: = 0;

(2) DIS-IO-PORT;(2) DIS-IO-PORT;

(3) DIS-PRCS-STS:HMP;(3) DIS-PRCS-STS: HMP;

(4) EXECUTE {(4) EXECUTE {

g_sCmdName[0][0]:="DIS_SN_STS:"+g_nStartAspNo;g_sCmdName [0] [0]: = "DIS_SN_STS:" + g_nStartAspNo;

g_sCmdName[0][1]:=","+g_nEndAspNo+",";g_sCmdName [0] [1]: = "," + g_nEndAspNo + ",";

}}

(4) 순으로 수행된다.(4) in order.

또한, Procedure Declaration Part는 프로시저를 선언하는 부분으로서, 문법은 다음과 같다.Also, the Procedure Declaration Part declares a procedure. The syntax is as follows:

<procedure_dcl> ::= <ident><procedure_dcl> :: = <ident>

':''PROC''('[<parameter_lists_dcl>]')'['(<var_type>')']':' 'PROC' '(' [<parameter_lists_dcl>] ')' ['(<var_type>') ']

{(<syn_dcl>│<var_dcl>)}{(<syn_dcl> │ <var_dcl>)}

{<statements>}{<statements>}

'END'[<ident>]';''END' [<ident>] ';'

<parameter_lists_dcl> ::=<parameter_list_dcl> {','<parameter_list_dcl>}<parameter_lists_dcl> :: = <parameter_list_dcl> {',' <parameter_list_dcl>}

<parameter_list_dcl> ::=<ident>{','<ident>} <var_type> ['LOC']<parameter_list_dcl> :: = <ident> {',' <ident>} <var_type> ['LOC']

예)Yes)

AddStrmstring:PROC(first STRING, second STRING)(STRING)AddStrmstring: PROC (first STRING, second STRING) (STRING)

DCL sRetValueSTRING;DCL sRetValueSTRING;

sRetValue :=first+second;sRetValue: = first + second;

RETURN(sRetValue);RETURN (sRetValue);

END AddStringEND AddString

프로시저의 파라미터 전달 방법으로 call by value와 call by reference를 사용할 수 있는 데, 파라미터 타입 뒤에 "LOC"를 선언할 경우 call by reference, 파라미터 타입만 존재할 경우 call by value를 의미한다.Call by value and call by reference can be used as the parameter passing method of the procedure. When "LOC" is declared after the parameter type, it means call by reference and if there is only a parameter type, call by value.

* Call by value일 경우 실제 파라미터(actual parameter)의 값이 형식 파라미터(formal parameter)로 복사되므로 형식 파라미터가 변경되더라도 실제 파라미터는 변경되지 않는다.* In case of Call by value, since the value of the actual parameter is copied to the formal parameter, the actual parameter does not change even if the formal parameter is changed.

EXECUTE{EXECUTE {

g_nFirst:=10;g_nFirst: = 10;

g_nSecond:=20;g_nSecond: = 20;

SomeFunc(g_nFirst,g_nSecond);Some Func (g_nFirst, g_nSecond);

printf("\n g_nFirst=%d,g_nSecond=%d",g_nFirst,g_nSecond);printf ("'n g_nFirst =% d, g_nSecond =% d", g_nFirst, g_nSecond);

}}

SomeFunc:PROC(nFirst,nSecond INT)SomeFunc: PROC (nFirst, nSecond INT)

nFirst:=30;nFirst: = 30;

nSecond:=40;nSecond: = 40;

printf("\n nFirst=%d,nSecond=%d',nFirst,nSecond);printf ("'n nFirst =% d, nSecond =% d', nFirst, nSecond);

END;END;

위의 수행결과는 다음과 같다.The above execution result is as follows.

nFirst=30, nSecond=40nFirst = 30, nSecond = 40

g_nFirst=10, g_nSecond=20g_nFirst = 10, g_nSecond = 20

* 기준호(Call by reference)일 경우 형식 파라미터는 실제 파라미터의 또 다른 이름으로써 형식 파라미터가 변경되면 실제 파라미터도 변경된다.* In the case of a call by reference, the formal parameter is another name of the actual parameter.

EXECUTE{EXECUTE {

g_nFirst:=10;g_nFirst: = 10;

g_nSecond:=20;g_nSecond: = 20;

SomeFunc(g_nFirst,g_nSecond);Some Func (g_nFirst, g_nSecond);

printf("\n g_nFirst=%d, g_nSecond=%d", g_nFirst, g_nSecond);printf ("'n g_nFirst =% d, g_nSecond =% d", g_nFirst, g_nSecond);

}}

SomeFunc:PROC(nFirst, nSecond INT Loc)SomeFunc: PROC (nFirst, nSecond INT Loc)

nFirst:=30;nFirst: = 30;

nSecond :=40;nSecond: = 40;

printf("\n nFirst=%d, nSecond=%d", nFirst, nSecond);printf ("'n nFirst =% d, nSecond =% d", nFirst, nSecond);

END;END;

위의 수행결과는 다음과 같다.The above execution result is as follows.

nFirst=30, nSecond=40nFirst = 30, nSecond = 40

g_nFirst=30, g_nSecond=40g_nFirst = 30, g_nSecond = 40

다음으로 statement는 TDL에서 사용할 수 있는 수행문을 나타내며, 문법은 다음과 같다.Next, statement represents the execution statement that can be used in TDL. The syntax is as follows.

<statements> ::={<statement>}<statements> :: = {<statement>}

<statement><statement>

::=<assignment_st>│<call_st>│<loop_st>│<if_st>│<control_st>│<null_st>:: = <assignment_st> │ <call_st> │ <loop_st> │ <if_st> │ <control_st> │ <null_st>

<assignment_st><assignment_st>

::=<ident>{'['<expression>']'}<assign_operator><expression>';':: = <ident> {'[' <expression> ']'} <assign_operator> <expression> ';'

<assign_operator> ::=[('+'│'-'│'*'│'/'│'%')]':='<assign_operator> :: = [('+' │ '-' │ '*' │ '/' │ '%')] ': ='

<call_st> ::=<ident>'('[<actual_para_lists>]')' ';'<call_st> :: = <ident> '(' [<actual_para_lists>] ')' ';'

<loop_st> ::=<do_for_loop>│<do_while_loop><loop_st> :: = <do_for_loop> │ <do_while_loop>

<if_st> ::='IF'<expression>'THEN'<statements><if_st> :: = 'IF' <expression> 'THEN' <statements>

{'ELSIF'<statements>}{'ELSIF' <statements>}

{'ELSE'<statements>}{'ELSE' <statements>}

'FI' ';''FI' ';'

<control_st> ::=('BREAK'│'continue'│'RETURN'│'STOP')';'<control_st> :: = ('BREAK'│'continue'│'RETURN'│'STOP') ';'

<null_st> ::= ';'<null_st> :: = ';'

<actual_para_lists> ::=<expression>{','<expression>}<actual_para_lists> :: = <expression> {',' <expression>}

<do_for_loop><do_for_loop>

::='DO''FOR''('[<do_for_init>','[<expression>]','[<do_for_last>]')'<statements>:: = 'DO''FOR' '(' [<do_for_init> ',' [<expression>] ',' [<do_for_last>] ')' <statements>

'OD' ';''OD' ';'

<do_while_loop> ::='DO' 'WHILE' '('<expression>')' <statements><do_while_loop> :: = 'DO' 'WHILE' '(' <expression> ')' <statements>

'OD''OD'

<do_for_init> ::= <assignment_st>{','<assignment_st>}<do_for_init> :: = <assignment_st> {',' <assignment_st>}

<do_for_last> ::=<assignment_st>{','<assignment_st>}<do_for_last> :: = <assignment_st> {',' <assignment_st>}

<expression> ::=<algebra_exp><expression> :: = <algebra_exp>

<algebra_exp> ::=<relational_exp>('OR'│'AND')<relational_exp>│<algebra_exp> :: = <relational_exp> ('OR'│'AND') <relational_exp> │

'NOT'<relational_exp>│'NOT' <relational_exp> │

<relational_exp><relational_exp>

<relational_exp> ::=<arithmetic_exp>('>'│'>='│'<'│'<='│'='│'/=')<relational_exp> :: = <arithmetic_exp> ('>' │ '> =' │ '<' │ '<=' │ '=' │ '/ =')

<arithmetic_exp>│<airthmetic_exp><arithmetic_exp> │ <airthmetic_exp>

<arithmetic_exp> ::= <value>('+'│'-'│'*'│'/'│'%')<value>│'-'<value>│<arithmetic_exp> :: = <value> ('+' │ '-' │ '*' │ '/' │ '%') <value> │ '-' <value> │

<value><value>

<value> ::= <ident>{'['<expression>']'}│<value> :: = <ident> {'[' <expression> ']'} │

<digits>│<digits> │

<string>│<string> │

<call_st>│<call_st> │

'('<expression>')''(' <expression> ')'

여기서 Assignment 수행문은 변수에 값을 할당하는 것을 나타내며, 그 예는 다음과 같다.In this case, the Assignment statement indicates the assignment of a value to a variable.

- g_nStartAspNo:=10;g_nStartAspNo: = 10;

- g_sCmdName[0][1] := "DIS-SN-STS:1,10;"g_sCmdName [0] [1]: = "DIS-SN-STS: 1,10;"

- g_sCmdName[0][2] := AddString';'g_sCmdName [0] [2]: = AddString ';'

- g_nStartAspNo+:= 10; ==> g_nStartAspNo := g_nStartAspNo+10;g_nStartAspNo +: = 10; ==> g_nStartAspNo: = g_nStartAspNo + 10;

- g_nEndAspNo%:=5; ==> g_nEndAspNo:= g_nEndAspNo%5;g_nEndAspNo%: = 5; ==> g_nEndAspNo: = g_nEndAspNo% 5;

Call 수행문은 프로시저를 호출하는 것을 나타내며, 그 예는 다음과 같다.The Call statement indicates that the procedure is called. For example:

- AddString(g_sCmdName[0][0], g_sCmdName[0][1]);AddString (g_sCmdName [0] [0], g_sCmdName [0] [1]);

- GetPatternData(ptn_AspNum, g_sCmdName[0][3]);GetPatternData (ptn_AspNum, g_sCmdName [0] [3]);

Loop 수행문은 주어진 구간을 반복하는 수행문으로 DO-FOR loop와 DO-WHILE loop가 있다.Loop statement is a statement that repeats a given section. There are DO-FOR loop and DO-WHILE loop.

DO-FOR Loop는 Loop에 들어가기 전에 초기화 과정을 처리하고 주어진 조건이 사실일 동안 Loop Body와 Last Action 부분을 반복한다.The DO-FOR Loop processes the initialization process before entering the loop and repeats the loop body and the last action while the given condition is true.

nTotal:=0;nTotal: = 0;

DO FOR((1)nIndx:=1; (2)nIndx<=10; (4)nIndx+:=1)DO FOR ((1) nIndx: = 1; (2) nIndx <= 10; (4) nIndx +: = 1)

(3)nTotal+:=nIndx;(3) n Total +: = n Indx;

OD:OD:

printf("\n Total=%d",nTotal);printf ("\ n Total =% d", nTotal);

(2) ....이다.(2) ....

DO-WHILE loop는 주어진 조건이 진실일 경우 Loop body를 반복한다.The DO-WHILE loop repeats the loop body if the given condition is true.

nTotal:=0;nTotal: = 0;

nIndx :=1;nIndx: = 1;

DO WHILE ((1) nIndx <=10)DO WHILE ((1) nIndx <= 10)

(2) nTotal +:=nIndx;(2) n Total +: = n Indx;

(3) nIndx +:=1;(3) n Indx +: = 1;

OD;OD;

printf("\n Total = %d", nTotal);printf ("\ n Total =% d", nTotal);

(3) .....이다.(3) .....

또한 IF 수행문은 조건에 따라 처리내용을 달리 하기 위한 수행문이다.Also, IF statement is a statement to change the processing contents according to conditions.

nEvenTotal := 0;nEvenTotal: = 0;

nOddTotal := 0;nOddTotal: = 0;

DO FOR(nIndx :=1; nIndx<= 10; nIndx +:=1)DO FOR (nIndx: = 1; nIndx <= 10; nIndx +: = 1)

IF (1) nIndx %2 = 0 THENIF (1) nIndx% 2 = 0 THEN

(2) nEvenTotal +:=nIndx;(2) nEvenTotal +: = nIndx;

ELSEELSE

(3) nOddTotal +:=nIndx;(3) nOddTotal +: = nIndx;

FI;FI;

OD;OD;

printf("\n Even Total=%d, Odd Total=%d", nEvenTotal, nOddTotal);printf ("\n Even Total =% d, Odd Total =% d", nEvenTotal, nOddTotal);

위의 예는 1부터 10까지 숫자에서 짝수, 홀수별로 합계를 구하는 코드로 nIndx를 2로 나눈 나머지가 0이면 (2)문장을 수행하고, 그렇지 않으면 (3)문장을 수행한다.The above example is a code that calculates the sum of even and odd numbers from 1 to 10. If nIndx is divided by 2 and the remainder is 0, it executes (2), otherwise it executes (3).

IF nSum < 50 THENIF nSum <50 THEN

sGrade := "F";sGrade: = "F";

ELSIF nSum < 60 THEN/*50 <= nSum < 60*/ELSIF nSum <60 THEN / * 50 <= nSum <60 * /

sGrade := "E";sGrade: = "E";

ELSIF nSum < 70 THEN/*60 <= nSum < 70*/ELSIF nSum <70 THEN / * 60 <= nSum <70 * /

sGrade := "D";sGrade: = "D";

ELSIF nSum < 80 THEN/*70 <= nSum < 80*/ELSIF nSum <80 THEN / * 70 <= nSum <80 * /

sGrade := "C";sGrade: = "C";

ELSIF nSum < 90 THEN/*80 <= nSum < 90*/ELSIF nSum <90 THEN / * 80 <= nSum <90 * /

sGrade := "B";sGrade: = "B";

ELSIF /*nSum >= 90*/ELSIF / * nSum> = 90 * /

sGrade := "A";sGrade: = "A";

FI;FI;

위의 예는 nSum의 값에 따라 sGrade를 구하는 코드이다.The above example is the code to get sGrade according to the value of nSum.

다음으로 Control 수행문은 루프내에서 루프 외부 혹은 루프의 마지막 수행 부분으로 제어를 옮기거나 프로시저내에서 프로시저를 호출한 곳으로 제어를 옮기는 등 수행 위치를 제어하는 문장이다.Next, the Control statement is used to control the execution position, such as moving control within the loop to the last execution of the loop, or moving control to where the procedure was called from within the procedure.

"BREAK"는 루프내에서 루프외부로 제어를 옮기는 제어문이다."BREAK" is a control statement that transfers control out of a loop.

DO FOR(nIndx := 1; nIndx<=100; nIndx +:=1)DO FOR (nIndx: = 1; nIndx <= 100; nIndx +: = 1)

nTotal +:=nIndx;nTotal +: = n Indx;

IF nTotal > 100 THENIF nTotal> 100 THEN

BREAK; /*nTotal이 100보다 크면 루프를 벗어난다.*/BREAK; / * If nTotal is greater than 100, we leave the loop

FI;FI;

OD;OD;

DO FOR(i:=0; i<10; i+:=1)DO FOR (i: = 0; i <10; i +: = 1)

DO FOR(j:=0; j<10; j+:=1)DO FOR (j: = 0; j <10; j +: = 1)

IF g_nInformTb[i][j] < 0 THENIF g_nInformTb [i] [j] <0 THEN

BREAK; /* g_nInformTb1[i][j]가 0보다 작으면 제어를 아래의 #지점으로 옮긴다.*/BREAK; / * If g_nInformTb1 [i] [j] is less than 0, transfer control to point # below. * /

FI;FI;

OD;OD;

# printf("\n j=%d",j);# printf ("\ n j =% d", j);

IF j<10 THENIF j <10 THEN

BREAK; /*j가 10보다 작으면 제어를 @지점으로 옮긴다.*/BREAK; / * If j is less than 10, transfer control to point @ * /

FI;FI;

OD;OD;

@ printf("\n i=%d", i);@ printf ("\ n i =% d", i);

"CONTINUE"는 루프의 마지막 수행 부분으로 제어를 옮기는 수행문으로 DO-FOR 루프일 경우 라스트 액션 파트로, DO-WHILE일 경우 컨디션 파트로 제어를 옮긴다."CONTINUE" is a statement that transfers control to the last part of the loop, and transfers control to the last action part in the case of a DO-FOR loop and to the condition part in the case of DO-WHILE.

DO FOR(i:=0; i<100; #i+;=1)DO FOR (i: = 0; i <100; #i +; = 1)

IF i %2 = 0 THENIF i% 2 = 0 THEN

CONTINUE; /*i를 2로 나눈 나머지가 0일 경우 제어를 #으로 옮긴다. */CONTINUE; / * i divided by 2 transfers control to # when the remainder is zero. * /

FI;FI;

nTotal +:=i;nTotal +: = i;

OD;OD;

i:=0;i: = 0;

DO WHILE(@ i<100)DO WHILE (@ i <100)

IF i %2 = 0 THENIF i% 2 = 0 THEN

i+:=1;i +: = 1;

CONTINUE; /*i를 2로 나눈 나머지가 0일 경우 제어를 #으로 옮긴다.*/CONTINUE; / * Transfer the control to # if i divided by 2 and the remainder is 0. * /

FI;FI;

nTotal +:=i;nTotal +: = i;

i+:=2;i +: = 2;

OD;OD;

"RETURN"은 프로시저내에서 프로시저를 호출한 곳으로 제어를 옮긴다."RETURN" transfers control to where the procedure was called from within the procedure.

EXECUTE{EXECUTE {

g_nTotal1:=SumFunc(50);g_nTotal1: = SumFunc (50);

g_nTotal2:=SumFunc(200); /*g_nTotal2는 -1을 갖게 된다*/g_nTotal2: = SumFunc (200); / * g_nTotal2 will have -1 * /

}}

SomeFunc:PROC(nMax INT)(INT)SomeFunc: PROC (nMax INT) (INT)

DCL indx INT;DCL indx INT;

DCL nTotal INT;DCL nTotal INT;

IF nMax>=100 THENIF nMax> = 100 THEN

RETURN-1;RETURN-1;

FI;FI;

nTotal :=0;nTotal: = 0;

DO FOR(indx:=0;indx<nMax;indx+:=1)DO FOR (indx: = 0; indx <nMax; indx +: = 1)

nTotal+:=g_nArray[indx];nTotal +: = g_nArray [indx];

OD;OD;

RETURN(nTotal)RETURN (nTotal)

END SomeFunc;END Some Func;

"STOP"은 모든 수행을 종료하는 수행문이다."STOP" is a statement that terminates all executions.

한편 TDL 수행문에서 사용할 수 있는 연산자는 다음과 같다.On the other hand, operators that can be used in TDL statement are as follows.

대입연산자(:=)Assignment operator (: =)

논리연산자(AND, OR, NOT) : 여기서 AND는 피연산자 둘 다 참일 경우 참, 그렇지 않을 경우 거짓, OR은 피연산자 둘 다 거짓일 경우 거짓, 그렇지 않을 경우 참, NOT는 피연산자가 참이면 거짓, 피연산자가 거짓이면 참이 되는 것을 나타낸다.Logical operators (AND, OR, NOT) where AND is true if both operands are true, false otherwise, OR is false if both operands are false, otherwise true, NOT is false if the operand is true, and the operand is False indicates that it is true.

관계연산자(>, >=, <, <=, =, /=) : 여기서 >연산자는 좌측 피연산자가 우측피연산자보다 크면 참, >=연산자는 좌측 피연산자가 우측 피연산자보다 크거나 같으면 참, <연산자는 좌측 피연산자가 우측 피연산자보다 작으면 참, <=연산자는 좌측 피연산자가 우측 피연산자보다 작거나 같으면 참, =연산자는 좌측 피연산자와 우측 피연산자가 같으면 참, /=연산자는 좌측 피연산자와 우측 피연산자가 같지 않으면 참을 나타낸다.Relational operators (>,> =, <, <=, =, / =) where> operator is true if left operand is greater than right operand,> = operator is true if left operand is greater than or equal to right operand, <operator is True if left operand is less than right operand, <= true if left operand is less than or equal to right operand, = operand is true if left operand and right operand are equal, / = operand is true if left operand and right operand are not equal Indicates.

산술연산자(+,-,*,/,%) : 여기서 +연산자는 둘 다 INT 타입이면 더하기, 둘 다 STRING 타입이면 string 연결, 둘 중 하나만 STRING type이면 INT 타입을 문자열로 변환하여 연결하는 것을 나타낸다.Arithmetic operator (+,-, *, /,%) where + operator indicates that if both are of type INT, add string if both are of type STRING, and converts INT type to string if only one of them is STRING type .

예)Yes)

12 +13 => 2512 +13 => 25

"This"+"is" => "This is""This" + "is" => "This is"

123+"sample" => "123 sample"123+ "sample" => "123 sample"

"text"+456 => "text456""text" +456 => "text456"

12 + 13 + "book" => "25book"12 + 13 + "book" => "25book"

아울러 -연산자는 피연산자가 둘일 경우 빼기, 하나일 경우 피연산자에 -1을 곱하는 것을 나타낸다.In addition, the-operator indicates that if two operands are subtracted, and if one, the operand is multiplied by -1.

예)Yes)

10 - 5 => 510-5 => 5

-(10+5) => -15-(10 + 5) => -15

그리고 *연산자는 곱하기를 나타낸다.And the * operator represents multiplication.

예)Yes)

2*3 => 62 * 3 => 6

/연산자는 나누기(젯수를 0으로 할 경우 "Devide by zero"error 발생)를 나타낸다.The / operator represents division ("Devide by zero" error occurs if the number of jets is zero).

예)Yes)

2/3 => 02/3 => 0

4/3 => 14/3 => 1

2/0 => Devide by zero error2/0 => Devide by zero error

%연산자는 나머지를 나타낸다.The% operator represents the remainder.

예)Yes)

2 % 3 => 22% 3 => 2

4 % 3 => 14% 3 => 1

3 % 3 => 03% 3 => 0

여기서 *, /, % 연산자는 +, - 연산자보다 우선 순위가 높다.Where the *, /, and% operators take precedence over the + and-operators.

아울러 각 연산자별 우선 순위는 괄호"()" > 산술연산자 > 관계연산자 > 논리연산자 > 대입연산자 순이다.In addition, the order of precedence for each operator is parenthesis "()"> arithmetic operator> relational operator> logical operator> assignment operator.

다음으로 TDL 라이브러리(Library)는 다음과 같다.Next, TDL library is as follows.

1) ExeMmcCommand(sCmdString STRING)(INT) : sCmdString(명령어 문자열)을 MMS(Man-Machine Subsystem)로 전송하여 실행될 수 있도록 한다. 전송 실패 및 sCmdString상에 에러가 존재하면 0보다 작은 값을 리턴한다.1) ExeMmcCommand (sCmdString STRING) (INT): Sends sCmdString (command string) to MMS (Man-Machine Subsystem) for execution. If there is a transfer failure and an error on sCmdString, it returns a value less than zero.

예1)Example 1)

ExeMmcCommand("DIS-PRCS-STS:HMP;");ExeMmcCommand ("DIS-PRCS-STS: HMP;");

예2)Example 2)

g_csCmdString:="DID-PRCS-STS"+":"+"HMP;";g_csCmdString: = "DID-PRCS-STS" + ":" + "HMP;";

ExeMmcCommand(g_csCmdString);ExeMmcCommand (g_csCmdString);

2) printf(sFormatString STRING, *) : sFormatString을 이용하여 파라미터들을 포맷하고 이를 화면에 출력한다.2) printf (sFormatString STRING, *): Formats parameters using sFormatString and prints them to the screen.

예)Yes)

g_csCmdString:="DIS-IO-PORT";g_csCmdString: = "DIS-IO-PORT";

printf("\n This is a sample=%d, %s", 1234, g_csCmdString);printf ("'n This is a sample =% d,% s", 1234, g_csCmdString);

=> 화면에 "This is a sample = 1234, DIS-IO-PORT"가 출력된다.=> "This is a sample = 1234, DIS-IO-PORT" is displayed on the screen.

3) sprintf(sMsgString STRINGLOC, sFormatString STRING, *) : sFormatString을 이용하여 파라미터들을 포맷하고 이를 sMsgStrinG에 할당한다.3) sprintf (sMsgString STRINGLOC, sFormatString STRING, *): Format parameters using sFormatString and assign it to sMsgStrinG.

예)Yes)

sSorStr:="HMP";sSorStr: = "HMP";

sprintf(g_csCmdString, "DIS-PRCS-STS:%s;",sSorStr);sprintf (g_csCmdString, "DIS-PRCS-STS:% s;", sSorStr);

=> g_csCmdString은 "DIS-PRCS-STS : HMP;"가 저장된다.=> g_csCmdString contains "DIS-PRCS-STS: HMP;"

4) fprintf(sFileName STRING, sFormatString STRING, *)(INT) : sFormatString을 이용하여 파라미터들을 포맷하고 이를 sFileName이 가리키는 파일에 기록한다. 실패시 0보다 작은 값을 리턴한다.(문자열 안의 '\'문자는 특수 코드('\n', '\t',....)를 표현할 때 쓰인다. 따라서 디렉토리를 구분자인 "\'를 나타내기 위해서는 '\\' 로 표시해야 한다.4) fprintf (sFileName STRING, sFormatString STRING, *) (INT) Formats parameters using sFormatString and writes them to the file pointed to by sFileName. On failure, it returns a value less than zero (the '' character in the string is used to represent special codes ('\ n', '\ t', ...), so use the directory separator "\". It should be marked with '\\' to indicate.

예)Yes)

fprintf("c:\\Temp\\MyResult.log","\n!!Error:%d", nErrorCode);fprintf ("c: \ Temp\\MyResult.log", "\ n !! Error:% d", nErrorCode);

=> nErrorCode가 -1이면 "c:\Temp\MyResult.log"파일의 끝 라인에 "\!! Error : -1"이 추가된다.=> If nErrorCode is -1, "\ !! Error: -1" is added to the end line of "c: \ Temp \ MyResult.log" file.

5) GetPatternData(sPatternString PTNDATA, sData STRING LOC)(INT) : 메시지 출력 후 추출된 데이터중 sPatternString에 위치하는 데이터를 sData에 할당한다. 데이터가 없으면 0보다 작은 값을 리턴한다.5) GetPatternData (sPatternString PTNDATA, sData STRING LOC) (INT): Allocate the data located in sPatternString among the extracted data after message output to sData. If there is no data, it returns a value less than zero.

6) RewindPatternData(sPatternString PTNDATA) : 출력 메시지의 추출된 데이터 중에 sPatternString이 가리키는 데이터의 위치를 처음으로 되돌린다.6) RewindPatternData (sPatternString PTNDATA): Returns the position of the data pointed to by sPatternString among the extracted data of the output message for the first time.

7) atoi(sMsgSTRING)(INT) : sMsG를 Integer로 변환하여 리턴한다.7) atoi (sMsgSTRING) (INT): convert sMsG to Integer and return.

예)Yes)

nValue := atoi("12345");nValue: = atoi ("12345");

=> nValue에는 숫자 12345가 저장된다.=> nValue stores the number 12345.

8) StrLength(sMsg STRING)(INT) : sMsg의 길이를 리턴한다.8) StrLength (sMsg STRING) (INT): Returns the length of sMsg.

예)Yes)

nLen:= StrLength("12345");nLen: = StrLength ("12345");

=> nLen에는 5가 저장된다.=> 5 is stored in nLen.

9) StrRight(sMsg STRING, nLen INT)(STRING) : sMsg의 오른쪽에서 nLen 만큼의 문자를 리턴한다.9) StrRight (sMsg STRING, nLen INT) (STRING): Returns nLen characters from the right side of sMsg.

예)Yes)

sNum := StrRight("ASP01",2);sNum: = StrRight ("ASP01", 2);

=> sNum에는 "01"이 저장된다.=> "01" is stored in sNum.

10) StrLeft(sMsg STRING, nLen INT)(STRING) : sMsg의 왼쪽에서 nLen 만큼의 문자를 리턴한다.10) StrLeft (sMsg STRING, nLen INT) (STRING): Returns nLen characters from the left side of sMsg.

예)Yes)

sPrc := StrLeft("HMP-A", 3);sPrc: = StrLeft ("HMP-A", 3);

=> sPrc에는 "HMP"가 저장된다.=> sPrc stores "HMP".

11) StrMiddle(sSource STRING, nPos INT, nLen INT)(STRING) : sSource 문자열의 nPos 위치부터 nLen 만큼의 문자열을 리턴한다.11) StrMiddle (sSource STRING, nPos INT, nLen INT) (STRING): Returns nLen strings from nPos position of sSource string.

예)Yes)

sMiddle := StrMiddle("12345", 1, 2);sMiddle: = StrMiddle ("12345", 1, 2);

=> sMiddle에는 "12345"가 1위치부터 2개의 문자열인 "23"이 저장된다.=> In sMiddle, "12345" is stored in two strings "23" from 1st position.

12) StrFind(sSource STRING, sTarget STRING)(INT) : sSource 문자열에 sTarget 문자열이 포함되어 있는지를 검색하여 그 위치를 리턴한다(문자열의 위치를 나타내는 값은 0부터 시작하며 sTarget 문자열이 없을 경우 -1이 리턴된다).12) StrFind (sSource STRING, sTarget STRING) (INT): Search sSource string to see if it contains sTarget string and return its position (value indicating string position starts from 0 and -1 if no sTarget string exists) Is returned).

예)Yes)

nPos := StrFind("12345", "34");nPos: = StrFind ("12345", "34");

=> nPos에는 "12345"에서 "34'의 첫 위치2가 저장된다.=> nPos stores the first position 2 of "12345" to "34 '.

13) GetPrn()(STRING) : 출력된 메시지의 Print-out Reference Number를 리턴한다. => GetPrn은 PATTERN에 선언한 프로시저가 호출되었을 때 사용해야만 한다.13) GetPrn () (STRING): Returns the Print-out Reference Number of the printed message. => GetPrn must be used when the procedure declared in PATTERN is called.

14) WriteOutputMsg(sFileName STRING)(INT) : 출력된 메시지를 sFileName이 가리키는 file에 저장한다. 저장 실패시 0보다 작은 값을 리턴한다. => WriteOutputMsg는 PATTREN에 선언한 프로시저가 호출되었을 때 사용해야만 한다.14) WriteOutputMsg (sFileName STRING) (INT): Save the output message to the file pointed to by sFileName. If the save fails, it returns a value less than zero. => WriteOutputMsg must be used when the procedure declared in PATTREN is called.

15) GetMmcFailCrn()(INT) : MMC Execution Fail 발생시(MMC를 처리하는 Application으로부터 응답이 없을 경우) 해당 명령어 번호를 리턴한다. 수행이 정상적일 경우 -1을 리턴한다.15) GetMmcFailCrn () (INT): When MMC Execution Fail occurs (when there is no response from MMC processing application), the command number is returned. If execution is normal, -1 is returned.

16) MakePseudoMsg(nPrn INT) : nPrn에 해당하는 Pxxxx(xxxx는 nPrn) 메시지를 생성한다. 패턴 파트의 PRN 항목에 Pxxxx가 선언되어 있고 프로시저 항목에 프로시저의 이름이 선언되어 있으면 해당 프로시저가 불리워진다.16) MakePseudoMsg (nPrn INT): Creates a Pxxxx (xxxx is nPrn) message corresponding to nPrn. If Pxxxx is declared in the PRN item of the pattern part and the procedure name is declared in the procedure item, the procedure is called.

17) eprintf(sFormatStringSTRING,*) : sFormatString을 이용하여 파라미터들을 포맷하고 이를 에러 윈도우 화면에 출력한다 => 에러 윈도우는 eprintf 또는 OutputMsgToErr을 사용해야만 열린다.17) eprintf (sFormatStringSTRING, *) Formats parameters using sFormatString and prints them to the error window display => The error window can only be opened using eprintf or OutputMsgToErr.

예)Yes)

eprintf("\n!!ERROR Invalid ASP status =%d", rErrorCode);eprintf ("\ n !! ERROR Invalid ASP status =% d", rErrorCode);

18) OutputMsgToErr() : MMC 출력 메시지를 에러 윈도우 화면에 출력한다. => OutputMgToErR은 PATTERN에 선언한 프로시저가 호출되었을 때 사용해야만 한다.(에러 윈도우는 eprintf 또는 OutputMsgToErr을 사용해야만 열린다).18) OutputMsgToErr (): Outputs the MMC output message to the error window screen. => OutputMgToErR must be used when the procedure declared in PATTERN is called (the error window can only be opened using eprintf or OutputMsgToErr).

19) SetMmcWaitFlag(nFlag INT) :ExeMmcCommand()를 통해 MMC 명령어를 수행시킬 경우 수행결과의 대기 여부를 지정한다. nFlag가 0이 아니면 수행결과가 수신될 때까지 대기한다.(Default로 ExeMmcCommand()는 수행결과가 수신될 때까지 대기한다)19) SetMmcWaitFlag (nFlag INT): Specifies whether to wait for execution result when executing MMC command through ExeMmcCommand (). If nFlag is not 0, it waits until the execution result is received (by default ExeMmcCommand () waits until the execution result is received).

예)Yes)

EXECUTE{EXECUTE {

/*DIS-IO-PORT;를 수행시키고 출력 메시지가 올 때까지 대기한다.*// * Execute DIS-IO-PORT; and wait for an output message * /

ExeMmcCommand("DIS-IO-PORT;");ExeMmcCommand ("DIS-IO-PORT;");

SetMmcWaitFlag(FALSE);SetMmcWaitFlag (FALSE);

/*이후부터 ExeMmcCommand()호출시 명령어 수행 결과 메시지를 기다리지 않는다.*// * Do not wait for the result message when executing ExeMmcCommand () afterwards.

ExeMmcCommand("DIS-PRC-STS;");/*수행만 시키고 바로 리턴된다.*/ExeMmcCommand ("DIS-PRC-STS;"); / * Just execute and return immediately * /

}}

20) GetToken(nLine INT, nNth INT, sString STRING LOC)(INT) : MMC 출력 메시지의 nLine의 nNtH 번째의 문자열을 sString에 할당하고 그 문자열의 길이를 리턴한다(Line은 1부터 시작하며 nLine 및 nNth의 위치에 해당하는 문자열이 존재하지 않으면 -1을 리턴한다).20) GetToken (nLine INT, nNth INT, sString STRING LOC) (INT): Assign the nNtH th string of nLine of MMC output message to sString and return the length of the string (Line starts from 1, nLine and nNth If no string exists for the location of-, -1 is returned).

21) GetMsgLineCount()(INT) : MMC 출력 메시지의 라인 수를 리턴한다 => GetMsgLineCount는 PATTERN에 선언한 프로시저가 호출되었을 때 사용해야만 한다.21) GetMsgLineCount () (INT): Returns the number of lines in the MMC output message => GetMsgLineCount should be used when the procedure declared in PATTERN is called.

예)Yes)

PATTERN{PATTERN {

PRN:=M6612;PRN: = M6612;

TYPE:=NONE;TYPE: = NONE;

PROCEDURE:=RSLT_PROC;PROCEDURE: = RSLT_PROC;

}}

..........

RSLT_PROC:PROC()RSLT_PROC: PROC ()

DCL sStr STRING;DCL sStr STRING;

DCL nLen,i INT;DCL nLen, i INT;

DCL nLineCnt INT;DCL nLineCnt INT;

DO FOR(i:=1;i<=nLineCnt; i+:=1)DO FOR (i: = 1; i <= nLineCnt; i +: = 1)

nLineCnt:=GetMsgLineCount();nLineCnt: = GetMsgLineCount ();

nLen:=GetToKen(i,1,sStr);nLen: = GetToKen (i, 1, sStr);

printf("\n FIRST STRING =%s, LEN =%d", sStr, nLen);printf ("\ n FIRST STRING =% s, LEN =% d", sStr, nLen);

OD;OD;

END;END;

=> 출력 메시지의 각 라인에서 맨 처음 문자열을 출력한다.=> Print the first string in each line of the output message.

22) IsMsgCompleted()(INT) : MMC 출력 메시지의 종결 여부를 리턴한다. 출력 메시지가 "COMPLETED"로 끝났을 경우 1이 리턴되며, "CONTINUED"로 끝났을 경우 0이 리턴된다. => IsMsgCompleted는 PATTREN에 선언한 프로시저가 호출되었을 때사용해야만 한다.22) IsMsgCompleted () (INT): Returns whether the MMC output message is closed. 1 is returned if the output message ends with "COMPLETED", or 0 if the output message ends with "CONTINUED". => IsMsgCompleted must be used when the procedure declared in PATTREN is called.

예)Yes)

PATTERN{PATTERN {

PRN:=M0100;PRN: = M0100;

TYPE:=NONE;TYPE: = NONE;

PROCEDURE:=RSLT_PROC;PROCEDURE: = RSLT_PROC;

}}

............

RSLT_PROC:PROC()RSLT_PROC: PROC ()

/*Other Processing*// * Other Processing * /

IF IsMsgCompleted() THENIF IsMsgCompleted () THEN

printf("Message = COMPLETED");printf ("Message = COMPLETED");

ELSEELSE

printf("Message =CONTINUTED,");printf ("Message = CONTINUTED,");

FI;FI;

END;END;

테스트 파일이 위와 같고 다음과 같은 메시지가 출력된다면 화면에는 메시지 = CONTINUED, Message = CONTINUED, Message=COMPLETED가 출력된다.If the test file is as above and the following message is displayed, message = CONTINUED, Message = CONTINUED, Message = COMPLETED is displayed on the screen.

KTF_PCX 1990-01-07 09:21:10 SUN ON PORT 24KTF_PCX 1990-01-07 09:21:10 SUN ON PORT 24

M0100 EXAMPLE OUTPUT MESSAGEM0100 EXAMPLE OUTPUT MESSAGE

RESULT = NOKRESULT = NOK

CONTINUDECONTINUDE

KTF_PCX 1990-01-07 09:21:10 SUN ON PORT 24KTF_PCX 1990-01-07 09:21:10 SUN ON PORT 24

M0100 EXAMPLE OUTPUT MESSAGEM0100 EXAMPLE OUTPUT MESSAGE

RESULT = NOKRESULT = NOK

CONTINUEDCONTINUED

KTF_PCX 1990-01-07 09:21:10 SUN ON PORT 24KTF_PCX 1990-01-07 09:21:10 SUN ON PORT 24

M0100 EXAMPLE OUTPUT MESSAGEM0100 EXAMPLE OUTPUT MESSAGE

RESULT = OKRESULT = OK

COMPLETEDCOMPLETED

23) sleep(nSec INT)(INT) : 초 단위로 nSec 만큼 슬립(sleep)한다. 실패시 -1을 리턴한다.23) sleep (nSec INT) (INT): Sleeps by nSec in seconds. On failure, -1 is returned.

예)Yes)

sleep(10); /*10초 동안 대기한다.*/sleep (10); / * Wait 10 seconds * /

이상에서 상술한 본 발명 "교환기 자동 진단 방법"에 따르면, 교환기 시스템의 진단을 위해서 요구되는 다양한 종류의 반복 수행이 필요한 운용자 명령어(MMC)들을 자동화된 툴(Tool)에 의해 일괄 처리할 수 있는 이점이 있다.According to the above-described "exchange automatic diagnostic method" of the present invention, it is possible to batch process the operator commands (MMC) that require various kinds of repetitive execution required for the diagnosis of the exchange system by an automated tool. There is this.

또한 상기 일괄 처리된 결과를 자동으로 분석하여 불량 원인을 운용자에게제공해주는 이점도 있다.In addition, there is an advantage that provides the operator with the cause of the failure by automatically analyzing the batch processed results.

또한 상기와 같은 이점들로 인해 시스템의 설치, 점검 및 안정화에 소요되는 인적, 시간적, 경제적 낭비를 최소화할 수 있는 이점이 있으며, 또한 교환기 시스템의 품질 향상을 도모해주는 이점도 있다.In addition, the above advantages have the advantage of minimizing the human, time, and economic waste of installing, checking and stabilizing the system, and also improving the quality of the exchange system.

Claims (7)

교환기의 자동 진단 방법에 있어서,In the automatic diagnosis method of the exchanger, 시험자가 시험절차를 TDL(Test Description Language)문법에 맞춰 프로그램을 작성하여 입력한 상태에서, 자동 진단이 시작되면 컴파일러에서 수행코드를 획득하고 이를 파일로 만들어 에뮬레이터에 전송해주는 단계와;In the state in which the tester writes and inputs a test procedure in accordance with TDL (Test Description Language) syntax, when the automatic diagnosis starts, acquiring the execution code from the compiler, making it into a file, and transmitting it to the emulator; 상기 에뮬레이터에서 수행코드 파일을 읽어 패턴 정보, 수행코드, 프로시저 정보를 부분별로 저장하고, 수행코드만을 처리하는 런쓰레드(RunThread) 루틴을 실행시키는 단계와;Reading an execution code file in the emulator, storing pattern information, execution code, and procedure information for each part, and executing a runthread routine that processes only the execution code; 상기 런쓰레드 실행 후 수신 시그널이 교환기내 프로세서(ATMP)에서 클라이언트로 신호를 전송하기 위한 시그널(BatchMsgToClientSig)일 경우, 수신 데이터가 명령어 검사 결과 데이터인지를 체크하고, 그 결과 수신 데이터가 명령 체크 결과일 경우에는 명령어 검사 결과에 대응하는 동작을 수행시키는 단계와;When the received signal is a signal (BatchMsgToClientSig) for transmitting a signal from the ATMP to the client after executing the run thread, it is checked whether the received data is the command check result data, and the received data is the command check result. If the step of performing an operation corresponding to the command check result; 상기 수신 데이터가 명령어 검사 결과 데이터가 아닐 경우에는, 상기 수신 데이터가 메시지 출력 데이터인지를 판단하고, 그 판단 결과 메시지 출력 데이터일 경우에는 출력 메시지를 토큰(Token)별로 분류한 후 PRN(Printout Reference Number)을 추출하는 단계와;If the received data is not the command check result data, it is determined whether the received data is message output data. If the received data is the message output data, the output message is classified by token and then a printout reference number (PRN). Extracting c); 상기 추출한 PRN이 패턴 정보 영역에 존재하는지를 체크하고, 상기 추출한 PRN이 패턴 정보 영역에 존재할 경우에는 패턴 정보에 기록된 추출정보를 이용하여 데이터를 추출하는 단계와;Checking whether the extracted PRN exists in the pattern information area, and extracting data using the extraction information recorded in the pattern information when the extracted PRN exists in the pattern information area; 상기 패턴 정보에 등록되어 있는 프로시저 ID를 추출하고, 대기중인 런쓰레드를 활성화시키는 단계를 포함하여 이루어짐을 특징으로 하는 교환기 자동 진단방법.And extracting a procedure ID registered in the pattern information and activating a waiting run thread. 제1항에 있어서, 상기 추출한 PRN이 패턴 정보 영역에 존재하지 않을 경우에는 메시지 출력 완료 여부를 체킹하는 단계와; 상기 체크 결과 메시지 출력이 완료된 경우에는 MMC 전송 카운트를 감소시키고, 시그널 입력 대기 상태로 전환하는 단계를 더 포함하여 이루어짐을 특징으로 하는 교환기 자동 진단방법.2. The method of claim 1, further comprising: checking whether message output is complete when the extracted PRN does not exist in a pattern information area; And when the output of the check result message is completed, reducing the MMC transmission count and switching to a signal input standby state. 제1항에 있어서, 상기 수신 시그널이 교환기내 프로세서(ATMP)에서 클라이언트로 신호를 전송하기 위한 시그널(BatchMsgToClientSig)이 아닐 경우에는, 수신 시그널이 런쓰레드로부터의 명령어 수행 요구인지를 판단하는 단계와; 그 판단 결과 수신 데이터가 명령 수행 요구일 경우에는 명령어를 상기 시그널(BatchMsgToClientSig)에 실어 MMS로 전송하고, 그에 대한 응답이 오면 대기중인 런쓰레드를 활성화시키는 단계와; 상기 수신 시그널이 명령 수행 요구가 아닐 경우에는, 수신 시그널이 런쓰레드 종료 데이터인지를 확인하고, 그 결과 수신 시그널이 런쓰레드 종료 데이터일 경우에는 각 부분별로 할당했던 메모리를 해제한 뒤 종료하는 단계를 더 포함하여 이루어짐을 특징으로 하는 교환기 자동 진단방법.The method of claim 1, further comprising: determining whether the received signal is a request for execution of a command from a run thread when the received signal is not a signal (BatchMsgToClientSig) for transmitting a signal from an ATMP to a client; If it is determined that the received data is a command execution request, putting the command on the signal BatchMsgToClientSig to the MMS and activating a waiting run thread when a response is received; If the received signal is not a command execution request, check whether the received signal is run thread termination data, and if the received signal is run thread termination data, release the memory allocated to each part and then terminate. Exchange automatic diagnosis method characterized in that it comprises a further. 제1항에 있어서, 상기 실행되는 런쓰레드 루틴은,The method of claim 1, wherein the run thread routine to be executed, 수행코드 포인터 및 MMC 전송 카운터를 초기화시키고, 대기 상태에서 수행코드 포인터(IP)가 0보다 작은지를 체크하는 단계와, 상기 수행코드 포인터를 체크한 결과 수행코드 포인터가 0보다 클 경우에는 MMC 전송 카운트값이 0보다 큰지를 확인하는 단계와, 상기 확인 결과 MMC 전송 카운트값이 0보다 작을 경우에는 에뮬레이터로 쓰레드 종료 메시지를 전송하는 단계와, 상기 MMC 전송 카운트가 0보다 클 경우에는 출력 메시지를 대기하는 단계와, 상기 출력 메시지가 수신되면 수행코드 포인터를 저장하고, 프로시저 ID를 통해 해당 프로시저를 탐색하는 단계와, 상기 해당 프로시저가 탐색되거나 상기 수행코드 포인터(IP)가 0보다 작을 경우에는 수행코드 포인터를 1증가시켜 다음 수행코드(Next IP)로 설정하는 단계와, 상기 수행코드의 종류를 분석하고, 그 분석된 수행코드에 대응하는 쓰레드를 실행시켜 시험 루틴을 실행하는 단계와, 수행코드에 대한 쓰레드가 종료되면, 수행코드 포인터를 다음 수행코드 포인터(Next IP)로 설정하고, 상기 수행코드 포인터를 검색하는 단계로 이동하는 단계로 이루어짐을 특징으로 하는 교환기 자동 진단방법.Initializing the execution code pointer and the MMC transmission counter and checking whether the execution code pointer (IP) is less than zero in the waiting state; and if the execution code pointer is greater than zero as a result of checking the execution code pointer, the MMC transmission count Checking whether the value is greater than 0, transmitting a thread termination message to the emulator if the MMC transmission count value is less than zero, and waiting for an output message if the MMC transmission count is greater than zero. And storing the execution code pointer when the output message is received, searching for the procedure through a procedure ID, and when the procedure is searched or the execution code pointer IP is less than zero. Incrementing the execution code pointer by 1 to set the next execution code (Next IP); analyzing the type of the execution code; Executing a test routine by executing a thread corresponding to the executed execution code, and when the thread for the execution code ends, setting the execution code pointer to the next execution code pointer (Next IP) and searching for the execution code pointer. Switch automatic diagnosis method characterized in that the step consisting of moving to the step. 제4항에 있어서, 상기 수행코드의 종류를 분석한 후, 그 수행코드가 서브 루틴 점프(JSR : Jump Sub Routine)일 경우,The method of claim 4, wherein after analyzing the type of the execution code, when the execution code is a jump subroutine (JSR), 상기 수행코드가 MMC를 수행하기 위한 코드(ExeMmcCommand)인지를 체크하는 단계와, 상기 체크 결과 수행코드가 MMC를 수행하기 위한 코드(ExeMmcCommand)일 경우에는, 파라미터로 전달된 명령어 문자열을 에뮬레이터로 전송하는 단계와, 상기 에뮬레이터가 활성화될 때까지 대기하는 단계와, 전송한 명령어에 오류가 발생하였나를 체크하는 단계와, 상기 체크결과 전송한 명령어에 오류가 발생하였으면 처음 단계로 리턴을 하고, 전송한 명령어에 오류가 없으면, 명령어 전송 카운트를 1증가시키고, 출력 메시지가 수신되기를 기다리는 단계와, 수신 메시지가 도착하면 수행코드 포인터를 저장하는 단계와, 프로시저 ID를 통해 해당 프로시저를 탐색하는 단계와, 상기 프로시저가 탐색되면 수행코드를 처리하도록 제어하는 단계로 이루어짐을 특징으로 하는 교환기 자동 진단방법.Checking whether the execution code is a code for executing MMC (ExeMmcCommand); and if the check result code is an code for executing MMC (ExeMmcCommand), transmitting the command string passed as a parameter to the emulator Waiting for the emulator to be activated, checking if an error has occurred in the transmitted command, returning to the first step if an error occurs in the transmitted command, and transmitting the command If there is no error, increasing the instruction transmission count by 1, waiting for the output message to be received, storing the execution code pointer when the received message arrives, searching for the procedure by the procedure ID, And when the procedure is found, controlling to process the execution code. Auto diagnosis method. 제5항에 있어서, 상기 수행코드를 검색한 결과 수행코드가 MMC를 수행하기 위한 코드(ExeMmcCommand)가 아닐 경우에는 수행코드가 다른 디폴트 라이브러리(LIB)인지를 체크하는 단계와, 상기 체크 결과 수행코드가 다른 디폴트 라이브러리일 경우에는 디폴트 라이브러리를 저장하는 단계와, 상기 수행코드가 다른 디폴트 라이브러리도 아닐 경우에는 수행코드 포인터를 저장하고 처음 단계로 이동하는 단계를 더 포함하여 이루어짐을 특징으로 하는 교환기 자동 진단방법.The method as claimed in claim 5, further comprising: checking whether the execution code is another default library (LIB) if the execution code is not ExeMmcCommand for performing the MMC. Is another default library, and if the execution code is not another default library, the step of storing the execution code pointer and moving to the first step is further included. Way. 제5항에 있어서, 상기 탐색된 프로시저에서 수행코드를 제어할 수 있도록 제어하는 단계는, 수신한 출력 메시지를 토큰별로 분류하고 패턴 데이터를 추출한 뒤 런쓰레드를 활성화시키는 단계와, 상기 활성화된 런쓰레드는 현재 진행중인 수행코드 포인터를 저장하고, 에뮬레이터가 넘겨준 프로시저 ID를 통해 프로시저의 수행코드 시작주소를 수행코드 포인터에 할당하여 프로시저의 수행코드가 처리될 수 있도록 제어하는 단계와, 상기 프로시저가 리턴되면 저장된 수행코드 포인터를 인출하여 프로시저로 점프하기 이전의 작업이 계속 진행될 수 있도록 제어하는 단계로 이루어짐을 특징으로 하는 교환기 자동 진단방법.The method of claim 5, wherein the controlling of the execution code in the searched procedure comprises: classifying the received output message for each token, extracting pattern data, and activating a run thread; The thread stores the currently executing execution pointer and assigns the execution code start address of the procedure to the execution code pointer through the procedure ID passed by the emulator, so that the execution code of the procedure can be processed. And returning the stored execution code pointer to control the operation before the jump to the procedure.
KR10-2000-0087456A 2000-12-30 2000-12-30 Method for diagnostic automatic in mobile switch center KR100396031B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR10-2000-0087456A KR100396031B1 (en) 2000-12-30 2000-12-30 Method for diagnostic automatic in mobile switch center

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR10-2000-0087456A KR100396031B1 (en) 2000-12-30 2000-12-30 Method for diagnostic automatic in mobile switch center

Publications (2)

Publication Number Publication Date
KR20020057181A KR20020057181A (en) 2002-07-11
KR100396031B1 true KR100396031B1 (en) 2003-08-27

Family

ID=27690304

Family Applications (1)

Application Number Title Priority Date Filing Date
KR10-2000-0087456A KR100396031B1 (en) 2000-12-30 2000-12-30 Method for diagnostic automatic in mobile switch center

Country Status (1)

Country Link
KR (1) KR100396031B1 (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61198951A (en) * 1985-02-28 1986-09-03 Nec Corp Automatic test equipment for telephone exchange
JPH0662114A (en) * 1992-08-10 1994-03-04 Fujitsu Ltd Inter-processor diagnostic processing system
JPH06189353A (en) * 1992-12-22 1994-07-08 Nec Corp Command control system for period ic program starting at predetermined time
JPH1093561A (en) * 1996-09-13 1998-04-10 Fujitsu Ltd Test system for data transmitter
KR19990060636A (en) * 1997-12-31 1999-07-26 윤종용 How to manage state of exchange
KR20000046123A (en) * 1998-12-31 2000-07-25 김영환 Method for complete electronic switchboard's main processor capability measurement

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61198951A (en) * 1985-02-28 1986-09-03 Nec Corp Automatic test equipment for telephone exchange
JPH0662114A (en) * 1992-08-10 1994-03-04 Fujitsu Ltd Inter-processor diagnostic processing system
JPH06189353A (en) * 1992-12-22 1994-07-08 Nec Corp Command control system for period ic program starting at predetermined time
JPH1093561A (en) * 1996-09-13 1998-04-10 Fujitsu Ltd Test system for data transmitter
KR19990060636A (en) * 1997-12-31 1999-07-26 윤종용 How to manage state of exchange
KR20000046123A (en) * 1998-12-31 2000-07-25 김영환 Method for complete electronic switchboard's main processor capability measurement

Also Published As

Publication number Publication date
KR20020057181A (en) 2002-07-11

Similar Documents

Publication Publication Date Title
US5339422A (en) System and method for jacketing cross-domain calls in a multi-code execution and debugging system within a multi-architecture environment
US5651111A (en) Method and apparatus for producing a software test system using complementary code to resolve external dependencies
US5774729A (en) Event handling in a high level programming language environment
US5764947A (en) System and method for automatically interfacing call conventions between two dissimilar program units
US7577874B2 (en) Interactive debug system for multiprocessor array
US5361352A (en) Method for debugging in a parallel computer system and system for the same
EP0595540A1 (en) Debugging/modifying of software in ROM
JPH0748182B2 (en) Program error detection method
CN109542464B (en) Development and deployment system, method and storage medium of IoT (Internet of things) equipment script program
KR100396031B1 (en) Method for diagnostic automatic in mobile switch center
JP2991242B2 (en) How to use a multiprocessor computer system
CN111240728A (en) Application program updating method, device, equipment and storage medium
US20060174248A1 (en) Software tool for automatically protecting shared resources within software source code
EP1966691A2 (en) Method and system for compiling a source code
JP3300090B2 (en) Test program execution method
JPH08305583A (en) Method for simulating cpu
US7318221B2 (en) Windows™ F-language interpreter
JPH096646A (en) Program simulation device
JPH0823861B2 (en) Distributed processing method
EP1569099A2 (en) Process language for microprocessors with finite resources
KR100258095B1 (en) A detection method for uninitialized names in chill
Byun et al. High-level chill debugging system in cross-development environments
Love ANSI C for programmers on UNIX systems
Marty et al. Implementation Guidelines
Barklund et al. Erlang 4.7. 3 Reference Manual DRAFT (0.7)

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20060807

Year of fee payment: 4

LAPS Lapse due to unpaid annual fee