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命令并逐个输出,求程序!!!...相关推荐
- at指令 和c语言,学渣求指教,如何识别字符串中的AT命令并逐个输出,求程序!!!...
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼 Topic – to implement a parser to retrieve AT command line and print out (1) t ...
- c语言 at指令,学渣求指教,如何识别字符串中的AT命令并逐个输出,求程序!!!...
该楼层疑似违规已被系统折叠 隐藏此楼查看此楼 Topic – to implement a parser to retrieve AT command line and print out (1) t ...
- C语言试题四十三之求出ss所指字符串中指定字符的个数,并返回此值。
1. 题目 请编写一个函数function,它的功能是:求出ss所指字符串中指定字符的个数,并返回此值. 2 .温馨提示 C语言试题汇总里可用于计算机二级C语言笔试.机试.研究生复试中C程序设计科目. ...
- 如何编写有多个返回值的C语言函数
1引言 笔者从事C语言教学多年,在教学中学生们常常会问到如何编写具有多个返回值的C语言函数.编写有多个返回值的函数是所有C语言教材里均没有提到的知识点,但在实际教学与应用的过程中我们都有可能会遇到这样 ...
- c语言c判断字符数字,c语言问题求教 利用函数判断字符串中是否全为数字
c语言问题求教 利用函数判断字符串中是否全为数字 答案:4 信息版本:手机版 解决时间 2018-12-22 19:42 已解决 2018-12-22 08:52 c语言问题求教 利用函数判断字符串 ...
- R语言stringr包str_detect函数检测字符串中模式存在与否实战
R语言stringr包str_detect函数检测字符串中模式存在与否实战 目录 R语言stringr包str_detect函数检测字符串中模式存在与否实战 #导入stringr包
- c语言规定 函数返回值6,C语言六函数.ppt
C语言六函数 第六章 函数 任何一个结构化程序都可以由三种基本结构组成:顺序结构.选择结构和循环结构,为了利用这三种结构编写结构化程序,通常需要采用自顶向下.逐步细化和模块化的程序设计方法,这也就是说 ...
- c++ 一个函数包括多个返回值判断_go语言学习笔记(10)-函数、包的使用
跳转控制语句-continue 1:continue语句用于结束本次循环,继续执行下一次循环. 2:continue语句出现在多层嵌套的循环语句体中时,可以通过标签指明要跳过的是哪一层循环,这个和前面 ...
- 函数的返回值,C语言函数返回值详解
看旋转编码器程序的时候,遇见了一些关于函数返回值的函数,感觉很懵逼,就百度了一下C语言函数调用,感觉写的挺好的, 原链接:http://c.biancheng.net/view/204.html 通常 ...
最新文章
- 一定是h的方式不对阅读_20T/H中水 超滤回用处理系统
- (JAVA学习笔记) 类与对象小结
- 【NLP】fastText词向量与文本分类工具
- 基于SpringJDBC 实现关键功能-QueryRuleSqlBulider
- Lua 协同程序(coroutine)
- Dotnet Core
- Codeforces Round #324 (Div. 2) B. Kolya and Tanya 快速幂
- 理解AES加密解密的使用方法
- python磁盘空间_python3实现磁盘空间监控
- windows下Qt5.4.2 for android开发环境配置
- 【渝粤教育】国家开放大学2018年春季 0299-21T中国古代文学(1) 参考试题
- 微信小程序之----audio音频播放
- linux入门目录汇总
- OGNL表达式用法详解
- 揭开A股38位「 90后」董事长的神秘面纱
- 涂师傅手机数据恢复官方版
- 浅谈Google三篇大数据论文
- flutter中页面跳转之Navigator
- 远控免杀专题(12)-Green-Hat-Suite免杀(VT免杀率23/70)
- WPF:Provide value on 'System.Windows.Baml2006.TypeConverterMarkupExtension'