CN100417104C - Ethernet communication device and method between data processing single board - Google Patents

Ethernet communication device and method between data processing single board Download PDF

Info

Publication number
CN100417104C
CN100417104C CNB011320540A CN01132054A CN100417104C CN 100417104 C CN100417104 C CN 100417104C CN B011320540 A CNB011320540 A CN B011320540A CN 01132054 A CN01132054 A CN 01132054A CN 100417104 C CN100417104 C CN 100417104C
Authority
CN
China
Prior art keywords
task
data
socket
scbt
sndt
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.)
Expired - Fee Related
Application number
CNB011320540A
Other languages
Chinese (zh)
Other versions
CN1414739A (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.)
ZTE Corp
Original Assignee
ZTE Corp
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 ZTE Corp filed Critical ZTE Corp
Priority to CNB011320540A priority Critical patent/CN100417104C/en
Publication of CN1414739A publication Critical patent/CN1414739A/en
Application granted granted Critical
Publication of CN100417104C publication Critical patent/CN100417104C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

The present invention relates to an Ethernet communication device among data processing boards. The present invention comprises a plurality of data processing boards (DPB), a network hub (HUB), a socket control table (SCBT), a receiving-transmitting interface, a chain task establishing (ESTT) module, a data transmitting task (SNDT) module, a data receiving task (RCVT) module and an agent task (AGTT) module, wherein the DPBs comprise a real time operation system (RTOS), the HUB connects the DPBs together, the SCBT determines objects and manners of chain establishing and the receiving-transmitting interface provides data. The device has the advantages that a C/S mixing coding technique is convenient to maintain codes and can dynamically configure link connection. The socket control table (SCBT) technique solves the problem of interactive control information among tasks on the boards. A communication module in the device can flexibly configure transmission control protocol (TCP) links according to actual situations, and the new configuration takes effect without restarting the boards.

Description

