CN111090949B - ATP peripheral equipment simulation method for testing ATP equipment and general simulator - Google Patents

ATP peripheral equipment simulation method for testing ATP equipment and general simulator Download PDF

Info

Publication number
CN111090949B
CN111090949B CN202010205274.XA CN202010205274A CN111090949B CN 111090949 B CN111090949 B CN 111090949B CN 202010205274 A CN202010205274 A CN 202010205274A CN 111090949 B CN111090949 B CN 111090949B
Authority
CN
China
Prior art keywords
atp
script
instruction
equipment
data
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN202010205274.XA
Other languages
Chinese (zh)
Other versions
CN111090949A (en
Inventor
张国振
张振兴
孙二敬
张泽文
赵山河
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CRSC Research and Design Institute Group Co Ltd
Original Assignee
CRSC Research and Design Institute Group Co Ltd
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 CRSC Research and Design Institute Group Co Ltd filed Critical CRSC Research and Design Institute Group Co Ltd
Priority to CN202010205274.XA priority Critical patent/CN111090949B/en
Publication of CN111090949A publication Critical patent/CN111090949A/en
Application granted granted Critical
Publication of CN111090949B publication Critical patent/CN111090949B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides an ATP peripheral equipment simulation method for testing ATP equipment, which comprises the steps that a general simulator obtains a simulation request, and ATP peripheral equipment required to be simulated is determined according to the simulation request; calling a test script with a trigger judgment condition according to the ATP peripheral equipment to be simulated; and executing the test script with the trigger judgment condition, simulating ATP peripheral equipment, and sending data to the ATP equipment by the general simulator to test the ATP equipment. The invention realizes the simulation of different ATP peripheral devices, and tests the ATP device by using the simulated ATP peripheral devices. The test on the ATP equipment is strict and comprehensive, and the test in a special scene can be realized. The used general simulator is simple to upgrade, easy to maintain and low in test cost.

Description

ATP peripheral equipment simulation method for testing ATP equipment and general simulator
Technical Field
The invention belongs to the field of ATP peripheral equipment simulation, and particularly relates to an ATP peripheral equipment simulation method for testing ATP equipment and a general simulator.
Background
The ATP equipment is used as core equipment of a train operation control system, overspeed protection and impersonation protection are realized, the safe operation of the train is ensured, and strict and comprehensive test and verification on the ATP equipment are particularly important. The method for testing the ATP equipment has many methods, and has a semi-physical semi-simulation test method, and the test method needs many real equipment supports, has high manufacturing cost and difficult maintenance, and can not realize the test of special scenes. And the test method based on the PC uses software to realize the logic of the peripheral equipment, and has many advantages compared with a semi-physical semi-simulation test method, but the software logic of the simulation peripheral equipment is complex, is not easy to develop, and is complex to upgrade and maintain.
Disclosure of Invention
In view of the above problems, the present invention provides an ATP peripheral device simulation method for testing an ATP device, the method including:
the method comprises the steps that a general simulator obtains a simulation request, and ATP peripheral equipment needing to be simulated is determined according to the simulation request;
calling a test script with a trigger judgment condition according to the ATP peripheral equipment to be simulated;
and executing the test script with the trigger judgment condition, simulating ATP peripheral equipment, and sending data to the ATP equipment by the general simulator to test the ATP equipment.
Further, the executing the test script with the trigger judgment condition includes:
and the universal simulator receives the data sent by the ATP, analyzes the data and executes the test script with the trigger judgment condition.
Further, parsing the data using a configuration file;
the configuration file defines different data formats for the ATP peripheral to communicate with the ATP device.
Further, the test script with the trigger judgment condition comprises a plurality of groups of command signals,
the command signals include train position and script instructions.
Further, the script instructions include:
a first script instruction, the first script instruction being preset;
a second script instruction, the second script instruction requiring configuration;
the configuration comprises:
and the universal simulator starts a script configuration table to configure the second script instruction.
Further, the script configuration table includes:
automatically generating a data message number to be sent to the ATP device;
automatically generating a field value in a data message sent to the ATP device;
a latest received source message number for automatic assignment;
a field value in the latest received source message for automatic assignment.
Further, the script instructions define data content and processing modes for communicating with the ATP device;
and executing the script instruction to generate instruction communication data.
Further, the universal simulator uses the configuration file to process the received data sent by the ATP, and generates a message number and a field value;
and the general simulator processes the instruction communication data by using the configuration file to generate a byte stream.
Further, the method further comprises:
automatic test is carried out by using EXPECT instruction;
the automatic testing using EXPECT instructions comprises:
and the universal simulator receives the ATP message, verifies the ATP message by using an EXPECT instruction and obtains a test result.
The invention also proposes an ATP peripheral device generic simulator for testing an ATP device, the simulator comprising:
the acquisition module is used for acquiring a simulation request;
the determining module is used for determining the ATP peripheral equipment required to be simulated according to the simulation request;
the calling module is used for calling the test script with the trigger judgment condition;
the execution module is used for executing the test script with the trigger judgment condition;
an analog module for simulating an ATP peripheral;
the sending module is used for sending data to the ATP equipment;
and the test module is used for testing the ATP equipment.
Further, the execution module includes:
the receiving component is used for receiving data sent by the ATP;
a parsing component for parsing the data;
and the execution component is used for executing the test script with the trigger judgment condition.
Further, the parsing component parses the data using a configuration file;
the configuration file defines different data formats for the ATP peripheral to communicate with the ATP device.
Further, the test script with the trigger judgment condition comprises a plurality of groups of command signals,
the command signals include train position and script instructions.
Further, the script instructions include:
a first script instruction, the first script instruction being preset;
a second script instruction, the second script instruction requiring configuration;
the configuration comprises:
and the universal simulator starts a script configuration table to configure the second script instruction.
Further, the script configuration table includes:
automatically generating a data message number to be sent to the ATP device;
automatically generating a field value in a data message sent to the ATP device;
a latest received source message number for automatic assignment;
a field value in the latest received source message for automatic assignment.
Further, the script instructions define data content and processing modes for communicating with the ATP device;
and executing the script instruction to generate instruction communication data.
Further, the universal simulator uses the configuration file to process the received data sent by the ATP, and generates a message number and a field value;
and the general simulator processes the instruction communication data by using the configuration file to generate a byte stream.
Further, the simulator also comprises an automatic test module;
the automatic test module is used for automatically testing by using an EXPECT instruction;
the automatic testing using EXPECT instructions comprises:
and receiving the ATP message, and verifying the ATP message by using an EXPECT instruction to obtain a test result.
The invention realizes the simulation of different ATP peripheral devices, and tests the ATP device by using the simulated ATP peripheral devices. The test on the ATP equipment is strict and comprehensive, and the test in a special scene can be realized. The used general simulator is simple to upgrade, easy to maintain and low in test cost.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart of an ATP peripheral simulation method for testing an ATP device according to an embodiment of the invention;
FIG. 2 is a schematic diagram of an ATP peripheral general simulator for testing an ATP device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention discloses an ATP (Automatic Train Protection) peripheral equipment simulation method for testing ATP equipment.
In particular, the ATP peripherals include on-board devices of the train, including ground devices, including all devices that interact with the ATP devices. For example, train equipment such as a speed governor, a horn, brakes, etc.; ground devices such as track circuits, transponders, etc. are ATP peripherals.
ATP peripherals interact with ATP devices, there are two cases: one is that the ATP peripheral only sends data, and the ATP device receives data, such as a transponder device; the other is that the ATP peripheral device and the ATP device communicate data with each other, and the ATP peripheral device needs to reply corresponding data according to the data transmitted by the ATP device, such as an RBC (radio Block Center) device.
So the ATP peripheral simulation method for testing ATP device can be divided into two types:
method one, as shown in fig. 1, the method is as follows:
the method comprises the steps that a general simulator obtains a simulation request, and ATP peripheral equipment needing to be simulated is determined according to the simulation request;
calling a test script with a trigger judgment condition according to the ATP peripheral equipment to be simulated;
and executing the test script with the trigger judgment condition, simulating ATP peripheral equipment, and sending data to the ATP equipment by the general simulator to test the ATP equipment.
Specifically, a general simulator obtains a simulation request, and determines ATP peripheral equipment to be simulated according to the simulation request; and calling a test script with a trigger judgment condition according to the ATP peripheral equipment to be simulated.
Specifically, a plurality of test scripts with trigger judgment conditions are preset in the universal simulator, and the test scripts with the trigger judgment conditions correspond to corresponding ATP peripheral equipment one by one; if the responder script corresponds to the responder, the RBC script corresponds to the RBC equipment. Each script is designed according to the corresponding ATP peripheral equipment; under what conditions the ATP peripheral will send; the universal simulator may in this case send the same data using the corresponding script. And determining the ATP peripheral equipment to be simulated according to the simulation request, and calling a test script with a trigger judgment condition corresponding to the ATP peripheral equipment by the general simulator.
Illustratively, a generic simulator obtains a simulation request, which is a simulation responder. The universal simulator determines, upon request, that the universal simulator is to simulate the ATP peripheral as a responder. And calling the responder script according to the simulation of the ATP peripheral equipment as the responder by the general simulator.
Specifically, the test script with the trigger judgment condition is executed, the ATP peripheral device is simulated, and the general simulator sends data to the ATP device to test the ATP device.
The test script with the trigger judgment condition is composed of a Command signal, and each Command signal comprises a train Position (Position) and a script Command (Command).
The train location is a location condition for executing the script instruction. When the train head reaches or exceeds the position, the script instruction is executed, and the action corresponding to the script instruction is operated. And the field part of the train position in the script is optional, and if the train position does not exist, the script instruction is executed unconditionally. The train position in the script can be preset, and can also be filled by a scriber according to the actual requirement. The scriber comprises a scriber for scriber compiling, a scriber for using a scriber, a general simulator for using, and the like.
Specifically, the train position fills in train head position data. The train head arrival position is generated by a train positioning system in real time. When the arrival position of the train head is larger than or equal to the position data, the train head is judged to arrive at or exceed the train position, and the script execution condition is met.
Illustratively, where the kilometer of the arrival location of the train head is 300 kilometers and 450 meters, the following are filled in the train location: 30050000cm (300 km and 500 m) represents that the train head reaches the position of 300 km and 450 m of the current line, the position of the script command is executed at the position of 300 km and 500 m of the current line, and after comparison, the script command execution condition is judged not to be reached.
If the train position is not filled, the situation that the train position does not need to be determined is shown, and the script command is executed unconditionally.
Specifically, the script instruction is a script instruction in a script instruction set;
the script instructions define data content and processing modes for communication with the ATP device.
Specifically, a script instruction set is defined in advance, and the script instruction set comprises a plurality of script instructions. The script instructions define the data content and processing means for communicating with the ATP device. By executing the script instructions, a behavior of an ATP peripheral in communication with the ATP device may be emulated. The specific ATP peripheral can be simulated by executing the combination of script instructions, namely executing the test script with the trigger judgment condition.
Illustratively, the set of script instructions includes, but is not limited to, the following script instructions:
1) the simulation script runs the maximum time limit instruction.
The format is SET _ MAX _ TIME (parameter 1);
the instruction defines the maximum time of the script operation, and when the operation time exceeds the maximum time, the script automatically stops operating;
parameter 1: a maximum time for the script to run is specified.
2) And (5) simulator attribute assignment instructions.
The format is SET _ specific _ MSG (parameter 1= parameter 2);
the instruction defines a script for simulating the initial settings of the ATP peripheral equipment, including the ID, the running period, the name and the like of the simulation equipment;
parameter 1: special variables inside the simulator, including SIM _ ID (representing simulator ID), RUN _ PERIOD _ TIME (representing simulator RUN PERIOD), SIM _ NAME (representing simulator NAME); parameter 2: values to be assigned to specific variables inside the simulator are specified.
3) The data is sent in a byte stream to the ATP device for command.
The command defines the form of a script sending command as a byte stream;
the format is SEND _ RAW _ MSG (parameter 1);
parameter 1: a byte stream, which may be 16-ary, sent to the ATP device.
4) Waiting for the ATP device to send a certain message data instruction.
The format is WAIT _ MSG (parameter 1, [ parameter 2 … ]);
waiting for the ATP equipment to send certain message data, if the current period receives a message meeting the requirements of the message number and the field content in the parameter, continuing to execute a subsequent script instruction, otherwise, finishing the execution of the current period by the simulator, and continuing to execute the instruction in the next period;
parameter 1: waiting for the sequence number of the message; parameter 2: the parameter may be null waiting for the value of one or more fields in the message.
5) The start cycle sends data to the ATP device instructions.
Format START _ SEND _ MSG (parameter 1, parameter 2, parameter 3);
the instruction defines a script sending period; periodically transmitting the data in the script to the ATP equipment, wherein the transmission cycle time is given by the instruction;
parameter 1: a cycle time for periodically transmitting the message; parameter 2: sending a message sequence number; parameter 3: the message content.
6) Stall cycles send data to ATP device instructions.
The format is STOP _ SEND _ MSG (parameter 1);
the instruction defines a script termination send cycle; the instruction corresponds to a START _ SEND _ MSG () instruction, and a certain message of the periodic transmission is terminated and transmitted;
parameter 1: the message number required to stop periodic transmission; if the parameter is ALL _ MESSAGE, ALL data sent in the START _ SEND _ MSG instruction cycle is stopped.
7) And automatically replying data to the ATP equipment instruction.
The format is AUTO _ ANSWER _ MSG (parameter 1, parameter 2, parameter 3);
the instruction defines that the instruction is automatically sent; after receiving a specified message, the general simulator sends a message data of the instruction to the ATP equipment;
parameter 1: triggering the message number which needs to be received by the instruction; parameter 2: the message number sent after triggering; parameter 3: the content of the message sent.
8) Stopping the auto-reply data to ATP device command.
Format STOP _ ANSWER _ MSG (parameter 1);
the instruction defines an instruction automatic reply; the command corresponds to an AUTO _ ANSWER _ MSG () command, and the command responding to a certain message periodically terminates the execution;
parameter 1: the message number for which automatic reply is required to stop. And if the parameter 1 is ALL _ MESSAGE, stopping ALL MESSAGE data automatically replied in the AUTO _ ANSWER _ MSG instruction.
9) The instructions are delayed for execution.
Format DELAY (parameter 1);
the instruction defines instruction latency execution; and executing subsequent instructions after delaying for a certain time.
Parameter 1: time delay.
10) And automatically testing the command.
Format EXPECT (parameter 1= parameter 2);
the instruction defines an automatic test; when the general simulator executes the instruction, judging that the received ATP parameter 1 value is the same as the parameter 2 value, considering that the automatic test is passed, and then executing the subsequent instruction; if the ATP test is different from the ATP test, the automatic test fails, the ATP test fails, and other instructions are not executed.
Parameter 1: certain field name of received ATP message, parameter 2: the value of the field.
In the first method, the ATP peripheral equipment to be simulated does not need to receive ATP equipment messages, and only needs to send data to the ATP equipment.
Illustratively, the transponder need not receive ATP device messages, but only data to the ATP device, and therefore, the transponder script need not receive ATP device messages. The responder script also consists of a command signal, and each command signal comprises a train position and a script instruction; the data of the script instructions in the transponder script can be preset by the system, and can also be filled by a script configurator according to the actual requirement.
Specifically, the test script with the trigger judgment condition is executed to simulate the ATP peripheral equipment.
If the test script with the trigger judgment condition does not have the train position, the script is executed immediately; and if the test script with the trigger judgment condition contains the train position, executing the test script after the test script execution condition is met.
By way of example, but not limitation, a car horn may be simulated that sounds once after 3 minutes for 30 seconds. The siren script is defined as follows.
The simulated train whistle does not need to judge the trigger condition according to the train position, so the test script does not have train position information.
In the simulator attribute assignment instruction, SIM _ ID =1 (indicating that the current ID is 1) is defined; RUN _ PERIOD _ TIME =1 (indicating that the car horn script is RUN every 1S); SIM _ NAME = car whistle (representing the current simulated car whistle); in the simulation script maximum TIME limit instruction, SET _ MAX _ TIME (2000 s) is defined (representing that the maximum allowable simulation script run TIME of the horn is 2000 seconds); in the delayed execution instruction, DELAY (3 m) is defined (the vehicle horn script is operated after being delayed for 3 minutes, namely, the horn is sounded after 3 minutes); when a whistling instruction is started, a SEND _ RAW _ MSG (1) is defined (1 means that the whistling instruction is effective); in the delayed execution instruction, DELAY (30 s) is defined (which means that the car horn script is delayed for 30 seconds to run, namely, the horn is continuously sounded for 30 seconds); at the end of the blast instruction, SEND _ RAW _ MSG (0) is defined (0 means that the blast instruction is not valid).
Executing the car whistle script, simulating the car whistle action: after three minutes, the car horn began to whistle for a duration of 30 seconds.
By way of example, but not limitation, the simulation may be performed for a transponder that sends the specified data a to the ATP device when the train arrives at 1000KM of the current leg. The transponder script is defined as follows.
The simulation braking needs to judge the trigger condition according to the train position, so the test script contains the train position information.
Defining the station position: 1000 KM. In the simulator attribute assignment instruction, SIM _ ID =3 (indicating that the current ID is 3), RUN _ PERIOD _ TIME =1 (indicating that the brake script is RUN once), and SIM _ NAME = the transponder (indicating that the transponder is currently simulated) are defined. SEND _ RAW _ msg (a) is defined in the SEND data to ATP device instruction in the form of a byte stream. (indicating that the transponder sent a data).
And executing the responder script, judging the position of the train by the general simulator all the time, and when the train head reaches the 1000KM position of the current line, starting to send the data A once by the responder script. This simulates the action of the transponder sending a message after the train has arrived at the location.
Specifically, the universal simulator sends data to the ATP device to test the ATP device.
The test script with the trigger judgment condition consists of one command signal, and each command signal comprises a train position and a script instruction. Namely, the test script with the trigger judgment condition comprises a plurality of script instructions. The script command includes data content and processing method of ATP device communication. When the script instructions are executed, instruction communication data is generated.
And the general simulator processes the instruction communication data by using the configuration file to generate a byte stream and sends the byte stream to the ATP equipment.
In particular, the configuration file defines the data formats for different ATP peripherals to communicate with the ATP device.
By way of example, the configuration file may use, but is not limited to, the following format: the configuration file is an xml format file.
Specifically, XML (Extensible Markup Language), a subset of standard universal Markup languages, is a Markup Language for Markup electronic documents to be structured. The language format is an xml format. In electronic computers, a label refers to a symbol of information that can be understood by a computer, and by this label, various information such as articles and the like can be handled between computers. It can be used to mark data, define data types, and is a source language that allows a user to define his or her own markup language. It is well suited for world wide web transport, providing a unified approach to describing and exchanging structured data that is independent of the application or vendor. Is a cross-platform, content-dependent technology in the Internet environment and is also an effective tool today for processing distributed structural information.
The configuration file defines the data formats of the different ATP peripherals to communicate with the ATP device. And selecting a configuration file corresponding to the ATP peripheral equipment according to the ATP peripheral equipment needing to be simulated. Illustratively, the profile of the track circuit contains track circuit related content.
The configuration file processes the command communication data to generate a byte stream and sends the byte stream to the ATP equipment. And the ATP equipment receives the information and completes the test of the ATP equipment.
Illustratively, an analog transponder tests an ATP device. The transponder script is executed. After execution, the byte stream is generated and sent to the ATP device. If the ATP equipment receives the message A when the train head reaches 1000KM and the message A is verified correctly, the test is successful; if the message A is received before the train head reaches 1000 KM; or the message A is not received after the train head reaches 1000 KM; or the A message is received when the train head reaches 1000KM, but the A message is verified incorrectly, which represents that the test fails.
The method II comprises the following steps:
the method comprises the steps that a general simulator obtains a simulation request, and ATP peripheral equipment needing to be simulated is determined according to the simulation request;
calling a test script with a trigger judgment condition according to the ATP peripheral equipment to be simulated;
and the universal simulator receives the data sent by the ATP, analyzes the data, executes the test script with the trigger judgment condition, simulates ATP peripheral equipment, and sends the data to the ATP equipment to test the ATP equipment.
Specifically, a general simulator obtains a simulation request, and determines ATP peripheral equipment to be simulated according to the simulation request; calling a test script with a trigger judgment condition according to the ATP peripheral equipment to be simulated; this is the same as method one, with specific reference to method one.
Specifically, the general simulator receives data transmitted by the ATP and analyzes the data.
And the universal simulator receives the data sent by the ATP, analyzes the data and generates analysis data I.
The general simulator analyzes the data transmitted by the ATP equipment by using the configuration file to generate analysis data I, and the analysis data I comprises a message number and a field value. The configuration file sets the data format of the communication between the generic device and the ATP device. Then, the message number of the parsed data one and the field value of the parsed data one are processed.
The message number is defined by the application specifications of the ATP and the peripheral device, and the message number is not sequential.
Specifically, the configuration file defines a field name in advance, and the field name is a corresponding attribute value which comprises a message number attribute value and a field attribute value; each attribute value corresponds to a different data content. For example, in the staff information form, the field is "name", and the corresponding attribute value under the field is different when a person fills the field, and for example, zhang san should fill the field. The values of the configuration file fields and the attribute values corresponding to different ATP peripherals are not identical. After receiving the ATP message, the universal simulator finds out the relevant configuration file according to the ATP message content, and fills the analyzed data-message number value and the analyzed data-field value obtained by analysis into the attribute value under the field value corresponding to the relevant configuration file.
The message number attribute value corresponds to a parsed data one message number, and the field attribute value corresponds to a parsed data one field value. When ATP equipment data is received, the ATP equipment data is analyzed, a message number of the analyzed data is filled in a message number attribute value, and a field value of the analyzed data is filled in a field attribute value. And reading the configuration file to obtain the specific data content of the ATP equipment.
Illustratively, the ATP device sends data, and after parsing the data, the message number of the parsed data is 15, and the field value of the parsed data is NID _ BG = 200.
The profile sets the message number attribute value to 15 and the field attribute value is NID _ BG = 200.
Specifically, the test script with the trigger judgment condition is executed to simulate the ATP peripheral equipment.
The test script with the trigger judgment condition consists of one command signal, and each command signal comprises a train position and a script instruction. The train position is the same as that in the first method, which is specifically referred to as the first method.
The script instructions are divided into two types, namely a first script instruction and a second script instruction. The first script instruction is preset; the second script instruction requires configuration.
The configuration comprises:
and the general simulator starts a script configuration table to configure the second test script instruction.
Specifically, the general simulator calls a test script with a trigger judgment condition according to the ATP peripheral equipment to be simulated. Different testing scripts with trigger judgment conditions corresponding to different ATP peripheral equipment to be simulated are different. And the test script with the triggering judgment condition consists of one command signal, and each command signal comprises a train position and a script instruction. Some test scripts with trigger judgment conditions need to interact with ATP equipment, and data transmitted by ATP needs to be obtained; some test scripts with trigger judgment conditions can run without interacting with ATP equipment, and the scripts are preset.
Illustratively, the RBC needs to interact with the ATP device, and therefore, the RBC script also needs to interact with the ATP device. The RBC script also consists of one command signal, and each command signal comprises a train position and a script instruction; the script instruction contained in the RBC script partially belongs to the second script instruction, and the data of the script instruction needs to be configured; the rest part belongs to the first script instruction, and the data of the script instruction is preset by the system and does not need to be configured.
Whether the test script with the trigger judgment condition contains the train position is irrelevant to judging whether the script instruction in the test script belongs to the first script instruction or the second script instruction.
If a test script with a trigger judgment condition is available, the script contains the train position and is used for sending the specified byte stream to the ATP. The script contains a minimum of two command signals; since the command signal contains a train position and a script instruction, and the script has a train position, each of the two command signals of the script contains a train position and a script instruction. The two script instructions of the script are respectively as follows: simulator attribute assignment instructions and instructions to send data to the ATP device in the form of a byte stream. The two script instructions can be preset, namely the two scripts in the script belong to the first script instruction and are preset by the system without configuration.
If a certain test script with a trigger judgment condition exists, the script does not have the train position and is used for automatically replying data to the ATP after receiving the specified message. The script contains a minimum of 2 command signals; since the command signal contains a train position and a script instruction, and the script has no train position, 2 command signals of the script are equivalent to 2 script instructions. The two script instructions of the script are respectively as follows: simulator attribute assignment commands and auto-reply data to ATP device commands. The simulator attribute assignment instruction in the script comprises assignment to the script, and assignment information is set at the beginning; namely, the simulator attribute assignment instruction in the script belongs to a first script instruction, is preset by the system and does not need to be configured; the automatic reply data in the script is sent to an ATP equipment instruction, interaction with ATP is needed, interaction information cannot be determined at the beginning, namely a system cannot be preset, and the content of the interaction information needs to be configured by a general simulator; the automatic reply data in the script to the ATP equipment instruction belongs to a second script instruction, and the data of the script instruction needs to be configured.
Further, certain fields in the script instruction require scripted fill-in.
Illustratively, a test script with a trigger judgment condition comprises a delay execution instruction, and the specific delay time can be set in advance; or according to actual requirements, the scriber can fill the specific delay time to determine the script delay time. These fields are then filled with values that are specific.
This type of script instruction still belongs to the first script instruction.
Values of some fields of the script instruction can be obtained through automatic calculation, and manual calculation by a scriber is not needed.
Illustratively, a test script with a trigger judgment condition comprises a script instruction, and the script instruction content comprises specific information, information length and the like. The message length can be automatically calculated by the system according to the configuration files of the ATP device and the ATP peripheral device. The fields relating to the length of the message may or may not be filled in by the scriber and may be filled in automatically by the system.
The script instruction is preset by the system if all contents except the message length belong to the first script instruction because the message length is only simple operation; the second script instruction is attributed if something else, besides the message length, needs to be configured.
Some fields of the script instructions may be automatically populated from previous messages or manually populated by a scriber to implement different behavior simulations of the ATP peripheral.
Such script instructions belong to the first script instruction if manual fill is used.
If auto-fill from previous message is used: the script instruction belongs to the first script instruction if the previous message belongs to the system preset and other contents in the script instruction are all the system preset; such script instructions belong to second script instructions if the previous message belongs to get through configuration.
Specifically, each ATP peripheral device to be simulated corresponds to a test script with a trigger determination condition, and the corresponding script configuration table has different specific contents. Illustratively, a test script with a trigger judgment condition corresponding to the RBC is called an RBC script, and a script configuration table thereof is called an RBC script configuration table. The script configuration table defines the rules of the AUTO field in the script instruction. For example, the RBC script configuration table defines rules of AUTO field in script instructions contained in RBC scripts.
The script configuration table comprises four parts: the method includes automatically generating a data message number to be sent to the ATP device, automatically generating a field value in the data message to be sent to the ATP device, a latest received source message number for automatic assignment, and a field value in the latest received source message for automatic assignment.
The configuration file automatically assigns values to the script configuration table. The configuration file fills the message number attribute value content into the newly received source message number and fills the field attribute value content into the field value in the newly received source message.
Illustratively, the ATP equipment sends data, the configuration file analyzes the data to generate analysis data I, and the script configuration table is used for configuring the test script with the trigger judgment condition according to the analysis data I.
After parsing, in the configuration file: the message number attribute value is 15 and the field attribute value is NID _ BG = 200.
In the script configuration table, all the original settings are null:
at this point, the configuration file automatically assigns values to the script configuration table. After the value is assigned,
in the script configuration table, now set:
the automatically generated data message number sent to the ATP device is temporarily empty since no data has been sent;
the value of the field in the automatically generated data message sent to the ATP device is temporarily empty since no data has been sent;
the latest received source MESSAGE number for auto-assignment, set NID _ MESSAGE = 15;
a field value in the latest received source message for auto assignment, set NID _ BG = 200.
And configuring the second script instruction by using the script configuration table.
The configuration may be made using, but is not limited to, the following: in a second script instruction, field one contains time stamp information, and field one is assigned as AUTO. In the script configuration table, the field value in the latest received source message for automatic assignment contains timestamp information. And at the moment, the script configuration table configures the second script instruction, and the script configuration table reassigns the timestamp information in the field value in the latest received source message for automatic assignment to the field one. And filling the relevant data into a script configuration table to explain the source of the field value at this time.
Illustratively, a certain test script with the trigger judgment condition includes an a script instruction, and the a script instruction is a second script instruction. The a-script instructions are configured with a script configuration table.
The A script instruction comprises a first field: the value of the field in the data message sent to the ATP device is 24; a field value in a data message transmitted to the ATP device is NID _ BG = AUTO.
A field value in a newly received source message for automatic assignment in the script configuration table, which contains NID _ BG =200, is judged to be able to assign a value to the first field; the script configuration table automatically reassigns the first field in the script instruction A. The script configuration table assigns a field value in the newly received source message to the first field.
At this time, the script configuration table reassigns NID _ BG in the A script command to 200 according to the field value in the newly received source message.
And after the A script instruction is assigned, updating data in the script configuration table to explain the source of the A script instruction assignment.
The latest script configuration table data is as follows:
a data MESSAGE number sent to the ATP device, setting NID _ MESSAGE = 24;
a field value in a data message transmitted to the ATP device, setting NID _ BG = 200;
the newly received source MESSAGE number sets NID _ MESSAGE = 15;
a field value in the newly received source message, NID _ BG =200 is set.
The method comprises the steps that a general simulator receives data sent by ATP, a configuration file analyzes the data, and a message number and a field value are generated; the configuration file assigns the latest message number and field value to the script configuration table; and judging the script instruction by the script configuration table to see whether the value can be assigned or not. If the value can be assigned, updating the script configuration table file after the value is assigned, and explaining the source of the value assignment. If the script instruction can not be assigned, the script configuration table waits for the next data transmitted by the configuration file.
A certain test script with a trigger judgment condition needs to interact with the ATP device for multiple times, that is, the test script with the trigger judgment condition includes multiple second script instructions, and the automatically generated data message number sent to the ATP device, the automatically generated field value in the data message sent to the ATP device, the latest received source message number for automatic assignment, and the field value in the latest received source message for automatic assignment in the script configuration table are updated in each interaction process, that is, the script configuration table stores a plurality of data for recording the source of the assignment of the script configuration table to the test script.
The test script with the trigger judgment condition consists of a command signal; each command signal contains a train position and a script instruction. When the first script instruction reaches an execution condition, the first script instruction starts to be executed; when the second script instruction reaches the execution condition, the second script instruction starts executing … … until the test script has been completely executed when all script instructions have been executed. The test script is assumed to comprise n script instructions, wherein the mth script instruction is a second script instruction (m is less than or equal to n); then the configuration of the mth script instruction may be configured when the test script is not executed, or may be configured after the test script receives the ATP message after the mth script instruction of the test script is executed (g < m).
Specifically, the universal simulator sends data to the ATP device to test the ATP device.
Illustratively, the ATP reply may be simulated using, but not limited to, a reply device. The replying device receives the message with the message number of 50 and sends the message with the message number of 61 to the ATP equipment. The message with message number 50 contains data B. The content of the replied message is as follows: the replying device replies that the message content is B. Assuming that the reply device does not require the train position to make the trigger condition determination, the reply device script is defined as follows.
In the simulator attribute assignment instruction, SIM _ ID =3 (indicating that the current ID is 3), RUN _ PERIOD _ TIME =1 (indicating that the simulation reply device operates every 1S), and SIM _ NAME = the reply device (indicating that the current simulation reply device operates). In the AUTO reply data to ATP device instruction, AUTO _ ANSWER _ MSG is defined (50, 61, reply by reply means, message content = AUTO). (indicating that the replying device receives the message with the message number of 50 and sends the message with the message number of 61 to the ATP equipment, wherein the message content is replied by the replying device, and the replied content is data transmitted by the ATP equipment).
The universal simulator receives a message with the message number of 50 sent by the ATP, analyzes the message by using the configuration file, and configures the reply device script by using the analyzed data. The reply device script is executed, thus simulating the behavior of replying to ATP data after ATP data is received.
When each script instruction in the test script with the trigger judgment condition is executed, instruction communication data is generated. And the configuration file processes the instruction communication data to generate a byte stream and sends the byte stream to the ATP equipment. And the ATP equipment receives the information and completes the test of the ATP equipment.
Illustratively, the analog reply device tests an ATP device. If the ATP device sends a message with a message number of 50 and then receives a message with a message number of 61 of the replying device, the message content is: the replying device replies with message content = B. Then the test is successful. If the ATP equipment sends the message with the message number of 50, the message with the message number of 61 of the recovery device is not received back within a period of time; or a message with message number 61 is received but the message content is wrong. It represents a test failure.
The method also includes automatic testing using EXPECT instructions.
The automatic test method comprises the following steps: and the universal simulator receives the ATP message, and the configuration file analyzes the ATP message to generate a message number and a field value. Verifying the ATP message number and the field value by using an EXPECT instruction, and if the ATP message number and the field value are the same as the defined value, representing that the automatic test is successful; if the ATP test result is different from the ATP test result, the ATP test is failed, and other instructions are not executed.
The universal simulator can simulate various ATP peripheral devices to test ATP according to the method, so that the ATP device is tested strictly and comprehensively.
Further, the ATP peripheral simulation method for testing the ATP device can be used for carrying out special scene testing on the ATP device. For example, when the train is over-speed, accidents can be caused; testing ATP devices using real ATP peripherals in this scenario is dangerous. The method can simulate the behavior of ATP equipment in the overspeed scene of the train. The general simulator sets the acceleration of the train in the test script, and when the train speed exceeds the allowable speed of ATP after the train is accelerated for a certain time, the ATP equipment automatically applies the brake; after the ATP equipment continuously applies the brake for a certain time, the general simulator receives data transmitted by the ATP equipment to obtain train speed field value data in the data; an extract command is used to verify that the obtained train speed field value exceeds the ATP's allowable speed field value. If the train speed field value is not higher than the allowable speed field value of the ATP, the ATP equipment is effectively braked, and the overspeed scene test is successful; if the train speed field value is higher than the allowable speed field value of the ATP, the overspeed scene test fails, the ATP test fails, and other instructions are not executed.
The embodiment of the invention also discloses an ATP peripheral equipment general simulator for testing ATP equipment, which can adopt but is not limited to the following structure as shown in FIG. 2. The universal simulator comprises:
the acquisition module is used for acquiring the simulation request and generating acquisition information;
the determining module is used for receiving the acquisition information transmitted by the acquisition module, determining the ATP peripheral equipment to be simulated according to the simulation request and generating the determination information;
the calling module is used for receiving the determination information transmitted by the determination module, acquiring the information and calling the test script with the trigger judgment condition to generate calling information;
the execution module is used for receiving the calling information transmitted by the calling module, executing the test script with the trigger judgment condition and generating execution information;
the execution module includes:
the receiving component is used for receiving the data sent by the ATP and generating received data;
the analysis component receives the received data transmitted by the receiving component and is used for analyzing the data to generate analyzed data;
the parsing component parses the data using a configuration file;
the configuration file defines different data formats for communication of the ATP peripheral device with the ATP device;
the general simulator uses the configuration file to process the received data sent by the ATP, and generates a message number and a field value;
the general simulator uses the configuration file to process the instruction communication data to generate a byte stream;
the execution component receives the analysis data transmitted by the configuration file and is used for executing the test script with the trigger judgment condition;
the test script with the trigger judgment condition comprises a plurality of groups of command signals, and the command signals comprise train positions and script instructions;
the script instruction defines data content and a processing mode of communication with the ATP equipment;
executing the script instruction to generate instruction communication data;
the script instructions include:
a first script instruction, the first script instruction being preset;
a second script instruction, the second script instruction requiring configuration;
the configuration comprises:
the general simulator starts a script configuration table to configure a second script instruction;
the script configuration table includes:
automatically generating a data message number to be sent to the ATP device;
automatically generating a field value in a data message sent to the ATP device;
a latest received source message number for automatic assignment;
a field value in the latest received source message for automatic assignment.
The simulation module is used for receiving the execution information transmitted by the execution module, simulating the ATP peripheral equipment and generating simulation information;
the sending module is used for receiving the execution information transmitted by the execution module, sending data to the ATP equipment and generating sending information;
and the test module is used for receiving the simulation information transmitted by the simulation module and the sending information transmitted by the sending module and testing the ATP equipment.
The automatic test module is used for automatically testing by using an EXPECT instruction;
the automatic testing using EXPECT instructions comprises:
and receiving the ATP message, and verifying the ATP message by using an EXPECT instruction to obtain a test result.
The universal simulator can simulate various ATP peripheral devices to test the ATP devices, and the testing cost is low because real devices are not used in the testing.
Further, when a new ATP peripheral device appears, the general simulator only needs to add a corresponding configuration file, a script configuration table and a test script triggering a judgment condition; according to the ATP peripheral simulation method for testing the ATP device, the test of the ATP device by the new ATP peripheral can be simulated. If a certain peripheral equipment changes, only part or all of the corresponding configuration file, the script configuration table and the test script triggering the judgment condition need to be modified. This makes the universal simulator simple to upgrade and easy to maintain.
Although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (14)

