CPC H04L 1/245 (2013.01) [G06F 11/079 (2013.01); G06F 11/0745 (2013.01); H04L 2001/0094 (2013.01)] | 6 Claims |
1. A data transmission method, wherein the data transmission method comprises:
sending data acquisition commands to a plurality of target devices and turning on a timer;
detecting, for any first target device of the plurality of target devices, whether first target data transmitted by the first target device exists on a bus within a preset timing time;
performing a data verification on the first target data and determining a communication flag bit of the first target device based on a check result; and
determining whether to receive the first target data transmitted by the first target device based on the communication flag bit of the first target device,
wherein the data verification comprises a transmission length check and a cyclical redundancy check; and the step of performing a data verification on the first target data and determining a communication flag bit of the first target device based on a check result comprises:
detecting whether a transmission length of the first target data is consistent with a preset target transmission length;
performing, if they are consistent, a cyclical redundancy check on the first target data, and if the cyclical redundancy check is passed, identifying the communication flag bit of the first target device as a first communication flag bit; if the cyclical redundancy check is not passed, identifying the communication flag bit of the first target device as a second communication flag bit; and
identifying, if they are not consistent, the communication flag bit of the first target device as a third communication flag bit, and continuing to wait for a transmission of the first target data,
wherein the step of determining whether to receive the first target data transmitted by the target device based on the communication flag bit of the first target device comprises:
detecting a type of the communication flag bit of the first target device;
performing, if the communication flag bit is the first communication flag bit, a data processing corresponding to the first target data and receiving next target data of the first target device after the processing is complete;
sending, if the communication flag bit is the second communication flag bit, a data error identification and receiving a second target data from a second target device; and
skipping, if the communication flag bit is the third communication flag bit, a processing of the first target data, waiting for the first target data to be transmitted and receiving the second target data from the second target device of the plurality of target devices.
|