CN111628919B - Method for realizing Arinc485 protocol state machine - Google Patents

Method for realizing Arinc485 protocol state machine Download PDF

Info

Publication number
CN111628919B
CN111628919B CN202010397511.7A CN202010397511A CN111628919B CN 111628919 B CN111628919 B CN 111628919B CN 202010397511 A CN202010397511 A CN 202010397511A CN 111628919 B CN111628919 B CN 111628919B
Authority
CN
China
Prior art keywords
message
machine
state machine
equipment
queue
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.)
Active
Application number
CN202010397511.7A
Other languages
Chinese (zh)
Other versions
CN111628919A (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.)
CETC Avionics Co Ltd
Original Assignee
CETC Avionics Co Ltd
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 CETC Avionics Co Ltd filed Critical CETC Avionics Co Ltd
Priority to CN202010397511.7A priority Critical patent/CN111628919B/en
Publication of CN111628919A publication Critical patent/CN111628919A/en
Application granted granted Critical
Publication of CN111628919B publication Critical patent/CN111628919B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L12/40006Architecture of a communication node
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/1607Details of the supervisory signal
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L5/00Arrangements affording multiple use of the transmission path
    • H04L5/003Arrangements for allocating sub-channels of the transmission path
    • H04L5/0053Allocation of signaling, i.e. of overhead other than pilot signals
    • H04L5/0055Physical resource allocation for ACK/NACK
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/40Bus networks
    • H04L2012/40267Bus for use in transportation systems
    • H04L2012/4028Bus for use in transportation systems the transportation system being an aircraft

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention discloses a method for realizing an Arinc485 protocol state machine, which comprises the realization of a message framing substate machine, the realization of a message processing substate machine and the realization of a message interaction process, wherein the realization of the message framing substate machine converts binary bit streams transmitted by a bus into byte sequence data, and restores the received byte sequence into original information at a receiving end to realize the assembly of complete message frames for the subsequent message processing; the realization of the message processing sub-state machine is realized by completing one-time complete transmission of messages, including message processing of the host airborne equipment and message processing of the slave airborne equipment; the realization of the message interaction process is respectively used for finishing the functions of the host machine-mounted equipment message processing sub-state machine, the host machine-mounted equipment message framing sub-state machine, the slave machine-mounted equipment message framing sub-state machine and the slave machine-mounted equipment message processing sub-state machine by establishing four threads, so that the high-efficiency data communication between the host machine-mounted equipment and the slave machine-mounted equipment is realized.

Description

