gwenhywfar 5.12.0
msg_ipc.h File Reference
#include <gwenhywfar/msg.h>
Include dependency graph for msg_ipc.h:
This graph shows which files directly or indirectly include this file:

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_ID   8 /* 4 bytes msg id */
#define GWEN_MSGIPC_OFFS_PAYLOAD   16 /* 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_REFID   12 /* 4 bytes reference msg id */
#define GWEN_MSGIPC_OFFS_SIZE   0 /* 4 bytes: number of all bytes including size, protoid, protover and code */

Functions

GWENHYWFAR_API void GWEN_IpcMsg_AdjustMsgSize (GWEN_MSG *msg)
GWENHYWFAR_API uint16_t GWEN_IpcMsg_GetCode (const GWEN_MSG *msg)
GWENHYWFAR_API uint32_t GWEN_IpcMsg_GetMsgId (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 uint32_t GWEN_IpcMsg_GetRefMsgId (const GWEN_MSG *msg)
GWENHYWFAR_API int GWEN_IpcMsg_IsMsgComplete (const GWEN_MSG *msg)
GWENHYWFAR_API GWEN_MSGGWEN_IpcMsg_new (uint8_t protoId, uint8_t protoVer, uint16_t code, uint32_t msgId, uint32_t refMsgId, uint32_t payloadLen, const uint8_t *payload)

Macro Definition Documentation

◆ GWEN_MSGIPC_OFFS_CODE

#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().

◆ GWEN_MSGIPC_OFFS_ID

#define GWEN_MSGIPC_OFFS_ID   8 /* 4 bytes msg id */

Definition at line 21 of file msg_ipc.h.

Referenced by GWEN_IpcMsg_GetMsgId().

◆ GWEN_MSGIPC_OFFS_PAYLOAD

#define GWEN_MSGIPC_OFFS_PAYLOAD   16 /* begin of payload for a given message */

Definition at line 23 of file msg_ipc.h.

Referenced by _getBytesNeededForMessage(), and GWEN_IpcMsg_new().

◆ GWEN_MSGIPC_OFFS_PROTOID

#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().

◆ GWEN_MSGIPC_OFFS_PROTOVER

#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().

◆ GWEN_MSGIPC_OFFS_REFID

#define GWEN_MSGIPC_OFFS_REFID   12 /* 4 bytes reference msg id */

Definition at line 22 of file msg_ipc.h.

Referenced by GWEN_IpcMsg_GetRefMsgId().

◆ GWEN_MSGIPC_OFFS_SIZE

#define GWEN_MSGIPC_OFFS_SIZE   0 /* 4 bytes: number of all bytes including size, protoid, protover and code */

Function Documentation

◆ GWEN_IpcMsg_AdjustMsgSize()

GWENHYWFAR_API void GWEN_IpcMsg_AdjustMsgSize ( GWEN_MSG * msg)

Definition at line 50 of file msg_ipc.c.

References GWEN_Msg_WriteUint32At(), and GWEN_MSGIPC_OFFS_SIZE.

Here is the call graph for this function:

◆ GWEN_IpcMsg_GetCode()

GWENHYWFAR_API uint16_t GWEN_IpcMsg_GetCode ( const GWEN_MSG * msg)

Definition at line 95 of file msg_ipc.c.

References GWEN_Msg_GetUint16At(), and GWEN_MSGIPC_OFFS_CODE.

Here is the call graph for this function:

◆ GWEN_IpcMsg_GetMsgId()

GWENHYWFAR_API uint32_t GWEN_IpcMsg_GetMsgId ( const GWEN_MSG * msg)

Definition at line 102 of file msg_ipc.c.

References GWEN_Msg_GetUint32At(), and GWEN_MSGIPC_OFFS_ID.

Here is the call graph for this function:

◆ GWEN_IpcMsg_GetMsgSize()

GWENHYWFAR_API uint32_t GWEN_IpcMsg_GetMsgSize ( const GWEN_MSG * msg)

Definition at line 74 of file msg_ipc.c.

References GWEN_Msg_GetUint32At(), and GWEN_MSGIPC_OFFS_SIZE.

Referenced by _getBytesNeededForMessage().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_IpcMsg_GetProtoId()

GWENHYWFAR_API uint8_t GWEN_IpcMsg_GetProtoId ( const GWEN_MSG * msg)

Definition at line 81 of file msg_ipc.c.

References GWEN_Msg_GetUint8At(), and GWEN_MSGIPC_OFFS_PROTOID.

Here is the call graph for this function:

◆ GWEN_IpcMsg_GetProtoVersion()

GWENHYWFAR_API uint8_t GWEN_IpcMsg_GetProtoVersion ( const GWEN_MSG * msg)

Definition at line 88 of file msg_ipc.c.

References GWEN_Msg_GetUint8At(), and GWEN_MSGIPC_OFFS_PROTOVER.

Here is the call graph for this function:

◆ GWEN_IpcMsg_GetRefMsgId()

GWENHYWFAR_API uint32_t GWEN_IpcMsg_GetRefMsgId ( const GWEN_MSG * msg)

Definition at line 109 of file msg_ipc.c.

References GWEN_Msg_GetUint32At(), and GWEN_MSGIPC_OFFS_REFID.

Here is the call graph for this function:

◆ GWEN_IpcMsg_IsMsgComplete()

GWENHYWFAR_API int GWEN_IpcMsg_IsMsgComplete ( const GWEN_MSG * msg)

Definition at line 58 of file msg_ipc.c.

References GWEN_Msg_GetUint32At(), and GWEN_MSGIPC_OFFS_SIZE.

Here is the call graph for this function:

◆ GWEN_IpcMsg_new()

GWENHYWFAR_API GWEN_MSG * GWEN_IpcMsg_new ( uint8_t protoId,
uint8_t protoVer,
uint16_t code,
uint32_t msgId,
uint32_t refMsgId,
uint32_t payloadLen,
const uint8_t * payload )

Definition at line 22 of file msg_ipc.c.

References GWEN_Msg_AddBytes(), GWEN_Msg_AddUint16(), GWEN_Msg_AddUint32(), GWEN_Msg_AddUint8(), GWEN_Msg_new(), GWEN_MSGIPC_OFFS_PAYLOAD, and NULL.

Here is the call graph for this function: