CN109522262B - Receiving method, system, electronic terminal and storage medium suitable for indefinite length data frame - Google Patents

Receiving method, system, electronic terminal and storage medium suitable for indefinite length data frame Download PDF

Info

Publication number
CN109522262B
CN109522262B CN201811179251.5A CN201811179251A CN109522262B CN 109522262 B CN109522262 B CN 109522262B CN 201811179251 A CN201811179251 A CN 201811179251A CN 109522262 B CN109522262 B CN 109522262B
Authority
CN
China
Prior art keywords
frame
length
data
indefinite length
value
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
CN201811179251.5A
Other languages
Chinese (zh)
Other versions
CN109522262A (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.)
Shanghai Yaming Lighting Co Ltd
Original Assignee
Shanghai Yaming Lighting 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 Shanghai Yaming Lighting Co Ltd filed Critical Shanghai Yaming Lighting Co Ltd
Priority to CN201811179251.5A priority Critical patent/CN109522262B/en
Publication of CN109522262A publication Critical patent/CN109522262A/en
Application granted granted Critical
Publication of CN109522262B publication Critical patent/CN109522262B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/10Program control for peripheral devices
    • G06F13/102Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver

Abstract

The invention provides a receiving method, a system, an electronic terminal and a storage medium suitable for an indefinite length data frame, comprising: numbering each byte in a frame structure of a received data frame with indefinite length according to the frame structure of the data frame; and determining that the current data frame with the indefinite length is received through the number of the most sequenced byte in the frame structure. The invention can solve the technical problems of high cost of hardware equipment, occupation of processor resources by software and the like in the prior art. Particularly for processors without peripheral functions, the technical scheme provided by the invention can help the processors to receive frame data with indefinite length without wasting MCU resources.

Description