Method for realizing Arinc485 protocol state machine
Technical Field
The invention relates to the technical field of aviation aircrafts, in particular to a method for realizing an Arinc485 protocol state machine.
Background
Arinc is an ericre corporation, usa, and is known as Aeronautical Radio Inc (Aeronautical Radio Inc), which is mainly responsible for coordinating, managing and certifying the Radio communication work of airlines independently of the government. The Arinc company leads the development of technical standards of airborne electronic equipment, aircraft maintenance equipment and practice, flight simulator equipment for military and commercial aviation and the like, and is a technical provider of a data communication network of civil aviation in China.
The Arinc485 protocol is an aviation standard protocol issued by Arinc corporation, and is a standard for defining characteristics such as communication specification and electrical compatibility related to a cabin Entertainment System (IFE). The protocol mainly defines the electrical characteristics, communication protocol and data content of the data bus for the cabin electronics, can be used to address the functional requirements of the head-end equipment and the seat terminal equipment in terms of bus communication, and is simultaneously applicable to multi-drop bus and point-to-point bus structures.
Because the number of airborne equipment of the airplane is large, how to ensure normal communication among the equipment is very important. Although the Arinc485 protocol for managing the bus onboard the passenger cabin is based on the EIA-485(Electronic Industry Association, EIA) standard, its application is subject to strict requirements. The Arinc485 protocol is mainly used for a Line Replaceable Unit (LRU) of the electronic equipment in an airborne passenger cabin, for example, an interface is provided for communication between a seat alternating current control box and a seat display terminal, and the interface is used for controlling the seat alternating current control box and reporting information of the seat alternating current control box, communicating among seat equipment, executing seat power management, seat state reporting functions and the like.
However, in the prior art, there are very few implementation methods for the Arinc485 protocol state machine, and a method for implementing the Arinc485 protocol state machine is urgently needed.
Disclosure of Invention
The invention aims to solve the technical problems that in the prior art, the implementation method for the state machine of the Arinc485 protocol is very few, and a method for realizing the information interaction of the state machines among devices in the Arinc485 protocol is lacked so as to achieve high-efficiency data communication among the devices. The invention provides a method for realizing the Arinc485 protocol state machine, which solves the problems and achieves high-efficiency data communication among devices.
The invention is realized by the following technical scheme:
a method for realizing Arinc485 protocol state machine includes the realization of message framing sub-state machine, the realization of message processing sub-state machine and the realization of message interaction process, wherein:
the realization of the message framing sub-state machine solves the problem of how to position the head and tail of a message at the receiving end. After binary bit stream transmitted by a bus is converted into byte sequence data, the received byte sequence is restored into original information at a receiving end, so that the assembly of a complete message frame is realized for the use of a subsequent message processing flow;
the realization of the message processing sub-state machine is realized by completing one complete transmission of the message, and if the transmission is successful, the one complete transmission of the message is represented; if the transmission fails, reporting an error warning; the implementation of the message processing sub-state machine comprises message processing of the host airborne equipment and message processing of the slave airborne equipment;
the realization of the message interaction process is realized by establishing four threads to respectively complete the functions of the host machine-mounted device message processing sub-state machine, the host machine-mounted device message framing sub-state machine, the slave machine-mounted device message framing sub-state machine and the slave machine-mounted device message processing sub-state machine, so that the high-efficiency data communication between the host machine-mounted device and the slave machine-mounted device is realized.
Further, the implementation of the message framing substate machine comprises the steps of:
carrying out internal initialization on the airborne equipment, and entering an idle state if the initialization is successful; if the initialization fails, returning to restart until the initialization is successful;
when the airborne equipment is in a receiving mode, immediately starting frame overtime timing when a first byte of data is received, and restarting the frame overtime timing if the data is continuously received and the frame timing is not overtime; otherwise, the receiving of a complete message is completed, the message is added into a message receiving queue for subsequent message processing after being assembled into a complete message frame, and the message receiving queue is switched into an idle state;
when the airborne equipment is not in a receiving mode, judging whether data are to be sent or not and overtime is sent for the last time, if not, switching the state into an idle state to wait until the data can be sent; if so, sending the data, and immediately switching to an idle state after the data is sent for subsequent message processing.
Further, in the implementation of the message framing substate machine, when the onboard apparatus is in the receiving mode, the frame timeout timer is immediately started when the first byte of the data is received, and if the data continues to be received and the frame timeout timer is less than 1.72ms, the frame timeout timer is restarted.
Further, in the implementation of the message framing substate machine, when the onboard device is not in the receiving mode, it is determined whether there is data to be sent and it is more than 100ms since the last sending.
Further, in the implementation of the message processing sub-state machine, the message processing of the host onboard device includes the following steps:
initializing the inside of the host equipment, and if the initialization is successful, checking whether a message exists in a message sending queue; if the initialization fails, returning to restart;
when checking whether there is a message in the send message queue:
if the connection message does not exist in the message sending queue, waiting for 100ms and adding a connection message into the message sending queue to maintain the communication connection between the host machine-mounted equipment and the slave machine-mounted equipment;
if the message exists in the message sending queue, taking out the message to be sent for storage, and waiting for receiving after the message is sent;
if the message queue of the receiving message does not have the message from the on-board equipment, the on-board equipment waits until the time is out; if the retransmission is not needed after the timeout, indicating that the transmission fails and reporting an error warning, otherwise, retransmitting the message;
if the message from the on-board equipment exists in the received message queue, taking out the message for verification and analysis, if the verification is successful and the analysis is a non-NAK (negative acknowledgement) message, indicating that the transmission is successful, otherwise, detecting whether retransmission is needed after sending the NAK message; if no retransmission is required, a transmission failure is indicated and an error warning is reported, otherwise the message is retransmitted.
Further, in the implementation of the message processing sub-state machine, the message processing from the on-board device includes the following steps:
initializing the interior of the slave on-board equipment, and if the initialization is successful, checking whether a master on-board equipment message exists in a received message queue; if the initialization fails, returning to restart;
when checking whether there is a host on-board device message in the received message queue:
if the received message queue does not exist, waiting for all the time;
if the message exists in the received message queue, taking out the message for checking, if the check is not passed, discarding the message and sending a NAK message, and then continuing to wait for receiving;
if the verification is passed, the message is analyzed, a response message can be taken out from the message sending queue after a non-NAK message is encountered, the response message can be sent out after being stored, and the message transmission is successful at this time; adding the response message into a message sending queue from the airborne equipment while the analysis is successful;
if NAK information is encountered during analysis, whether response information sent last time exists is detected, if yes, the information is sent out again when retransmission is needed, otherwise, transmission failure is indicated, and error warning is reported.
Further, in the implementation of the message interaction process, the message processing sub-state machine and the message framing sub-state machine communicate with each other through threads, and the message framing sub-state machines of different devices communicate with each other through an EIA-485 bus.
Further, in the implementation of the message interaction process, the message processing sub-state machine for the host-mounted device is completed by establishing a Thread1, the message framing sub-state machine for the host-mounted device is completed by establishing a Thread2, the message framing sub-state machine for the slave-mounted device is completed by establishing a Thread3, and the respective functions of the message processing sub-state machine for the slave-mounted device are completed by establishing a Thread 4;
when a message exists in a message sending queue of the main onboard equipment, the Thread1 takes out the message from the message sending queue of the main onboard equipment, the message is sent to the Thread2 through Thread communication after being processed, the Thread2 is sent to the Thread3 through an EIA-485 bus after being processed, the Thread3 adds a complete message frame into a message receiving queue of the auxiliary onboard equipment after being processed, and the Thread4 acquires the message from the message receiving queue of the auxiliary onboard equipment through Thread communication and then carries out verification and analysis processing;
when the slave onboard equipment is successfully verified and analyzed, a corresponding response message is added into a message sending queue of the slave onboard equipment, the Thread4 acquires the message from the message sending queue of the slave onboard equipment, processes the message and then sends the message to the Thread3 through Thread communication, the Thread3 sends the processed message to the Thread2 through an EIA-485 bus, the Thread2 adds a complete message frame into a message receiving queue of the master onboard equipment after processing, the Thread1 acquires the message from a message receiving queue of the master onboard equipment through Thread communication and then performs verification and analysis processing, and then the master onboard equipment and the slave onboard equipment complete message interaction.
The invention has the following advantages and beneficial effects:
the invention provides a method for realizing an Arinc485 protocol state machine, which realizes information interaction of different states among devices, can be used for solving the functional requirements of head-end equipment and seat terminal equipment in the aspect of bus communication, realizes a concurrent Processing function during communication, improves the response speed and the utilization rate of a Central Processing Unit (CPU) so as to achieve high-efficiency data communication among the devices, is simultaneously suitable for a multi-point bus and a point-to-point bus structure, and provides support for communication among airborne devices in the field of aviation.
Drawings
The accompanying drawings, which are included to provide a further understanding of the embodiments of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the principles of the invention. In the drawings:
FIG. 1 is a schematic diagram of the Arinc485 protocol state machine of the present invention.
FIG. 2 is a diagram of the Arinc485 message framing sub-state machine of the present invention.
Fig. 3 is a schematic diagram of a message processing sub-state machine of a host device in the Arinc485 protocol according to the present invention.
Fig. 4 is a schematic diagram of a message processing sub-state machine of an on-board device in the Arinc485 protocol according to the present invention.
Fig. 5 is a schematic diagram of an Arinc485 message interaction process according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is further described in detail below with reference to examples and accompanying drawings, and the exemplary embodiments and descriptions thereof are only used for explaining the present invention and are not meant to limit the present invention.
Examples
As shown in fig. 1 to fig. 5, a method for implementing an Arinc485 protocol state machine includes implementing a message framing sub-state machine, implementing a message processing sub-state machine, and implementing a message interaction process, where:
the realization of the message framing substate machine is that after binary bit stream transmitted by an EIA-485 bus is converted into byte sequence data, the received byte sequence is restored into original information at a receiving end, and the assembly of a complete message frame is realized for the use of a subsequent message processing flow;
the realization of the message processing sub-state machine is realized by completing one complete transmission of the message, and if the transmission is successful, the one complete transmission of the message is represented; if the transmission fails, reporting an error warning; the implementation of the message processing sub-state machine comprises message processing of the host airborne equipment and message processing of the slave airborne equipment;
the realization of the message interaction process is realized by establishing four threads to respectively complete the functions of the host machine-mounted device message processing sub-state machine, the host machine-mounted device message framing sub-state machine, the slave machine-mounted device message framing sub-state machine and the slave machine-mounted device message processing sub-state machine, so that the high-efficiency data communication between the host machine-mounted device and the slave machine-mounted device is realized.
The main idea of the invention is to provide a method for realizing the state machine of the Arinc485 protocol based on a state machine schematic diagram (as shown in fig. 1) in the Arinc485 standard protocol, so as to realize the information interaction of the state machine and achieve high-efficiency data communication between devices. Wherein Master represents a Master on-board device, and Slave represents a Slave on-board device; the protocol state machine is realized by a message framing substate machine, a message processing substate machine and a message interaction process which are jointly completed, and the detailed description is as follows:
in this embodiment, the implementation of the message framing substate machine includes:
the framing is realized to solve the problem of how to position the head and tail of a message at the receiving end. Because the equipment in the protocol receives and transmits the binary bit stream transmitted from the EIA-485 bus, the binary bit stream is converted into byte data and then is the discrete information formed by a group of fields, the received byte sequence must be reduced into the original information at the receiving end, and the assembly of a complete message frame is realized for the use of the subsequent message processing flow.
The Arinc485 protocol bus is in an asynchronous half-duplex mode, namely only one operation of transmitting or receiving can be carried out at the same time. As shown in fig. 2, the Master or Slave message is framed in three states: an idle state, a transmit state, and a receive state. Y in fig. 2 indicates that the determination condition is satisfied, and N indicates that the determination condition is not satisfied.
The idle state does not process any data, and the idle state is entered after the internal initialization is successful.
The receiving state is used for receiving data from the bus, the frame overtime timing is started immediately when the first byte of the data is received, if the data is continuously received and the timing is not overtime (less than 1.72ms), the frame overtime timing is restarted, otherwise, the frame overtime timing is indicated to be finished, the frame is assembled into a complete message frame and then added into a message receiving queue for subsequent message processing, and meanwhile, the state is switched into the idle state.
The sending state is used for sending data outwards, and if the time for sending the data last time does not exceed 100ms, the state is switched to an idle state to wait until the data can be sent; and immediately switching to an idle state after data transmission for subsequent message processing.
As shown in fig. 2, the specific steps are as follows:
carrying out internal initialization on the airborne equipment, and entering an idle state if the initialization is successful; if the initialization fails, returning to restart until the initialization is successful;
when the airborne equipment is in a receiving mode, immediately starting frame overtime timing when the first byte of the data is received, and restarting the frame overtime timing if the data is continuously received and the frame timing is not overtime (the non-overtime setting is less than 1.72 ms); otherwise, the receiving of a complete message is completed, the message is added into a message receiving queue for subsequent message processing after being assembled into a complete message frame, and the message receiving queue is switched into an idle state;
when the airborne equipment is not in a receiving mode, judging whether data are to be sent or not and the time is more than 100ms before sending, if not, switching the state into an idle state to wait until the data can be sent; if so, sending the data, and immediately switching to an idle state after the data is sent for subsequent message processing.
In this embodiment, in the implementation of the message processing sub-state machine, since the message processing processes of the Master and the Slave are different, they will be described below respectively.
a) Master message processing sub-state machine
As shown in the Master block diagram of fig. 3, the message processing of the Master includes the following steps:
initializing the Master inside, and if the initialization is successful, checking whether a message exists in a message sending queue; if the initialization fails, returning to restart;
when checking whether there is a message in the send message queue:
if the Master is not in the message sending queue, waiting for 100ms and then adding a connection message into the message sending queue to maintain the communication connection between the Master and the Slave;
if the message exists in the message sending queue, taking out the message to be sent for storage, and waiting for receiving after the message is sent;
if no Slave message exists in the received message queue, waiting until timeout; if the retransmission is not needed after the timeout, indicating that the transmission fails and reporting an error warning, otherwise, retransmitting the message;
if the Slave message exists in the received message queue, taking out the message for checking and analyzing, if the checking is successful and the message is analyzed to be a non-NAK (negative acknowledgement) message, indicating that the transmission is successful, otherwise, detecting whether retransmission is needed after sending the NAK message; if no retransmission is required, a transmission failure is indicated and an error warning is reported, otherwise the message is retransmitted.
b) Slave message processing sub-state machine
As shown in the Slave block diagram of fig. 4, the message processing of the Slave includes the following steps:
initializing the interior of the Slave, and if the initialization is successful, checking whether a Master message exists in a received message queue; if the initialization fails, returning to restart;
when checking whether Master messages exist in the received message queue:
if the received message queue does not exist, waiting for all the time;
if the message exists in the received message queue, taking out the message for checking, if the check is not passed, discarding the message and sending a NAK message, and then continuing to wait for receiving;
if the verification is passed, the message is analyzed, a response message can be taken out from the message sending queue after a non-NAK message is encountered, the response message can be sent out after being stored, and the message transmission is successful at this time; when the analysis is successful, the Slave adds the response message into a message sending queue;
if NAK information is encountered during analysis, whether response information sent last time exists is detected, if yes, the information is sent out again when retransmission is needed, otherwise, transmission failure is indicated, and error warning is reported.
In this embodiment, as shown in fig. 5, the implementation of the message interaction process includes completing a Master message processing sub-state machine by establishing a Thread1, completing a Master message framing sub-state machine by establishing a Thread2, completing a Slave message framing sub-state machine by establishing a Thread3, and completing respective functions of the Slave message processing sub-state machines by establishing a Thread 4; the message processing sub-state machine and the message framing sub-state machine are communicated through threads, and the message framing sub-state machines of different devices are communicated through an EIA-485 bus. By establishing thread processing for different state machines, high-efficiency data communication between the Master and the Slave can be realized, and the utilization rate of the CPU is improved.
When in implementation: firstly, a sending message queue and a receiving message queue are respectively created for the Master and the Slave, and are respectively used for receiving a sending request message and a receiving request message.
Second, as shown in FIG. 5, four threads are created: thread1, Thread2, Thread3 and Thread 4. Thread1 is used to implement a Master message processing sub-state machine, Thread2 is used to implement a Master message framing sub-state machine, Thread3 is used to implement a Slave message framing sub-state machine, and Thread4 is used to implement a Slave message processing sub-state machine.
Furthermore, the specific implementation of Thread1 is shown in the Master block diagram of fig. 3, the specific implementations of Thread2 and Thread3 are shown in fig. 2, and the specific implementation of Thread4 is shown in the Slave block diagram of fig. 4.
Then, when there is a message in the Master's message sending queue, Thread1 takes out the message from the Master's message sending queue, and after processing, it is handed to Thread2 through Thread communication, Thread2 sends to Thread3 through EIA-485 bus after processing, Thread3 adds the complete message frame into the Slave's message receiving queue after processing, Thread4 obtains the message from the Slave's message receiving queue through Thread communication, and then checks and resolves;
finally, when the Slave is successfully verified and analyzed, a corresponding response message is added into a message sending queue of the Slave, the Thread4 acquires the message from the message sending queue of the Slave and processes the message, then the message is delivered to the Thread3 through Thread communication, the Thread3 sends the processed message to the Thread2 through an EIA-485 bus, the Thread2 adds a complete message frame into a message receiving queue of a Master after processing, the Thread1 acquires the message from a message receiving queue of the Master through Thread communication, then verification and analysis processing is performed, and then the Master and the Slave complete message interaction.
The invention provides a method for realizing an Arinc485 protocol state machine, which realizes information interaction of different states among devices, can be used for solving the functional requirements of head end equipment and seat terminal equipment in the aspect of bus communication, realizes a concurrent processing function during communication, improves the response speed and the utilization rate of a CPU (central processing unit) so as to achieve high-efficiency data communication among the devices, is simultaneously suitable for a multipoint bus and a point-to-point bus structure, and provides support for communication among airborne devices in the field of aviation.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (7)

