Home > Back-end >  C language experimental
C language experimental

Time:11-07

A the AT command to characters AT beginning, ends with a carriage return line breaks over the instructions contained in the command, the node address, node data, such as "AT + OPEN=12345678,01, over", the directive, the command to "AT + OPEN", the node address is "12345678", the node data for "01", assume that the machine node address is "12345678", the effective value of node data for "01", "02"... Ordered the RMS values of the "99", for "AT + OPEN", "AT + LOCK", "AT + the INQUIRE,"
Input from the keyboard a AT instruction, to determine whether instruction is correct, if the ERROR output COMMAND "ERROR", the end of the program,
If the command is correct decision NODE ADDRESS is consistent with the machine NODE ADDRESS, if not consistent, the output "NODE ADDRESS ERROR", the end of the program,
If the command is to determine whether a NODE DATA is valid and correct if effective, output "OK", if the invalid output NODE "DATA ERROR",
Requirements:
(1) do not use the string processing library function;
(2), two functions are defined respectively to extract the AT command input command, the node address, node data and string, the function in the form of a parameter to a pointer to the characters,
  • Related