CN106874009B - Network layer ICD packaging method and device - Google Patents

Network layer ICD packaging method and device Download PDF

Info

Publication number
CN106874009B
CN106874009B CN201710109297.9A CN201710109297A CN106874009B CN 106874009 B CN106874009 B CN 106874009B CN 201710109297 A CN201710109297 A CN 201710109297A CN 106874009 B CN106874009 B CN 106874009B
Authority
CN
China
Prior art keywords
parameter
logic
data block
length value
change
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
CN201710109297.9A
Other languages
Chinese (zh)
Other versions
CN106874009A (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.)
Beijing Runke General Technology Co Ltd
Original Assignee
Beijing Runke General Technology 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 Beijing Runke General Technology Co Ltd filed Critical Beijing Runke General Technology Co Ltd
Priority to CN201710109297.9A priority Critical patent/CN106874009B/en
Publication of CN106874009A publication Critical patent/CN106874009A/en
Application granted granted Critical
Publication of CN106874009B publication Critical patent/CN106874009B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/313Logic programming, e.g. PROLOG programming language
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/30Definitions, standards or architectural aspects of layered protocol stacks
    • H04L69/32Architecture of open systems interconnection [OSI] 7-layer type protocol stacks, e.g. the interfaces between the data link level and the physical level
    • H04L69/322Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions
    • H04L69/325Intralayer communication protocols among peer entities or protocol data unit [PDU] definitions in the network layer [OSI layer 3], e.g. X.25

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention provides a method and a device for encapsulating network layer ICD, which can reduce the workload of personnel in the process of encapsulating the network layer ICD by matching a bus link corresponding to each logic parameter from pre-established bus links, further reduce the time consumed by the encapsulating process, then judge whether a first data block exists in the corresponding bus link according to the calculated required domain length value of the logic parameter, if so, directly store the corresponding logic parameter in a blank region of a signal in the first data block so that a source device sends the logic parameter to a destination device by using the first data block, if not, newly establish a second data block to store the corresponding logic parameter, thus, based on the related information of the bus link, automatically store the logic parameter in the corresponding data block meeting the required domain length value of the logic parameter, the workload of manual participation in encapsulation is further reduced, and the working efficiency of network layer ICD encapsulation is indirectly improved.

Description