1. A method for realizing Arinc485 protocol state machine is characterized by comprising the realization of a message framing substate machine, the realization of a message processing substate machine and the realization of a message interaction process, wherein:
the realization of the message framing substate machine is that after binary bit stream transmitted by a bus is converted into byte sequence data, the received byte sequence is restored into original information at a receiving end, and the assembly of a complete message frame is realized for the use of a subsequent message processing flow;
the realization of the message processing sub-state machine is realized by completing one complete transmission of the message, and if the transmission is successful, the one complete transmission of the message is represented; if the transmission fails, reporting an error warning; the implementation of the message processing sub-state machine comprises message processing of the host airborne equipment and message processing of the slave airborne equipment;
the realization of the message interaction process is realized by establishing four threads to respectively complete the functions of a host machine-mounted device message processing sub-state machine, a host machine-mounted device message framing sub-state machine, a slave machine-mounted device message framing sub-state machine and a slave machine-mounted device message processing sub-state machine, so that the high-efficiency data communication between the host machine-mounted device and the slave machine-mounted device is realized;
in the implementation of the message interaction process, the message processing sub-state machine of the host-mounted device is completed by establishing a Thread1, the message framing sub-state machine of the host-mounted device is completed by establishing a Thread2, the message framing sub-state machine of the slave-mounted device is completed by establishing a Thread3, and the respective functions of the message processing sub-state machine of the slave-mounted device are completed by establishing a Thread 4;
when a message exists in a message sending queue of the main onboard equipment, the Thread1 takes out the message from the message sending queue of the main onboard equipment, the message is sent to the Thread2 through Thread communication after being processed, the Thread2 is sent to the Thread3 through an EIA-485 bus after being processed, the Thread3 adds a complete message frame into a message receiving queue of the auxiliary onboard equipment after being processed, and the Thread4 acquires the message from the message receiving queue of the auxiliary onboard equipment through Thread communication and then carries out verification and analysis processing;
when the slave onboard equipment is successfully verified and analyzed, a corresponding response message is added into a message sending queue of the slave onboard equipment, the Thread4 acquires the message from the message sending queue of the slave onboard equipment, processes the message and then sends the message to the Thread3 through Thread communication, the Thread3 sends the message to the Thread2 through an EIA-485 bus after processing the message, the Thread2 adds a complete message frame into a message receiving queue of the master onboard equipment after processing the message, the Thread1 acquires the message from a message receiving queue of the master onboard equipment through Thread communication and then performs verification and analysis processing, and then the master onboard equipment and the slave onboard equipment complete message interaction;
the method is applied to the functional requirements of head end equipment and seat terminal equipment in airborne equipment in the aspect of bus communication, and realizes concurrent processing in communication.
2. The method of claim 1, wherein the implementing of the message framing substate machine comprises:
carrying out internal initialization on the airborne equipment, and entering an idle state if the initialization is successful; if the initialization fails, returning to restart until the initialization is successful;
when the airborne equipment is in a receiving mode, starting frame overtime timing when a first byte of data is received, and restarting the frame overtime timing if the data is continuously received and the frame timing is not overtime; otherwise, the receiving of a complete message is completed, the message is added into a message receiving queue for subsequent message processing after being assembled into a complete message frame, and the message receiving queue is switched into an idle state;
when the airborne equipment is not in a receiving mode, judging whether data are to be sent or not and overtime is sent for the last time, if not, switching the state into an idle state to wait until the data can be sent; if so, sending the data, and immediately switching to an idle state after the data is sent for subsequent message processing.
3. The method as claimed in claim 2, wherein the message framing substate machine is implemented by starting a frame timeout timer when the on-board device is in a receiving mode when a first byte of data is received, and restarting the frame timeout timer if the data continues to be received and the frame timer is less than 1.72 ms.
4. A method as claimed in claim 2 or 3, wherein said implementation of the Arinc485 protocol state machine is such that, when the on-board device is not in receive mode, it is determined whether there is data to be sent and that it is more than 100ms from the last transmission.
5. The method of claim 1, wherein in the implementation of the message processing substate state machine, the message processing of the host device comprises the following steps:
initializing the inside of the host equipment, and if the initialization is successful, checking whether a message exists in a message sending queue; if the initialization fails, returning to restart;
when checking whether there is a message in the send message queue:
if the connection message does not exist in the message sending queue, waiting for 100ms and adding a connection message into the message sending queue to maintain the communication connection between the host machine-mounted equipment and the slave machine-mounted equipment;
if the message exists in the message sending queue, taking out the message to be sent for storage, and waiting for receiving after the message is sent;
if the message queue of the receiving message does not have the message from the on-board equipment, the on-board equipment waits until the time is out; if the retransmission is not needed after the timeout, indicating that the transmission fails and reporting an error warning, otherwise, retransmitting the message;
if the message from the on-board equipment exists in the received message queue, taking out the message for verification and analysis, if the verification is successful and the analysis is non-NAK message, indicating that the transmission is successful, otherwise, detecting whether to need retransmission after sending the NAK message; if no retransmission is required, a transmission failure is indicated and an error warning is reported, otherwise the message is retransmitted.
6. The method for implementing the Arinc485 protocol state machine according to claim 1 or 5, wherein in the implementation of the message processing sub-state machine, the message processing from the on-board device includes the following steps:
initializing the interior of the slave on-board equipment, and if the initialization is successful, checking whether a master on-board equipment message exists in a received message queue; if the initialization fails, returning to restart;
when checking whether there is a host on-board device message in the received message queue:
if the received message queue does not exist, waiting for all the time;
if the message exists in the received message queue, taking out the message for checking, if the check is not passed, discarding the message and sending a NAK message, and then continuing to wait for receiving;
if the verification is passed, the message is analyzed, a response message can be taken out from the message sending queue after a non-NAK message is encountered, the response message can be sent out after being stored, and the message transmission is successful at this time; adding the response message into a message sending queue from the airborne equipment while the analysis is successful;
if NAK information is encountered during analysis, whether response information sent last time exists is detected, if yes, the information is sent out again when retransmission is needed, otherwise, transmission failure is indicated, and error warning is reported.
7. The method as claimed in claim 1, wherein in the implementation of the message interaction process, the message processing sub-state machine and the message framing sub-state machine communicate with each other through threads, and the message framing sub-state machines of different devices communicate with each other through an EIA-485 bus.
CN202010397511.7A 2020-05-12 2020-05-12 Method for realizing Arinc485 protocol state machine Active CN111628919B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010397511.7A CN111628919B (en) 2020-05-12 2020-05-12 Method for realizing Arinc485 protocol state machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010397511.7A CN111628919B (en) 2020-05-12 2020-05-12 Method for realizing Arinc485 protocol state machine

