Such as "AT + OPEN=12345678,01 \ r \ n", 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 "12", 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,
CodePudding user response:
Basis of pointer manipulationWrite their own!
CodePudding user response:
The