创建 my_example 的消息头文件
为生成运行时目录,可按如下所示使用
runcat 命令:
runcat my_example my_example.msg这会生成 my_example_msg.h 头文件,如下一段所示。 请注意,集合助记符为
MS_MY_EXAMPLE ,消息助记符为 CANTOPEN, BYTECNT, 和 CHARCNT。 本附录中的程序用到了这些助记符。/*
** The header file: my_example_msg.h is as follows:
*/
#ifndef _H_MY_EXAMPLE_MSG
#define _H_MY_EXAMPLE_MSG
#include <limits.h>
#include <nl_types.h>
#define MF_MY_EXAMPLE "my_example.cat"
/* The following was generated from my_example.msg. */
/* definitions for set MS_MY_EXAMPLE */
#define MS_MY_EXAMPLE 1
#define CANTOPEN 1
#define BYTECNT 2
#define CHARCNT 3
#endif