CN109474582A - A kind of processing method and processing device emulating embedded system data communication protocol - Google Patents
A kind of processing method and processing device emulating embedded system data communication protocol Download PDFInfo
- Publication number
- CN109474582A CN109474582A CN201811249953.6A CN201811249953A CN109474582A CN 109474582 A CN109474582 A CN 109474582A CN 201811249953 A CN201811249953 A CN 201811249953A CN 109474582 A CN109474582 A CN 109474582A
- Authority
- CN
- China
- Prior art keywords
- data
- layer
- back end
- transmission protocol
- item
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/06—Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Communication Control (AREA)
- Computer And Data Communications (AREA)
Abstract
The embodiment of the invention discloses a kind of processing method and processing devices for emulating embedded system data communication protocol, wherein, the described method includes: being configured according to the agreement in the emulation embedded system to transmission protocol layer, wherein the transmission protocol layer includes multiple back end;Referring to the back end each in the transmission protocol layer, data dictionary layer is configured;According to the transmission protocol layer and data dictionary layer postponed, data communication protocol is established;Communication protocol carries out data transmission based on the data.The processing method of emulation embedded system data communication protocol disclosed by the embodiments of the present invention, mapping and reversible transformation are carried out using data name and data transformed representation between transmission protocol layer and data dictionary layer, so that data protocol treatment process clear layer, the physical data strong operability and processing result reusability of Simulation-Oriented are strong, and data interaction is convenient and reliable and not easy to make mistakes.
Description
Technical field
The present invention relates to field of communication technology more particularly to a kind of processing sides for emulating embedded system data communication protocol
Method and device.
Background technique
In existing embedded system simulation process, the processing of data communication protocol is often extremely complex, general to use
Towards the mode that communication protocol data code stream is directly handled, the working principle of this method is to pass through extensible markup language document
The code stream composition for describing communication protocol, uses buffer area or array directly to process data code flow in group code and decoding
And processing.
Specifically, data in buffer area are directly put into data protocol code stream corresponding position, unpacking processing when the processing of group packet
When code stream corresponding position data are taken out, a series of and processing such as carry out data conversion, calculating, storage, distribution are entire processed
Journey is extremely error-prone, and processing result reusability is poor.
Summary of the invention
Technical problem solved by the present invention is providing a kind of processing method for emulating embedded system data communication protocol
And device, to solve the problems, such as that data handling procedure existing in the prior art is error-prone and processing result reusability is poor.
In order to solve the above-mentioned technical problem, the present invention is implemented as follows:
In a first aspect, the embodiment of the invention provides a kind of processing method for emulating embedded system data communication protocol,
Wherein, which comprises transmission protocol layer is configured according to the agreement in the emulation embedded system, wherein institute
Stating transmission protocol layer includes multiple back end;Referring to the back end each in the transmission protocol layer, to data dictionary layer
It is configured;According to the transmission protocol layer and data dictionary layer postponed, data communication protocol is established;It communicates based on the data
Agreement carries out data transmission.
Optionally, the step of agreement according in the emulation embedded system configures transmission protocol layer,
Include: for each data protocol in the transmission protocol layer, decomposes the title that the data protocol is set, protocol is situated between
Matter type and the big small end sequence of agreement code stream;It wherein, include multiple data protocols in the transmission protocol layer;Determine the data
The name of the data element is referred to as back end title for each data element by each data element for including in agreement,
And the node type of the back end is set according to the data element type;Offset, the length of each back end are set
Degree, transformed representation and inverse conversion expression formula.
Optionally, described referring to the back end each in the transmission protocol layer, data dictionary layer is configured
Step, comprising: the name of the title of each data item and each back end in the transmission protocol layer in the data dictionary layer is set
Correspondence is claimed to be consistent;It wherein, include multiple data item in the data dictionary layer, and the number of the data item and the biography
The number for the back end for including in defeated protocol layer is identical;For consistent a pair of of the data item of title and back end, according to institute
The node type for stating back end determines the data Value Types of the data item;For each data in the data dictionary layer
, determine the corresponding description of the data item, physical unit, data value, upper limit threshold and lower threshold.
Optionally, the step of basis matches the transmission protocol layer and data dictionary layer postponed, establishes data communication protocol,
It include: to be turned data item in the back end and the data dictionary layer in the transmission protocol layer according to preset rules
Change, forms the data communication protocol;Wherein, each the data code flow region with full sense is in the transmission protocol layer
One back end, the data item are the basic unit of individual data content in the data dictionary layer.
Optionally, the back end by the transmission protocol layer is with data item in the data dictionary layer according to pre-
If rule is converted, the step of forming the data communication protocol, comprising: when in the transmission protocol layer back end and
When data item title in the data dictionary layer is consistent, the back end is converted into the data by transformed representation
The value of item;It, will be described when the back end in the transmission protocol layer is consistent with the data item title in the data dictionary layer
Data item is converted to the value of the back end by inverse conversion expression formula.
Second aspect, the embodiment of the invention provides it is a kind of emulate embedded system data communication protocol processing unit,
Wherein, described device includes: the first configuration module, for according to it is described emulation embedded system in agreement to transmission protocol layer
It is configured, wherein the transmission protocol layer includes multiple back end;Second configuration module, for being assisted referring to the transmission
Each back end in layer is discussed, data dictionary layer is configured;Module is established, for according to the transmission protocol layer postponed
With data dictionary layer, data communication protocol is established;Transmission module carries out data transmission for communication protocol based on the data.
Optionally, first configuration module includes: first unit, for for every number in the transmission protocol layer
According to agreement, the title that the data protocol is set, protocol media type and the big small end sequence of agreement code stream are decomposed;Wherein,
It include multiple data protocols in the transmission protocol layer;Second unit, for determining each data for including in the data protocol
The name of the data element is referred to as back end title for each data element by element, and according to the data element
The node type of the back end is arranged in type;Third unit, for the offset of each back end to be arranged, length, turns
Change expression formula and inverse conversion expression formula.
Optionally, second configuration module includes: Unit the 4th, for each data item in the data dictionary layer to be arranged
Title with the title of each back end is corresponding in the transmission protocol layer is consistent;Wherein, it is wrapped in the data dictionary layer
Containing multiple data item, and the number of back end for including in the number of the data item and the transmission protocol layer is identical;The
Unit five, for being determined according to the node type of the back end for consistent a pair of of the data item of title and back end
The data Value Types of the data item;Unit the 6th, for determining the number for each data item in the data dictionary layer
According to the corresponding description of item, physical unit, data value, upper limit threshold and lower threshold.
Optionally, the module of establishing is specifically used for: by the transmission protocol layer back end and the data word
Data item is converted according to preset rules in allusion quotation layer, forms the data communication protocol;Wherein, every in the transmission protocol layer
A data code flow region with full sense is a back end, and the data item is individually to count in the data dictionary layer
According to the basic unit of content.
Optionally, the module of establishing includes: the first converting unit, for when the back end in the transmission protocol layer
When consistent with the data item title in the data dictionary layer, the back end is converted into the number by transformed representation
According to the value of item;Second converting unit, for when the number in the back end and the data dictionary layer in the transmission protocol layer
It is consistent according to item title, the data item is converted to the value of the back end by inverse conversion expression formula.
The present invention has the following beneficial effects: compared to the prior art
The processing method of emulation embedded system data communication protocol provided in an embodiment of the present invention, by data communication protocol
It is configured to transmission protocol layer and data dictionary layer, transmission protocol layer is responsible for agreement code stream part in processing emulation embedded system,
Data dictionary layer is responsible for Simulation-Oriented application, carries out mapping and reversible using data name and data transformed representation between two levels
Conversion, so that data protocol treatment process clear layer, the physical data strong operability and processing result of Simulation-Oriented are reused
Property is strong, and data interaction is convenient and reliable and not easy to make mistakes.
Detailed description of the invention
Fig. 1 is a kind of stream of the processing method of according to embodiments of the present invention one emulation embedded system data communication protocol
Cheng Tu;
Fig. 2 is a kind of stream of the processing method of according to embodiments of the present invention two emulation embedded system data communication protocol
Cheng Tu;
Fig. 3 is transmission protocol layer and data dictionary layer relation schematic diagram;
Fig. 4 is a kind of structural frames of the processing unit of emulation embedded system data communication protocol of the embodiment of the present invention three
Figure.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair
Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts
Example, shall fall within the protection scope of the present invention.
Referring to Fig.1, the processing method of emulation embedded system data communication protocol provided in an embodiment of the present invention is shown
Flow chart.
The processing method of the information emulator embedded system data communication protocol of the embodiment of the present invention the following steps are included:
Step 101: transmission protocol layer being configured according to the agreement in emulation embedded system.
Wherein, transmission protocol layer is the general designation for emulating the Data Stream Processing of all data protocols in embedded system, data
Each the data code flow region with full sense is referred to as back end in agreement, and each data protocol is by several data sections
Point composition, therefore transmission protocol layer includes multiple back end.
Back end is divided into 2 seed types and is respectively as follows: byte Type, position type;Back end has 5 attribute to be respectively as follows: name
Title, offset, length, transformed representation and inverse conversion expression formula.
Data protocol has 3 attribute to be respectively as follows: title, communication media type and the big small end sequence of code stream.
Step 102: referring to the back end each in the transmission protocol layer, data dictionary layer being configured.
Wherein, data dictionary layer is the general designation for emulating the processing of all data dictionaries in embedded system.Data dictionary is
The set of total data item in project, data item refer to that the basic unit of individual data content, data item have 7 attribute difference
Are as follows: title, data Value Types, description, physical unit, data value, upper limit threshold and lower threshold.
Step 103: according to the transmission protocol layer and data dictionary layer postponed, establishing data communication protocol.
According to the transmission protocol layer and data dictionary layer postponed, data communication protocol is established, core is to realize transmission association
The mutual conversion of back end and data item in data dictionary layer in layer is discussed, mutually conversion between the two is specific as follows:
When the back end in transmission protocol layer is consistent with the data item title in the data dictionary layer, by the number
The value of the data item is converted to by transformed representation according to node;When the back end and data dictionary layer in transmission protocol layer
In data item title it is consistent, data item is converted to the value of the back end by inverse conversion expression formula.
Transformed representation and inverse conversion expression formula can indicate to be counted when calculating with reference data node or data item title
It substitutes into and calculates according to value;For convenience of editor, abbreviation of the " # " symbol as this node or data item title can be used.Transformed representation
Arithmetic is supported with inverse conversion expression formula, supports bit arithmetic, and type trans form function and other spread functions is supported to call.
Step 104: communication protocol carries out data transmission based on the data.
After establishing data communication protocol, data stream is transmitted according to the communications protocol, is carrying out data
When transmission, transmission protocol layer is mapped and be can be reversed using data name and data transformed representation with data dictionary interlayer
It changes, so that data protocol treatment process clear layer.Emulation embedded system data communication protocol provided in an embodiment of the present invention
Processing method, configure transmission protocol layer and data dictionary layer for data communication protocol, transmission protocol layer is responsible for processing emulation
Agreement code stream part in embedded system, data dictionary layer are responsible for Simulation-Oriented application, use data name sum number between two levels
Mapping and reversible transformation are carried out according to transformed representation, so that data protocol treatment process clear layer, the physics number of Simulation-Oriented
According to strong operability and processing result reusability it is strong, data interaction is convenient and reliable and not easy to make mistakes.
Embodiment two
Referring to Fig. 2, the processing method of emulation embedded system data communication protocol provided in an embodiment of the present invention is shown
Flow chart.
The embodiment of the present invention emulation embedded system data communication protocol processing method the following steps are included:
Step 201: for each data protocol in the transmission protocol layer, decomposing the name that the data protocol is set
Title, protocol media type and the big small end sequence of agreement code stream.
Wherein, include multiple data protocols in transmission protocol layer, each there is the numeric data code of full sense in data protocol
Stream region is referred to as back end, and each data protocol is made of several back end.Step 201 to step 203 is to biography
The concrete configuration process of defeated protocol layer.When being configured to transmission protocol layer, to each data protocol in transmission protocol layer
The configuration flow being performed both by step 201 to step 203.Setting data are decomposed to data protocol natural language description in this step
Three attributes of the title of agreement, protocol media type and the big small end sequence of agreement code stream.
Step 202: each data element for including in the data protocol is determined, for each data element by the data
The name of element is referred to as back end title, and the node type of the back end is arranged according to the data element type.
Include multiple data elements in data protocol, is directed to each data protocol in this step and analyzes the data protocol one by one
In data element.
Step 203: offset, length, transformed representation and the inverse conversion expression formula of each back end are set.
The concrete operations that the offset of each back end, length, transformed representation and inverse conversion expression formula is arranged are as follows:
The node type of back end is set according to data element type: if data element is defined comprising position, then number is set
Node type according to node is position type, other to be set as byte Type;
The offset of back end is set, offset with the 0th byte of current data frame the 0th start to calculate: byte Type
Offset is arranged in back end as unit of byte;Offset is arranged in the back end of position type as unit of position.
It is defined according to the type of data element or position, the length of back end is arranged: position type is determined according to position in agreement
Length is arranged in justice as unit of position;Length is arranged according to element type in byte Type as unit of byte.Wherein, byte Type
It is as shown in Table 1 with the corresponding relationship of back end length thereof:
Type | Corresponding byte Type back end length |
char/BYTE | 1 |
WORD/INT16/UINT16 | 2 |
DWORD/INT32/UINT32 | 4 |
INT64/UINT64 | 8 |
FLOAT | 4 |
DOUBLE | 8 |
Transformed representation is set according to the meaning of data element, target is to be converted to and have by agreement bit stream data
The physical meaning data of direct use value;Transformed representation is generally bit stream data and its equivalent physical or coefficient carries out four fundamental rules
Operation, calculated result are physical meaning data value.According to the transformed representation being arranged, inverse conversion expression formula is set, to turn
Change the inverse solution of expression formula.
Such as certain data protocol natural language description is in emulation embedded system;
Serial data inputs agreement as shown in following table two:
Data name | Byte offset | Type | Meaning |
Frame head 0 | 0 | BYTE | It is fixed as 0xEB |
Frame head 1 | 1 | BYTE | It is fixed as 0x90 |
DSS | 2 | WORD | It is detailed in B (DSS acquires data format) description |
Postamble | 4 | BYTE | It is fixed as 0x0 |
Note: code stream sequence is big end mode.
DSS (Digital Sun Sensor, digital sun sensor) acquires data format as shown in following table three:
Then in transmission protocol layer serial port protocol attribute as shown in following table four:
Property Name | Attribute value |
Title | Serial data inputs agreement |
Communication media type | Serial ports |
The big small end sequence of code stream | Big end |
Then serial port protocol node is described as follows shown in table five in transmission protocol layer:
Step 204: referring to each back end in transmission protocol layer, data dictionary layer being configured.
It is as follows to the concrete configuration of data dictionary layer:
It is corresponding with the title of each back end in the transmission protocol layer that the title of each data item in data dictionary layer is set
It is consistent;It wherein, include multiple data item, and the number for including in data dictionary layer in the number of data item and transmission protocol layer
It is identical according to the number of node;For consistent a pair of of the data item of title and back end, according to the node class of the back end
Type determines the data Value Types of the data item;
Specifically the type of data item determines that method is as follows according to the type of back end:
(a) back end is fixed value, and data item type corresponds to integer;
(b) back end is position type, and data item type corresponds to integer;
(c) back end is physical meaning value (such as voltage, electric current, angle, length, height) or other is explicitly described as
Floating point type, data item type corresponds to floating type;
Description, physical unit are determined by the concrete meaning of the data item in data item, are only used for auxiliary viewing and are understood, no
Data handling procedure is had an impact, can be set to nothing.
For each data item in data dictionary layer, the corresponding description of data item, physical unit, data value, the upper limit are determined
Threshold value and lower threshold.
Data value, upper limit threshold, lower threshold are according to true to the processing requirement of the data item in actual use in data item
It is fixed, can specifically it follow following methods:
Data value, be set in communication do not set up also before, other systems access the return value when data item;
Upper limit threshold: if the data item has physical meaning, then it is set as its theoretical upper limit value;Such as data item has solid
Fixed codomain range is then set as its codomain upper limit value;Other situations are set as nothing.
Lower threshold is then set as its theory lower bound value if the data item has physical meaning, as the data item has admittedly
Fixed codomain range is then set as its codomain lower limit value;Other situations are set as nothing.
In example in dictionary each data item description as shown in following table six:
Title | Data Value Types | Description | Physical unit | Data value | Upper limit threshold | Lower threshold |
Frame head 0 | Integer | Nothing | Nothing | 0 | 0xEB | 0xEB |
Frame head 1 | Integer | Nothing | Nothing | 0 | 0x90 | 0x90 |
DSS_ sign bit | Integer | Nothing | Nothing | 0 | 1 | 0 |
DSS_ data value | Floating type | Nothing | Degree | 90.0 | 154.0 | 36.0 |
DSS_ monitors code | Integer | Nothing | Nothing | 0 | 0 | 0 |
DSS_ data D0 | Integer | Nothing | Nothing | 0 | Nothing | Nothing |
Postamble | Integer | Nothing | Nothing | 0 | 0 | 0 |
Step 205: the back end in transmission protocol layer is carried out with data item in data dictionary layer according to preset rules
Conversion forms data communication protocol.
Wherein, each the data code flow region with full sense is a back end, data item in transmission protocol layer
For the basic unit of individual data content in data dictionary layer.
When the back end in transmission protocol layer is consistent with the data item title in data dictionary layer, back end is led to
Cross the value that transformed representation is converted to data item;
When the back end in transmission protocol layer is consistent with the data item title in data dictionary layer, data item is passed through inverse
Transformed representation is converted to the value of back end.
Referring to Fig. 3 transmission protocol layer and data dictionary layer relation schematic diagram, to transmission protocol layer and data dictionary layer
Between it is mutual conversion be illustrated.
Realize the mutual conversion of back end and data item in data dictionary layer in transmission protocol layer, the specific method is as follows:
The definition of back end in transmission protocol layer is compareed, the bit stream data in transport protocol, concrete operations are successively handled
Including following sub-step:
Sub-step one takes out the numeric data code of the offset of corresponding data node and length in agreement code stream, and according to agreement
Big small end attribute is ranked up adjustment: in the case of big end, numeric data code is taken out by low offset data code in a data high position, high offset numbers
Mode according to code in data low level adjusts;In the case of small end, numeric data code is taken out by low offset data code in data low level, high offset
Numeric data code is adjusted in the mode of a data high position;
Sub-step two, treated the node data value of sub-step one is substituted into transformed representation (# in replacement expression formula or
Back end title) and accordingly calculated, corresponding function call is carried out if including function in expression formula;
Sub-step three, the data that the calculated result that sub-step two obtains is put into data item corresponding with back end title
In value.
When data item is converted to back end in data protocol layer in data dictionary layer, number in data dictionary layer is successively handled
According to item, concrete operations include following sub-step:
S1, the corresponding data item of transmission protocol layer back end is sequentially found, its data value is substituted into inverse conversion expression formula
(# or data item title in replacement expression formula) is simultaneously accordingly calculated (arithmetic, bit arithmetic), as included letter in expression formula
It is several, carry out corresponding function call;
The processing result of S1 is put into the offset of corresponding data node by S2, the buffer area for establishing data protocol data storage
Numeric data code deviation post;
S3, the sequence that high-low-position is carried out according to the big small end attribute of data protocol adjust: in the case of big end, back end pair
Answer that a high position for numeric data code is put into buffer area low level space, numeric data code low level is put into buffer area high address;In the case of small end, data
The low level of node corresponding data code is put into buffer area low level space, a numeric data code high position is put into buffer area high address.
It is as follows to be converted to data item for back end in upper example:
Such as bit stream data is (hexadecimal): EB 90 64 65 00, then data value such as following table in translated data item
Shown in seven:
It is as follows to be converted to back end code stream for data item in upper example:
Such as in data item data value as shown in following table eight:
Data item title | Data value |
Frame head 0 | 0xEB |
Frame head 1 | 0x90 |
DSS_ sign bit | 1 |
DSS_ data value | 72.453125 |
DSS_ monitors code | 0 |
DSS_ data D0 | 0 |
Postamble | 0x00 |
Bit stream data is (hexadecimal): 90 A3 18 00 of EB after then converting.
Step 206: being carried out data transmission based on data communication protocol.
The processing method of emulation embedded system data communication protocol provided in an embodiment of the present invention, by data communication protocol
It is configured to transmission protocol layer and data dictionary layer, transmission protocol layer is responsible for agreement code stream part in processing emulation embedded system,
Data dictionary layer is responsible for Simulation-Oriented application, carries out mapping and reversible using data name and data transformed representation between two levels
Conversion, so that data protocol treatment process clear layer, the physical data strong operability and processing result of Simulation-Oriented are reused
Property is strong, and data interaction is convenient and reliable and not easy to make mistakes.
Embodiment three
Referring to Fig. 4, the processing unit of emulation embedded system data communication protocol provided in an embodiment of the present invention is shown
Structural block diagram.It is embedded that the processing unit of emulation embedded system data communication protocol is able to achieve the emulation in previous embodiment
The details of the processing method of system data communication agreement, and reach identical effect.
The processing unit of the emulation embedded system data communication protocol of the embodiment of the present invention includes: the first configuration module
401, for being configured according to the agreement in the emulation embedded system to transmission protocol layer, wherein the transport protocol
Layer includes multiple back end;Second configuration module 402 is used for referring to the back end each in the transmission protocol layer, right
Data dictionary layer is configured;Module 403 is established, for establishing number according to the transmission protocol layer and data dictionary layer postponed
According to communication protocol;Transmission module 404 carries out data transmission for communication protocol based on the data.
Preferably, first configuration module 401 may include: first unit 4011, for being directed to the transport protocol
Each data protocol in layer decomposes title, protocol media type and the agreement code stream size that the data protocol is arranged
End sequence;It wherein, include multiple data protocols in the transmission protocol layer;Second unit 4012, for determining the data association
The name of the data element is referred to as back end title for each data element by each data element for including in view, and
The node type of the back end is set according to the data element type;Third unit 4013, for each number to be arranged
According to the offset of node, length, transformed representation and inverse conversion expression formula.
Preferably, second configuration module 402 may include: the 4th unit 4021, for the data dictionary to be arranged
In layer the title of each data item with the title of each back end is corresponding in the transmission protocol layer is consistent;Wherein, the number
According to including multiple data item in dictionary layer, and the back end for including in the number of the data item and the transmission protocol layer
Number is identical;5th unit 4022, for being directed to consistent a pair of of the data item of title and back end, according to the back end
Node type determine the data Value Types of the data item;6th unit 4023, for in the data dictionary layer
Each data item determines the corresponding description of the data item, physical unit, data value, upper limit threshold and lower threshold.
Preferably, the module 403 of establishing is specifically used for: by the transmission protocol layer back end and the data
Data item is converted according to preset rules in dictionary layer, forms the data communication protocol;Wherein, in the transmission protocol layer
Each data code flow region with full sense is a back end, and the data item is single in the data dictionary layer
The basic unit of data content.
Preferably, the module 403 of establishing may include: the first converting unit 4031, for working as the transmission protocol layer
In back end it is consistent with the data item title in the data dictionary layer when, the back end is passed through into transformed representation
Be converted to the value of the data item;Second converting unit 4032, for back end in the transmission protocol layer and described
Data item title in data dictionary layer is consistent, and the data item is converted to the back end by inverse conversion expression formula
Value.
The processing unit of emulation embedded system data communication protocol provided in an embodiment of the present invention can be realized Fig. 1 to figure
Each mistake achieved by the equipment of the processing method of emulation embedded system data communication protocol is executed in 3 embodiment of the method
Journey, to avoid repeating, which is not described herein again.
The processing unit of emulation embedded system data communication protocol provided in an embodiment of the present invention, by data communication protocol
It is configured to transmission protocol layer and data dictionary layer, transmission protocol layer is responsible for agreement code stream part in processing emulation embedded system,
Data dictionary layer is responsible for Simulation-Oriented application, carries out mapping and reversible using data name and data transformed representation between two levels
Conversion, so that data protocol treatment process clear layer, the physical data strong operability and processing result of Simulation-Oriented are reused
Property is strong, and data interaction is convenient and reliable and not easy to make mistakes.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row
His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and
And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do
There is also other identical elements in the process, method of element, article or device.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art
The part contributed out can be embodied in the form of software products, which is stored in a storage medium
In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal (can be mobile phone, computer, service
Device, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The embodiment of the present invention is described with above attached drawing, but the invention is not limited to above-mentioned specific
Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art
Under the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, it can also make very much
Form belongs within protection of the invention.
Claims (10)
1. a kind of processing method for emulating embedded system data communication protocol, which is characterized in that the described method includes:
Transmission protocol layer is configured according to the agreement in the emulation embedded system, wherein the transmission protocol layer packet
Containing multiple back end;
Referring to the back end each in the transmission protocol layer, data dictionary layer is configured;
According to the transmission protocol layer and data dictionary layer postponed, data communication protocol is established;
Communication protocol carries out data transmission based on the data.
2. the method according to claim 1, wherein the agreement pair according in the emulation embedded system
The step of transmission protocol layer is configured, comprising:
For each data protocol in the transmission protocol layer, the title that the data protocol is set is decomposed, protocol is situated between
Matter type and the big small end sequence of agreement code stream;It wherein, include multiple data protocols in the transmission protocol layer;
It determines each data element for including in the data protocol, is referred to as the name of the data element for each data element
For back end title, and the node type of the back end is set according to the data element type;
Offset, length, transformed representation and the inverse conversion expression formula of each back end are set.
3. according to the method described in claim 2, it is characterized in that, described referring to the data section each in the transmission protocol layer
Point, the step of configuration to data dictionary layer, comprising:
It is corresponding with the title of each back end in the transmission protocol layer that the title of each data item in the data dictionary layer is set
It is consistent;It wherein, include multiple data item in the data dictionary layer, and the number of the data item and the transport protocol
The number for the back end for including in layer is identical;
For consistent a pair of of the data item of title and back end, the data are determined according to the node type of the back end
The data Value Types of item;
For each data item in the data dictionary layer, determine the corresponding description of the data item, physical unit, data value,
Upper limit threshold and lower threshold.
4. according to the method described in claim 3, it is characterized in that, the basis matches the transmission protocol layer and data dictionary postponed
Layer, the step of establishing data communication protocol, comprising:
Back end in the transmission protocol layer is converted with data item in the data dictionary layer according to preset rules,
Form the data communication protocol;
Wherein, each the data code flow region with full sense is a back end, the number in the transmission protocol layer
It is the basic unit of individual data content in the data dictionary layer according to item.
5. according to the method described in claim 4, it is characterized in that, the back end and institute by the transmission protocol layer
State the step of data item is converted according to preset rules, forms the data communication protocol in data dictionary layer, comprising:
When the back end in the transmission protocol layer is consistent with the data item title in the data dictionary layer, by the number
The value of the data item is converted to by transformed representation according to node;
When the back end in the transmission protocol layer is consistent with the data item title in the data dictionary layer, by the data
Item is converted to the value of the back end by inverse conversion expression formula.
6. a kind of processing unit for emulating embedded system data communication protocol, which is characterized in that described device includes:
First configuration module, for being configured according to the agreement in the emulation embedded system to transmission protocol layer, wherein
The transmission protocol layer includes multiple back end;
Second configuration module, for being configured to data dictionary layer referring to the back end each in the transmission protocol layer;
Module is established, for establishing data communication protocol according to the transmission protocol layer and data dictionary layer postponed;
Transmission module carries out data transmission for communication protocol based on the data.
7. device according to claim 6, which is characterized in that first configuration module includes:
First unit, for decomposing the name that the data protocol is arranged for each data protocol in the transmission protocol layer
Title, protocol media type and the big small end sequence of agreement code stream;Wherein, it is assisted in the transmission protocol layer comprising multiple data
View;
Second unit, for determining each data element for including in the data protocol, for each data element by the number
It is referred to as back end title according to the name of element, and the node class of the back end is set according to the data element type
Type;
Third unit, for offset, length, transformed representation and the inverse conversion expression formula of each back end to be arranged.
8. device according to claim 7, which is characterized in that second configuration module includes:
Unit the 4th, for the title of each data item and each data section in the transmission protocol layer in the data dictionary layer to be arranged
The title correspondence of point is consistent;Wherein, in the data dictionary layer include multiple data item, and the number of the data item with
The number for the back end for including in the transmission protocol layer is identical;
Unit the 5th, for being directed to consistent a pair of of the data item of title and back end, according to the node class of the back end
Type determines the data Value Types of the data item;
Unit the 6th, for determining the corresponding description of the data item, physics for each data item in the data dictionary layer
Unit, data value, upper limit threshold and lower threshold.
9. device according to claim 8, which is characterized in that the module of establishing is specifically used for: by the transport protocol
Back end in layer is converted with data item in the data dictionary layer according to preset rules, and the data communication association is formed
View;Wherein, each the data code flow region with full sense is a back end, the data in the transmission protocol layer
Item is the basic unit of individual data content in the data dictionary layer.
10. device according to claim 9, which is characterized in that the module of establishing includes:
First converting unit, for when the data item name in the back end and the data dictionary layer in the transmission protocol layer
When claiming consistent, the back end is converted to the value of the data item by transformed representation;
Second converting unit, for when the data item name in the back end and the data dictionary layer in the transmission protocol layer
Claim unanimously, the data item to be converted to the value of the back end by inverse conversion expression formula.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811249953.6A CN109474582B (en) | 2018-10-25 | 2018-10-25 | Processing method and device for simulating data communication protocol of embedded system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811249953.6A CN109474582B (en) | 2018-10-25 | 2018-10-25 | Processing method and device for simulating data communication protocol of embedded system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109474582A true CN109474582A (en) | 2019-03-15 |
CN109474582B CN109474582B (en) | 2021-10-01 |
Family
ID=65664279
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811249953.6A Active CN109474582B (en) | 2018-10-25 | 2018-10-25 | Processing method and device for simulating data communication protocol of embedded system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109474582B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111221532A (en) * | 2019-12-23 | 2020-06-02 | 北京轩宇信息技术有限公司 | Method and device for generating dynamic link library |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5923557A (en) * | 1997-08-01 | 1999-07-13 | Hewlett-Packard Company | Method and apparatus for providing a standard interface to process control devices that are adapted to differing field-bus protocols |
US20020165975A1 (en) * | 2001-05-07 | 2002-11-07 | Michael Abbott | Dynamic mapping of communication protocols |
US7978699B1 (en) * | 2006-11-21 | 2011-07-12 | Picomobile Networks, Inc. | Protocol compression with synchronized sequence numbers |
CN103457845A (en) * | 2013-09-09 | 2013-12-18 | 江南大学 | Conversion technology capable of being configured with multiple protocols |
CN104281632A (en) * | 2013-07-11 | 2015-01-14 | 深圳市金正方科技股份有限公司 | Encoding and decoding method and system based on object protocol mapping (OPM) |
CN105279090A (en) * | 2015-11-17 | 2016-01-27 | 中国建设银行股份有限公司 | Test script generating method and test script generating device applied in financial field |
CN106713357A (en) * | 2017-01-24 | 2017-05-24 | 南京仁谷系统集成有限公司 | Universal network protocol analysis method |
US20180020098A1 (en) * | 2016-07-15 | 2018-01-18 | E-MetroTel Global Inc. | Web Real-Time Client Communication Over a Stimulus Based Network |
CN108243168A (en) * | 2016-12-27 | 2018-07-03 | 比亚迪股份有限公司 | Packet parsing, group packet method and apparatus and message handling system |
-
2018
- 2018-10-25 CN CN201811249953.6A patent/CN109474582B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5923557A (en) * | 1997-08-01 | 1999-07-13 | Hewlett-Packard Company | Method and apparatus for providing a standard interface to process control devices that are adapted to differing field-bus protocols |
US20020165975A1 (en) * | 2001-05-07 | 2002-11-07 | Michael Abbott | Dynamic mapping of communication protocols |
US7978699B1 (en) * | 2006-11-21 | 2011-07-12 | Picomobile Networks, Inc. | Protocol compression with synchronized sequence numbers |
CN104281632A (en) * | 2013-07-11 | 2015-01-14 | 深圳市金正方科技股份有限公司 | Encoding and decoding method and system based on object protocol mapping (OPM) |
CN103457845A (en) * | 2013-09-09 | 2013-12-18 | 江南大学 | Conversion technology capable of being configured with multiple protocols |
CN105279090A (en) * | 2015-11-17 | 2016-01-27 | 中国建设银行股份有限公司 | Test script generating method and test script generating device applied in financial field |
US20180020098A1 (en) * | 2016-07-15 | 2018-01-18 | E-MetroTel Global Inc. | Web Real-Time Client Communication Over a Stimulus Based Network |
CN108243168A (en) * | 2016-12-27 | 2018-07-03 | 比亚迪股份有限公司 | Packet parsing, group packet method and apparatus and message handling system |
CN106713357A (en) * | 2017-01-24 | 2017-05-24 | 南京仁谷系统集成有限公司 | Universal network protocol analysis method |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111221532A (en) * | 2019-12-23 | 2020-06-02 | 北京轩宇信息技术有限公司 | Method and device for generating dynamic link library |
Also Published As
Publication number | Publication date |
---|---|
CN109474582B (en) | 2021-10-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104753540B (en) | Data compression method, data decompression method and apparatus | |
GB2424350A (en) | Method and system for virtual powerline local area networks | |
EP2595349A3 (en) | Routing scheme based on virtual space representation | |
WO2005031510A3 (en) | Table-oriented application development environment | |
WO2007143679A3 (en) | Efficient address methods, computer readable medium and apparatus for wireless communication | |
AU2003258579A1 (en) | Method and system for configuration control in telecommunications networks | |
WO2005004500A3 (en) | Method and apparatus for packet aggregation in a wireless communication network | |
GB0023169D0 (en) | Message parsing in message processing systems | |
CN105302591B (en) | The communication means of Double MCUs Architecture system update program | |
CN109474582A (en) | A kind of processing method and processing device emulating embedded system data communication protocol | |
Mohammady et al. | Performance investigation of peak shrinking and interpolating the PAPR reduction technique for LTE-advance and 5G signals | |
CN106941501A (en) | A kind of data communications method and device | |
Pinelis | Evolutionary models of phylogenetic trees | |
Hassani et al. | A flexible method of LUT indexing in digital predistortion linearization of RF power amplifiers | |
CN103631983B (en) | A kind of tactical data message analogy method and system | |
CN110324356A (en) | A kind of blended data packet processing method of multiclass bus data | |
CN107135173A (en) | Multi-site real time data exchange method based on triones navigation system | |
Manley et al. | SPEAD: streaming protocol for exchanging astronomical data | |
CN107809335A (en) | The collocation method and device of a kind of network system | |
CN105591965B (en) | flow equalization output method and device | |
CN108809795A (en) | Transparent shunt method and device in a kind of LAN environment | |
CN106899572A (en) | Sterility testing data staging encryption method based on condition random field algorithm | |
CN109379342B (en) | UDP network protocol-based upper computer and DSP data transmission method | |
CN104102664B (en) | Data processing method and system for physical machine resource information | |
CN103475686A (en) | Communication data distribution system and communication data distribution method for electric power simulation |
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 |