Network layer ICD packaging method and device
Technical Field
The invention relates to the field of avionic systems, in particular to a network layer ICD packaging method and device.
Background
Interface Control Document (ICD) is used as the core part of the system architecture, gives the definitions of the meanings, the compositions, the formats and other contents of the message receiving and sending among all subsystems in the avionics system, and is the key part of the modern complex avionics system architecture design. The ICD is a network layer message interface defining an interface control file (ICD), and encapsulates the ICD, and the logic parameters of the ICD can be encapsulated into domain data of the ICD, so that communication cooperation among different devices in the avionics system is realized.
At present, the method for encapsulating the ICD at the network layer mainly depends on manual work to complete all the encapsulation steps, and specifically includes: based on the current message to be sent, manually setting a logic parameter corresponding to the message in the source device, then setting a corresponding bus link according to the logic parameter, mapping the corresponding bus link to the destination device, then calculating the required domain length value of the logic parameter, manually searching a blank region of a signal with the length greater than or equal to the required domain length value in a data block of the corresponding bus link in the source device, and storing the logic parameter into the data block, thereby completing the process of encapsulating the logic parameter of the ICD (logical interface control document) into the domain data of the ICD (network interface control document), and facilitating the source device to successfully send the message to the destination device. However, due to the huge volume of messages transmitted in the avionics system, the existing method for encapsulating the network layer ICD greatly increases the workload of personnel and reduces the working efficiency of network layer ICD encapsulation.
Disclosure of Invention
In view of this, the present invention provides a method and an apparatus for encapsulating an ICD at a network layer, which reduce the workload of personnel participating in the encapsulation process, and further improve the working efficiency of ICD encapsulation at the network layer.
In order to achieve the purpose, the invention provides the following technical scheme:
a method for encapsulating an ICD (interface control document) at a network layer comprises the following steps:
when an encapsulation instruction is received, matching out at least one logic parameter corresponding to the encapsulation instruction;
calculating a desired domain length value for each of said logical parameters;
matching a pre-established bus link corresponding to each logic parameter;
judging whether each bus link comprises a first data block, wherein the length value of a blank area of a signal in the first data block is greater than or equal to the required area length value of a logic parameter corresponding to the bus link;
if the bus link comprises the first data block, storing the logic parameter corresponding to the bus link in a blank area of a signal in the first data block as the area data of the first data block;
if the bus link does not contain the first data block, establishing a second data block;
and storing the logic parameter corresponding to the bus link in a blank area of a signal in the second data block as the area data of the second data block.
Preferably, the matching out at least one logic parameter corresponding to the encapsulation instruction includes:
matching all pre-generated logic sub-parameters corresponding to the packaging instruction;
judging whether the transmission type of each logic sub-parameter is periodic transmission;
if the transmission type of the logic sub-parameters is periodic transmission, all the logic sub-parameters with the same refreshing period are used as one logic parameter;
and if the transmission type of the logic sub-parameter is non-periodic transmission, taking each logic sub-parameter with the transmission type of the non-periodic transmission as a logic parameter.
Preferably, the calculating the required domain length value of each of the logical parameters includes:
when all logic sub-parameters with the same refresh period are taken as a logic parameter, acquiring the effective range, the maximum absolute value of the effective range and the precision value of each logic sub-parameter contained in the logic parameter;
judging whether the effective range of each logic sub-parameter contained in the logic parameter contains a negative number;
if the effective range of the logic sub-parameter contained in the logic parameter contains a negative number, substituting the maximum absolute value and the precision value of the effective range of the logic sub-parameter into a first required domain length value calculation formula to obtain the required domain length value of the logic sub-parameter;
if the effective range of the logic sub-parameter contained in the logic parameter only contains positive numbers, substituting the maximum absolute value and the precision value of the effective range of the logic sub-parameter into a second required domain length value calculation formula to obtain the required domain length value of the logic sub-parameter;
adding the required domain length values of all the logic sub-parameters contained in the logic parameter to obtain the required domain length value of the logic parameter;
when each logic sub-parameter with the transmission type of non-periodic transmission is taken as a logic parameter, acquiring an effective range, a maximum absolute value of the effective range and an accuracy value of the logic sub-parameter contained in the logic parameter;
judging whether the effective range of the logic sub-parameters contained in the logic parameters contains negative numbers or not;
if the effective range of the logic sub-parameter contained in the logic parameter contains a negative number, substituting the maximum absolute value and the precision value of the effective range of the logic sub-parameter into a first required domain length value calculation formula to obtain a required domain length value of the logic sub-parameter as the required domain length value of the logic parameter;
and if the effective range of the logic sub-parameter contained in the logic parameter only contains positive numbers, substituting the maximum absolute value and the precision value of the effective range of the logic sub-parameter into a second required domain length value calculation formula to obtain the required domain length value of the logic sub-parameter as the required domain length value of the logic parameter.
Preferably, after the saving the logic parameter corresponding to the bus link in the blank area of the signal in the first data block as the area data of the first data block, the method further includes:
establishing an incidence relation between the logic parameter and the domain data of the first data block as a first incidence relation, and storing the first incidence relation;
when the attribute value of the logic parameter is changed for the first time, the domain data of the first data block is changed for the first time by using the first incidence relation, wherein the attribute value of the logic parameter comprises a period, a required domain length value and a refresh period, and the first change comprises that the transmission type of the logic parameter is changed from a period to an aperiodic and the required domain length value of the logic parameter is reduced;
when the attribute value of the logic parameter is changed for the second time, judging whether the transmission attribute of the bus link containing the first data block meets a second change preset condition or not;
if the transmission attribute of the bus link containing the first data block meets the second change preset condition, making the domain data of the first data block generate second change by using the first incidence relation;
if the transmission attribute of the bus link containing the first data block does not meet the second change preset condition, sending a change prohibition prompt;
wherein the second change comprises a change of a transmission type of the logic parameter from an aperiodic to a periodic, an increase of a required domain length value of the logic parameter, and a change of a refresh period of the logic parameter;
when the second change is that the transmission type of the logic parameter is changed from non-periodic to periodic, the second change preset condition is that the transmission type of the bus link containing the first data block is periodic transmission; when the second change is that the length value of the required domain of the logical parameter is increased, the second change preset condition is that a blank area of a signal with a length value larger than or equal to the increased length value of the required domain is stored in a data block contained in a bus link containing the first data block; when the second change is the change of the refresh cycle of the logic parameter, the second change preset condition is that the refresh cycle of the bus link including the first data block is less than or equal to the refresh cycle of the logic parameter.
Preferably, after the saving the logic parameter corresponding to the bus link in the blank area of the signal in the second data block as the area data of the second data block, the method further includes:
establishing an incidence relation between the logic parameter and the domain data of the second data block as a second incidence relation, and storing the second incidence relation;
when the attribute value of the logic parameter is changed for the first time, the second incidence relation is utilized to make the domain data of the second data block changed for the first time, the attribute value of the logic parameter comprises a period, a required domain length value and a refresh period, and the first change comprises that the transmission type of the logic parameter is changed from a period to an aperiodic and the required domain length value of the logic parameter is reduced;
when the attribute value of the logic parameter is changed for the second time, judging whether the transmission attribute of the bus link containing the second data block meets a second change preset condition or not;
if the transmission attribute of the bus link containing the second data block meets the second change preset condition, making the domain data of the second data block generate second change by using the second incidence relation;
if the transmission attribute of the bus link containing the second data block does not meet the second change preset condition, sending a change prohibition prompt;
wherein the second change comprises a change of a transmission type of the logic parameter from an aperiodic to a periodic, an increase of a required domain length value of the logic parameter, and a change of a refresh period of the logic parameter;
when the second change is that the transmission type of the logic parameter is changed from non-periodic to periodic, the second change preset condition is that the transmission type of the bus link containing the second data block is periodic transmission; when the second change is that the length value of the required domain of the logical parameter is increased, the second change preset condition is that a blank area of a signal with a length value larger than or equal to the increased length value of the required domain is stored in a data block contained in a bus link containing the second data block; when the second change is the change of the refresh cycle of the logic parameter, the second change preset condition is that the refresh cycle of the bus link including the second data block is less than or equal to the refresh cycle of the logic parameter.
An encapsulation apparatus of a network layer ICD, comprising:
the parameter matching module is used for matching at least one logic parameter corresponding to the packaging instruction when the packaging instruction is received;
a first domain length value calculation module for calculating a required domain length value for each of the logical parameters;
the link matching module is used for matching a pre-established bus link corresponding to each logic parameter;
a data block determining module, configured to determine whether each of the bus links includes a first data block, where a length value of a blank area of a signal in the first data block is greater than or equal to a length value of a required area of a logic parameter corresponding to the bus link;
a first storing module, configured to store the logic parameter corresponding to the bus link in a blank area of a signal in the first data block when the data block determining module determines that each of the bus links includes a first data block, where the blank area is used as field data of the first data block;
the data block establishing module is used for establishing a second data block when the data block judging module judges that each bus link does not contain the first data block;
and a second storing module, configured to store the logic parameter corresponding to the bus link in a blank area of a signal in the second data block, as the field data of the second data block.
Preferably, the parameter matching module includes:
the sub-parameter matching module is used for matching all pre-generated logic sub-parameters corresponding to the packaging instruction;
the transmission type judging module is used for judging whether the transmission type of each logic sub-parameter is periodic transmission;
a first parameter selection module, configured to, when the transmission type determination module determines that the transmission type of the logic sub-parameter is periodic transmission, take all logic sub-parameters with the same refresh period as a logic parameter;
and the second parameter selection module is used for taking each logic sub-parameter with the transmission type of non-periodic transmission as a logic parameter when the transmission type judgment module judges that the transmission type of the logic sub-parameter is non-periodic transmission.
Preferably, the first domain length value calculating module includes:
a first obtaining module, configured to obtain an effective range, a maximum absolute value of the effective range, and a precision value of each logic sub-parameter included in the logic parameter when the first parameter selecting module takes all logic sub-parameters with the same refresh cycle as one logic parameter;
the first valid range judging module is used for judging whether the valid range of each logic sub-parameter contained in the logic parameter contains a negative number;
a second domain length value calculation module, configured to substitute, when the first effective range determination module determines that the effective range of the logical subparameter included in the logical parameter includes a negative number, the maximum absolute value and the precision value of the effective range of the logical subparameter into a first required domain length value calculation formula, so as to obtain a required domain length value of the logical subparameter;
a third domain length value calculation module, configured to, when the first effective range judgment module judges that the effective range of the logical subparameter included in the logical parameter only includes a positive number, substitute a maximum absolute value and a precision value of the effective range of the logical subparameter into a second required domain length value calculation formula to obtain a required domain length value of the logical subparameter;
an adding module, configured to add required domain length values of all the logical sub-parameters included in the logical parameter to obtain a required domain length value of the logical parameter;
a second obtaining module, configured to obtain, when the second parameter selecting module uses each logic sub-parameter with a non-periodic transmission type as a logic parameter, an effective range, a maximum absolute value of the effective range, and a precision value of the logic sub-parameter included in the logic parameter;
the second effective range judging module is used for judging whether the effective range of the logic sub-parameters contained in the logic parameters contains negative numbers or not;
a fourth domain length value calculating module, configured to, when the second valid range determining module determines that the valid range of the logical subparameter included in the logical parameter includes a negative number, substitute the maximum absolute value and the precision value of the valid range of the logical subparameter into the first required domain length value calculating formula to obtain a required domain length value of the logical subparameter, where the required domain length value is used as the required domain length value of the logical parameter;
a fifth domain length value calculating module, configured to, when the second valid range determining module determines that the valid range of the logical subparameter included in the logical parameter only includes a positive number, substitute a maximum absolute value and a precision value of the valid range of the logical subparameter into a second required domain length value calculating formula, to obtain a required domain length value of the logical subparameter, where the required domain length value is used as the required domain length value of the logical parameter.
Preferably, the apparatus further comprises:
a first association relation establishing module, configured to establish an association relation between the logic parameter and the domain data of the first data block, as a first association relation, and store the first association relation;
a first changing module, configured to, when an attribute value of the logical parameter is changed for the first time, make the domain data of the first data block changed for the first time by using the first association relationship, where the attribute value of the logical parameter includes a period, a required domain length value, and a refresh period, and the first change includes a change of a transmission type of the logical parameter from a period to an aperiodic period and a reduction of the required domain length value of the logical parameter;
the first transmission attribute judgment module is used for judging whether the transmission attribute of the bus link containing the first data block meets a second change preset condition or not when the attribute value of the logic parameter is changed for the second time;
a second changing module, configured to, when the first transmission attribute determining module determines that the transmission attribute of the bus link including the first data block meets a second change preset condition, make the domain data of the first data block undergo a second change by using the first association relationship;
the first prompting module is used for sending out a change prohibition prompt when the first transmission attribute judging module judges that the transmission attribute of the bus link containing the first data block does not meet a second change preset condition;
wherein the second change comprises a change of a transmission type of the logic parameter from an aperiodic to a periodic, an increase of a required domain length value of the logic parameter, and a change of a refresh period of the logic parameter;
when the second change is that the transmission type of the logic parameter is changed from non-periodic to periodic, the second change preset condition is that the transmission type of the bus link containing the first data block is periodic transmission; when the second change is that the length value of the required domain of the logical parameter is increased, the second change preset condition is that a blank area of a signal with a length value larger than or equal to the increased length value of the required domain is stored in a data block contained in a bus link containing the first data block; when the second change is the change of the refresh cycle of the logic parameter, the second change preset condition is that the refresh cycle of the bus link including the first data block is less than or equal to the refresh cycle of the logic parameter.
Preferably, the apparatus further comprises:
a second association relationship establishing module, configured to establish an association relationship between the logic parameter and the domain data of the second data block, as a second association relationship, and store the second association relationship;
a first changing module, configured to, when an attribute value of the logical parameter is changed for the first time, make the domain data of the second data block changed for the first time by using the second association relationship, where the attribute value of the logical parameter includes a period, a required domain length value, and a refresh period, and the first change includes a change of a transmission type of the logical parameter from a period to an aperiodic period and a reduction of the required domain length value of the logical parameter;
the second transmission attribute judgment module is used for judging whether the transmission attribute of the bus link containing the second data block meets a second change preset condition or not when the attribute value of the logic parameter is changed for the second time;
a second changing module, configured to, when the second transmission attribute determining module determines that the transmission attribute of the bus link including the second data block meets a second change preset condition, make the domain data of the second data block undergo a second change by using the second association relationship;
the second prompting module is used for sending out a change prohibition prompt when the second transmission attribute judging module judges that the transmission attribute of the bus link containing the second data block does not meet a second change preset condition;
wherein the second change comprises a change of a transmission type of the logic parameter from an aperiodic to a periodic, an increase of a required domain length value of the logic parameter, and a change of a refresh period of the logic parameter;
when the second change is that the transmission type of the logic parameter is changed from non-periodic to periodic, the second change preset condition is that the transmission type of the bus link containing the second data block is periodic transmission; when the second change is that the length value of the required domain of the logical parameter is increased, the second change preset condition is that a blank area of a signal with a length value larger than or equal to the increased length value of the required domain is stored in a data block contained in a bus link containing the second data block; when the second change is the change of the refresh cycle of the logic parameter, the second change preset condition is that the refresh cycle of the bus link including the second data block is less than or equal to the refresh cycle of the logic parameter.
Through the technical scheme, compared with the prior art, the invention provides a method and a device for encapsulating a network layer ICD, which can reduce the workload of personnel in the process of encapsulating the network layer ICD by matching a bus link corresponding to each logic parameter from pre-established bus links so as to achieve the purpose of reducing the time consumed by the encapsulating process, then judge whether a first data block with the length value of a blank area of a signal being larger than or equal to the length value of the required area of the corresponding logic parameter exists in each bus link according to the calculated length value of the required area of each logic parameter, and directly store the logic parameter corresponding to the bus link in the blank area of the signal in the first data block when the first data block exists so that a source device transmits the logic parameter to the corresponding destination device through a network by using the first data block, when the first data block does not exist in the bus link, a second data block is directly established for storing the logic parameter corresponding to the bus link, and therefore, based on the relevant information of the bus link, the logic parameter is automatically stored in the data block corresponding to the required domain length value meeting the logic parameter, the workload of manual packaging is further reduced, and the working efficiency of network layer ICD packaging is indirectly improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a method for encapsulating an ICD at a network layer according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a bus link according to an embodiment of the present invention;
fig. 3 is a flowchart of another method for encapsulating an ICD at a network layer according to an embodiment of the present invention;
fig. 4 is a flowchart of another method for encapsulating an ICD at a network layer according to an embodiment of the present invention;
fig. 5 is a flowchart of another method for encapsulating an ICD at a network layer according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a network layer ICD packaging apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of another network layer ICD packaging apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of another network layer ICD packaging apparatus according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention discloses a method for encapsulating an ICD (interface control document) at a network layer, which specifically comprises the following steps of:
s101: when an encapsulation instruction is received, matching out at least one logic parameter corresponding to the encapsulation instruction;
specifically, the encapsulation instruction according to the embodiment of the present invention may be an instruction generated according to a message that needs to be transmitted when the source device controls the destination device to perform an operation in the avionics system, such as a takeoff instruction, a landing instruction, and a deceleration instruction.
After the source device analyzes the message to be transmitted from the encapsulation instruction, the physical meaning of the message can be defined by using the logic parameter in order to facilitate the source device to perform relevant processing operation on the transmission message, so that after the source device receives the encapsulation instruction in the avionics system, the source device can match the corresponding logic parameter according to the encapsulation instruction to serve as basic data required by the subsequent encapsulation network layer ICD. The number of the logic parameters corresponding to one package instruction may be one or multiple.
S102: calculating a desired domain length value for each of said logical parameters;
specifically, since the logical parameters cannot be directly transmitted on the network layer, the logical parameters need to be stored in the corresponding data block and then transmitted, and before the logical parameters are stored in the data block, the required domain length value of the logical parameters itself needs to be calculated first, so as to prevent the storage failure.
S103: matching a pre-established bus link corresponding to each logic parameter;
specifically, since the data transmission communication between the source device and the destination device mainly depends on the virtual transmission link established between the devices, after matching one or more logic parameters, it is further required to match a bus link corresponding to each logic parameter, where the bus link corresponding to the logic parameter is established in advance in the source device and is mapped to the destination device, respectively, and the bus link may include communication links such as 1553B, ARINC429, ARINC422, and ethernet, and each bus link has attributes including: source device, destination device, refresh period, maximum delay, type of transmission, etc. Taking fig. 2 as an example for illustration, two bus links, namely 1553A and 1553B, are pre-established in the source Device, where the link 1553A is respectively connected to the Device1, the Device2, the Device3 and the Device4, and the link 1553B is respectively connected to the Device3 and the Device4, and if the Device1 is used as the source Device and the Device2 is used as the destination Device, the bus link 1553A connecting the Device1 and the Device2 can be used as a corresponding bus link, so that the subsequent source Device1 transmits a message to the destination Device 2. One bus link may correspond to one logic parameter or may simultaneously correspond to a plurality of logic parameters.
Still taking fig. 2 as an example, the interface of the BUS link 1553A connected to the Device1 may be the BC TERMINAL, and the interfaces of the devices 2, 3, and 4 connected to the BUS link 1553A may only be the RT TERMINAL. When transmitting the data block message over bus link 1553A, the transmission direction of the data block message may include: from the BC end to the RT end, from the RT end to the BC end and from the RT end to the RT end. Wherein, the RT terminal can set the sub-address.
S104: judging whether each bus link comprises a first data block, wherein the length value of a blank area of a signal in the first data block is greater than or equal to the length value of a required area of a logic parameter corresponding to the bus link, if so, executing S105, and if not, executing S106;
specifically, each bus link may have a respective data block for storing transmission data, and each data block has a respective signal, and only when there is a blank area in the signal in the data block, a certain amount of data may be stored in the data block, so that after the required domain length value of each logical parameter is calculated, it is further required to respectively determine, for each bus link corresponding to each logical parameter, whether there is a blank area in each data block contained therein, where the length value of the blank area is greater than or equal to the required domain length value of the corresponding logical parameter, so as to effectively prevent a problem of data storage failure caused by insufficient blank areas in the signal in the data block.
S105: storing the logic parameter corresponding to the bus link in a blank area of a signal in the first data block as domain data of the first data block;
specifically, when a blank area of a signal having a length greater than or equal to the required area length of the corresponding logical parameter is stored in a data block included in the bus link, the corresponding logical parameter may be directly stored in the blank area of the signal, and the blank area may be used as the area data of the data block, so as to facilitate subsequent transmission operations.
For example, the Device1 is used as a source Device, the Device2 is used as a destination Device, the para1 is used as a logic parameter, the a/D1D2/00 is used as a 1553A bus link matched by the corresponding para1, and for the condition that the required domain length value of the logic parameter para1 is 8 bits, the source Device1 will sequentially determine a first data block a/D1D2/00-01, a signal 0signal _155300-/D1 of the first data block and blank regions bit 0-bit 7 of the signal, which satisfy the condition, from the bus link a/D1D2/00, and then directly store the logic parameter para1 in the blank regions bit 0-7 of the signal 0signal _155300-/D1 of the first data block a/D2/00-01.
S106: establishing a second data block and executing S107;
specifically, when the length of the blank area of the signal stored in the data block included in the bus link is smaller than the required length of the logical parameter, a new data block needs to be created in the bus link for storing the corresponding logical parameter. When naming the newly-built data blocks, naming can be performed based on the related information of the bus link and the data block arrangement sequence included in the bus link, such as a/D1D2/00-01, where a is the related information of the bus link and 00-01 is the data block arrangement sequence included in the bus link.
S107: storing the logic parameter corresponding to the bus link in a blank area of a signal in the second data block as domain data of the second data block;
specifically, since the second data block is a newly created data block, the data block contains sufficient empty space for storing the corresponding logical parameters.
The embodiment of the invention discloses a method for encapsulating network layer ICD, which can reduce the workload of personnel in the process of encapsulating the network layer ICD by matching a bus link corresponding to each logic parameter from pre-established bus links to achieve the purpose of reducing the time consumed by the encapsulating process, then judges whether the length value of a blank area of a signal of a data block contained in each bus link is greater than or equal to the length value of the required area of the corresponding logic parameter according to the calculated length value of the required area of each logic parameter, and takes the data block as a first data block for directly storing the logic parameter corresponding to the bus link when the length value of the blank area of the signal of the data block is greater than or equal to the length value of the required area of the logic parameter, so that a source device utilizes the first data block to send the logic parameter to a corresponding destination device through a network, when the first data block does not exist in the bus link, a second data block is directly established and used for storing the logic parameter corresponding to the bus link, and therefore, based on the relevant information of the bus link, the logic parameter is automatically stored in the data block corresponding to the required domain length value meeting the logic parameter, the workload of personnel in the packaging process can be further reduced, and the working efficiency of ICD packaging of a network layer is indirectly improved.
On the basis of the embodiment shown in fig. 1, the embodiment discloses another method for encapsulating an ICD at a network layer, please refer to fig. 3, where the method specifically includes the following steps:
s201: matching all pre-generated logic sub-parameters corresponding to a packaging instruction when the packaging instruction is received;
for example, as shown in table 1, each logical subparameter may include attributes such as parameter name, type, unit, precision, and detailed description, and may be encapsulated as material defined by the ICD data at the network layer.
Table 1: logical subparameter attributes and content
Figure BDA0001233973510000121
In the parameter types shown in table 1, the integer is used to represent various integer numbers, and the attributes include (short, int, and long), presence or absence of a symbol, an expression bit number, a specification number, a name, a description, an effective range, precision, a unit, a transmission type, and a refresh period; the enumeration type can define 0 to 2^ (n-1) -1 (representing enumeration value and enumeration description in the range of power n-1 minus 1 of 2) by using n bits, and the attribute comprises a specification number, a name, an expression bit number, a description, a transmission type and a refresh period; the floating point type is used for representing various floating point numbers, and the attributes comprise (Float and Double), specification number, name, description, effective range, precision, unit, signed or unsigned number, expression bit number, transmission type and refresh period; the character string type is used for representing a one-dimensional character array, and the attributes comprise a specification number, a name, a description, an expression digit, a transmission type and a refreshing period; the data flow type is used for representing binary flow information, and the attributes comprise specification numbers, names, descriptions, expression digits, transmission types and refresh cycles.
Since the attribute of a logical subparameter will contain a detailed parameter description for the parameter, one or more logical subparameters corresponding to the attribute can be matched according to the package instruction.
S202: judging whether the transmission type of each logic sub-parameter is periodic transmission, if so, executing S203, and if not, executing S204;
specifically, whether the logical subparameter is a periodic transmission or not can be determined according to the transmission type contained in the attribute of the logical subparameter.
S203: taking all logic sub-parameters with the same refresh period as a logic parameter, and executing S205;
specifically, the logic sub-parameters with the transmission type of periodic transmission all preset corresponding refresh cycles, so that the logic sub-parameters with periodic transmission exist in all the matched logic sub-parameters, and the logic sub-parameters can be grouped according to the refresh cycles preset by the logic sub-parameters with periodic transmission, and one or more logic sub-parameters with the same refresh cycle are used as one logic parameter to further participate in the subsequent packaging process.
S204: taking each logic sub-parameter with the transmission type of non-periodic transmission as a logic parameter, and executing S206;
specifically, if there is a logic sub-parameter with a transmission type of non-periodic transmission in all the matched logic sub-parameters, the logic sub-parameters are respectively used as an independent logic parameter to further participate in the subsequent encapsulation process.
S205: obtaining the effective range, the maximum absolute value of the effective range and the precision value of each logic sub-parameter contained in the logic parameter, and executing S207;
specifically, according to the attributes of the logical sub-parameters in the constituent logical parameters, the effective range, the maximum absolute value of the effective range, and the precision value of each logical sub-parameter can be obtained.
S206: obtaining the effective range, the maximum absolute value of the effective range and the precision value of the logic sub-parameters contained in the logic parameters, and executing S208;
specifically, according to the attribute of the logical subparameter in the constituent logical parameters, the effective range, the maximum absolute value of the effective range, and the precision value of the logical subparameter can be obtained.
S207: judging whether the valid range of each logic sub-parameter contained in the logic parameter contains a negative number, if so, executing S209a, and if only contains a positive number, executing S209 b;
specifically, the valid range of each logic sub-parameter according to the embodiment of the present invention includes negative numbers, specifically all negative numbers in the valid range, and both positive numbers and negative numbers in the valid range.
S208: judging whether the valid range of the logic sub-parameter contained in the logic parameter contains a negative number, if so, executing S2010a, and if only contains a positive number, executing S2010 b;
specifically, the valid range of each logic sub-parameter according to the embodiment of the present invention includes negative numbers, specifically all negative numbers in the valid range, and both positive numbers and negative numbers in the valid range.
S209 a: substituting the maximum absolute value and the precision value of the effective range of the logic sub-parameter into a first required domain length value calculation formula to obtain a required domain length value of the logic sub-parameter, and executing S2011;
specifically, if one or more logical subparameters with valid ranges containing negative numbers exist in all the logical subparameters contained in the logical parameters, the maximum absolute value and the precision value of the valid range of each logical subparameter with valid ranges containing negative numbers can be respectively substituted into the first required domain length value calculation formula:
Figure BDA0001233973510000141
the desired domain length values for each of these logical subparameters are obtained.
S209 b: substituting the maximum absolute value and the precision value of the effective range of the logic sub-parameter into a second required domain length value calculation formula to obtain a required domain length value of the logic sub-parameter, and executing S2011;
specifically, if there is one or more logical subparameters of which effective ranges only include positive numbers in all the logical subparameters included in the logical parameter, the maximum absolute value and the precision value of the effective range of each logical subparameter of which effective range only includes positive numbers may be respectively substituted into the second required domain length value calculation formula:
Figure BDA0001233973510000142
the desired domain length values for each of these logical subparameters are obtained.
S2010 a: substituting the maximum absolute value and the precision value of the effective range of the logic sub-parameter into a first required domain length value calculation formula to obtain a required domain length value of the logic sub-parameter as the required domain length value of the logic parameter, and executing S2012;
specifically, if the effective range of the logical subparameter contained in the logical parameter contains a negative number, the maximum absolute value and the precision value of the effective range of the logical subparameter can be respectively substituted into a first required domain length value calculation formula:
Figure BDA0001233973510000143
and obtaining the required domain length value of the logic subparameter, wherein the logic subparameter only comprises one logic subparameter, so that the obtained required domain length value of the logic subparameter is the required domain length value of the logic parameter, and further provides basic data for a subsequent packaging process.
Secondly, if the number of the matched logic sub-parameters corresponding to the encapsulation instruction is large, the number of the correspondingly obtained logic parameters may also be larger than 1, and at this time, each logic parameter may obtain the respective required domain length value according to the above steps.
S2010 b: substituting the maximum absolute value and the precision value of the effective range of the logic sub-parameter into a second required domain length value calculation formula to obtain a required domain length value of the logic sub-parameter as the required domain length value of the logic parameter, and executing S2012;
specifically, if the effective ranges of the logical sub-parameters included in the logical parameters are all positive numbers without negative numbers, the maximum absolute value and the precision value of the effective ranges of the logical sub-parameters can be respectively substituted into a second required domain length value calculation formula:
Figure BDA0001233973510000151
obtaining the required domain length value of the logic subparameter, wherein the logic subparameter only comprises one logic subparameter, so that the obtained required domain length value of the logic subparameter is the required domain length value of the logic parameter, and further providing basic data for the subsequent packaging process
S2011: adding the required domain length values of all the logic sub-parameters included in the logic parameter to obtain the required domain length value of the logic parameter, and executing S2012;
specifically, since the logic parameter includes a plurality of logic sub-parameters, the required domain length value of the logic parameter should be the sum of the required domain length values of all the logic sub-parameters included in the logic parameter.
S2012: matching the pre-established bus link corresponding to each of the logical parameters, and executing S2013.
S2013: judging whether each bus link contains a first data block, wherein the length value of a blank area of a signal in the first data block is greater than or equal to the required area length value of a logic parameter corresponding to the bus link, if so, executing S2014, and if not, executing S2015.
S2014: and storing the logic parameter corresponding to the bus link in a blank area of a signal in the first data block as the area data of the first data block.
S2015: a second data block is established and S2016 is performed.
S2016: and storing the logic parameter corresponding to the bus link in a blank area of a signal in the second data block as the area data of the second data block.
In the method for encapsulating the ICD at the network layer disclosed by the embodiment of the invention, all matched logic sub-parameters are classified according to whether the transmission type is periodic transmission or not, all the logic sub-parameters which are periodically transmitted are grouped according to whether the refresh period is the same or not, so that the logic parameters corresponding to the encapsulation instruction can be determined according to the logic sub-parameters which are periodically transmitted, and the required domain length value of the logic parameters is calculated, so that the logic sub-parameters which can be simultaneously subjected to the same encapsulation process are combined by using the transmission attribute of the logic sub-parameters, and the required domain length of the combined logic parameters is calculated, thereby indirectly reducing the time required to be consumed in the encapsulation process and improving the working efficiency of encapsulation.
On the basis of the embodiment shown in fig. 1, the embodiment discloses another method for encapsulating an ICD at a network layer, please refer to fig. 4, where the method specifically includes the following steps:
s301: and matching at least one logic parameter corresponding to the packaging instruction when the packaging instruction is received.
S302: calculating a desired domain length value for each of the logical parameters.
S303: matching pre-established bus links corresponding to each of the logical parameters.
S304: judging whether each bus link comprises a first data block, wherein the length value of a blank area of a signal in the first data block is greater than or equal to the required area length value of a logic parameter corresponding to the bus link, if so, executing S305, and if not, executing S306.
S305: the logic parameter corresponding to the bus link is saved in a blank area of a signal in the first data block as domain data of the first data block, and S307 is performed.
S306: a second data block is created and S308 is performed.
S307: establishing an association relationship between the logic parameter and the domain data of the first data block as a first association relationship, storing the first association relationship, and then executing S309;
specifically, the domain data stored in the first data block included in the bus link and the corresponding logical parameter have the same content and attribute, a first association relationship is established between the logical parameter and the domain data of the first data block, and the first association relationship is stored in the database corresponding to the bus link, so that a modification basis is provided for the subsequent change of the logical parameter.
S308: and storing the logic parameter corresponding to the bus link in a blank area of a signal in the second data block as the area data of the second data block.
S309: judging whether the attribute value of the logic parameter is changed for the first time, if so, executing S3010a, and if so, executing S3010 b;
specifically, the attribute value of the logic parameter includes a period, a required domain length value and a refresh period, and the first change includes two change cases of changing the transmission type of the logic parameter from the period to the aperiodic and reducing the required domain length value of the logic parameter.
S3010 a: making the domain data of the first data block generate a first change by using the first incidence relation;
for example, if the transmission type of the attribute value of the logical parameter is changed from periodic transmission to aperiodic transmission, the source device may directly control the domain data of the first data block corresponding to the logical parameter to be automatically changed from periodic transmission to aperiodic transmission according to the first association relationship established between the logical parameter stored in the database and the domain data of the first data block, thereby ensuring the consistency of the transmission of the logical parameter in the network layer.
S3010 b: judging whether the transmission attribute of the bus link containing the first data block meets a second change preset condition, if so, executing S3011a, and if not, executing S3011 b;
specifically, the second change according to the embodiment of the present invention includes three change situations, that is, changing the transmission type of the logic parameter from an aperiodic type to a periodic type, increasing the length value of the required domain of the logic parameter, and changing the refresh period of the logic parameter;
correspondingly, when the transmission type of the second changed logic parameter is changed from the non-periodic transmission to the periodic transmission, the second changed preset condition is that the transmission type of the bus link containing the first data block is periodic transmission; when the length value of the required domain of the second change to the logic parameter is increased, the second change preset condition is that a blank area of a signal with the length value being more than or equal to the increased length value of the required domain is stored in a data block contained in a bus link containing the first data block; when the second change is the change of the refresh cycle of the logic parameter, the second change preset condition is that the refresh cycle of the bus link including the first data block is less than or equal to the refresh cycle of the logic parameter.
S3011 a: making a second change to the domain data of the first data block by using the first incidence relation;
for example, if the required domain length value of the logical parameter is increased, after learning that a blank area of a signal whose length value is greater than or equal to the increased required domain length value is stored in a data block included in a bus link including a first data block, the source device may automatically store the newly increased logical parameter of the required domain length value of the logical parameter into the blank area of the signal in the data block; the data block contained in the bus link referred to here can be either a data block containing the desired field length value of the originally corresponding logical parameter or another data block belonging to the bus link.
S3011 b: sending out a change prohibition prompt;
for example, the required domain length value that is changed into the logical parameter is increased, the second change preset condition is that a blank area in which a signal whose length value is greater than or equal to the increased required domain length value is stored in a data block included in the bus link including the first data block is used as an example for description, after the source device obtains that the blank area in which the signal whose length value is greater than or equal to the increased required domain length value is not stored in the data block included in the bus link including the first data block, a change prohibition prompt that "the bus signal in which the parameter is encapsulated does not have enough blank area, and ICD cancels the logical parameter content modification operation" is automatically sent, so that a prompt to the user is realized.
In the method for encapsulating the ICD at the network layer disclosed by the embodiment of the invention, after the logical parameter corresponding to the bus link is stored in the first data block contained in the bus link and used as the domain data of the logical parameter, the first association relationship between the logical parameter and the domain data is established and stored, so that when the logical parameter is changed, the source device can automatically make the domain data corresponding to the logical parameter perform the same change operation, thereby ensuring the transmission consistency of the logical parameter at the network layer, avoiding manually changing the domain data and improving the working efficiency of ICD encapsulation at the network layer.
On the basis of the embodiment shown in fig. 1, the present embodiment discloses another method for encapsulating an ICD at a network layer, please refer to fig. 5, where the method specifically includes the following steps:
s401: and matching at least one logic parameter corresponding to the packaging instruction when the packaging instruction is received.
S402: calculating a desired domain length value for each of the logical parameters.
S403: matching pre-established bus links corresponding to each of the logical parameters.
S404: and judging whether each bus link comprises a first data block, wherein the length value of a blank area of a signal in the first data block is greater than or equal to the length value of a required area of a logic parameter corresponding to the bus link, if so, executing S405, and if not, executing S406.
S405: and storing the logic parameter corresponding to the bus link in a blank area of a signal in the first data block as the area data of the first data block.
S406: a second data block is established and S407 is performed.
S407: and saving the logic parameter corresponding to the bus link in a blank area of a signal in the second data block as domain data of the second data block, and executing S408.
S408: establishing an association relationship between the logic parameter and the domain data of the second data block as a second association relationship, storing the second association relationship, and then executing S409;
specifically, the domain data stored in the second data block included in the bus link and the corresponding logical parameter have the same content and attribute, a second association relationship is established between the logical parameter and the domain data of the second data block, and the second association relationship is stored in the database corresponding to the bus link, so that a modification basis is provided for the subsequent change of the logical parameter.
S409: judging whether the attribute value of the logic parameter is subjected to first change, if so, executing S4010a, and if so, executing S4010 b;
specifically, the attribute values of the logical parameter include a period, a required domain length value, and a refresh period, and the first change includes two change cases, namely, a change of the transmission type of the logical parameter from a period to an aperiodic, and a reduction of the required domain length value of the logical parameter.
S4010 a: making the domain data of the second data block generate a first change by using the second incidence relation;
for example, if the transmission type of the attribute value of the logical parameter is changed from periodic transmission to aperiodic transmission, the source device may directly control the domain data of the second data block corresponding to the logical parameter to be automatically changed from periodic transmission to aperiodic transmission according to a second association relationship established between the logical parameter stored in the database and the domain data of the second data block, thereby ensuring consistency of the logical parameter in the network layer transmission.
S4010 b: judging whether the transmission attribute of the bus link containing the second data block meets a second change preset condition, if so, executing S4011a, and if not, executing S4011 b;
specifically, the second change according to the embodiment of the present invention includes three change situations, that is, changing the transmission type of the logic parameter from an aperiodic type to a periodic type, increasing the required domain length value of the logic parameter, and changing the refresh period of the logic parameter.
Correspondingly, when the transmission type of the second changed logic parameter is changed from the non-periodic transmission to the periodic transmission, the second changed preset condition is that the transmission type of the bus link containing the second data block is periodic transmission; when the length value of the required domain of the second changed logical parameter is increased, the second changed preset condition is that a blank area of a signal with the length value being more than or equal to the increased length value of the required domain is stored in a data block contained in a bus link containing a second data block; when the second change is the change of the refresh cycle of the logic parameter, the second change preset condition is that the refresh cycle of the bus link including the second data block is less than or equal to the refresh cycle of the logic parameter.
S4011 a: making the domain data of the second data block generate a second change by using the second incidence relation;
for example, if the refresh period of the logic parameter is shortened by 25ms, after the source device knows that the refresh period of the bus link including the second data block is less than or equal to the refresh period of the logic parameter, the source device will automatically shorten the refresh period of the domain data of the second data block corresponding to the logic parameter by 25 ms.
S4011 b: sending out a change prohibition prompt;
for example, still taking the case that the refresh period of the bus link including the second data block becomes smaller than 25ms, and the second preset condition of the change is that the refresh period of the bus link including the second data block is smaller than or equal to the refresh period of the logic parameter as an example, after the source device knows that the refresh period of the bus link including the second data block is greater than the refresh period of the logic parameter, the source device automatically sends a change prohibition prompt of "the refresh period of the link to which the bus ICD encapsulating the parameter belongs is greater than the refresh period after the change, and cancels the content modification operation of the logic parameter", so as to remind the user.
In the method for encapsulating the ICD at the network layer disclosed by the embodiment of the invention, after the logical parameter corresponding to the bus link is stored in the second data block contained in the bus link and used as the domain data of the logical parameter, the second association relationship between the logical parameter and the domain data is established and stored, so that when the logical parameter is changed, the source device can automatically make the domain data corresponding to the logical parameter perform the same change operation, thereby ensuring the transmission consistency of the logical parameter at the network layer, avoiding manually changing the domain data and improving the working efficiency of ICD encapsulation at the network layer.
The embodiment discloses a device for encapsulating an ICD at a network layer, referring to fig. 6, the device includes:
a parameter matching module 501, configured to match at least one logic parameter corresponding to an encapsulation instruction when the encapsulation instruction is received;
a first domain length value calculation module 502, configured to calculate a required domain length value of each of the logic parameters;
a link matching module 503, configured to match a pre-established bus link corresponding to each of the logic parameters;
a data block determining module 504, configured to determine whether each of the bus links includes a first data block, where a length value of a blank area of a signal in the first data block is greater than or equal to a length value of a required area of a logic parameter corresponding to the bus link;
a first storing module 505, configured to, when the data block determining module 504 determines that each of the bus links includes a first data block, store the logic parameter corresponding to the bus link in a blank area of a signal in the first data block as field data of the first data block;
a data block establishing module 506, configured to establish a second data block when the data block determining module 504 determines that each bus link does not include the first data block;
a second storing module 507, configured to store the logic parameter corresponding to the bus link in a blank area of a signal in the second data block as the domain data of the second data block.
In the encapsulating device of the ICD in the network layer disclosed in the embodiment of the present invention, the link matching module 503 matches out the bus link corresponding to each logical parameter from the pre-established bus links, so as to reduce the workload of personnel in the ICD encapsulating process in the network layer to achieve the purpose of reducing the time consumed by the encapsulating process, and then according to the required domain length value of each logical parameter calculated by the first domain length value calculating module 502, the data block judging module 504 judges whether the length value of the blank region of the signal of the data block contained in each bus link is greater than or equal to the required domain length value of the corresponding logical parameter, and when the length value of the blank region of the signal of the data block is greater than or equal to the required domain length value of the logical parameter, the data block is used as the first data block for directly storing the logical parameter corresponding to the bus link, therefore, based on the relevant information of the bus link, the logic parameters are automatically stored in the data blocks corresponding to the required domain length values meeting the logic parameters, so that the workload of personnel in the packaging process can be further reduced, and the working efficiency of ICD packaging of a network layer is indirectly improved.
Please refer to a method flowchart corresponding to fig. 1 for the working process of each module provided in the embodiment of the present invention, and detailed description of the working process is omitted.
This embodiment discloses another network layer ICD packaging apparatus, please refer to fig. 7, where the apparatus includes:
a parameter matching module 501, a first domain length value calculating module 502, a link matching module 503, a data block judging module 504, a first storage module 505, a data block establishing module 506 and a second storage module 507;
wherein the parameter matching module 501 comprises:
a sub-parameter matching module 5011, configured to match all pre-generated logic sub-parameters corresponding to the encapsulation instruction;
a transmission type determining module 5012, configured to determine whether the transmission type of each of the logic sub-parameters is periodic transmission;
a first parameter selection module 5013, configured to use all the logic sub-parameters with the same refresh period as one logic parameter when the transmission type determination module 5012 determines that the transmission type of the logic sub-parameter is periodic transmission;
the second parameter selection module 5014 is configured to, when the transmission type determination module 5012 determines that the transmission type of the logical subparameter is aperiodic transmission, use each logical subparameter whose transmission type is aperiodic transmission as a logical parameter.
The first domain length value calculation module 502 includes:
a first obtaining module 5021, configured to obtain an effective range, a maximum absolute value of the effective range, and an accuracy value of each logic sub-parameter included in the logic parameter when the first parameter selecting module 5013 takes all logic sub-parameters with the same refresh period as one logic parameter;
a first valid range determining module 5022, configured to determine whether a valid range of each logic sub-parameter included in the logic parameter includes a negative number;
a second domain length value calculating module 5023, configured to substitute the maximum absolute value and the precision value of the effective range of the logical subparameter into a first required domain length value calculating formula to obtain a required domain length value of the logical subparameter when the first effective range determining module 5022 determines that the effective range of the logical subparameter included in the logical parameter includes a negative number;
a third domain length value calculating module 5024, configured to substitute the maximum absolute value and the precision value of the effective range of the logical subparameter into a second required domain length value calculating formula to obtain the required domain length value of the logical subparameter when the first effective range determining module 5022 determines that the effective range of the logical subparameter included in the logical subparameter only includes a positive number;
an adding module 5025, configured to add the required domain length values of all the logic sub-parameters included in the logic parameter to obtain a required domain length value of the logic parameter;
a second obtaining module 5026, configured to obtain the valid range, the maximum absolute value of the valid range, and the precision value of each logical subparameter included in the logical parameter when the second parameter selecting module 5014 uses each logical subparameter whose transmission type is aperiodic transmission as a logical parameter;
a second valid range determining module 5027, configured to determine whether a valid range of a logic sub-parameter included in the logic parameter includes a negative number;
a fourth domain length value calculating module 5028, configured to substitute the maximum absolute value and the precision value of the effective range of the logical subparameter into the first required domain length value calculating formula to obtain the required domain length value of the logical subparameter as the required domain length value of the logical parameter when the second effective range determining module 5027 determines that the effective range of the logical subparameter included in the logical parameter includes a negative number;
a fifth domain length value calculating module 5029, configured to substitute the maximum absolute value and the precision value of the effective range of the logical subparameter into a second required domain length value calculating formula to obtain the required domain length value of the logical subparameter as the required domain length value of the logical parameter when the second effective range determining module 5027 determines that the effective range of the logical subparameter included in the logical parameter only includes a positive number.
In the encapsulating device of the ICD at the network layer disclosed by the embodiment of the invention, the transmission type judging module 5012 is used for classifying and judging all the logic sub-parameters matched by the sub-parameter matching module 5011 according to whether the transmission type is periodic transmission or not, the first parameter selecting module 5013 is used for grouping all the logic sub-parameters transmitted periodically according to whether the refreshing period is the same or not, further, the logic parameter corresponding to the encapsulation instruction can be determined according to the logic sub-parameter transmitted periodically, and then the first domain length value calculating module 502 calculates the required domain length value of the logic parameter, therefore, the transmission attributes of the logic sub-parameters are utilized to combine the logic sub-parameters capable of simultaneously performing the same packaging process, and then the required domain length of the combined logic parameters is calculated, so that the time consumed in the packaging process is indirectly shortened, and the packaging work efficiency is improved.
Please refer to a method flowchart corresponding to fig. 3 for the working process of each module provided in the embodiment of the present invention, and detailed description of the working process is omitted.
This embodiment discloses another network layer ICD encapsulation apparatus, please refer to fig. 8, where the apparatus includes:
the system comprises a parameter matching module 501, a first domain length value calculating module 502, a link matching module 503, a data block judging module 504, a first storage module 505, a data block establishing module 506, a second storage module 507, a first association relationship establishing module 508, a first changing module 509, a first transmission attribute judging module 5010, a second changing module 5011, a first prompting module 5012, a second association relationship establishing module 5013, a second transmission attribute judging module 5014 and a second prompting module 5015.
The first association relationship establishing module 508 is configured to establish an association relationship between the logic parameter and the domain data of the first data block, as a first association relationship, and store the first association relationship;
a first changing module 509, configured to, when an attribute value of the logical parameter is changed for the first time, utilize the first association relationship to make the domain data of the first data block changed for the first time, where the attribute value of the logical parameter includes a period, a required domain length value, and a refresh period, and the first change includes a change of a transmission type of the logical parameter from a period to an aperiodic, and a reduction of the required domain length value of the logical parameter;
the first transmission attribute determining module 5010 is configured to determine, when the attribute value of the logic parameter is changed for the second time, whether the transmission attribute of the bus link including the first data block meets a second change preset condition;
a second changing module 5011, configured to, when the first transmission attribute determining module 5010 determines that the transmission attribute of the bus link including the first data block meets a second change preset condition, make the domain data of the first data block undergo a second change by using the first association relationship;
the first prompting module 5012 is configured to send a change prohibition prompt when the first transmission attribute determining module 5010 determines that the transmission attribute of the bus link including the first data block does not satisfy the second change preset condition;
wherein the second change comprises a change of a transmission type of the logic parameter from an aperiodic to a periodic, an increase of a required domain length value of the logic parameter, and a change of a refresh period of the logic parameter;
when the second change is that the transmission type of the logic parameter is changed from non-periodic to periodic, the second change preset condition is that the transmission type of the bus link containing the first data block is periodic transmission; when the second change is that the length value of the required domain of the logical parameter is increased, the second change preset condition is that a blank area of a signal with a length value larger than or equal to the increased length value of the required domain is stored in a data block contained in a bus link containing the first data block; when the second change is the change of the refresh cycle of the logic parameter, the second change preset condition is that the refresh cycle of the bus link including the first data block is less than or equal to the refresh cycle of the logic parameter.
A second association relationship establishing module 5013, configured to establish an association relationship between the logic parameter and the domain data of the second data block, as a second association relationship, and store the second association relationship;
a first changing module 509, configured to, when an attribute value of the logical parameter is changed for the first time, utilize the second association relationship to change the domain data of the second data block for the first time, where the attribute value of the logical parameter includes a period, a required domain length value, and a refresh period, and the first change includes a change of a transmission type of the logical parameter from a period to an aperiodic period and a reduction of the required domain length value of the logical parameter;
the second transmission attribute determining module 5014 is configured to determine, when the attribute value of the logical parameter is changed for the second time, whether the transmission attribute of the bus link including the second data block meets a second change preset condition;
a second changing module 5011, configured to, when the second transmission attribute determining module 5015 determines that the transmission attribute of the bus link including the second data block meets a second change preset condition, make the domain data of the second data block undergo a second change by using the second association relationship;
the second prompting module 5015 is configured to send a change prohibition prompt when the second transmission attribute determining module 5014 determines that the transmission attribute of the bus link including the second data block does not satisfy the second change preset condition;
wherein the second change comprises a change of a transmission type of the logic parameter from an aperiodic to a periodic, an increase of a required domain length value of the logic parameter, and a change of a refresh period of the logic parameter;
when the second change is that the transmission type of the logic parameter is changed from non-periodic to periodic, the second change preset condition is that the transmission type of the bus link containing the second data block is periodic transmission; when the second change is that the length value of the required domain of the logical parameter is increased, the second change preset condition is that a blank area of a signal with a length value larger than or equal to the increased length value of the required domain is stored in a data block contained in a bus link containing the second data block; when the second change is the change of the refresh cycle of the logic parameter, the second change preset condition is that the refresh cycle of the bus link including the second data block is less than or equal to the refresh cycle of the logic parameter.
In the encapsulating device of the ICD in the network layer disclosed in the embodiment of the present invention, after the logical parameter corresponding to the bus link is stored in the first data block or the second data block included in the bus link and is used as the domain data thereof, the first association relationship establishing module 508 or the second association relationship establishing module 5013 establishes and stores the association relationship between the logical parameter and the domain data, and further when the logical parameter is changed, the source device can automatically perform the same change operation on the domain data corresponding to the logical parameter, thereby ensuring the consistency of the transmission of the logical parameter in the network layer, avoiding manual change of the domain data, and improving the working efficiency of ICD encapsulation in the network layer.
Please refer to the method flow diagrams corresponding to fig. 4 and fig. 5 for the working processes of the modules provided in the embodiment of the present invention, and detailed description of the working processes is omitted.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (8)