Receiving method, system, electronic terminal and storage medium suitable for indefinite-length data frame
Technical Field
The invention relates to the technical field of serial port communication, in particular to a receiving method, a receiving system, an electronic terminal and a storage medium suitable for an indefinite-length data frame.
Background
At present, a higher-level processor generally receives a frame of data of an indefinite length by using hardware, and determines whether the reception of the frame of data is completed by detecting the idleness of a data bus.
For processors without peripheral functions, software is required to implement the same functions, but the software usually occupies more processor resources. For example, the setting of the timer is required to detect whether the bus is idle, which obviously wastes processor resources.
Disclosure of Invention
In view of the above drawbacks of the prior art, an object of the present invention is to provide a receiving method, a system, an electronic terminal and a storage medium for data frames with indefinite length, which are used to solve the technical problems of high cost of hardware devices, processor resources occupied by software, and the like in the prior art.
To achieve the above and other related objects, the present invention provides a receiving method for an indefinite length data frame, comprising: numbering each byte in a frame structure of a received data frame with indefinite length according to the frame structure of the data frame; and determining that the current data frame with the indefinite length is completely received through the number of the most sequenced bytes in the frame structure.
In an embodiment of the present invention, the frame structure of the data frame includes: frame header, data type, message length, message body, check bit and frame tail; the length of the frame head is 1byte, the length of the data type is 1byte, the length of the message length is 1byte, the length of the message body is n bytes, the length of the check bit is 1byte, and the length of the frame tail is 1byte; wherein n is more than or equal to 1.
In an embodiment of the present invention, the method includes: performing reception or rejection of a current indefinite length data frame by judging the value of the byte count N; the number of the frame header is 1, the number of the data type is 2, the number of the message length is 3, the numbers of the message body are 4 to (n + 3), the number of the check bit is (n + 4), and the number of the frame tail is (n + 5).
In an embodiment of the present invention, the method includes: judging the value of N; if the judgment result indicates that the N =0, judging whether the frame header of the received current data frame with the indefinite length conforms to the frame header specified by the protocol or not; if the frame header meeting the protocol specification is judged, executing the operation of N = N +1, storing the data of the frame header of the current indefinite length data frame into a preset area, and waiting for the next judgment of the N value; if the frame header which does not accord with the protocol regulation is judged, enabling N =0 and waiting for the next judgment of the N value; if the judgment result is N =2, let X = DAT +4, y = DAT +5, execute N = N +1 operation, store the data of the current indefinite length data frame data type to a preset area, and wait for the next N value judgment; wherein DAT represents the byte length of the current indefinite length data frame message body; if the judgment result is that N = X, executing check bit operation and judging whether the check bit of the current indefinite length data frame conforms to the check bit specified by the protocol or not; if the check bit meeting the protocol regulation is judged, executing N = N +1 operation, storing the data of the check bit of the current indefinite length data frame into a preset area, and waiting for the next judgment of the N value; if the check bit does not accord with the protocol regulation, enabling N =0 and waiting for the next judgment of the N value; if the judgment result shows that the N = Y, judging whether the frame tail of the received current indefinite length data frame conforms to the frame tail specified by the protocol or not; if the frame end meeting the protocol specification is judged, executing N =0 operation, waiting for the next judgment of the N value, and quitting the processing task of the current indefinite length data frame to indicate that the current indefinite length data frame is received and completed; if the frame end does not accord with the protocol regulation, enabling N =0 and waiting for the next N value judgment; if N is other value, executing N = N +1 operation, storing the data of the byte corresponding to the value to the preset area, and waiting for the next judgment of N value.
In an embodiment of the present invention, the waiting for the next judgment of the N value includes waiting for the next reception of the serial port interrupt cycle.
To achieve the above and other related objects, the present invention provides a receiving system for an indefinite length data frame, comprising: the numbering module is used for numbering the bytes in the frame structure according to the frame structure of the received data frame with the indefinite length; and the determining module is used for determining that the current data frame with the indefinite length is received through the serial number of the most rear byte sequenced in the frame structure.
In an embodiment of the present invention, the frame structure of the data frame includes: frame header, data type, message length, message body, check bit and frame tail; the length of the frame head is 1byte, the length of the data type is 1byte, the length of the message length is 1byte, the length of the message body is n bytes, the length of the check bit is 1byte, and the length of the frame tail is 1byte; wherein n is more than or equal to 1.
In an embodiment of the present invention, the method includes: performing receiving or rejecting a current indefinite length data frame by judging the value of the byte count N; the number of the frame header is 1, the number of the data type is 2, the number of the message length is 3, the numbers of the message body are 4 to (n + 3), the number of the check bit is (n + 4), and the number of the frame tail is (n + 5).
To achieve the above and other related objects, the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method.
To achieve the above and other related objects, the present invention provides an electronic terminal, comprising: a processor and a memory; the memory is configured to store a computer program and the processor is configured to execute the computer program stored by the memory to cause the terminal to perform the method.
As described above, the receiving method, system, electronic terminal and storage medium suitable for an indefinite length data frame provided by the present invention have the following beneficial effects: the invention can solve the technical problems of high cost of hardware equipment, occupation of processor resources by software and the like in the prior art. Particularly for processors without peripheral functions, the technical scheme provided by the invention can help the processors to receive frame data with indefinite length without wasting MCU resources.
Drawings
Fig. 1 is a flowchart illustrating a receiving method for an indefinite length data frame according to an embodiment of the present invention.
Fig. 2 is a schematic diagram illustrating a structure of a data frame according to an embodiment of the invention.
Fig. 3 is a flow chart of a frame structure receiving and storing method according to an embodiment of the invention.
Fig. 4 is a diagram illustrating a receiving system for an indefinite length data frame according to an embodiment of the present invention.
Fig. 5 is a schematic structural diagram of an electronic terminal according to an embodiment of the invention.
Detailed Description
The embodiments of the present invention are described below with reference to specific embodiments, and other advantages and effects of the present invention will be easily understood by those skilled in the art from the disclosure of the present specification. The invention is capable of other and different embodiments and of being practiced or of being carried out in various ways, and its several details are capable of modification in various respects, all without departing from the spirit and scope of the present invention. It should be noted that the features in the following embodiments and examples may be combined with each other without conflict.
It is noted that in the following description, reference is made to the accompanying drawings which illustrate several embodiments of the present application. It is to be understood that other embodiments may be utilized and that mechanical, structural, electrical, and operational changes may be made without departing from the spirit and scope of the present application. The following detailed description is not to be taken in a limiting sense, and the scope of embodiments of the present application is defined only by the claims of the issued patent. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. Spatially relative terms, such as "upper," "lower," "left," "right," "lower," "below," "lower," "over," "upper," and the like, may be used herein to facilitate describing one element or feature's relationship to another element or feature as illustrated in the figures.
Also, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context indicates otherwise. It will be further understood that the terms "comprises," "comprising," and/or "comprising," when used in this specification, specify the presence of stated features, operations, elements, components, items, species, and/or groups, but do not preclude the presence, or addition of one or more other features, operations, elements, components, items, species, and/or groups thereof. The terms "or" and/or "as used herein are to be construed as inclusive or meaning any one or any combination. Thus, "a, B or C" or "a, B and/or C" means "any of the following: a; b; c; a and B; a and C; b and C; A. b and C ". An exception to this definition will occur only when a combination of elements, functions or operations are inherently mutually exclusive in some way.
The invention provides a receiving method, a receiving system, an electronic terminal and a storage medium suitable for an indefinite length data frame, which can solve the technical problems that the hardware equipment cost is high, software occupies processor resources and the like in the prior art. Particularly for processors without peripheral functions, the technical scheme provided by the invention can help the processors to receive frame data with indefinite length without wasting MCU resources. Hereinafter, the working principle of the technical solution provided by the present invention will be described with reference to specific embodiments.
Fig. 1 shows a flow chart of a receiving method applicable to an indefinite length data frame according to an embodiment of the present invention. It is worth to say that the receiving method can be applied to an intelligent terminal or a controller; the intelligent terminal provided by the invention can adopt a fixed intelligent terminal such as a desktop computer, a local server or a cloud server, and can also adopt a mobile intelligent terminal such as a mobile phone, a pad computer, a notebook computer and an intelligent bracelet; the controller referred to in the present invention may be, for example, an MCU controller, an FPGA controller, a DSP controller, an SoC controller, or an ARM controller. The receiving method suitable for the data frame with the indefinite length specifically comprises the following steps:
s11: and numbering the bytes in the frame structure according to the frame structure of the received data frame with the indefinite length. To facilitate understanding by those skilled in the art, the present invention, in conjunction with fig. 2, describes a frame structure of a data frame, which specifically includes: frame header, data type, message length, message body, check bits, and frame trailer.
In this embodiment, the length of the frame header is 1Byte, the length of the data type is 1Byte, the length of the message length is 1Byte, the length of the message body is n Byte, the length of the check bit is 1Byte, and the length of the frame tail is 1Byte; wherein n is more than or equal to 1. The number of the frame header is 1, the number of the data type is 2, the number of the message length is 3, the numbers of the message bodies are 4 to (n + 3), the number of the check bit is (n + 4), and the number of the frame end is (n + 5).
S12: and determining that the current data frame with the indefinite length is received through the number of the most sequenced byte in the frame structure.
In one embodiment, the number of the last frame end in the sequence is used to determine that the current data frame of indefinite length is completely received. Taking the flow chart of the frame structure receiving and storing method shown in fig. 3 as an embodiment, the method for receiving an indefinite length data frame specifically includes the following steps:
step 1, initialize the received byte count, i.e. let N =0.
Step 2, the MCU is interrupted, and the data of the receiving buffer area is read, namely the current indefinite length data frame is received;
step 3, exiting the interrupt and entering the data processing program;
and 4, if N =0, judging whether the frame header of the current indefinite length data frame received in the step 2 meets the frame header specified by the protocol. And if the frame header meeting the protocol regulation is judged, executing the operation of N = N +1, storing the data of the frame header of the current indefinite-length data frame into a specified storage area, exiting the data processing program, and waiting for the next receiving interruption cycle. And if the frame header does not accord with the protocol regulation, judging that the frame header is a wrong frame header, and enabling N =0 and waiting for receiving interruption again.
Step 5, if N =2, let X = DAT +4, y = DAT +5, execute N = N +1 operation, store the data of the current indefinite length data frame data type to the designated storage area, exit the data processing program, and wait for the next reception interrupt cycle.
Step 6, if N = X, executing check bit operation and judging whether the check bit of the current indefinite length data frame conforms to the check bit specified by the protocol; and if the check bit according with the protocol regulation is judged, executing the operation of N = N +1, storing the data of the check bit of the current indefinite length data frame into a specified storage area, exiting the data processing program, and waiting for receiving the interrupt cycle next time. And if the check bit does not accord with the protocol regulation, enabling N =0 and waiting for receiving the interrupt again.
Step 7, if N = Y, judging whether the frame end of the received current indefinite length data frame conforms to the frame end specified by the protocol; and if the frame end meeting the protocol specification is judged, executing N =0 operation to indicate that the data of the current frame is completely received, exiting the data processing program, waiting for the interrupt cycle of the next receiving, and starting the receiving of the next frame data. If the end of frame specified by the protocol is not met, initializing N =0 and re-waiting for receiving an interrupt.
And 8, if the N is other value, namely not equal to the value specified in the step 4-7, executing the operation of N = N +1, storing the data of the byte corresponding to the value into a preset area, exiting the data processing program, and waiting for the next interrupt cycle.
Step 9, repeating the operations of steps 2 to 8, may receive continuous frame structure data.
It should be noted that the structure of the indefinite length data frame according to the present invention includes, but is not limited to, the structure in the above embodiments, and the frame structure processing method according to the present invention can provide guidance and reference for other similar frame structure processing.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the above method embodiments may be performed by hardware associated with a computer program. The aforementioned computer program may be stored in a computer readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Fig. 4 is a schematic diagram of a receiving system for data frames of indefinite length according to an embodiment of the present invention. The receiving system comprises a numbering module 41 and a determining module 42, wherein the numbering module 41 is used for numbering each byte in a frame structure of a received data frame with indefinite length according to the frame structure, and the determining module 42 is used for determining that the receiving of the data frame with indefinite length is completed through the numbering of the most sequenced byte in the frame structure.
In this embodiment, the frame structure of the data frame includes: frame header, data type, message length, message body, check bits, and frame trailer. The length of the frame header is 1byte, the length of the data type is 1byte, the length of the message length is 1byte, the length of the message body is n bytes, the length of the check bit is 1byte, and the length of the frame tail is 1byte; wherein n is more than or equal to 1. It should be noted that the embodiment of the receiving system for the data frame with indefinite length is similar to the above embodiment of the receiving method for the data frame with indefinite length, and therefore, the description is omitted.
It should be noted that the division of the modules of the above apparatus is only a logical division, and the actual implementation may be wholly or partially integrated into one physical entity, or may be physically separated. And these modules can be realized in the form of software called by processing element; or may be implemented entirely in hardware; and part of the modules can be realized in the form of calling software by the processing element, and part of the modules can be realized in the form of hardware. For example, the determining module may be a processing element separately set up, or may be implemented by being integrated in a chip of the apparatus, or may be stored in a memory of the apparatus in the form of program code, and the function of the determining module is called and executed by a processing element of the apparatus. Other modules are implemented similarly. In addition, all or part of the modules can be integrated together or can be independently realized. The processing element described herein may be an integrated circuit having signal processing capabilities. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in the form of software.
For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as: one or more Application Specific Integrated Circuits (ASICs), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), among others. For another example, when one of the above modules is implemented in the form of a Processing element scheduler code, the Processing element may be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. As another example, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
Fig. 5 is a schematic structural diagram of an electronic terminal according to an embodiment of the invention. The electronic terminal provided by the embodiment comprises: a processor 51, a memory 52, a transceiver 53, a communication interface 54, and a system bus 55; the memory 52 and the communication interface 54 are connected to the processor 51 and the transceiver 53 via the system bus 55 and perform communication with each other, the memory 52 is used for storing computer programs, the communication interface 54 and the transceiver 53 are used for communicating with other devices, and the processor 51 is used for running the computer programs, so that the electronic terminal performs the steps of the receiving method suitable for the indefinite-length data frame as described above.
The above-mentioned system bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The system bus may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown, but this is not intended to represent only one bus or type of bus. The communication interface is used for realizing communication between the database access device and other equipment (such as a client, a read-write library and a read-only library). The Memory may include a Random Access Memory (RAM), and may further include a non-volatile Memory (non-volatile Memory), such as at least one disk Memory.
The Processor may be a general-purpose Processor, and includes a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, or discrete hardware components.
In summary, the present invention is applicable to a receiving method, a receiving system, an electronic terminal and a storage medium for data frames with indefinite length, and can solve the technical problems in the prior art, such as high hardware device cost, processor resource occupation by software, and the like. Particularly, for processors without peripheral functions, the technical scheme provided by the invention can help the processors to receive frame data with indefinite length without wasting MCU resources. Therefore, the invention effectively overcomes various defects in the prior art and has high industrial utilization value.
The foregoing embodiments are merely illustrative of the principles and utilities of the present invention and are not intended to limit the invention. Those skilled in the art can modify or change the above-described embodiments without departing from the spirit and scope of the present invention. Accordingly, it is intended that all equivalent modifications or changes which can be made by those skilled in the art without departing from the spirit and technical spirit of the present invention be covered by the claims of the present invention.