Publications (2)

Publication Number Publication Date
CN111628919A CN111628919A (en) 2020-09-04
CN111628919B true CN111628919B (en) 2022-02-11

Family

ID=72260508

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010397511.7A Active CN111628919B (en) 2020-05-12 2020-05-12 Method for realizing Arinc485 protocol state machine

Country Status (1)

Country Link
CN (1) CN111628919B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112187408B (en) * 2020-09-28 2024-04-12 北京龙鼎源科技股份有限公司 Data processing method, system, device, storage medium and processor

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7028304B1 (en) * 1998-05-26 2006-04-11 Rockwell Collins Virtual line replaceable unit for a passenger entertainment system, method and article of manufacture

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102841554A (en) * 2011-06-24 2012-12-26 镇江华扬信息科技有限公司 Intelligent remote control method for system
CN104283749B (en) * 2014-09-25 2017-12-01 烽火通信科技股份有限公司 Business disk upgrade method based on the half-duplex bus of RS 485
CN110635982B (en) * 2019-08-09 2021-12-14 工业互联网创新中心(上海)有限公司 Double-host communication method and system on communication bus, industrial control gateway and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7028304B1 (en) * 1998-05-26 2006-04-11 Rockwell Collins Virtual line replaceable unit for a passenger entertainment system, method and article of manufacture