1. An ATP peripheral simulation method for testing ATP equipment is characterized in that,
the method comprises the following steps:
the method comprises the steps that a general simulator obtains a simulation request, and ATP peripheral equipment needing to be simulated is determined according to the simulation request, wherein the ATP peripheral equipment comprises all equipment interacting with the ATP equipment;
calling a test script with a trigger judgment condition according to the ATP peripheral equipment to be simulated;
executing the test script with the trigger judgment condition, simulating ATP peripheral equipment, and sending data to the ATP equipment by the general simulator to test the ATP equipment;
the test script with the trigger judgment condition comprises a plurality of groups of command signals,
the command signal comprises a train position and a script instruction;
the script instruction defines data content and a processing mode of communication with the ATP equipment;
executing the script instruction to generate instruction communication data;
executing the script instructions to simulate a behavior of an ATP peripheral in communication with the ATP device;
the combination of script instructions is executed to emulate a specific ATP peripheral.
2. The simulation method of claim 1,
the executing the test script with the trigger judgment condition comprises the following steps:
and the universal simulator receives the data sent by the ATP equipment, analyzes the received data and executes the test script with the trigger judgment condition.
3. The simulation method of claim 2,
parsing the received data using a configuration file;
the configuration file defines different data formats for the ATP peripheral to communicate with the ATP device.
4. The simulation method of claim 1,
the script instructions include:
a first script instruction, the first script instruction being preset;
a second script instruction, the second script instruction requiring configuration;
the second script instruction configuration comprises:
and the universal simulator starts a script configuration table to configure the second script instruction.
5. The simulation method of claim 4,
the script configuration table includes:
automatically generating a data message number to be sent to the ATP device;
automatically generating a field value in a data message sent to the ATP device;
a latest received source message number for automatic assignment;
a field value in the latest received source message for automatic assignment.
6. The simulation method of claim 1,
the general simulator uses the configuration file to process the received data sent by the ATP equipment, and generates a message number and a field value;
and the general simulator processes the instruction communication data by using the configuration file to generate a byte stream.
7. The simulation method of claim 1,
the script instruction comprises an EXPECT instruction, and the EXPECT instruction is used for automatically testing ATP equipment by the general simulator;
the simulation method further comprises:
automatic test is carried out by using EXPECT instruction;
the automatic testing using EXPECT instructions comprises:
and the universal simulator receives the ATP equipment message, verifies the ATP equipment message by using an EXPECT instruction and obtains a test result.
8. An ATP peripheral universal simulator for testing an ATP device, the simulator comprising:
the acquisition module is used for acquiring a simulation request;
a determining module, configured to determine, according to the simulation request, ATP peripherals that need to be simulated, where the ATP peripherals include all devices that interact with an ATP device;
the calling module is used for calling the test script with the trigger judgment condition;
the execution module is used for executing the test script with the trigger judgment condition;
an analog module for simulating an ATP peripheral;
the sending module is used for sending data to the ATP equipment;
the testing module is used for testing the ATP equipment;
the test script with the trigger judgment condition comprises a plurality of groups of command signals,
the command signal comprises a train position and a script instruction;
the script instruction defines data content and a processing mode of communication with the ATP equipment;
executing the script instruction to generate instruction communication data;
executing the script instructions to simulate a behavior of an ATP peripheral in communication with the ATP device;
the combination of script instructions is executed to emulate a specific ATP peripheral.
9. The simulator of claim 8,
the execution module includes:
the receiving component is used for receiving data sent by the ATP equipment;
a parsing component for parsing the received data;
and the execution component is used for executing the test script with the trigger judgment condition.
10. The simulator of claim 9,
the parsing component parses the received data using a configuration file;
the configuration file defines different data formats for the ATP peripheral to communicate with the ATP device.
11. The simulator of claim 8,
the script instructions include:
a first script instruction, the first script instruction being preset;
a second script instruction, the second script instruction requiring configuration;
the second script instruction configuration comprises:
and the universal simulator starts a script configuration table to configure the second script instruction.
12. The simulator of claim 11,
the script configuration table includes:
automatically generating a data message number to be sent to the ATP device;
automatically generating a field value in a data message sent to the ATP device;
a latest received source message number for automatic assignment;
a field value in the latest received source message for automatic assignment.
13. The simulator of claim 8,
the general simulator uses the configuration file to process the received data sent by the ATP equipment, and generates a message number and a field value;
and the general simulator processes the instruction communication data by using the configuration file to generate a byte stream.
14. The simulator of claim 8,
the script instruction comprises an EXPECT instruction, and the EXPECT instruction is used for automatically testing ATP equipment by the general simulator;
the simulator also comprises an automatic test module;
the automatic test module is used for automatically testing by using an EXPECT instruction;
the automatic testing using EXPECT instructions comprises:
and receiving the ATP equipment message, and verifying the ATP equipment message by using an EXPECT instruction to obtain a test result.
CN202010205274.XA 2020-03-23 2020-03-23 ATP peripheral equipment simulation method for testing ATP equipment and general simulator Active CN111090949B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010205274.XA CN111090949B (en) 2020-03-23 2020-03-23 ATP peripheral equipment simulation method for testing ATP equipment and general simulator

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010205274.XA CN111090949B (en) 2020-03-23 2020-03-23 ATP peripheral equipment simulation method for testing ATP equipment and general simulator

