Design of Multi-task TDCS Station Extension Communication Protocol

Train Dispatch and Command System ( TDCS ) is a modern information system that realizes transparent command, real-time adjustment and centralized control of trains at all levels of railway transportation dispatch. It is composed of the Ministry of Railways, Railway Bureau Central Area Network and station basic network. TDCS station extension is the equipment of the basic network of the station, which plays the role of information collection, upload and distribution, and occupies a very important position in the entire system.

1 Functional analysis

In the station extension system, the station extension software mainly implements two functions:

(1) Receive the dispatching commands of the dispatch center of the railway bureau and the train service terminal, after the command analysis processing, send them to the train for execution via the wireless dispatching command device;

(2) Receive the status information sent by the computer interlocking device, wireless train number device, and wireless dispatch command device, and after parsing and repackaging, send the status information to the railway bureau dispatch center and vehicle service terminal.

It can be seen from the above analysis that the system mainly has the following three functional modules: receiving status module, receiving command module and data processing module. Among them, the receiving status module is realized by RS 422 serial communication mode; the receiving command module is realized by Ethernet communication mode; the data processing module is mainly responsible for data processing and sending.

2 Creation of multi-task model

Based on the Windows operating system, for the above three modules, this article established three tasks: serial communication task, Ethernet communication task, data processing task. The data processing task as the main thread, including data receiving and uploading, the processing process is as follows:

(1) The receiving thread receives the data, puts it into the buffer, and uses PostMessage () to send a message to the main thread to notify the main thread that the data is stored in the buffer;

(2) The main thread uses the ReadFile () function to read the buffer data;

(3) The main thread judges whether the received data has changed: if there is a change, call the WriteFile () function or SendData () function to send a message, and clear the timer; otherwise, continue to wait. The specific flow of data processing tasks is shown in Figure 1.

In this system, after using the AfxBeginThread () function to create Ethernet communication tasks, serial communication tasks, and data processing tasks, the message mechanism is used to communicate between multiple tasks, and the semaphore, mutual exclusion, etc. are used to implement threads. Synchronization of global variables and functions.

3 Communication protocol design and analysis

A protocol is a rule that data senders and receivers must abide by. Part of this rule is the format of information that the sender and receiver recognize, that is, information structure. The other part is composed of the protocol type and protocol operator of the information structure. The conversation mode is transmission control.

In this system, the types and lengths of the various data received from the serial port and Ethernet are inconsistent, and the data processing task must be clear about the type of data, the actual length, and the data itself in order to process them in different categories. Therefore, a data transmission protocol must be defined to ensure the reliability of communication and the availability of data reading. This article establishes corresponding data protocols for Ethernet communication and serial communication.

3.1 Ethernet communication protocol

The information related to Ethernet communication includes computer interlocking device status information, wireless vehicle number information, and scheduling command information. This article defines a general data protocol encapsulation class for Ethernet information as follows:

In this data structure, the message type is used to identify whether the message is interlocking device information, wireless vehicle number information or scheduling command information; the sequence number is used to judge the continuity of the received message; the CRC error detection suffix is ​​used to judge the reception The correctness of the message can be selected according to different generator polynomials; the received data array will be filled according to the corresponding content of the interlocking device information, wireless vehicle number information and scheduling command information.

Three-axis Stabilizer is composed of pan axis, rolling axis and tilt-axis. With a gyro-stabilized gimbal system, it keeps stabilized or steerable horizon with automatic calibration to give you an unprecedented smooth shooting experience.

3 axis gimbal stabilizer can be divided into 4 parts, including Three-axis Smartphone Stabilizer, three axis micro dslr stabilizer, 3 axis camera stabilizer and 3axis motion camera stabilizer.

3 axis gimbal stabilizer for cameta
For different consumer, there are 2 kind of 3 axis gimbal stabilizer for them, which are consumer stabilizer and Professional Stabilizer.
professtional gimbal stabilizer
Wewow focusing on handheld stabilizer is a technology company which does R & D independently. With Wenpod series product released, the company achieved the industry's praise and quickly became the leader of the smart stabilizer industry.

Our service

1. Reply to you within 24 hours.

2. Already sample: within 1-2days.

3. Shipping date: within 24 hours once get the payment.

4. 12 months warranty.

5. After-sales service, solve within 3 working dates.

If you have any questions, please contact with us directly.
Wewow appreciates domestic and international business relationship!

Three-Axis Stabilizer

Three-Axis Stabilizer,Popular Three-Axis Mobile Phone Stabilizer,Professional Three-Axis Stabilizer,Handheld Three-Axis Gimbal Stabilizer

GUANGZHOU WEWOW ELECTRONIC CO., LTD. , https://www.stabilizers.pl

This entry was posted in on