Claims (5)

1. A receiving method for an indefinite length data frame, comprising:
numbering each byte in a frame structure of a received data frame with indefinite length according to the frame structure of the data frame;
determining to receive the current indefinite length data frame according to the serial number of the most rear byte ordered in the frame structure;
the frame structure of the data frame comprises: frame head, data type, message length, message body, check bit and frame tail; the length of the frame head is 1byte, the length of the data type is 1byte, the length of the message length is 1byte, the length of the message body is n bytes, the length of the check bit is 1byte, and the length of the frame tail is 1byte; wherein n is more than or equal to 1; performing receiving or rejecting a current indefinite length data frame by judging the value of the byte count N; wherein, the number of the frame header is No. 1, the number of the data type is No. 2, the number of the message length is No. 3, the number of the message body is No. 4 to No. (n + 3), the number of the check bit is No. (n + 4), and the number of the frame tail is No. (n + 5); wherein, the value of N comprises 0, 2, X, Y and other values; the values of X and Y are as follows: when N =2, X = DAT +4, y = DAT +5; DAT denotes the byte length of the current indefinite length data frame message body;
the method further comprises the following steps:
judging the value of N;
if the judgment result indicates that the N =0, judging whether the frame header of the received current data frame with the indefinite length conforms to the frame header specified by the protocol or not;
if the frame header meeting the protocol specification is judged, executing the operation of N = N +1, storing the data of the frame header of the current indefinite length data frame into a preset area, and waiting for the next judgment of the N value; if the frame header which does not accord with the protocol regulation is judged, enabling N =0 and waiting for the next judgment of the N value;
if the judgment result is N =2, let X = DAT +4, y = DAT +5, execute N = N +1 operation, store the data of the current indefinite length data frame data type to a preset area, and wait for the next judgment of N value; wherein DAT represents the byte length of the current indefinite length data frame message body;
if the judgment result is that N = X, executing check bit operation and judging whether the check bit of the current indefinite length data frame conforms to the check bit specified by the protocol or not; if the check bit meeting the protocol regulation is judged, executing N = N +1 operation, storing the data of the check bit of the current indefinite length data frame into a preset area, and waiting for the next judgment of the N value; if the check bit does not accord with the protocol regulation, enabling N =0 and waiting for the next judgment of the N value;
if the judgment result shows that the N = Y, judging whether the frame tail of the received current indefinite length data frame conforms to the frame tail specified by the protocol or not; if the frame end meeting the protocol specification is judged, executing N =0 operation, waiting for the next judgment of the N value, and quitting the processing task of the current indefinite length data frame to indicate that the current indefinite length data frame is received and completed; if the frame end does not accord with the protocol regulation, enabling N =0 and waiting for the next N value judgment;
if N is other value, executing N = N +1 operation, storing the data of the corresponding byte of the value to a preset area, and waiting for the next judgment of N value.
2. A receiving method suitable for data frames with indefinite length as claimed in claim 1, wherein the manner of waiting for the next judgment of the N value comprises waiting for the next serial port interrupt cycle.
3. A receiving system adapted for use with frames of indefinite length, comprising:
the numbering module is used for numbering the bytes in the frame structure according to the frame structure of the received data frame with the indefinite length;
the determining module is used for determining that the current indefinite length data frame is received and completed through the serial number of the most rear byte sequenced in the frame structure;
the frame structure of the data frame comprises: frame head, data type, message length, message body, check bit and frame tail; the length of the frame head is 1byte, the length of the data type is 1byte, the length of the message length is 1byte, the length of the message body is n bytes, the length of the check bit is 1byte, and the length of the frame tail is 1byte; wherein n is more than or equal to 1; performing receiving or rejecting a current indefinite length data frame by judging the value of the byte count N; wherein, the number of the frame header is No. 1, the number of the data type is No. 2, the number of the message length is No. 3, the numbers of the message bodies are No. 4 to No. (n + 3), the number of the check bit is No. (n + 4), and the number of the frame tail is No. (n + 5); wherein, the value of N comprises 0, 2, X, Y and other values; the values of X and Y are as follows: when N =2, X = DAT +4, y = DAT +5; DAT denotes the byte length of the current indefinite length data frame message body;
further comprising:
judging the value of N;
if the judgment result indicates that the N =0, judging whether the frame header of the received current data frame with the indefinite length conforms to the frame header specified by the protocol or not;
if the frame header meeting the protocol specification is judged, executing the operation of N = N +1, storing the data of the frame header of the current indefinite length data frame into a preset area, and waiting for the next judgment of the N value; if the frame header which does not accord with the protocol regulation is judged, enabling N =0 and waiting for the next judgment of the N value;
if the judgment result is N =2, let X = DAT +4, y = DAT +5, execute N = N +1 operation, store the data of the current indefinite length data frame data type to a preset area, and wait for the next N value judgment; wherein DAT represents the byte length of the current indefinite length data frame message body;
if the judgment result is that N = X, executing check bit operation and judging whether the check bit of the current indefinite length data frame conforms to the check bit specified by the protocol or not; if the check bit meeting the protocol regulation is judged, executing N = N +1 operation, storing the data of the check bit of the current indefinite length data frame into a preset area, and waiting for the next judgment of the N value; if the check bit does not accord with the protocol regulation, enabling N =0 and waiting for the next judgment of the N value;
if the judgment result shows that the N = Y, judging whether the frame tail of the received current indefinite length data frame conforms to the frame tail specified by the protocol or not; if the frame end meeting the protocol specification is judged, executing N =0 operation, waiting for the next judgment of the N value, and quitting the processing task of the current indefinite length data frame to indicate that the current indefinite length data frame is received and completed; if the frame end does not accord with the protocol regulation, enabling N =0 and waiting for the next N value judgment;
if N is other value, executing N = N +1 operation, storing the data of the corresponding byte of the value to a preset area, and waiting for the next judgment of N value.
4. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the receiving method applicable to a data frame of indefinite length according to claim 1 or 2.
5. An electronic terminal, comprising: a processor, a memory, and a transceiver;
the memory is used for storing a computer program, the transceiver is used for being connected with an external device in a communication mode, and the processor is used for executing the computer program stored by the memory so as to enable the electronic terminal to execute the receiving method suitable for the data frames with the indefinite length as claimed in claim 1 or 2.
CN201811179251.5A 2018-10-10 2018-10-10 Receiving method, system, electronic terminal and storage medium suitable for indefinite length data frame Active CN109522262B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811179251.5A CN109522262B (en) 2018-10-10 2018-10-10 Receiving method, system, electronic terminal and storage medium suitable for indefinite length data frame

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811179251.5A CN109522262B (en) 2018-10-10 2018-10-10 Receiving method, system, electronic terminal and storage medium suitable for indefinite length data frame

Publications (2)

Publication Number Publication Date
CN109522262A CN109522262A (en) 2019-03-26
CN109522262B true CN109522262B (en) 2022-12-13

Family

ID=65769987

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811179251.5A Active CN109522262B (en) 2018-10-10 2018-10-10 Receiving method, system, electronic terminal and storage medium suitable for indefinite length data frame

Country Status (1)

Country Link
CN (1) CN109522262B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0837613A3 (en) * 1996-10-16 2000-06-14 Lucent Technologies Inc. Messaging protocol for use in a telecommunications network
CN101556564A (en) * 2008-04-11 2009-10-14 联芯科技有限公司 Data receiving/sending method and device
CN101977385A (en) * 2010-10-27 2011-02-16 南京航空航天大学 DSAM (Dynamic Slot-time Allocation Method) of scale-extensible single-jump ad hoc network supporting QoS (Quality of Service)
CN102724122A (en) * 2012-06-21 2012-10-10 广东威创视讯科技股份有限公司 Reliable serial port transmission method and device based on hardware system
CN103269257A (en) * 2013-05-13 2013-08-28 联发科技(新加坡)私人有限公司 Variable-length coding code stream error detection method and decoding and error detection device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5812335A (en) * 1995-09-01 1998-09-22 Adaptec, Inc. Programmable data transfer without sector pulses in a headerless disk drive architecture
CN100507892C (en) * 2004-09-02 2009-07-01 北京中星微电子有限公司 Communication method suitable for serial peripheral equipment interface bus
DE102011077493A1 (en) * 2010-06-23 2012-04-26 Robert Bosch Gmbh Method and device for data transmission with variable bit length
US10204024B2 (en) * 2015-06-17 2019-02-12 Ford Global Technologies, Llc Sent error generator

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0837613A3 (en) * 1996-10-16 2000-06-14 Lucent Technologies Inc. Messaging protocol for use in a telecommunications network
CN101556564A (en) * 2008-04-11 2009-10-14 联芯科技有限公司 Data receiving/sending method and device
CN101977385A (en) * 2010-10-27 2011-02-16 南京航空航天大学 DSAM (Dynamic Slot-time Allocation Method) of scale-extensible single-jump ad hoc network supporting QoS (Quality of Service)
CN102724122A (en) * 2012-06-21 2012-10-10 广东威创视讯科技股份有限公司 Reliable serial port transmission method and device based on hardware system
CN103269257A (en) * 2013-05-13 2013-08-28 联发科技(新加坡)私人有限公司 Variable-length coding code stream error detection method and decoding and error detection device