Publications (2)

Publication Number Publication Date
CN111090949A CN111090949A (en) 2020-05-01
CN111090949B true CN111090949B (en) 2020-10-23

Family

ID=70400677

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010205274.XA Active CN111090949B (en) 2020-03-23 2020-03-23 ATP peripheral equipment simulation method for testing ATP equipment and general simulator

Country Status (1)

Country Link
CN (1) CN111090949B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111488631B (en) * 2020-06-28 2020-09-22 中国核动力研究设计院 Nuclear-level security display device and configuration-analysis system thereof
CN115184713B (en) * 2022-09-13 2022-12-09 卡斯柯信号(北京)有限公司 Method and apparatus for testing RBCs

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5623498A (en) * 1995-03-31 1997-04-22 Lucent Technologies, Inc. User programmable test arrangement for a telecommunications network
CN104699069A (en) * 2015-01-09 2015-06-10 中国铁路总公司 Train control system vehicular device simulation testing system
CN108227519B (en) * 2017-12-29 2022-06-14 中国铁道科学研究院集团有限公司通信信号研究所 CTCS2-200C type train control vehicle-mounted equipment automation simulation test platform
CN109581123A (en) * 2018-12-24 2019-04-05 中国铁道科学研究院集团有限公司通信信号研究所 A kind of 250 kilometers of ATP convenient test equipments of speed per hour

