Schema Design of Communication Module in Highway Monitoring System: A Case Study

Because of an abundance of nodes in highway monitoring system and high complexity of Highway Monitoring System, a UDP-based communication module in Highway Monitoring System was designed, which can ensure consistency of information between nodes by means of the control command standardization and real-time interaction based on UDP protocol. Finally, the communication module was realized, and experiments showed that the design is feasible and has some flexibility.


INTRODUCTION
Nowadays, Highway plays an important role in the national economy. However, the urgent requirements for its normal operation and its creative potential have resulted in increasingly dependent on the highway monitoring system. The highway monitoring system has become an important field of scientific research which gains more concern, and more researchers make great efforts to develop and disseminate it, therefore, it is a secular trend of the 21st-century intelligent transportation system [1]. The highway monitoring system can save people's time and money, reduce the number of traffic casualties, and improve the quality of people's lives with regard to the perspective of safety and service function [2]. So, it is claimed that highway monitoring system throughout the country is the basis for the modernization of future transportation industry, which will create greater social and economic benefits than the existing interstate highway system in the United States in the next 20 years, just as cement, asphalt and steel rail do. Therefore, the highway monitoring system is the irresistible trend of the 21stcentury transportation system, an important field of scientific research worthy to be developed and disseminated [3].

II. OVERVIEW OF HIGHWAY MONITORING SYSTEM
The highway is enclosed, fully interchanged roadway, with the fast vehicles and heavy traffic. The perfect characteristics are "safe, fast, efficient, comfortable, and convenient". However, with the growing demand of traffic, congestion, accidents and pollution occurred, making the highway monitoring system to become the focus of attention of administrative authority in charge of the construction of transportation facilities [4].
The so-called monitoring, refers to real-time observation of traffic conditions [9], road surface, weather conditions and equipment conditions and other parameters which are sent to the monitoring center via the communi-cation system to adjust and control traffic, by means of data acquisition on the pavement and the roadside, testing equipment and artificial observation [5].
Overseas study on the Highway monitoring system commenced early, and the nowadays Highway monitoring system also have been perfect, for example, United States, Canada, Europe and Japan lead in the Highway monitoring system [6]. United States commenced large-scale construction of highway since the 1950s, and endeavored in the operation and management of the highway after 1960, therefore, some of the city's highways installed various Highways monitoring system [8]. Currently, the computer was introduced into the Highway monitoring system, so as to achieve the optimum operation of the highway [7].
At present, there is a wide gap between highway monitoring system in China and foreign countries, with vehicle detectors, cameras, intelligence panels of low density in China. There are differences between the situation in China and the developed countries, for example, the poor performance of vehicles, complex traffic composition, so we should study new highway monitoring system suitable for China's conditions, and we not only learn the advanced experience of foreign countries, but also integrate with China's conditions.

III. HIGHWAY MONITORING SYSTEM
Highway monitoring system is a application of advanced information technology, data transmission technology, electronic control technology and computer processing technology in management system for Highway transportation, which can give full scope to real-time, accurate and efficient management system for Highway transportation. Application of highway monitoring system in a comprehensive monitoring and controlling highway will play an extremely important role in the normal operation on the highway and efficiency of the highway.
Highway monitoring system is also a computer system with C / S (Client / Server) mode. The server is responsible for computing and information storage, and the client is responsible for handling the user interface. Server and Client can be connected to a LAN in monitoring center by means of the computer network equipment. In addition to connecting server and client in a LAN in monitoring center, monitoring center controls large-screen projectors, video switching matrix, video walls, map board by way of the associated computer device.  From a point of view of information flow in Highway monitoring system, the communication module is the entry of the external information into the system, and the exit of remote control command to external device, which plays the important role of Information transmission in Highway monitoring system. Its main functions are responsible for sending control and feedback Information to external monitoring device, receiving control and feedback Information from external monitoring device and system clock proofreading etc...
The communication module provides communication channel for data Interchange between external monitoring device and monitoring center. Information collected by external monitoring device is sent to the nearest communication station through the dedicated line modem, and then information will upload to the monitoring center through Computer Network.
Communication Protocol: In the communication module, we should determine the communication protocol, a port for each external device, the communication parameters of each port, such as: communication rate, data bits, and parity bits, stop bits, etc.
• Communication parameters: transmission rate from 1200bps to 19.6Kbps, 8bit data bit, no parity bit, 1bit start bit, 1bit stop bit, no hardware and software flow control. • The packets definition: STX-0x02 (header of frame), 0x03 (end of frame), ESC-0x1B (escape character). While Sending a frame, if a character between the header and the end of the frame byte is equal to the STX, ETX or ESC, its meaning ought to change, for example, STX will turn into ESC and 0xE7; ETX will turn the ESC and 0xe8; ESC will turn into ESC and 0x00. ADDR is address of external device, with the range of 01 to 99, 00 as the broadcast address. CRC generator polynomial is G (X) = X ^ 16 + X ^ 12 + X ^ 5 +1, while CRC is computed excluding the STX.
Other packet formats are given below:

