DrandInfo.h.~1.1.~
上传用户:joranyuan
上传日期:2022-06-23
资源大小:3306k
文件大小:1k
- #ifndef DRAND_INFO_H
- #define DRAND_INFO_H
- #include "SClock.h"
- #include "DrandMSG.h"
- typedef struct nodeInfo{
- uint8_t nodeID;
- uint8_t slot;
- uint8_t frame;
- uint8_t bitMap;
- } nodeInfo;
- typedef struct helloMsg{
- uint8_t sendID;
- uint8_t OneWayLen; // length of one way id array
- uint8_t OneWayId[MAX_NBR];
- } helloMsg;
- typedef struct requestMsg{
- uint8_t sendID;
- #ifdef DEBUG
- uint8_t myState;
- uint8_t lastRequestID;
- uint8_t roundNum;
- #endif
- uint8_t numRemaining;
- uint16_t OTT;
- GTime timestamp;
- uint8_t idMap[MAX_NBR];
- } requestMsg;
- typedef struct grantMsg{
- uint8_t sendID;
- #ifdef DEBUG
- uint8_t myState;
- uint8_t lastRequestID;
- uint8_t roundNum;
- #endif
- uint8_t timeSlot[MAX_NBR];
- GTime timestamp;
- } grantMsg;
- typedef struct rejectMsg{
- uint8_t sendID;
- #ifdef DEBUG
- uint8_t myState;
- uint8_t lastRequestID;
- uint8_t roundNum;
- #endif
- } rejectMsg;
- typedef struct releaseMsg{
- uint8_t sendID;
- #ifdef DEBUG
- uint8_t myState;
- uint8_t lastRequestID;
- uint8_t roundNum;
- #endif
- uint8_t slot;
- } releaseMsg;
- typedef struct twoHopMsg{
- uint8_t sendID;
- #ifdef DEBUG
- uint8_t myState;
- uint8_t lastRequestID;
- uint8_t roundNum;
- #endif
- uint8_t slot;
- uint8_t slotID;
- } twoHopMsg;
- typedef struct frameMsg{
- uint8_t sendID;
- uint8_t frame;
- uint8_t type;
- uint8_t oneHopNodeID[MAX_ONE_HOP];
- uint8_t frameArray[MAX_ONE_HOP];
- } frameMsg;
- typedef struct reportMsg{
- uint8_t sendID;
- uint8_t slot;
- uint8_t timeSlot[MAX_NBR];
- } reportMsg;
- #endif