|
gwenhywfar
5.11.2beta
|
#include <gwenhywfar/msg.h>

Go to the source code of this file.
Macros | |
| #define | GWEN_MSGIPC_OFFS_CODE 6 /* 2 bytes msg code (meaning depends on protocol) */ |
| #define | GWEN_MSGIPC_OFFS_PAYLOAD 8 /* begin of payload for a given message */ |
| #define | GWEN_MSGIPC_OFFS_PROTOID 4 /* 1 byte: protocol id (free to use) */ |
| #define | GWEN_MSGIPC_OFFS_PROTOVER 5 /* 1 byte: protocol version (free to use) */ |
| #define | GWEN_MSGIPC_OFFS_SIZE 0 /* 4 bytes: number of all bytes including size, protoid, protover and code */ |
Functions | |
| GWENHYWFAR_API uint16_t | GWEN_IpcMsg_GetCode (const GWEN_MSG *msg) |
| GWENHYWFAR_API uint32_t | GWEN_IpcMsg_GetMsgSize (const GWEN_MSG *msg) |
| GWENHYWFAR_API uint8_t | GWEN_IpcMsg_GetProtoId (const GWEN_MSG *msg) |
| GWENHYWFAR_API uint8_t | GWEN_IpcMsg_GetProtoVersion (const GWEN_MSG *msg) |
| GWENHYWFAR_API int | GWEN_IpcMsg_IsMsgComplete (const GWEN_MSG *msg) |
| GWENHYWFAR_API GWEN_MSG * | GWEN_IpcMsg_new (uint8_t protoId, uint8_t protoVer, uint16_t code, uint32_t payloadLen, const uint8_t *payload) |
| #define GWEN_MSGIPC_OFFS_CODE 6 /* 2 bytes msg code (meaning depends on protocol) */ |
Definition at line 20 of file msg_ipc.h.
Referenced by GWEN_IpcMsg_GetCode(), and GWEN_IpcMsg_new().
| #define GWEN_MSGIPC_OFFS_PAYLOAD 8 /* begin of payload for a given message */ |
Definition at line 21 of file msg_ipc.h.
Referenced by _getBytesNeededForMessage(), GWEN_IpcMsg_GetCode(), GWEN_IpcMsg_GetProtoId(), GWEN_IpcMsg_GetProtoVersion(), and GWEN_IpcMsg_new().
| #define GWEN_MSGIPC_OFFS_PROTOID 4 /* 1 byte: protocol id (free to use) */ |
Definition at line 18 of file msg_ipc.h.
Referenced by GWEN_IpcMsg_GetProtoId(), and GWEN_IpcMsg_new().
| #define GWEN_MSGIPC_OFFS_PROTOVER 5 /* 1 byte: protocol version (free to use) */ |
Definition at line 19 of file msg_ipc.h.
Referenced by GWEN_IpcMsg_GetProtoVersion(), and GWEN_IpcMsg_new().
| #define GWEN_MSGIPC_OFFS_SIZE 0 /* 4 bytes: number of all bytes including size, protoid, protover and code */ |
Definition at line 17 of file msg_ipc.h.
Referenced by GWEN_IpcMsg_GetMsgSize(), GWEN_IpcMsg_IsMsgComplete(), and GWEN_IpcMsg_new().
| GWENHYWFAR_API uint16_t GWEN_IpcMsg_GetCode | ( | const GWEN_MSG * | msg | ) |
Definition at line 104 of file msg_ipc.c.
References GWEN_MSGIPC_OFFS_CODE, and GWEN_MSGIPC_OFFS_PAYLOAD.
| GWENHYWFAR_API uint32_t GWEN_IpcMsg_GetMsgSize | ( | const GWEN_MSG * | msg | ) |
Definition at line 72 of file msg_ipc.c.
References GWEN_MSGIPC_OFFS_SIZE.
Referenced by _getBytesNeededForMessage().

| GWENHYWFAR_API uint8_t GWEN_IpcMsg_GetProtoId | ( | const GWEN_MSG * | msg | ) |
Definition at line 86 of file msg_ipc.c.
References GWEN_MSGIPC_OFFS_PAYLOAD, and GWEN_MSGIPC_OFFS_PROTOID.
| GWENHYWFAR_API uint8_t GWEN_IpcMsg_GetProtoVersion | ( | const GWEN_MSG * | msg | ) |
Definition at line 95 of file msg_ipc.c.
References GWEN_MSGIPC_OFFS_PAYLOAD, and GWEN_MSGIPC_OFFS_PROTOVER.
| GWENHYWFAR_API int GWEN_IpcMsg_IsMsgComplete | ( | const GWEN_MSG * | msg | ) |
Definition at line 53 of file msg_ipc.c.
References GWEN_MSGIPC_OFFS_SIZE.
| GWENHYWFAR_API GWEN_MSG* GWEN_IpcMsg_new | ( | uint8_t | protoId, |
| uint8_t | protoVer, | ||
| uint16_t | code, | ||
| uint32_t | payloadLen, | ||
| const uint8_t * | payload | ||
| ) |
Definition at line 22 of file msg_ipc.c.
References GWEN_Msg_new(), GWEN_MSGIPC_OFFS_CODE, GWEN_MSGIPC_OFFS_PAYLOAD, GWEN_MSGIPC_OFFS_PROTOID, GWEN_MSGIPC_OFFS_PROTOVER, GWEN_MSGIPC_OFFS_SIZE, and NULL.

1.8.14