UDP-based Communication:
UDP-based communication is used in the highway monitoring system. When Computer in communication station has received information collected by the external monitoring device, the information is passed to the monitoring computer in monitoring center by means of UDP packets, then the monitoring computer writes the information into the server, finally the information is displayed on the map board by graphics workstation. In addition, video surveillance workstation and toll stations use UDP-based communication. Therefore, a brief introduction on "connectionless-oriented" protocol UDP is given below [10].
"connectionless-oriented" means that data packets are directly sent regardless of state on the other side, without a preestablished connection with each other before the formal communication [16]. This is very similar to text messages in mobile phone: when you send text messages, you only need to enter the recipient's mobile phone number, regardless of the recipient's service state [11].
UDP (User Datagram Protocol) is a protocol corresponding to TCP [18]. It is a connectionless-oriented protocol, which can directly send data packet, without preestablishing a connection with each other [14,20].

SPECIAL FOCUS PAPER SCHEMA DESIGN OF COMMUNICATION MODULE IN HIGHWAY MONITORING SYSTEM: A CASE STUDY
UDP is only suitable for application with sending small amounts of data and the fewer requirements for reliability [19]. For example, we often use the "ping" command to test TCP / IP communication between two computers. Principle of "ping" command is that UDP packet is sent to the computer on the other side, and then it confirmed receipt of UDP packets, in other words, if a message which denotes that the data package has arrived, is feedback in a timely manner, the network is Interconnection. For example, with default setting, a "ping" operation sends four packets. It is well known that four packets are sent, four packets should be received. (Because the other computer will send back confirmation packets as long as it receives a packets). This fully shows that the UDP protocol is a connectionless-oriented protocol, without a process of establishing a connection. Because of no a process of establishing a connection, the UDP protocol is efficient; in the same way, because of this, its reliability is lower than the TCP protocol [15]. For example, QQ, a chat application, employ UDP-based message, so sometimes the message maybe is lost [13].
UDP-based communication process is shown in Fig.2 [12]. On the server side, the server uses AF-INET protocol family to create a UDP datagram socket, with the socket type SOCK-DGRAM. The API function below will create a UDP datagram sockets: Sockfd=socket(AF-INET SOCK-DGRAM 0) The server then calls the bind function to bind a port to the UDP datagram socket. Due to have no use for establishing a connection, the server can be waiting for the UDP datagram which was sent by the client by means of calling recvfrom function on the specified port. The client firstly creates a UDP datagram socket by the socket function, with a port number assigned by the operating system. Since then, the client can use the sendto function to send a UDP packet to a specified address. Once server received the UDP packet, the recvfrom function will return. After server has processed the UDP packet, then server will return the results to the client by the sendto function.
Sendto and recvfrom function are defined as follows: ! The sendto function can send data in application buffer to the specified address space of the receiving process. Its prototype is: #include<sys/socket h> int sendto(int sockfd const void *msg int len unsigned int flags const struct sockaddr*to int tolen) ! The recvfrom function can receive data in socket buffer and send it to the user process in the following form: #include<sys/socket h> int recvfrom(int sockfd const void *buf int len unsigned int flags const struct sockaddr *from sockln_t*addrlen)

V. COMMUNICATION MODULE
The TNMUDP Control is introduced from NetMasters by Delphi. The programmer does not need to grasp the details of the UDP protocol, UDP-based communication can be implemented [17].
The TNMUDP Control's attributes: ! Loca1Port: This attribute is used to specify the local port. This property cannot be modified during operation. ! RemoteHost: This attribute is used to specify the computer to which the UDP packet is sent, a host name or IP address. ! RemotePort: This attribute is used to specify the port number used on the other computer. The TNMUDP Control's primary methods ! ReadBuffer(var Buff: array of char; var Length:integer ; The method is for receiving data and the received data is placed in a buffer. The Length parameter specifies the length of the buffer. If the Length of the buffer is too small, it will trigger the "OnBuffe Invalid" event. ! ReadStream(DataStream:TStream); The method is for receiving data and the received data is placed in a stream specified by DataStream parameters. If the stream specified by DataStream parameter does not exist, it will trigger OnStreamInvalid event.
Server is Windows 2000 Advance Server, and client is Windows XP Professional, with multitasking capabilities, multi-level system fault tolerance. Fig.3 shows interface of communication module.

VI. CONCLUSION
Highway monitoring system is a complex system and a systematic project, which involved the computer network technology, computer control technology, distributed database technology, component technology, communica-