80 #define MCF_CLASS_ERROR 0x00
81 #define MCF_CLASS_CMD 0x01
82 #define MCF_CLASS_REPLY 0x02
83 #define MCF_CLASS_EVENT 0x03
85 #define MCF_TYPE_GROUP_SHIFT 6
86 #define MCF_TYPE_GROUP_MASK 0x0FC0
87 #define MCF_TYPE_NUM_SHIFT 0
88 #define MCF_TYPE_NUM_MASK 0x003F
90 #define MCF_MK_TYPE(GROUP, NUM) \
91 ( ( ( GROUP ) << MCF_TYPE_GROUP_SHIFT & MCF_TYPE_GROUP_MASK ) | \
92 ( ( NUM ) << MCF_TYPE_NUM_SHIFT & MCF_TYPE_NUM_MASK ) )
uint32_t mcfEncodeFinish(MCFState *state)
Call this after encoding to complete the MCF packet.
uint32_t _mcfTimeStamp()
Dependency function.
uint32_t mcfEncodeFree()
Returns the number of bytes available for content in the current message.
bool mcfEncodeBuffer(MCFState *state, DataBuffer *db)
Encodes the content of a databuffer into the container.
bool mcfEncodeNext(MCFState *state)
Creates a new encoding entry.
Defines a DataBuffer structure.
uint32_t mcfEncodeFreeNext()
Returns the number of bytes available for content in the NEXT message.
DataBuffer reads and writes data into a buffer in the same format as defined in the data Java DataOut...
void mcfInitState(MCFState *state, uint8_t *bufPtr, uint32_t bufLen)
Initializes the decoding or encoding of a Message Container Formatted message.
bool mcfDecodeNext(MCFState *state)
Decodes the next message.