Ethernet communication device and method between the data processing single board
Technical field
The present invention relates to communicator and method between a kind of a plurality of entity, relate in particular to the ethernet communication Apparatus and method for technology between the polylith data processing single board in the distributed real-time system of communication field.
Background technology
At communication field, the function that main equipment is finished can be abstracted into simple " data input-data processing-data an are exported " model usually.Because the data volume of actual treatment is huge, and considers equipment dependability, this equipment is made of a plurality of data processing single boards usually, and they are cooperated jointly, the function that the equipment of finishing provides.The Ethernet mode is normally adopted in intercommunication between the data processing single board.
Ethernet communication device pattern commonly used at present is a Client, i.e. C/S model.Its advantage is that a certain processing capacity is divided into two, and finishes on client-server respectively, makes the processing height optimization separately of client-server.But for some application of communication field, its weak point is:
1, the notion of client-server, and the status of each data processing single board is identical in the practice;
2, the service that provides of family machine and server is different, and processing meeting more complicated has so in actual applications increased the difficulty that system realizes and safeguards.
Summary of the invention
The technical problem to be solved in the present invention is, at the above deficiency of C/S model, proposes a kind of dynamically configuration link and connects, and is convenient to code maintenance, can better solve the control information interaction problems between each task on the veneer.
Ethernet communication device between the data processing single board of the present invention comprises:
(1) in whole communicator, plays a part, and write down the configuration information of link, the socket control table (SCBT, Socket cotrol BlockTable) of decision link setup object and mode to the task interactive information.
(2) be used to provide the transmitting-receiving interface of up-downgoing data.
(3) be used for link setup task (ESTT, EStablish Task) module with corresponding veneer link setup.
(4) be used to receive when driving message that the responsible data that will send in the buffering area are shifted transmission task (SNDT, the Send Task) module on the network onto.
(5) be used for reception task (RCVT, the Receive Task) module of receiving network data.
(6) proxy task (AGTT, Agent Task) module.
Wherein, the transmitting-receiving interface is connected with the reception task module, and the Data Receiving task module sends task module with data and links, and data transmission blocks is connected with link setup task module and proxy task module.
Ethernet communication method between the data processing single board said method comprising the steps of:
(1) link setup task (ESTT) is at first created the monitoring socket of service end, unblock receives the connection request of client then, next creates the socket of client, initiatively the opposite end veneer of record sends the unblock connection request in socket control table (SCBT), automatic regular polling then, when poll, the link setup task also will scan socket control table (SCBT), will be by other task flaggings the socket handle of makeing mistakes close, simultaneously in socket control table (SCBT), variables corresponding is set, so that can be again in poll next time and corresponding veneer link setup.
When (2) data that provide when this platform of application call send function (function is called NetCommSend ()) data, pure user data and user profile are united two into one, and copy in the socket control table (SCBT) it to corresponding buffering area that sends, send task (SNDT) to data then and send out message, when data send tasks (SNDT) when receiving message, be responsible for to send the interior data of buffering area and shift network onto and get on.When Data Receiving task (RCVT) or link setup task (ESTT) learn that the socket handle is invalid, to send out message and send task (SNDT) to data, when receiving message, data send task (SNDT) scanning socket control table (SCBT), will be by other task flaggings the socket handle that will close turn off, when application program wish to send the veneer address in socket control table (SCBT) when unregistered, data send task (SNDT) module and will adopt UDP (USer Datagram Protocol, User Datagram Protoco (UDP)) mode that data are sent to network.
(3) Data Receiving task (RCVT) adopts obstruction mode in limited time, it blocks the function in system call Select () (one of socket standard interface function) in limited time at ordinary times, when Select ()) (one of socket standard interface function) when returning the readable condition of socket, to call recv () (one of socket standard interface function) and copy data in the socket control table (SCBT) the corresponding buffering area that receives, if the data that receive have been complete user data package, giving the message distribution module after then unpacking handles, as Selecto (one of socket standard interface function) because during overtime returning, then scan socket control table (SCBT), will be by other task flaggings the socket handle that need close of makeing mistakes turn off.
(4) link setup task (ESTT) sends task (SNDT) and the shared socket handle of Data Receiving task (RCVT) to data after the link setup success.
(5) link setup task (ESTT) is after the link setup request that inserts certain data processing single board (DPB) again, in socket control table (SCBT), variables corresponding need be set, allow data transmission task (SNDT) and Data Receiving task (RCVT) that the socket handle that lost efficacy is closed; After all handles of this socket were all closed, this socket resource discharged automatically.
(6) data transmission task (SNDT) or Data Receiving task (RCVT) are when knowing that some sockets lost efficacy, in scanning socket control table (SCBT), variables corresponding need be set, allow data send task (SNDT) or Data Receiving task (RCVT) and link setup task (ESTT) handle of inefficacy socket is closed.
Utilize real time operating system (RTOS, Real one Time Oprating System) socket canonical function interface that provides and the system call function library of itself, this device has made up a network communication platform, be called NetCOInln Platform, be called for short the NP device, Here it is this ethernet communication device.This ethernet communication device is made up of three parts:
1. socket control table (SCBT, Socket Cotrol Block Table)
In whole module, play a part, and write down the configuration information of link, the object and the mode of decision link setup to the task interactive information;
2. application interface (Interface)
The up-downgoing data transmit-receive interface that provides to application;
3. task (Task)
Be divided into link setup task (ESTT), Data Receiving task (RCVT), data send task (SNDT), and proxy task (AGTT).
Link setup task (ESTT) is described
What link setup task (ESTT) adopted is the unblock polling method.
At first create the monitoring socket of server end, unblock receives the connection request of client then; Next creates the socket of client, and initiatively the opposite end veneer of record sends the unblock connection request in socket control table (SCBT).Then, automatic regular polling.
It is that monoboard programme can be without Differentiated Services device end and client that this module adopts the advantage of C/S shuffling mode, thereby has reduced the complexity of maintenance program.
In poll, link setup task (ESTT) also will scan socket control table (SCBT), will be by other task flaggings the socket handle of makeing mistakes close, simultaneously in socket control table (SCBT), variables corresponding is set, so that can be again in poll next time and corresponding veneer link setup.
Transmission task (SNDT) is described
It is the obstruction mode that data send task (SNDT).
When application program (APP) is called data that this platform provides and is sent functions (function be called NetCommSend ()) transmission data, this function unites two into one pure user data and user profile, and copy in the socket control table (SCBT) it to corresponding buffering area that sends, send tasks (SNDT) to data then and send out and trigger message.When data transmission tasks (SNDT) were received triggering message, the responsible data that will send in the buffering area were shifted network onto and are got on.When reception task (RCVT) or link setup task (ESTT) when learning that socket is invalid, will send out message and send task (SNDT) to data; When receiving message, data send tasks (SNDT) scanning socket control table (SCBT), will be by other task flaggings the socket handle that will close turn off.
When use to wish send the veneer address in socket control table (SCBT) when unregistered, this module will adopt UDP (User Datagram Protocol, User Datagram Protoco (UDP)) mode that data are sent to network.
Reception task (RCVT) is described
Reception task (RCVT) adopts obstruction mode in limited time.It blocks the function in system call select () (one of socket standard interface function) in limited time at ordinary times.As select () (one of socket standard interface function) when returning the readable condition of socket, will call recv () (one of socket standard interface function) and copy data in the socket control table (SCBT) the corresponding buffering area that receives.If the data that receive have been complete user data package, give the message distribution module after then unpacking and handle.
Because during overtime returning, then scan socket control table (SCBT) as select () (one of socket standard interface function), will be by other task flaggings the socket handle that need close of makeing mistakes turn off.
Proxy task (AGTT) is described
The function of proxy task (AGTT) is the agency as the backstage tool software.Its function is: carry out test; Performance monitoring; Finish configuration.
Each task obstruction mode has nothing in common with each other, and between rare contact.They rely on semaphore and socket control table (SCBT) to coordinate mutually.Mainly contain following several situation:
1. link setup task (ESTT) sends task (SNDT) and reception task (RCVT) dispenser sleeve interface handle to data after the link setup success;
2. link setup task (ESTT) is after the link setup request that inserts certain data processing single board (DPB) again, in socket control table (SCBT), variables corresponding need be set, allow data transmission task (SNDT) and reception task (RCVT) that the handle of inefficacy socket is closed; After all handles of this socket were all closed, this socket resource discharged automatically;
3. reception task (RCVT) (or transmission task (SNDT)) is when knowing that some sockets lost efficacy, in socket control table (SCBT), variables corresponding need be set, allow transmission task (SNDT) (or reception task (RCVT)) and link setup task (ESTT) that the handle of inefficacy socket is closed.
This device utilizes real time operating system (RTOS, Real-Time Oprating System) socket (Sockets) and the system call function library that provide, made up a network communication platform (NP, NetCommPlatform), data processing single board (DPB, Data Process Board), just can between data processing single board (DPB), carry out high speed exchanges data reliably with the service that utilizes network communication platform (NP) to provide as long as bound network communication platform (NP) device.
Description of drawings
Data processing single board in Fig. 1 native system (DPB) physical entity connecting mode;
Each part of Fig. 2 network communication platform (NP) device;
Fig. 3 link setup task (ESTT) operational mode;
Fig. 4 data transmission procedure;
Fig. 5 DRP data reception process.
Specific implementation method
As shown in Figure 1, a plurality of data processing single boards (DPB) are linked together by hub (HUB) on physical relation, are the real time operating system (RTOS) of usefulness on the data processing single board (DPB).
Shown in Figure 2 is three parts of this ethernet communication device: socket control table (SCBT, i.e. SCB among the figure), interface (Interface), Task (reception task (RCVT), transmission task (SNDT), link setup task (ESTT), proxy task (AGTT)), and the relation between them, can see among the figure that application program (APP) carries out data interaction by interface (Interface) and opposite end, this is that this installs a most important function.
Shown in Figure 3 is the operational mode of link setup task (ESTT).What link setup task (ESTT) adopted is the unblock polling method.At first create the monitoring socket of server end, unblock receives the connection request (ACCEPT) of client then; Next creates the socket of client, and initiatively the opposite end veneer of record sends unblock connection request (CONNECT) in socket control table (SCBT).(IDLE) poll then, regularly.
The process of transmitting of application data shown in Figure 4.The data transmission interface that using (APP) calling interface (Interface) provides sends data, interface (Interface) module with data-moving to data buffer zone that socket control table (SCBT) provides, trigger transmission task (SNDT) simultaneously, allow it be responsible for the data in socket control table (SCBT) buffering are shifted onto on the network.Data3 is that data send the data that task (SNDT) once sends, and repeatedly sends if Data3 less than Data2, then needs data to send task (SNDT), could all shift data onto network, and this will be activated by timed message.
The receiving course of application data shown in Figure 5.When bottom interrupts detecting data on the network, will activate reception task (RCVT) reception data; Reception task (RCVT) is carried out different disposal for data of different types.Application data bag for UDP (User Datagram Protocol, User Datagram Protoco (UDP)) mode once receives, and submits corresponding APP to by Interface then; For the application data bag of TCP (Transfer Control Protocol, transmission control protocol) mode,, so also be to submit to application (APP) immediately if once can finish receiving; If just can receive several times, will go into socket control table (SCBT) so earlier and receive data buffering, wait for that an application data bag receives fully, just submit to using (APP).
In the distributed real-time system, the exchange mass data is very usual thing between the polylith data processing single board, in the communications field, bandwidth, real-time and the reliability of data exchange is had higher requirement.Still there is not ripe general solution in the market.
Ethernet communication device between the data processing single board that the present invention proposes is to conclude abstract come out according to the example in the actual development process, has stronger transplantability.The present invention has accomplished data processing single board (DPB) as long as bound network communication platform (NP) device, just can carry out high speed exchanges data reliably between data processing single board (DPB) with the service that utilizes network communication platform (NP) to provide.This device has adopted some following new technologies:
C/S shuffling technology;
Socket control table (SCBT) technology;
Configurable TCP (Transfer Control Protocol, transmission control protocol) interconnection technique.
Than traditional C/S device, advantage has: be convenient to code maintenance, and dynamically configuration link connects; Solved the control information interaction problems between each task on the veneer well; Communication module can be according to actual conditions flexible configuration TCP (Transfer Control Protocol, transmission control protocol) link, and need not restart veneer, and new configuration can come into force.

