X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=hw2%2Fmessages.h;h=cd9439832c85b534025f196e2350ce79176163f0;hb=f9b0067097963fa87b35d7844de1a30d2c93c005;hp=9f7dd712e9518bd7040635da21af9c5f4ca8de07;hpb=7809f2b477c2eec8d27e45b3e441002509cfc556;p=~andy%2Fcsm213a-hw diff --git a/hw2/messages.h b/hw2/messages.h index 9f7dd71..cd94398 100644 --- a/hw2/messages.h +++ b/hw2/messages.h @@ -11,13 +11,14 @@ extern "C" { * Message Definitions * ***********************/ -#define MSG_HEADER 0x1234 +#define MSG_HEADER 0x1234 -#define MSG_VALID_DEVICE 0x0001 // device id is valid -#define MSG_VALID_WORLD 0x0002 // world time is valid -#define MSG_VALID_START 0x0004 // start time is valid -#define MSG_VALID_PERIOD 0x0008 // period is valid -#define MSG_VALID_SYNC 0x8000 // begin time sync +#define MSG_CTL_VALID_DEVICE 0x0001 // device id is valid +#define MSG_CTL_VALID_WORLD 0x0002 // world time is valid +#define MSG_CTL_VALID_START 0x0004 // start time is valid +#define MSG_CTL_VALID_PERIOD 0x0008 // period is valid +#define MSG_CTL_RELAY_MODE 0x4000 // relay output messages +#define MSG_CTL_BEGIN_SYNC 0x8000 // begin time sync #pragma pack(1) @@ -41,7 +42,7 @@ typedef struct { } header_t; typedef struct { - uint16_t valid; // Message valid bits + uint16_t control; // Message control bits uint16_t device; // Device ID to use ntime_t world; // World time (since 1970) ntime_t start; // Transmit start time