vxworks
文章平均质量分 93
Jonas饭饭
这个作者很懒,什么都没留下…
展开
-
vxwors下读取配置文件代码(vs下同样也能实现)
1.config_rw.c#include "config_rw.h"//#define filenm ''./config"#define FILENAME "D:/jonasworkproject/test/test/config.txt" /* 函数功能: 去除字符串首位的空格; 输入参数: char *strIn 要去除首尾空格的字符串; 返回参数: char *strOut 去除首尾空格后的字符串; 备注: */static void trim(cha原创 2020-06-30 01:20:52 · 446 阅读 · 1 评论 -
vxworks下UDP通信代码
代码内容1. udp.h文件#ifndef _UDP_H#define _UDP_H#include "vxWorks.h"#include "msgQLib.h"#include "semLib.h"#include "sockLib.h"#include "inetLib.h"#include "string.h"#include "hostLib.h"#include "ioLib.h"#include "timers.h"#include "taskLib.h"#原创 2020-06-30 14:20:49 · 1657 阅读 · 1 评论 -
vxworks消息队列相关函数和案例
头文件:#include <msgQLib.h>msgQCreate 创建一个消息队列MSG_Q_ID msgQCreate ( int maxMsgs, /*队列中存储的最大消息数目*/ int maxMsgLength, /*每个消息的最大字节数*/ int options /*消息在消息队列中的排列方式*/ ) options一般有两个选项:MSG_Q_FIFO 表示消息以先原创 2020-06-23 10:42:24 · 1827 阅读 · 0 评论 -
vxworks获得CPU使用情况
#include <vxWorks.h>#include <spyLib.h>#include <stdio.h>#include <ioLib.h>#include <stdarg.h>#include <taskLib.h>#include <sysLib.h>#include <string.h>#define SPYTASKSMAX 100int data_ana(const原创 2020-06-26 01:40:11 · 3545 阅读 · 0 评论