Claims (2)

1. the ethernet communication device between the data processing single board, it is characterized in that: this ethernet communication device comprises:
(1) in whole communicator, plays a part, and write down the configuration information of link, the socket control table of decision link setup object and mode to the task interactive information;
(2) be used to provide the transmitting-receiving interface of data;
(3) be used for creating the monitoring socket, unblock receives the connection request of client, creates the socket of Client end, automatic regular polling, close the Socket handle of makeing mistakes, variables corresponding is set, can be again in poll next time and the link setup task module of corresponding veneer link setup;
When (4) being used to receive message MSG, the data of being responsible for will sending in the buffering area are shifted onto on the network, when receiving that Data Receiving task or ESTT learn the SOCKET invalid message, scanning SCB table, will be by other task flaggings the SNDT task module turned off of the Socket handle that will close;
(5) be used for blocking function in limited time in system call select (), to call recv () primitive and copy data among the SCB corresponding buffering area that receives, if what receive is a complete user data package, giving the message distribution module after then unpacking handles, as select () because during overtime returning, scanning SCB table, will be by other task flaggings the RCVT task module turned off of the Socket handle that need close of makeing mistakes;
Wherein, described transmitting-receiving interface is connected with described reception task module, and described Data Receiving task module sends task module with described data and links, and described data transmission blocks is connected with described link setup task module.
2. the ethernet communication method between the data processing single board, it is characterized in that: this ethernet communication method may further comprise the steps:
(1) the link setup task is at first created the monitoring socket of service end, unblock receives the connection request of client then, next creates the socket of Client end, initiatively the opposite end veneer of record sends the unblock connection request in socket control table (SCBT), automatic regular polling then, when poll, the link setup task also will scan socket control table (SCBT), will be by other task flaggings the socket handle of makeing mistakes close, simultaneously in socket control table (SCBT), variables corresponding is set, so that can be again in poll next time and corresponding veneer link setup;
When (2) the data data that send tasks (SNDT) and provide when this platform of application call send function data, pure user data and user profile are united two into one, and copy in the socket control table (SCBT) it to corresponding buffering area that sends, send task (SNDT) to data then and send out triggering message, when data send tasks (SNDT) when receiving message, be responsible for to send the interior data of buffering area and shift network onto and get on; When Data Receiving task (RCVT) or link setup task learn that socket is invalid, to send out message and send task (SNDT) to data, when receiving message, data send task (SNDT) scanning socket control table (SCBT), will be by other task flaggings the socket handle that will close turn off, when application program wish to send the veneer address in socket control table (SCBT) when unregistered, data send task (SNDT) module and will adopt User Datagram Protoco (UDP) UDP mode that data are sent to network;
(3) Data Receiving task (RCVT) adopts obstruction mode in limited time, it blocks the function in system call select () in limited time at ordinary times, when select () returns the readable condition of socket, to call recv () and copy data in the socket control table (SCBT) the corresponding buffering area that receives, if the data that receive have been complete user data package, giving the message distribution module after then unpacking handles, as select () because during overtime returning, then scan socket control table (SCBT), will be by other task flaggings the socket handle that need close of makeing mistakes turn off;
(4) the link setup task sends task (SNDT) and Data Receiving task (RCVT) socket handle to data after the link setup success;
(5) the link setup task is after the link setup request that inserts certain data processing single board (DPB) again, in socket control table (SCBT), variables corresponding need be set, allow data transmission task (SNDT) and Data Receiving task (RCVT) that the handle of inefficacy socket is closed; After all handles of this socket were all closed, this socket resource discharged automatically;
(6) data transmission task (SNDT) or Data Receiving task (RCVT) are when knowing that some sockets lost efficacy, in socket control table (SCBT), variables corresponding need be set, allow data send task (SNDT) or Data Receiving task (RCVT) and link setup task the handle of inefficacy socket is closed.
CNB011320540A 2001-10-26 2001-10-26 Ethernet communication device and method between data processing single board Expired - Fee Related CN100417104C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB011320540A CN100417104C (en) 2001-10-26 2001-10-26 Ethernet communication device and method between data processing single board

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB011320540A CN100417104C (en) 2001-10-26 2001-10-26 Ethernet communication device and method between data processing single board

