[background technology]:
Along with large-scale colony building occurs more and more, more and more higher requirement has been proposed automatic fire-alarm system at aspects such as geographical space fire detection, fire fighting equipment interlock controls.The heavy construction group makes geographic descriptor become big, and it is many that detection point becomes, and equipment linkage control complicates.Simultaneously,, make the delay of communication and the interference of environment strengthen, cause real-time, accuracy and the reliability of information transmission to reduce because communication distance becomes more and more far away.These all need alarm host machine can drive and manage more driving circuit board, and networking is satisfied the increase of communication information amount and the increase of communication distance between alarm host machine and the alarm host machine under the prerequisite of reliable transmission quick and precisely.
Traditional way is to use the RS485 communication modes to realize host computer communication and host computer communication, being connected between host computer communication and the driving circuit board.The RS-485 standard is that the EIA of Electronic Industries Association worked out and issue in nineteen eighty-three.It has only stipulated the electrical characteristics of balance driver and receiver and has not stipulated connector transmission cable and application layer communication protocol simultaneously, a node can only be arranged as main frame on the RS-485 bus, and other nodes can only be as slave, and no priority sends.These these quality factors cause the RS-485 agreement to exist bus efficiency low, and the real-time of system is poor, and the reliability of communication is low, the later maintenance cost height, and the network engineering debugging is complicated, and transmission range is undesirable, and the node that unibus can articulate is few, uses shortcomings such as dumb.
Controller local area network (Controller area network is called for short CAN) is a German Bosch company in nineteen eighty-three is that automobile is used and developed, can effectively support distributed control and the serial communication network of controlling in real time, 1991, the said firm released the CAN2.0 standard.In November, 1993, ISO (International Standards Organization) ISO has formally issued controller local area network CAN international standard (IS011898).Compared following characteristics with other buses: 1.. it is a kind of multi-master bus, and promptly each node machine all can become main frame, and also can communicate between the node machine; 2.. communication media can be twisted-pair feeder, concentric cable or light transmitting fiber, and traffic rate can reach 1Mbps; 3. the integrated Physical layer and the data link layer functions of CAN agreement in the .CAN bus communication interface can be finished the whole frame of communication data is handled, and comprises that position fillings, data block coding, cyclic redundancy check (CRC), priority discrimination etc. work; 4. the .CAN agreement is encoded to communicating data block.The identification code of data block can be made up of 11 (CAN2.0A) or 29 (CAN2.0B) binary numbers, therefore can define 2
11Or 2
29Individual different data block; 5.. data segment, length mostly is 8 bytes most; 6. the .CAN agreement adopts the CRC check and the corresponding error processing capacity can be provided, and has guaranteed reliability of data communication.
CAN technical manual (2.0B) is handled the data transmission layering (data link layer [logic chain LLC sublayer, media interviews control media access control sublayer] and Physical layer) of every frame.LLC sublayer major function: for data transmit and the teledata request provides service, confirm by the message reality that the LLC sublayer receives be received and for recovery management, notice overloads that information is provided.The media access control sublayer major function: guarantee to transmit rule (control frame structure, carry out arbitration, error-detecting, demarcations, failure defining make mistakes), it is monitored by a management entity that is referred to as failure defining.Data link layer is finished by application-specific integrated circuit that is referred to as the CAN protocol controller (as MCP2510, SJA1000,82C200 etc.) or the MCU (as 8XC592) that has a CAN agreement steering logic unit; Physical layer is finished by the application-specific integrated circuit that is referred to as the CAN driver (as 82C250).
Because Frame of CAN2.0B standard code is 8 bytes of transmission at most, and in current large-sized fire warning system, report to the police and the length of interlock information is far longer than 8 bytes; Simultaneously, the online detection of node, system clock is synchronous, and information such as state synchronized also are necessary in fire alarm system.Therefore, depend merely on the CAN2.0B standard, can't adapt to the needs of current fire alarm system, this just needs application layer protocol to guarantee these data message fast and reliable transmission.
[summary of the invention]:
Purpose of the present invention is exactly in order to overcome the above problems, and provides a kind of and can be applicable to fire alarm system, based on the fire alarm application-layer data transmission method of CAN2.0B.
For achieving the above object, the present invention proposes a kind of fire alarm application-layer data transmission method based on CAN2.0B, comprise the steps: A, calculate the length of this self-defined information bag or whole file, according to maximum length, the maximum data length that allows length, this transmission of Information Level packet of allowing of Frame, make up the Information Level packet; According to the data length of this transmission, when length is not more than 8 bytes, be the single frames send mode; Otherwise be the multiframe send mode; With described send mode information architecture in the information packet classification of first Information Level packet;
B, make up identifier, the 29bit of Frame ID identifier is divided at least four zones, be respectively packet type territory, transmission source address territory, receive destination address domain, packet data frame number territory;
C, judge described send mode information, determine the send mode of this packet; The Frame that is not more than 8 bytes with each is that unit sends the Information Level packet according to the reception destination address domain in the above-mentioned identifier to its destination address that provides;
After D, receiving node receive complete packets of information, at the appointed time in, send response signal according to the transmission source address territory in the identifier to transmission source address, confirm that data receive, this sends successfully, enters next packets of information transmit status.
In the above-mentioned transmission method, the step of described single frames send mode: the packets of information classification of judging first Information Level packet, when this value shows that this is sent as the single frames data packets, indicate the Information Level packet that time information packet stamp, User Defined data are arranged at least to its destination address that provides transmission according to the reception destination address domain in the above-mentioned identifier.The step of described multiframe send mode is: judge the packets of information classification of first Information Level packet, when this value shows that current data packet needs multiframe to send, then further judge information such as current information packet length; Number of information layers is sent according to pack subframe, subpackage.In the multiframe send mode, when the length of whole file allowed length greater than an Information Level packet is maximum, also indicating in packets of information Bale No. domain identifier is zero first Information Level packet had whole data file length information and current information bag Bale No. information; During transmission whole file is divided into a plurality of Information Level packets, each packet is divided into the multiframe data frame transfer.
Above-mentioned transmission method, also comprise overtime retransmission mechanism, when the affirmation that promptly at the appointed time interior sending node does not receive the receiving node transmission receives information, sending node starts repeating transmission automatically, receive the affirmation reception information that receiving node sends until sending node, or the repeating transmission number of times has reached predetermined maximum number of retransmissions.Described retransmission mechanism also comprises the method for judging duplicate packages: receiving node is judged the packet type territory and the timestamp of the packets of information sign that sending node sends, when the two and paid-in certain information in package bag type field, timestamp are identical respectively, think that then this information that receives is duplicate packages, abandon this duplicate packages.
Above-mentioned transmission method also comprises the node failure testing mechanism: each node regularly sends online signal to associated node with it on the bus when it is idle, and each node all has one group of node that interrelates with it at thread count.Each counter is provided with initial value when powering on and recovering, when receiving the online signal data bag of certain node, counter is carried out a forward operation, until certain predetermined value; Periodically counter is carried out once opposite with aforementioned positive computing direction reverse computing simultaneously, when the value of counter is 0, then quote this node communication failure.The preferred version of node failure testing mechanism is: send the time interval of the time interval of online signal less than the periodicity down counter, counter is provided with the non-zero initial value when powering on and recovering, when described node counts device is received the online signal data bag of certain node, carry out a forward operation and add 1, until a predetermined maximum value.Periodically each node is carried out once oppositely computing at thread count simultaneously and subtract 1, when the value of counter reduces to 0, quote this node communication failure.
Above-mentioned transmission method, also comprise the heavy trigger mechanism of buffer zone: for the packets of information that in described overtime retransmission mechanism, sends failure, sending node is opened up a new buffer zone and is preserved these packets of information, and when this node was in the transmission idle condition, this node attempted retransmitting these packets of information.
Owing to adopted above scheme, can make up the Information Level packet according to the length of transmission information, the data frame identifier of Gou Jianing comprises packet type territory, transmission source address territory, receives destination address domain and packet data frame number territory simultaneously, be convenient to define the priority level of transmission information, overcome the deficiency that does not comprise transmission source address and destination address domain in the CAN agreement, go for fire alarm control system; The acknowledgement mechanism of receiving node guarantees reliability of data transmission.
Secondly, adopt multiframe transmission or a plurality of Information Level packets of whole file, multiframe transmission, satisfy Information Level packet, the length that length in the system surpasses 8 bytes and surpass the maximum transmission that allows the file of length of single Information Level packet.In data transmission, also adopt overtime retransmission mechanism, node failure testing mechanism, the heavy trigger mechanism of buffer zone etc., can further guarantee accuracy, the validity of data transmission.
[embodiment]:
Also the present invention is described in further detail in conjunction with the accompanying drawings below by specific embodiment.
1. the structure of application layer protocol data packet format:
In the CAN2.0 technical manual Frame ID is divided into standard (A) and expansion (B) dual mode.Wherein standard mode comprises the 11Bit position, and extended mode comprises the 29Bit position.It is relevant by forming of ID identifier that bus sends arbitration, and the numerical value of ID is more little, and then the priority of this Frame is high more, and this sending node is the easy more bus of seizing in bus arbitration, and the time-delay that Frame is sent completely is more little.This fire alarm application layer protocol adopts the CAN2.0B standard.Frame ID29bit position is divided into 4 zones, the Bale No. territory of packet type territory, transmission source address territory, reception destination address domain, packets of information.Definition of data frame ID identifier and node address are as follows:
</entry></row></tbody></tgroup></table></tables>
Packet type territory (INFO_ID): in order to represent the priority level of the information of transmitting, most-significant byte definition position packet type with Frame ID, such as fire alarm information, feedback information, failure message, handshaking information, clock synchronization information, its packet id value of important more information is more little; ID21=0 represents that sending node sends packets of information to receiving node, ID21=1 represents the response (success) of receiving node to the packets of information of ID20=0, and data field is the timestamp and the packets of information classification (back will describe in detail) of first byte-transmission packets of information of reception data zero frame.When receiving node receives the packets of information of ID21=1, no longer send response message (otherwise will produce recurrence) to sending node.This shows that the INFO_ID of data packets is an even number, the INFO_ID of its ACK bag is an odd number.Such as, 08 is system recovery ID, and 14 is system state, clock synchronization, the online ID of node, and 32 is the fire alarm ID of system, and 64 is system failure ID etc.
Transmission source address territory (SRC_ADDR) and receive destination address domain (DEST_ADDR): these two address fields all take 8, represent the sending node and the receiving node address of Frame respectively, thus on a bus maximum 256 nodes.Do not comprise source address and destination address domain in the CAN agreement in the data block, must distinguish each node and distributing data stream with the address, so at the source address and the destination address of this section definition packet of Frame ID in fire alarm control field.Receiving node CAN controller whenever receives a CAN Frame, all can interrupt to the master microprocessor application.In order to reduce unnecessary spending between bus node master microprocessor and the CAN controller, improve the service efficiency of master microprocessor, the Frame of the filtering of CAN controller and mask register being arranged to only to allow to send to this node by and to microprocessor application Interrupt Process.
The data frame number territory (INFO_ORDER) of packets of information: this territory takies the 5bit position.Many data messages are all greater than 8 bytes of a CAN Frame maximum transmitted, so application layer protocol is a kind of multiframe host-host protocol.In application layer protocol, the information of a packet is made up of a plurality of CAN Frames.When this territory is zero, have special implication, the same meaning of 1-31, the Frame sequence number of expression packets of information:
INFO_O RDER | Implication | |
0 |
Represent these frame data or after |
DATA1 |
DATA2 |
DATA3 |
DATA4 |
DATA5 |
DATA6 |
DATA7 |
DATA8 |
Remarks |
XXXX0000 |
User Defined data layout (reporting the small data quantity information such as fire alarm, feedback, fault of main frame as the drive circuit plate). |
The single frames data packets. |
|
The meaning of continuous frame. |
XXXX0001 |
The current information packet length |
|
|
|
|
|
|
Length is less than the packets of information of 248 bytes. |
XXXX0010 |
The current information packet length |
Current information bag Bale No. |
Whole data file length |
|
Length is greater than the packets of information (file) of 248 bytes, non-last new packets data. |
XXXX0011 |
The current information packet length |
Current information bag Bale No. |
Whole data file length |
|
Length is greater than the packets of information (file) of 248 bytes, last packet data. |
1-31 |
Only after the INFO_ORDER=0 Frame occurred, these Frames just may occur.DATA1-DATA8 is the User Defined data. |
In last table 1.. whole data file length is the length of file during greater than a packets of information, and when smaller or equal to a packets of information, its value equals the current information packet length if adopt the XXXX0011 pattern to transmit then, and the current information Bale No. is 0.2.. current information bag data frame number is since 0 counting.3. maximum length position 248 bytes of a packets of information, various application can be according to the maximum length of actual provisioning information bag.
2. the structure of Information Level packet:
Under the situation that CAN Frame data are accurately transmitted, need guarantee the reliable transmission of data greater than the data of a Frame with the Information Level agreement.Must be divided into many Frames greater than the data of a Frame sends or receives.Be concrete agreement below:
Each Frame all has an ID identifier, distributes as can be known from the BIT position of top ID identifier, and ID4-ID0 is the frame number of Information Level Frame, is that the implication of different numerical value is described to the data frame number simultaneously:
INFO_ORDER=0 XXXX is the 4Bit width, and the time information packet that expression sends stabs.When the overtime retransmission of information bag of sending node, the data in this territory are constant.After sending the packets of information success, when sending next packets of information, this territory adds one, represents different packets of information. |
Represent that this Frame is the beginning (packet data can at a data frame end) of packet data, the concrete meaning of these frame data relies on the value of DATA1: DATA1=xxxx0000 represents that this packet data only is included in this Frame, and the implication of the data of back 7 bytes is defined by user oneself; DATA1=xxxx0001 represents that the data of this packets of information are greater than 7 bytes, must be by a plurality of data frame transfer, the maximum length of this information frame is less than the 8*31=248 byte simultaneously.The length of this packets of information of value representation of DATA2.Router and reception program must rely on this to be worth to judge whether this packets of information is sent completely.DATA1=xxxx0010 represents that the data volume (file transfer) that transmits can not be finished by a packets of information, must come segment transmissions by a plurality of packets of information.The value of DATA2 is the data length of this packets of information.DATA3*256+DATA4 is in this file transfer, the bag sequence number of current information bag.DATA5*65536+DATA6*256+DATA7 is the length of this file transfer.Current information bag bag sequence number counts from zero.Therefore the maximum length of file transfer is 248*65536=16,252,928 bytes.This packet type is used to transmit the data greater than the packets of information maximum length, and last packets of information of right and wrong.DATA1=xxxx0011 represents that the data volume (file transfer) that transmits can not be finished by a packets of information, must come segment transmissions by a plurality of packets of information.The value of DATA2 is the data length of this packets of information.DATA3*256+DATA4 is in this file transfer, the bag sequence number of current information bag.DATA5*65536+DATA6*256+DATA7 is the length of this file transfer.Current information bag bag sequence number counts from zero.Therefore the maximum length of file transfer is 248*65536=16,252,928 bytes.This packet type is used to transmit the data greater than the packets of information maximum length, and is last packets of information.Other reservations of DATA1=. |
INFO_ORDER=1-31 |
Each frame data of this packets of information are formed in expression.DATA1-DATA8 all can be used as the transmission of valid data.Receiving node can judge whether present frame is the repeating data frame or falls frame data according to the value of Info_Order.Simultaneously by the Frame of Info_0rder=0 with packet length information information judge whether that packets of information is sent completely. |
3. receiving node acknowledgement mechanism:
Reply with overtime retransmission mechanism be Control Flow and accurately and reliably the transmission the basis.After receiving node receives a complete packets of information, must send this packets of information of ACK signal indication by complete reception to sending node.The INFO_ORDER=0 of ACK packets of information.Data length is 2, and data content is for receiving first byte DATA1 (timestamp and packets of information classification) of packet data zero frame.ACK packet type (INFO_ID) adds 1 for receiving packet type.Such as, if the INFO_ID=10 of fire alarm packets of information, the INFO_ID=11 of the ACK bag of then fire alarm packets of information.
INFO_ORD ER | Implication | |
0 |
|
DATA1 |
DATA2 |
ATA3-DATA |
Remarks |
XXXX0000 |
Timestamp and packets of information classification (equaling to receive first byte of the CAN Frame of packet data Info-order=0) |
|
The single frames data packets. |
4. overtime retransmission mechanism:
When sending node sends a packet data, wait for that receiving node sends ACK and confirms reception information.In designated time intervals, if do not receive the ack signal bag of receiving node, sending node starts overtime retransmission mechanism.When the repeating transmission number of times reaches maximum number of retransmissions, send failure.At present, sending timeout interval is 2.5 seconds, and maximum number of retransmissions is 5.
When receiving node is received the packets of information that INFO_ID is identical and timestamp is also identical that same sending node sends, think sending node because the duplicate packages that retransmission mechanism sends must abandon this duplicate message bag.Otherwise many command action (as recovery, noise elimination etc.) may take place repeatedly.
5. sending node and receiving node processing that packets of information is sent and receives:
Sending node 1 (data priority is low, and first log-on data sends) |
Sending node 2 (data priority height, back log-on data sends) |
Receiving node |
Put data to be sent in order |
|
|
Send the Info_order=0 Frame |
Receive the Frame of sending node 1 Info_order=0 |
Send the Info_order=1 Frame |
|
Receive the Frame of the Info_order=1 of sending node 1 |
… |
… |
Send the Info_order=N Frame |
Put data to be sent in order |
Receive the Frame of the Info_order=N of sending node 1 |
Microprocessor send Info_order=N+1 data to the CAN controller |
Send the Info_order=0 Frame |
Receive the Frame of the Info_order=0 of sending node 2 |
|
Send the Info_order=1 Frame |
Receive the Frame of the Info_order=1 of sending node 2 |
Send Info_order=N+1 Frame (may make this node keep sending pending status due to the Frame that sending node 2 sends Info_order=2) |
Microprocessor send the Info_order=2 data (if this operation is enough fast to the CAN controller; Also may form the situation with sending node 1 competition bus, by the Frame of bus president mechanism Info_order=2, be sent) |
The Frame of the Info_order=2 of the Frame of the Info_order=N+1 of reception sending node 1 or reception sending node 2 |
… |
Send the Info_order=N Frame |
Receive the Frame of the Info_order=N of sending node 2 |
Transmission finishes, and waits for that the ACK of receiving node confirms Frame |
… |
Send ACK to node 1 and confirm Frame |
… |
Transmission finishes, and waits for that the ACK of receiving node confirms Frame |
Send ACK to node 2 and confirm Frame |
1. receive that ACK confirms, sends successfully.Enter next packets of information transmit status.2. overtime for receiving that ACK confirms, resends this packets of information. |
|
|
|
1. receive that ACK confirms, sends successfully.Enter next packets of information transmit status.2. overtime for receiving that ACK confirms, resends this packets of information. |
… |
… |
… |
… |
6. handshaking information bag, status information bag and clock synchronization information bag-online information bag:
These packets of information all are the packet of data length less than 7 bytes, can transmit to finish in a CAN2.0B protocol data frame, and the data packets that transmission and reception mechanism and other are general is identical.Use identical Info_ID, its value is 14.These three kinds of packets of information all belong to online handshaking information bag.Each node is according to the needs of self character and system, and other nodes on bus regularly send three kinds, two kinds or a kind of in these three kinds of packets of information.Following table is the concrete implication of these three kinds of contents of packet:
|
The packets of information classification |
Packets of information character |
Contents of packet |
Remarks |
DATA1 |
DATA2 |
DATA3 |
DATA4 |
DATA5 |
DATA6 |
DATA7 |
DATA8 |
The title content |
X0 |
00 |
Year |
Month |
Day |
The time |
Divide |
Second |
Length is 8, forms clock sync signal by a Frame |
Byte length |
|
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
The title content |
X0 |
01 |
|
|
|
|
|
|
Length is 2, forms handshake by a Frame |
Byte length |
|
1 |
1 |
|
|
|
|
|
|
The title content |
X0 |
02 |
Isolation |
General interlock |
Sound interlock far away |
Manual interlock |
State of alarm |
Malfunction |
Length is 8, forms status signal by a Frame |
Byte length |
|
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
As seen from the above table, all DATA1 byte datas are X0, represent that online packets of information is by a CAN2.The 0B Frame is formed.DATA2 represents the character of online packets of information, and expands more eurypalynous online information bag according to the needs of system.
7. node failure detects:
CAN2.0B agreement regulation, CAN controller are responsible for detecting the transmission of each Frame and are received mistake.And any node that detects mistake can mark this message and damage, and this message can lose efficacy and will begin automatically to retransfer, and the numerical value of error counter will increase simultaneously.When error counter is increased to certain numerical value, alarm to the master microprocessor reporting errors.These mechanism have guaranteed the accurate transmission of CAN message.But the CAN agreement is used coding (11 or 29) sign to the data message, there is not the node address notion, if a node breaks down (contacting bad) as power down, bifurcated bus, other nodes might not know that this node breaks down, in fire protection rule, stipulate, must show this node failure at other nodes (main frame).Therefore, must use more perfect node failure testing mechanism.
This agreement adopts following rule detection node failure: each node on the bus regularly sends online signal (three kinds of online signals of front) to associated node with it when it is idle, each node all has one group of node that interrelates with it at thread count.Each counter is provided with initial value when powering on and recovering, when receiving the packet of certain node, certain node counts device value adds 1, until a maximal value (by the time range and the interval determination of detection failure).Periodically (such as 500 milliseconds) subtract 1 to the online Counter Value of each node simultaneously, when the value of counter reduces to 0, quote this node communication failure.The time interval that sends online signal is less than the periodically time interval of down counter.Like this, each node can know that certain node breaks down and shows.
8. buffer zone weighs trigger mechanism:
For the packets of information that sends (overtime repeating transmission) failure, sending node is opened up a new buffer zone and is preserved these packets of information, as long as this node is in the transmission idle condition, this node will attempt retransmitting these packets of information.Like this, for the node that those re-power or other reasons temporarily can not receive,, still can receive these packets of information in case be in normal condition.The big I of buffer zone is provided with according to system's needs.
In Fig. 3, listed the fire alarm system network structure signal of forming by two CAN buses.On the CAN bus of alarm host machine networking, every main frame is by CAN driver 82C250, CAN controller MCP2510 on the mainboard and central processing unit S3C44B0X and other main frames exchange mutual information.On drive circuit plate CAN bus, the drive circuit plate is by CAN driver 82C250, CAN controller SJA1000 and microprocessor 8051 interactive information.When the drive circuit plate detects a fire alarm generation, will the detector physical address of this fire alarm and the fire alarm type sends this drive circuit plate to by the form of fire alarm packets of information 1 alarm host machine take place, alarm host machine is compiled more information then, be assembled into the form of fire alarm packets of information 2, transmit to other main frames.After every main frame on the network was received fire alarm information, the calculation process that links in conjunction with the interlock enabled state, provided action command to corresponding module.
Fig. 4 and Fig. 5 are respectively the fire alarm data structure of transmitting between fire alarm data structure (fire alarm packets of information 1) that the drive circuit plate reports and the alarm host machine (fire alarm packets of information 2).As seen from the figure, the fire alarm data message length that the drive circuit plate reports is 4 bytes, less than 7 bytes, this fire alarm data message can be in the Frame of a CAN agreement end of transmission, fire alarm data length between the main frame is 70 bytes, could end of transmission according to 10 CAN protocol data frames of application-layer data transmission method the foregoing description needs of the present invention.
Fig. 1 and Fig. 2 are respectively sending node and send data packets and the main schematic flow sheet of receiving node receiving data information bag.When the drive circuit plate is reported a fire on main frame, the fire alarm packing data need be become the form of fire alarm packets of information 1: 29 frame identifier is by INFO_ID, SRC_ADDR, and DEST_ADDR, INFO_ORDER forms.The length of this CAN protocol data frame (DLC) is set to 5, and the numerical value of DATA1 is xxxx0000, and wherein xxxx represents the timestamp of packets of information, and scope is from the 0-15 value, and sending node is every successfully to send a packets of information, and the numerical value of xxxx will add 1; The classification of 0000 expression packets of information, the data length of representing this packets of information is less than 7.The fire alarm data of 4 bytes are included among subsequently the DATA2-DATA5.DATA1-DATA5 is effective content of CAN Frame data, so length (DLC) is set to 5.The form of the fire alarm packets of information 2 between the main frame is: 29 frame identifier and fire alarm packets of information 1 constitutes basic identical owing to need a plurality of CAN protocol data frames of transmission, in the scope of INFO_ORDER from the 0-9 value.The numerical value of DATA1 need be arranged to xxxx0001 because the fire alarm data content that is transmitted is 70 bytes greater than 7 bytes.When the numerical value of INFO_ORDER was 0, CAN protocol data frame length (DLC) was 2, and the numerical value of DATA2 is 70, the length of expression fire alarm packets of information 2.When the numerical value of INFO_ORDER during from 1-8, CAN protocol data frame length (DLC) is 8, and the numerical value of DATA1-DATA8 is filled by the fire alarm data between the main frame successively.When the numerical value of INFO_ORDER was 9, remaining fire alarm data were 6 bytes, were the last frame data of this packets of information, and the Frame length (DLC) of CAN agreement is 6, and 6 remaining byte fire alarm data are filled into DATA1-DATA6.
Sending node sends to receiving node according to transmission flow with data packets, and receiving node is according to receiving flow process receiving data information bag.The heavy trigger mechanism of the ACK acknowledgement mechanism of receiving node, transmission timeout mechanism and buffer zone will guarantee that data send accurately and reliably.