1. A method for encapsulating an ICD (interface control document) at a network layer is characterized by comprising the following steps:
when an encapsulation instruction is received, matching out at least one logic parameter corresponding to the encapsulation instruction;
calculating a desired domain length value for each of said logical parameters;
matching a pre-established bus link corresponding to each logic parameter;
judging whether each bus link comprises a first data block, wherein the length value of a blank area of a signal in the first data block is greater than or equal to the required area length value of a logic parameter corresponding to the bus link;
if the bus link comprises the first data block, storing the logic parameter corresponding to the bus link in a blank area of a signal in the first data block as the area data of the first data block;
establishing an incidence relation between the logic parameter and the domain data of the first data block as a first incidence relation, and storing the first incidence relation;
when the attribute value of the logic parameter is changed for the first time, the domain data of the first data block is changed for the first time by using the first incidence relation, wherein the attribute value of the logic parameter comprises a period, a required domain length value and a refresh period, and the first change comprises that the transmission type of the logic parameter is changed from a period to an aperiodic and the required domain length value of the logic parameter is reduced;
when the attribute value of the logic parameter is changed for the second time, judging whether the transmission attribute of the bus link containing the first data block meets a second change preset condition or not;
if the transmission attribute of the bus link containing the first data block meets the second change preset condition, making the domain data of the first data block generate second change by using the first incidence relation;
if the transmission attribute of the bus link containing the first data block does not meet the second change preset condition, sending a change prohibition prompt;
wherein the second change comprises a change of a transmission type of the logic parameter from an aperiodic to a periodic, an increase of a required domain length value of the logic parameter, and a change of a refresh period of the logic parameter;
when the second change is that the transmission type of the logic parameter is changed from non-periodic to periodic, the second change preset condition is that the transmission type of the bus link containing the first data block is periodic transmission; when the second change is that the length value of the required domain of the logical parameter is increased, the second change preset condition is that a blank area of a signal with a length value larger than or equal to the increased length value of the required domain is stored in a data block contained in a bus link containing the first data block; when the second change is the change of the refresh cycle of the logic parameter, the second change preset condition is that the refresh cycle of the bus link containing the first data block is less than or equal to the refresh cycle of the logic parameter;
if the bus link does not contain the first data block, establishing a second data block;
and storing the logic parameter corresponding to the bus link in a blank area of a signal in the second data block as the area data of the second data block.
2. The method of claim 1, wherein the matching out at least one logic parameter corresponding to the encapsulation instruction comprises:
matching all pre-generated logic sub-parameters corresponding to the packaging instruction;
judging whether the transmission type of each logic sub-parameter is periodic transmission;
if the transmission type of the logic sub-parameters is periodic transmission, all the logic sub-parameters with the same refreshing period are used as one logic parameter;
and if the transmission type of the logic sub-parameter is non-periodic transmission, taking each logic sub-parameter with the transmission type of the non-periodic transmission as a logic parameter.
3. The method of claim 2, wherein said calculating the desired domain length value for each of said logical parameters comprises:
when all logic sub-parameters with the same refresh period are taken as a logic parameter, acquiring the effective range, the maximum absolute value of the effective range and the precision value of each logic sub-parameter contained in the logic parameter;
judging whether the effective range of each logic sub-parameter contained in the logic parameter contains a negative number;
if the effective range of the logic sub-parameter contained in the logic parameter contains a negative number, substituting the maximum absolute value and the precision value of the effective range of the logic sub-parameter into a first required domain length value calculation formula to obtain the required domain length value of the logic sub-parameter;
if the effective range of the logic sub-parameter contained in the logic parameter only contains positive numbers, substituting the maximum absolute value and the precision value of the effective range of the logic sub-parameter into a second required domain length value calculation formula to obtain the required domain length value of the logic sub-parameter;
adding the required domain length values of all the logic sub-parameters contained in the logic parameter to obtain the required domain length value of the logic parameter;
when each logic sub-parameter with the transmission type of non-periodic transmission is taken as a logic parameter, acquiring an effective range, a maximum absolute value of the effective range and an accuracy value of the logic sub-parameter contained in the logic parameter;
judging whether the effective range of the logic sub-parameters contained in the logic parameters contains negative numbers or not;
if the effective range of the logic sub-parameter contained in the logic parameter contains a negative number, substituting the maximum absolute value and the precision value of the effective range of the logic sub-parameter into a first required domain length value calculation formula to obtain a required domain length value of the logic sub-parameter as the required domain length value of the logic parameter;
and if the effective range of the logic sub-parameter contained in the logic parameter only contains positive numbers, substituting the maximum absolute value and the precision value of the effective range of the logic sub-parameter into a second required domain length value calculation formula to obtain the required domain length value of the logic sub-parameter as the required domain length value of the logic parameter.
4. The method of claim 1, further comprising, after the saving the logical parameter corresponding to the bus link in a blank area of a signal in the second data block as the field data of the second data block:
establishing an incidence relation between the logic parameter and the domain data of the second data block as a second incidence relation, and storing the second incidence relation;
when the attribute value of the logic parameter is changed for the first time, the second incidence relation is utilized to make the domain data of the second data block changed for the first time, the attribute value of the logic parameter comprises a period, a required domain length value and a refresh period, and the first change comprises that the transmission type of the logic parameter is changed from a period to an aperiodic and the required domain length value of the logic parameter is reduced;
when the attribute value of the logic parameter is changed for the second time, judging whether the transmission attribute of the bus link containing the second data block meets a second change preset condition or not;
if the transmission attribute of the bus link containing the second data block meets the second change preset condition, making the domain data of the second data block generate second change by using the second incidence relation;
if the transmission attribute of the bus link containing the second data block does not meet the second change preset condition, sending a change prohibition prompt;
wherein the second change comprises a change of a transmission type of the logic parameter from an aperiodic to a periodic, an increase of a required domain length value of the logic parameter, and a change of a refresh period of the logic parameter;
when the second change is that the transmission type of the logic parameter is changed from non-periodic to periodic, the second change preset condition is that the transmission type of the bus link containing the second data block is periodic transmission; when the second change is that the length value of the required domain of the logical parameter is increased, the second change preset condition is that a blank area of a signal with a length value larger than or equal to the increased length value of the required domain is stored in a data block contained in a bus link containing the second data block; when the second change is the change of the refresh cycle of the logic parameter, the second change preset condition is that the refresh cycle of the bus link including the second data block is less than or equal to the refresh cycle of the logic parameter.
5. An apparatus for encapsulating an ICD at a network layer, comprising:
the parameter matching module is used for matching at least one logic parameter corresponding to the packaging instruction when the packaging instruction is received;
a first domain length value calculation module for calculating a required domain length value for each of the logical parameters;
the link matching module is used for matching a pre-established bus link corresponding to each logic parameter;
a data block determining module, configured to determine whether each of the bus links includes a first data block, where a length value of a blank area of a signal in the first data block is greater than or equal to a length value of a required area of a logic parameter corresponding to the bus link;
a first storing module, configured to store the logic parameter corresponding to the bus link in a blank area of a signal in the first data block when the data block determining module determines that each of the bus links includes a first data block, where the blank area is used as field data of the first data block;
a first association relation establishing module, configured to establish an association relation between the logic parameter and the domain data of the first data block, as a first association relation, and store the first association relation;
a first changing module, configured to, when an attribute value of the logical parameter is changed for the first time, make the domain data of the first data block changed for the first time by using the first association relationship, where the attribute value of the logical parameter includes a period, a required domain length value, and a refresh period, and the first change includes a change of a transmission type of the logical parameter from a period to an aperiodic period and a reduction of the required domain length value of the logical parameter;
the first transmission attribute judgment module is used for judging whether the transmission attribute of the bus link containing the first data block meets a second change preset condition or not when the attribute value of the logic parameter is changed for the second time;
a second changing module, configured to, when the first transmission attribute determining module determines that the transmission attribute of the bus link including the first data block meets a second change preset condition, make the domain data of the first data block undergo a second change by using the first association relationship;
the first prompting module is used for sending out a change prohibition prompt when the first transmission attribute judging module judges that the transmission attribute of the bus link containing the first data block does not meet a second change preset condition;
the data block establishing module is used for establishing a second data block when the data block judging module judges that each bus link does not contain the first data block;
and a second storing module, configured to store the logic parameter corresponding to the bus link in a blank area of a signal in the second data block, as the field data of the second data block.
6. The apparatus of claim 5, wherein the parameter matching module comprises:
the sub-parameter matching module is used for matching all pre-generated logic sub-parameters corresponding to the packaging instruction;
the transmission type judging module is used for judging whether the transmission type of each logic sub-parameter is periodic transmission;
a first parameter selection module, configured to, when the transmission type determination module determines that the transmission type of the logic sub-parameter is periodic transmission, take all logic sub-parameters with the same refresh period as a logic parameter;
and the second parameter selection module is used for taking each logic sub-parameter with the transmission type of non-periodic transmission as a logic parameter when the transmission type judgment module judges that the transmission type of the logic sub-parameter is non-periodic transmission.
7. The apparatus of claim 6, wherein the first domain length value calculating module comprises:
a first obtaining module, configured to obtain an effective range, a maximum absolute value of the effective range, and a precision value of each logic sub-parameter included in the logic parameter when the first parameter selecting module takes all logic sub-parameters with the same refresh cycle as one logic parameter;
the first valid range judging module is used for judging whether the valid range of each logic sub-parameter contained in the logic parameter contains a negative number;
a second domain length value calculation module, configured to substitute, when the first effective range determination module determines that the effective range of the logical subparameter included in the logical parameter includes a negative number, the maximum absolute value and the precision value of the effective range of the logical subparameter into a first required domain length value calculation formula, so as to obtain a required domain length value of the logical subparameter;
a third domain length value calculation module, configured to, when the first effective range judgment module judges that the effective range of the logical subparameter included in the logical parameter only includes a positive number, substitute a maximum absolute value and a precision value of the effective range of the logical subparameter into a second required domain length value calculation formula to obtain a required domain length value of the logical subparameter;
an adding module, configured to add required domain length values of all the logical sub-parameters included in the logical parameter to obtain a required domain length value of the logical parameter;
a second obtaining module, configured to obtain, when the second parameter selecting module uses each logic sub-parameter with a non-periodic transmission type as a logic parameter, an effective range, a maximum absolute value of the effective range, and a precision value of the logic sub-parameter included in the logic parameter;
the second effective range judging module is used for judging whether the effective range of the logic sub-parameters contained in the logic parameters contains negative numbers or not;
a fourth domain length value calculating module, configured to, when the second valid range determining module determines that the valid range of the logical subparameter included in the logical parameter includes a negative number, substitute the maximum absolute value and the precision value of the valid range of the logical subparameter into the first required domain length value calculating formula to obtain a required domain length value of the logical subparameter, where the required domain length value is used as the required domain length value of the logical parameter;
a fifth domain length value calculating module, configured to, when the second valid range determining module determines that the valid range of the logical subparameter included in the logical parameter only includes a positive number, substitute a maximum absolute value and a precision value of the valid range of the logical subparameter into a second required domain length value calculating formula, to obtain a required domain length value of the logical subparameter, where the required domain length value is used as the required domain length value of the logical parameter.
8. The apparatus of claim 5, further comprising:
a second association relationship establishing module, configured to establish an association relationship between the logic parameter and the domain data of the second data block, as a second association relationship, and store the second association relationship;
a first changing module, configured to, when an attribute value of the logical parameter is changed for the first time, make the domain data of the second data block changed for the first time by using the second association relationship, where the attribute value of the logical parameter includes a period, a required domain length value, and a refresh period, and the first change includes a change of a transmission type of the logical parameter from a period to an aperiodic period and a reduction of the required domain length value of the logical parameter;
the second transmission attribute judgment module is used for judging whether the transmission attribute of the bus link containing the second data block meets a second change preset condition or not when the attribute value of the logic parameter is changed for the second time;
a second changing module, configured to, when the second transmission attribute determining module determines that the transmission attribute of the bus link including the second data block meets a second change preset condition, make the domain data of the second data block undergo a second change by using the second association relationship;
the second prompting module is used for sending out a change prohibition prompt when the second transmission attribute judging module judges that the transmission attribute of the bus link containing the second data block does not meet a second change preset condition;
when the second change is that the transmission type of the logic parameter is changed from non-periodic to periodic, the second change preset condition is that the transmission type of the bus link containing the second data block is periodic transmission; when the second change is that the length value of the required domain of the logical parameter is increased, the second change preset condition is that a blank area of a signal with a length value larger than or equal to the increased length value of the required domain is stored in a data block contained in a bus link containing the second data block; when the second change is the change of the refresh cycle of the logic parameter, the second change preset condition is that the refresh cycle of the bus link including the second data block is less than or equal to the refresh cycle of the logic parameter.
CN201710109297.9A 2017-02-27 2017-02-27 Network layer ICD packaging method and device Active CN106874009B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710109297.9A CN106874009B (en) 2017-02-27 2017-02-27 Network layer ICD packaging method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710109297.9A CN106874009B (en) 2017-02-27 2017-02-27 Network layer ICD packaging method and device

Publications (2)

Publication Number Publication Date
CN106874009A CN106874009A (en) 2017-06-20
CN106874009B true CN106874009B (en) 2020-07-03

Family

ID=59167995

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710109297.9A Active CN106874009B (en) 2017-02-27 2017-02-27 Network layer ICD packaging method and device

Country Status (1)

Country Link
CN (1) CN106874009B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113079072B (en) * 2020-01-06 2022-11-11 广州汽车集团股份有限公司 Vehicle data acquisition method and system, computer equipment and storage medium
CN113849556A (en) * 2021-08-11 2021-12-28 国网甘肃省电力公司信息通信公司 Sharing mechanism based on block chain distributed database

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103699393A (en) * 2014-01-07 2014-04-02 北京经纬恒润科技有限公司 Packaging-unpacking program generation method and packaging-unpacking program generation device
CN104461881A (en) * 2014-12-03 2015-03-25 陕西千山航空电子有限责任公司 ICD-oriented ARINC429 bus signal simulation test assembly

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103699393A (en) * 2014-01-07 2014-04-02 北京经纬恒润科技有限公司 Packaging-unpacking program generation method and packaging-unpacking program generation device
CN104461881A (en) * 2014-12-03 2015-03-25 陕西千山航空电子有限责任公司 ICD-oriented ARINC429 bus signal simulation test assembly

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"航电仿真系统接口监控软件的设计与实现";叶中脉;《中国优秀硕士学位论文全文数据库(电子期刊)信息科技辑》;20120115(第01期);I140-541 *

Also Published As

Publication number Publication date
CN106874009A (en) 2017-06-20

Similar Documents

Publication Publication Date Title
CN103020024B (en) A kind of file layout change-over method
CN106874009B (en) Network layer ICD packaging method and device
CN105681123A (en) Spacewire network delay testing and optimizing system
CN109684311A (en) Abnormal deviation data examination method and device
CN102185706A (en) Method for generating IEEE1394 (Institute of Electrical and Electronics Engineers 1394) network topological graph
WO2020142867A1 (en) Traffic shaping method and related device
CN104869079A (en) Queue scheduling method and device based on dynamic weighted round robin
CN114911598A (en) Task scheduling method, device, equipment and storage medium
CN104580008A (en) Method and device for improving multi-queue random message discarding accuracy based on hardware
CN105721410A (en) Method and device for obtaining network safety state
CN102811152A (en) Method for realizing real-time transaction and data exchange of multiple main bus network communication
CN103533090A (en) Mapping method and device for simulating single physical network port into multiple logical network ports
CN106911740A (en) A kind of method and apparatus of cache management
CN109919826B (en) Graph data compression method for graph computation accelerator and graph computation accelerator
CN111740922B (en) Data transmission method, device, electronic equipment and medium
CN112468573B (en) Data pushing method, device, equipment and storage medium based on distributed deployment
CN107239407B (en) Wireless access method and device for memory
CN111970112A (en) Ether house deployment method and system based on ZYNQ heterogeneous computing platform
CN115879543A (en) Model training method, device, equipment, medium and system
CN114138452B (en) High-energy-efficiency computing node selection method and device in edge computing
CN106293536B (en) Input/output I/O dispatching method and device
CN114612037A (en) Warehouse information management method and system
CN112718507B (en) Express sorting method, device, equipment and storage medium
CN103812904A (en) Resource sharing method, resource sharing request method, electronic device and mobile terminal
CN113453285A (en) Resource adjusting method, device and storage medium

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