Also Published As

Publication number Publication date
CN111628919A (en) 2020-09-04

Similar Documents

Publication Publication Date Title
Fuchs et al. The evolution of avionics networks from ARINC 429 to AFDX
CN104317765B (en) A kind of one-to-many communication system and implementation method based on serial communication
US8306004B2 (en) Communication network system having high-ranking network and low-ranking networks, interchange terminal connecting high-ranking network and low-ranking network, microcomputer controlling connection between transmission line of low-ranking network and transmission line of high-ranking network, and communication transmitter-receiver connected with transmission line of low-ranking network and transmission line of high-ranking network
CN109639546A (en) A kind of CAN bus based redundant system
CN111628919B (en) Method for realizing Arinc485 protocol state machine
CN112075063A (en) Gateway for data communication in a vehicle
KR20140132063A (en) Apparatus and Method for CAN Comnunication
WO2023016241A1 (en) Method, apparatus, and system for remotely diagnosising vehicle
CN114826812B (en) Implementation method and system for RS485 communication multi-master station
US7760655B2 (en) Method and device for transfer of data over a data connection from a sender to a receiver by means of packets
CN109116832A (en) Vehicle diagnostic data wireless communication method
JP2003198572A (en) Deterministic field bas and process for management of such a bus
CN112367196A (en) Method and device for detecting network communication fault and electronic equipment
KR20130064500A (en) Method of error recovery while transmitting message in can communication system
WO2020250778A1 (en) Communication device, communication method, and program
Molina et al. Implementation of an AFDX interface with Zynq SoC board in FPGA
CN111404793B (en) Method, system, equipment and readable storage medium for controlling mapping of physical CAN port and virtual CAN port
CN103677693A (en) Handling method for facilitating confirmation of printing operation state and printing system
CN113439245A (en) Method and coordinating device for providing control applications via a communication network for transmitting time-critical data
CN112367374B (en) AFDX data communication system applied to civil aviation
US11882160B1 (en) Asymmetric data transmission using efficiency features
KR20150107223A (en) Restoring apparatus for communication error using history queue and method thereof
CN113824698B (en) Method for guaranteeing data integrity of civil avionics system
Zhang et al. Research and software design of high reliability communication of CAN bus ID dynamically configurable on satellite
CN111586182B (en) Data transmission method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant