controller
RobotSystem.h 文件参考

机器人控制系统初始化必要接口 更多...

#include "Base/robotStruct.h"

浏览源代码.

函数

int initPriority (int priority)
 程序优先级设置 更多...
 
int initCurrentThreadPriority (int priority)
 线程优先级设置 更多...
 
int setCurrentThreadName (char *name)
 线程名称设置 更多...
 
int commandLineParser (int argc, char *argv[], command_arg *arg)
 解析程序命令行 更多...
 
int commandLineParser1 (const char *carg, command_arg *arg)
 命令行参数输入 更多...
 
int Rdebug (const char *__restrict __format,...)
 运行信息写入日志文件 更多...
 
int system_initialize (command_arg *arg)
 系统初始化 更多...
 
int robot_ok ()
 系统状态是否正常 更多...
 

详细描述

机器人控制系统初始化必要接口

作者
hanbing
版本
1.0
日期
2020-04-08

函数说明

◆ commandLineParser()

int commandLineParser ( int  argc,
char *  argv[],
command_arg arg 
)

解析程序命令行

参数
argc用于存放命令行参数的个数
argv是个字符指针的数组,每个元素都是一个字符指针,指向一个字符串,即命令行中的每一个参数。
arg返回解析结果
返回
int 0:正确,错误返回其他

◆ commandLineParser1()

int commandLineParser1 ( const char *  carg,
command_arg arg 
)

命令行参数输入

参数
carg命令行参数,如:”–path /hanbing –port 6665 –iscopy true“。(NULL为默认)
arg返回解析结果
返回
int 0:正确,错误返回其他

◆ initCurrentThreadPriority()

int initCurrentThreadPriority ( int  priority)

线程优先级设置

参数
priority优先级
返回
int 0:正确,错误返回其他

◆ initPriority()

int initPriority ( int  priority)

程序优先级设置

参数
priority优先级
返回
int 0:正确,错误返回其他

◆ Rdebug()

int Rdebug ( const char *__restrict  __format,
  ... 
)

运行信息写入日志文件

参数
__format格式化输入
返回
int 0:正确,错误返回其他

◆ robot_ok()

int robot_ok ( )

系统状态是否正常

返回
int 1:状态正常; 0:状态错误或强制退出

◆ setCurrentThreadName()

int setCurrentThreadName ( char *  name)

线程名称设置

参数
name线程名
返回
int 0:正确,错误返回其他

◆ system_initialize()

int system_initialize ( command_arg arg)

系统初始化

参数
arg系统启动参数(NULL为默认)
返回
int 0:成功; 1:失败