Also Published As

Publication number Publication date
CN109522262A (en) 2019-03-26

Similar Documents

Publication Publication Date Title
CN111190842B (en) Direct memory access, processor, electronic device, and data transfer method
CN108304272B (en) Data IO request processing method and device
CN109522262B (en) Receiving method, system, electronic terminal and storage medium suitable for indefinite length data frame
JPH02300939A (en) Semaphore operation system
CN112579323A (en) Heterogeneous multi-core asynchronous communication method and device
CN112040001A (en) Request processing method and device based on distributed storage
KR20170117326A (en) Direct memory access control device for at least one processing unit having a random access memory
CN109034668B (en) ETL task scheduling method, ETL task scheduling device, computer equipment and storage medium
CN113360448B (en) Data packet processing method and device
CN111207763A (en) Path planning method, system, terminal and storage medium based on real-time routing
CN111913666B (en) Method and device compatible with Nand particles with different protocols, computer equipment and storage medium
US10078604B1 (en) Interrupt coalescing
US20170070430A1 (en) Network-on-chip flit transmission method and apparatus
CN113342270A (en) Volume unloading method and device and electronic equipment
CN113572701A (en) Service interface flow control method, device, equipment and storage medium
CN112231018A (en) Method, computing device, and computer-readable storage medium for offloading data
CN111913815A (en) Call request processing method and device, electronic equipment and readable storage medium
CN110010167A (en) It is a kind of to improve method, apparatus, computer equipment and the storage medium for obtaining descriptor state
CN108881055B (en) Token management method and device
CN114827016B (en) Method, device, equipment and storage medium for switching link aggregation scheme
CN112817534B (en) Method, device, computer equipment and storage medium for improving SSD read-write performance
US20170322893A1 (en) Computing node to initiate an interrupt for a write request received over a memory fabric channel
CN109413064B (en) Application layer protocol message processing method between single network card VxWorks system and multiple hosts
CN111343257B (en) Data processing method, device, equipment and medium based on preset data instruction
CN109947469B (en) Address division method, device and computer readable 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