摘要: *******************************************************************https://git.archive.openwrt.org/15.05/openwrt.githttps://github.com/MediaTek-Labs/l 阅读全文
posted @ 2018-03-30 11:25 橙子好甜 阅读(468) 评论(0) 推荐(0) 编辑
摘要: MQTT MQTT提供三种Qos的消息传递质量: a.最多一次(Atmost once delivery):QoS=0,协议对此等级应用信息不要求回应确认, 也没有重发机制,这类信息可能会发生消息丢失或重复,取决于TCP/IP提供的尽最大努力交互的数据包服务。 b.最少一次(Atleast once 阅读全文
posted @ 2018-03-30 11:12 橙子好甜 阅读(427) 评论(0) 推荐(0) 编辑
摘要: 用了太久c++了,有些惯用的函数不能用了,只能够自己再写它出来实现吧 //写下linux的shell int32_t myexec(const char *cmd) { int size=0; FILE *pp = popen(cmd, "r"); if (!pp) { return -1; } c 阅读全文
posted @ 2018-03-29 10:46 橙子好甜 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 简单例子: //memset//C 库函数 void *memset(void *str, int c, size_t n) 复制字符 c(一个无符号字符)到参数 str 所指向的字符串的前 n 个字符。int test (){ char str[50]; strcpy(str,"This is s 阅读全文
posted @ 2018-03-16 09:09 橙子好甜 阅读(265) 评论(0) 推荐(0) 编辑
摘要: //构造体 typedef struct FilesArrayStruct { char** fileArray; int arraySize;} FilesArrayStruct_t; //函数 FilesArrayStruct_t getFilesArray(const char *dirNam 阅读全文
posted @ 2018-03-15 17:46 橙子好甜 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2018-03-15 09:45 橙子好甜 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 简单说一下popen()函数 函数定义 函数说明 popen()函数通过创建一个管道,调用fork()产生一个子进程,执行一个shell以运行命令来开启一个进程。这个管道必须由pclose()函数关闭,而不是fclose()函数。pclose()函数关闭标准I/O流,等待命令执行结束,然后返回she 阅读全文
posted @ 2018-03-13 17:01 橙子好甜 阅读(791) 评论(0) 推荐(0) 编辑
摘要: string.h char* 复制到char * strdup 函数名:strdup 功 能: 将串拷贝到新建的位置处 用 法: char *strdup(char *str); 程序例: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 # 阅读全文
posted @ 2018-03-09 14:45 橙子好甜 阅读(241) 评论(0) 推荐(0) 编辑
摘要: .tartar cvf FileName.tar FileName #压缩tar xvf FileName.tar #解压 .gzgunzip FileName.gz #解压1gzip -d FileName.gz #解压2gzip FileName #压缩.tar.gz tar zxvf File 阅读全文
posted @ 2018-03-08 11:52 橙子好甜 阅读(183) 评论(0) 推荐(0) 编辑
摘要: # 下载源代码包 # 下载源代码包 # 下载源代码包 # 下载源代码包 # 下载源代码包 # 下载源代码包 # 下载源代码包 wget http://mosquitto.org/files/source/mosquitto-1.4.5.tar.gz # 解压 tar zxfv mosquitto-1 阅读全文
posted @ 2018-03-08 11:17 橙子好甜 阅读(336) 评论(0) 推荐(0) 编辑