Publications (2)

Publication Number Publication Date
CN1414739A CN1414739A (en) 2003-04-30
CN100417104C true CN100417104C (en) 2008-09-03

Family

ID=4671100

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB011320540A Expired - Fee Related CN100417104C (en) 2001-10-26 2001-10-26 Ethernet communication device and method between data processing single board

Country Status (1)

Country Link
CN (1) CN100417104C (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101437301B (en) * 2008-12-04 2011-02-09 华为技术有限公司 Method, equipment and communication system for transmitting message
CN101714991B (en) * 2009-10-30 2012-06-20 清华大学 Method for realizing heartbeat mechanism
CN101958817B (en) * 2010-07-17 2012-09-05 刘利华 Intelligent home information management system
CN103731758B (en) * 2013-12-20 2017-03-15 北京欧迈特科技股份有限公司 A kind of video stream transmission method and device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5721876A (en) * 1995-03-30 1998-02-24 Bull Hn Information Systems Inc. Sockets application program mechanism for proprietary based application programs running in an emulation environment
US5978849A (en) * 1997-06-13 1999-11-02 International Business Machines Corporation Systems, methods, and computer program products for establishing TCP connections using information from closed TCP connections in time-wait state

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5721876A (en) * 1995-03-30 1998-02-24 Bull Hn Information Systems Inc. Sockets application program mechanism for proprietary based application programs running in an emulation environment
US5978849A (en) * 1997-06-13 1999-11-02 International Business Machines Corporation Systems, methods, and computer program products for establishing TCP connections using information from closed TCP connections in time-wait state

Also Published As

Publication number Publication date
CN1414739A (en) 2003-04-30

Similar Documents

Publication Publication Date Title
US4665519A (en) Wireless computer modem
US4855905A (en) Multiprotocol I/O communications controller unit including emulated I/O controllers and tables translation of common commands and device addresses
CN101843076B (en) Method and apparatus for peer to peer link establishment over a network
EP0667693B1 (en) Network arrangement for glassware forming system
US5931913A (en) Methods, system and computer program products for establishing a session between a host and a terminal using a reduced protocol
US7216174B2 (en) Implementing and coordinating configuration of protocol processes
CA2434258A1 (en) Exchanging electronic messages between a host computer system and a distributed computer system
US20060020705A1 (en) Managing and checking socket connections
CN101185070B (en) Device management system and method for setting configuration-value therein
CN102075389A (en) Debugging method and equipment
CN100417104C (en) Ethernet communication device and method between data processing single board
CA2104076C (en) Session oriented connectionless data transfer for a computer network
CN100536480C (en) Data communication system and method for distributed system
CN115022424B (en) Hydropower LCU controller network card virtual control method, system, equipment and medium thereof
CN101577599B (en) Embedded two-computer synchronizing method
CN110300042A (en) A kind of bus communication system and communication control method
JP2005522939A (en) Method, architecture and software for organizing communication between manager objects and managed objects in a communication network
CN115827285A (en) Cross-platform communication method, system, device, equipment and medium
CN101217413A (en) A centralized debugging system and centralized debugging method of extensible unit in the extensible system
KR100412237B1 (en) A user-level sockets layer and method for interfacing communication using the sockets layer
CN108735278A (en) A kind of transmission method of instruction suitable for rehabilitation equipment and application
CN115857420B (en) IO mutual control method between industrial control equipment
KR100273969B1 (en) M interface protocal method for matching network in exchange system
JPH11205763A (en) Image conference device
KR100953965B1 (en) Method for connecting loop of branch processor

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
ASS Succession or assignment of patent right

Owner name: ZTE CO., LTD.

Free format text: FORMER OWNER: SHENZHENG CITY ZTE CO., LTD. SHANGHAI SECOND INSTITUTE

Effective date: 20040528

C41 Transfer of patent application or patent right or utility model
TA01 Transfer of patent application right

Effective date of registration: 20040528

Address after: 518057 Department of law, Zhongxing building, South Science and technology road, Nanshan District hi tech Industrial Park, Shenzhen

Applicant after: ZTE Corporation

Address before: 200233 No. 396, Shanghai, Guilin Road

Applicant before: Shanghai Inst. of No.2, Zhongxing Communication Co., Ltd., Shenzhen City

C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20080903

Termination date: 20171026

CF01 Termination of patent right due to non-payment of annual fee