Also Published As

Publication number Publication date
CN111090949A (en) 2020-05-01

Similar Documents

Publication Publication Date Title
CN111090949B (en) ATP peripheral equipment simulation method for testing ATP equipment and general simulator
CN110239599B (en) Train control simulation test system and method based on service-oriented
CN110412374A (en) A kind of ADAS HIL test macro based on multisensor
CN112631932A (en) Sub-function independent test method of automatic train monitoring system based on interface
CN108490807B (en) Train fault simulation system and test method
CN112198867A (en) Train control system software simulation test method
US20050004787A1 (en) System and method for real time simulation
CN114936062B (en) Method, device, equipment, system and storage medium for automatic debugging of equipment
CN105867164A (en) Transponder system analog simulation method, device and system
CN116306479A (en) UVM-based Ethernet PHY universal verification platform and verification method
CN115993937A (en) Method and device for realizing simulation environment of multi-process solid state disk
CN113572817B (en) Vehicle-mounted interface platform system and communication system under cloud platform
CN116028367A (en) Automatic test system and method
US20160224456A1 (en) Method for verifying generated software, and verifying device for carrying out such a method
CN111897306B (en) Signal equipment testing method and external equipment interface
CN108228989A (en) Failure insertion system based on external real equipment
CN116701096A (en) Cloud server testing method, virtual machine, vehicle machine system and storage medium
CN114330036A (en) Simulation test method for collision avoidance software of airborne collision avoidance system
CN110398949B (en) Test platform of high-speed railway train operation control system based on black box test
CN107991904B (en) Simulated wireless block center message generator
CN111966072B (en) Simulation test method and device for air conditioner control panel
CN115447645B (en) Method and device for automatically canceling all temporary speed limits
Sağirkaya et al. Avionics Simulation Environment
KR101050666B1 (en) Network simulation device considering vehicle control algorithm
CN115755824A (en) Method and device for testing zone controller

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20200501

Assignee: BEIJING RAILWAY SIGNAL Co.,Ltd.

Assignor: BEIJING NATIONAL RAILWAY RESEARCH & DESIGN INSTITUTE OF SIGNAL & COMMUNICATION Co.,Ltd.

Contract record no.: X2023980035234

Denomination of invention: An ATP peripheral device simulation method and universal simulator for testing ATP equipment

Granted publication date: 20201023

License type: Common License

Record date: 20230504

EE01 Entry into force of recordation of patent licensing contract