vmac.h
来自「SOS操作系统用于无线传感器网络节点的源代码」· C头文件 代码 · 共 44 行
H
44 行
#ifndef _VMAC_H
#define _VMAC_H
#include "message.h"
#include "sos_types.h"
//packe sos message into RADIO(USE CHIPCON SPP LIBRARY)
/*struct vmac_payload
{
sos_pid_t did; //!< module destination id
sos_pid_t sid; //!< module source id
uint16_t daddr; //!< node destination address
uint16_t saddr; //!< node source address
uint8_t type; //!< module specific message type
uint8_t len; //!< payload length
uint8_t *data; //!< actual payload
uint16_t flag; //!< flag to indicate the status of message, see below
uint8_t payload[SOS_MSG_PAYLOAD_LENGTH]; //!< statically allocated payload
};
typedef struct vmac_payload vmac_payload;
*/
/*shoule be modified if struct Message changed
sos_pid_t did 1
sos_pid_t sid 1
uint16_t daddr 2
uint16_t saddr 2
uint8_t type 1
uint8_t len 1
uint16_t flag 2
//uint16_t seq; 2 BY zhou ya jin . seq no is not sent in msg. It is controled by application
*/
#define MESSAGE_RADIO_PAYLOAD_HEADER_LEN 10
extern void radio_msg_alloc(Message *msg);
extern void mac_init();
#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?