Update to dms control phase1.

This commit is contained in:
sunwen
2023-08-21 14:22:41 +08:00
parent d1dc5df680
commit 20fb814608
59 changed files with 2538 additions and 904 deletions

33
src/device/dms_mq.h Normal file
View File

@@ -0,0 +1,33 @@
#ifndef _DMS_MQ_H_
#define _DMS_MQ_H_
enum{
MQERR_DISCONNECT = -1,
MQERR_FULL = -2,
MQERR_NOMSGID = -3,
MQERR_MSGCTL_FAILED = -4,
MQERR_BLOCKED = -5,
MQERR_LOSTMSG = -6,
MQERR_PACKERR = -7,
MQERR_THDERR = -8,
};
//初始化DMS的MQ序列
int dmsmq_init( void );
//接收DMS的MQ序列阻塞方式。
// srvid 服务ID
// actid 动作ID
// data 数据指针
// 返回值 >= 0 数据长度, < 0 异常信息
int dmsmq_recv( int *srvid, int *actid, uint8_t *data );
// 发送DMS的MQ序列立即返回。
// srvid 服务ID
// actid 动作ID
// data 发送数据指针
// len 发送数据长度
// 返回值 0 成功,< 0 异常信息
int dmsmq_send( int srvid, int actid, uint8_t *data, int len );
#endif