该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

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命令并逐个输出,求程序!!!...相关推荐

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

    该楼层疑似违规已被系统折叠 隐藏此楼查看此楼 Topic – to implement a parser to retrieve AT command line and print out (1) t ...

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

    该楼层疑似违规已被系统折叠 隐藏此楼查看此楼 Topic – to implement a parser to retrieve AT command line and print out (1) t ...

  3. C语言试题四十三之求出ss所指字符串中指定字符的个数,并返回此值。

    1. 题目 请编写一个函数function,它的功能是:求出ss所指字符串中指定字符的个数,并返回此值. 2 .温馨提示 C语言试题汇总里可用于计算机二级C语言笔试.机试.研究生复试中C程序设计科目. ...

  4. c语言c判断字符数字,c语言问题求教 利用函数判断字符串中是否全为数字

    c语言问题求教 利用函数判断字符串中是否全为数字 答案:4  信息版本:手机版 解决时间 2018-12-22 19:42 已解决 2018-12-22 08:52 c语言问题求教 利用函数判断字符串 ...

  5. 【算法设计与分析】—— n的阶乘问题(eg:求100的阶乘 结果中的所有位数都精确输出)

    n的阶乘问题(eg:求100的阶乘 结果中的所有位数都精确输出) 算法题目 算法分析 代码实现 结果示例 算法题目 其实这个求n的阶乘问题,我们在刚刚学习c语言的时候,应该就有大致的了解过了,那个时候 ...

  6. R语言stringr包str_detect函数检测字符串中模式存在与否实战

    R语言stringr包str_detect函数检测字符串中模式存在与否实战 目录 R语言stringr包str_detect函数检测字符串中模式存在与否实战 #导入stringr包

  7. 给定一个字符串,判断该字符串中是否包含某个子串.如果包含,求出子串的所有出现位置. 要求:从键盘输入两个字符串,第一个是给定的字符串,第二个是子串。

    给定一个字符串,判断该字符串中是否包含某个子串.如果包含,求出子串的所有出现位置. 要求:从键盘输入两个字符串,第一个是给定的字符串,第二个是子串. 输入 abcd23abc34bcd bc 输出 1 ...

  8. C语言试题四十之使字符串中尾部的*号不得多于n个;若多于n个,则删除多于的*号;若少于或等于n个,则什么也不做,字符串中间和前面的*号不删除。

    1. 题目 请编写一个函数function,它的功能是:假定输入的字符串中只包含字母和*号.请编写函数fun,它的功能是:使字符串中尾部的*号不得多于n个:若多于n个,则删除多于的*号:若少于或等于n ...

  9. C语言试题七之将函数字符串中的前导*号全部删除,中间和尾部的*号不删除。

    1. 题目 规定输入字符串中只包含字母和*号.请编写函数fun,它的功能是:将函数字符串中的前导*号全部删除,中间和尾部的*号不删除. 2 .温馨提示 C语言试题汇总里可用于计算机二级C语言笔试.机试 ...

最新文章

  1. android studio字符串转整型,Android Studio 中的FindBugs插件使用,轻松帮你发现Bug (转)...
  2. (转载)keras使用入门及3D卷积神经网络资源
  3. 程序的内存模型—new运算符
  4. 第十届蓝桥杯大赛软件赛省赛 C/C++ 大学B组
  5. 测试设计中需要考虑的22种测试类型
  6. python 变量转字符串_[Python Basic] 字符串处理以及类型转换 2
  7. Day6 Pyhton基础之文件操作(五)
  8. 不变性真的意味着线程安全吗?
  9. 阿里云李刚:下一代低延时的直播CDN
  10. T-SQL字符串相加之后被截断的那点事
  11. Redis这么快你知道吗?
  12. 【Elasticsearch】 elasticsearch之Recovery
  13. 数据量大了一定要分表,分库分表Sharding-JDBC入门与项目实战
  14. android gradle fail,Android Studio更新后,Android Gradle CompilationFailedException
  15. 官网下载mysql源码
  16. Win7系统的开机个性化
  17. 以太坊区块链中的数据结构
  18. 使用github遇到的问题及其解决方法汇总
  19. 简历中的自我评价怎么写?
  20. Vue3+TypeScript从入门到精通系列之:Try changing the lib compiler option to es2015 or later

热门文章

  1. hihocoder 1075 : 开锁魔法III
  2. Bootstrap的全局css样式部分
  3. Netty关闭客户端
  4. java 静态变量生命周期(类生命周期)
  5. 引:善用backtrace解决大问题
  6. Visifire Silverlight Charts (基于SilverLight的Chart组件)
  7. repeate 绑定展开的第三只小板凳
  8. python闭包修改全局变量_python闭包探究一二
  9. python人脸识别opencv_Python与OpenCV实时人脸识别
  10. php的cookie教程,PHP4之COOKIE支持详解