Method for command communication, device for command communication and storage medium
AssigneeTymphany Hk Limited
InventorSheng-Pin WANG
Life of this patent
Estimating the term…
Abstract
A method for command communication includes: determining whether a command to parse conforms to a preset rule, wherein the preset rule includes: the command starts by a preset starting byte and terminates by a preset terminating byte, and each of the other bytes in the command except the preset starting byte and the preset terminating byte is a valid byte with a correct position; if determining that the command conforms to the preset rule, performing calculation on the index of each byte in the command by a preset calculation method to generate corresponding data; when determining that the command exists in a command set, parsing the command by translating the data.
Claims9
A method for command communication comprising:
- determining whether a command to parse conforms to a preset rule to generate a determination result, wherein the preset rule comprises:
- starting the command by a preset starting byte and terminating the command by a preset terminating byte, and each of the other bytes in the command except the preset starting byte and the preset terminating byte is a valid byte with a correct position;
- if the determination result is that the command conforms to the preset rule, performing calculation on an index of each byte in the command by a preset calculation method to generate corresponding data;
- and
- when determining that the command exists in a command set, parsing the command by translating the data.
A device for command communication comprising:
- a determination module configured to determine whether a command to parse conforms to a preset rule to generate a determination result, wherein the preset rule comprises:
- starting the command by a preset starting byte and terminating the command by a preset terminating byte, and each of other bytes in the command except the preset starting byte and the preset terminating byte is a valid byte with a correct position;
- a calculation module configured to perform calculation on an index of each byte in the command by a preset calculation method to generate corresponding data if the determination result of the determination module is that the command conforms to the preset rule;
- and
- a translation module configured to parse the command by translating the data when determining that the command exists in a command set.
Dependencies are inferred from the claim text.