Monday, March 18, 2013

[Photo] On the broadcast networks have broadcast file transfer using serial port - broadcast, digita - Business

Of: Tangshan, Hebei Broadcasting and Television Bureau Linne Yun Li Shuo A development background Present, along with digital TV broadcasting and network control the development of several television stations broadcast network control system using the broadcast structure, but when the system needs to computers exchange data with outside broadcast there Shiyou network computer how to prevent virus problems, how to achieve and television broadcast network control center with the outside world for security, data exchange is an important issue. Tangshan television is shown in Figure 1 with the structure of the networked automatic broadcast system, which by the standby data server, ready to stand, the main broadcast station and network switching equipment component, the completion of each part of each independent The task is not to repeat this. Figure 1 Tangshan automatic broadcast television network system structure Television broadcast stations in the control center of Tangsh an, the program was broadcast a day after the end of each day, all material has been broadcast each broadcast station in the corresponding local hard disk into a PARADOX table save for the advertising management able to broadcast all channels all day for content advertising programs and time statistics, you need to broadcast on all channels have been transmitted to the advertising table PARADOX management, but these have been broadcast from the broadcast table to manage network traffic to advertisers Department of computer? By floppy disks and other removable storage device or transmitted over the network means that we first thought, but taking into account the network broadcast system requirements for automated high security, while a variety of security risks in the performance of the computer virus against the most serious, because broadcast Once the network computer virus infection, it will cause the entire broadcast system does not work, the destruction of broadcast data , such as network congestion, which the security of broadcast television will be a fatal. On the network broadcast system, the computer virus infection, there are two main ways, one is through infected floppy disk or other storage medium to read and write infection, which is the oldest and most effective means of attack, through infected floppy boot viruses into the system boot or system partition table, storage media for long-term use will inevitably bring about a computer virus infection. Another way the infection is the infection through a network share, so if the network resource sharing, and infected the adverse impact of file sharing is beyond the capacity of a traditional virus, so we reject the use of floppy disks or other removable storage copy has been broadcast equipment broadcast table and ad management computer and the network broadcast system interconnection approach. Based on the analysis of the current operating conditions, taking into account the requirement s of system operation, we propose to transfer data based on serial communication program, independent data transfer protocol designed to develop independent serial data transmission system, network after the broadcast system broadcast information transmitted through the serial cable to the advertising management computer. As the serial communication protocol to transfer data are given their own characteristics according to the system design, not a standard protocol, and using one-way transmission of serial communication, can only broadcast network to network, transmit data, while not the broadcasting network, data the transmission of data within the network, but have not been found based on serial transmission of computer viruses appear, it can guarantee a good network broadcast systems. Serial transfer files two basic principles Nature of the serial port function as a CPU and serial devices encoding converter. When the data from the CPU through the serial port to send out, the byte data into a serial bit; in receiving data, serial data bits are converted to bytes. Delphi language is a new visual development tool, it has a powerful, easy to use and code execution speed and the characteristics of serial communication software development with Delphi, there are two general approaches: the use of Windows communication API function, the other species using Microsoft's SPCCOM control. Here we used was developed by serial transfer control SPCCOM data tables have been broadcast applications. * The program was designed to be set up when the first control SPCCOM various properties, SPCCOM include the following attributes: CommName is used to fill COM1, COM2 ... the names such as serial port, serial port before you open, you must fill out this value. Baud rate setting BaudRate 9600,4800 and so on, determined according to actual needs, the serial baud rate can change after opening, the actual resulting baud rate change. Byte length of the actual situation can ByteSize 5/6/7/8, etc., Parity is parity bit, PBits for the stop bit, SendDataEmpty is a Boolean attribute that is true send buffer is empty, or send queue No information, send for the False said that the cache is not empty, or send a message queue. * Serial port application development, applications to communicate using the serial port must be made before using the operating system resources to application requirements (open serial port), communications resources must be released after the completion of (off the serial port). Use Startcomm process used to open the serial port, usually when you open failed error, the error mainly has the following 7: First, the serial port is already open; Second, open the serial port error; Third, a file handle is not a communication sentence; fourth can not install the communication buffer; fifth, can not produce the event; Sixth, the process can not produce time; the seventh, can not produce writing process. StopComm process used to close the serial port, there is no return value. Function WriteCommData (pDataToWrite: PChar; dwSizeofDataToWrite: Word): boolean used to send a string to write threads, send a successful return true, send failure to return false, the implementation of this function will immediately return value, send operation executed thereafter. Function has two parameters, which pDatatowrite is to send the string, dwSizeofDatatoWrite is sent in length. There OnReceiveData, when the input buffer with data to trigger the event, where you can receive the data from the serial port for processing. Buffer is the data received, bufferlength is the length of the received data. OnReceiveError data when receiving an error will trigger the event. According to characteristics of the system, we designed the application layer communication protocol, to receive the data's general approach, the basic idea is analyzed by agreement, it is essential to the development agreement: First determine the startin g point of instruction, from a large number of data streams will command points





No comments:

Post a Comment