日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

at指令返回值检验c语言,学渣求指教,如何识别字符串中的AT命令并逐个输出,求程序!!!...

發布時間:2023/12/10 编程问答 31 豆豆
生活随笔 收集整理的這篇文章主要介紹了 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命令并逐个输出,求程序!!!...的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。