at指令返回值检验c语言,学渣求指教,如何识别字符串中的AT命令并逐个输出,求程序!!!...
該樓層疑似違規已被系統折疊?隱藏此樓查看此樓
Topic – to implement a parser to retrieve AT command line and print out (1) the tokens
one by one and (2) the elapse time of each command line (processing).
Please submit the solution in 48 hours.
- The solution could be varied depends on your algorithm. There is no standard solution.
- Please program it in C language.
- The specification is as bellows:
1. Based on the following AT command set and skip the space character, comma(,), a pair of (“ “), then decode each line and print out all the tokens you retrieve.
2. Refer to the following examples which will give you a hint.
3. The length of each token is varied. But the maximum length of token is 15 characters.
For example, the command line AT+CBST=7,0,0
Output should be: token[1] is AT
token[2] is +
token[3] is CBST
token[4] is =
token[5] is 7
token[6] is 0
token[7] is 0
Example 2. the command line ATE1+CBST=7,0,0;D01763266491
Output should be: token[1] is ATE1
token[2] is +
token[3] is CBST
token[4] is =
token[5] is 7
token[6] is 0
token[7] is 0
token[8] is ;
token[9] is D01763266491
Example 3. the command line AT+CPBS= M”6
Output should be: token[1] is AT
token[2] is +
token[3] is CPBS
token[4] is =
token[5] is M
token[6] is ”
token[7] is 6
Note single “ is not ignored.
Example 4. the command line AT+CKPD= ”#12#”
Output should be: token[1] is AT
token[2] is +
token[3] is CKPD
token[4] is =
token[5] is #
token[6] is 12
token[7] is #
Example 5. the command line
AT+CMGW=”+44802333237”
This is a test message
Hello world
Output should be: token[1] is AT
token[2] is +
token[3] is CMGW
token[4] is =
token[5] is +
token[6] is 44802333237
token[7] is
token[8] is This
token[9] is is
token[10] is a
token[11] is test
token[12] is message
token[13] is
token[14] is Hello
token[15] is world
Example 6. the command line
AT+CMGW=”+44802333237”
This is a test ”message
Hello ”world
Output should be: token[1] is AT
token[2] is +
token[3] is CMGW
token[4] is =
token[5] is +
token[6] is 44802333237
token[7] is
token[8] is This
token[9] is is
token[10] is a
token[11] is test
token[12] is ”
token[13] is message
token[14] is
token[15] is Hello
token[16] is ”
token[17] is world
總結
以上是生活随笔為你收集整理的at指令返回值检验c语言,学渣求指教,如何识别字符串中的AT命令并逐个输出,求程序!!!...的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 第一次冲刺阶段(三)
- 下一篇: 服务器pe 装linux,微PE工具箱增