msg.h File Reference
`#include <gwenhywfar/list.h>`
`#include <gwenhywfar/inherit.h>`
`#include <gwenhywfar/buffer.h>`
`#include <gwenhywfar/db.h>`

Go to the source code of this file.

## Macros

#define | GWEN_MSG_FLAGS_PAYLOADINFO_SET 0x80000000u

## Typedefs

typedef struct GWEN_MSG | GWEN_MSG

## Functions

GWENHYWFAR_API int | GWEN_Msg_AddByte (GWEN_MSG *msg, uint8_t b)
GWENHYWFAR_API int | GWEN_Msg_AddBytes (GWEN_MSG *msg, const uint8_t *bufferPtr, uint32_t bufferLen)
GWENHYWFAR_API void | GWEN_Msg_Attach (GWEN_MSG *msg)
GWENHYWFAR_API GWEN_MSG * | GWEN_Msg_dup (const GWEN_MSG *srcMsg)
GWENHYWFAR_API void | GWEN_Msg_free (GWEN_MSG *msg)
GWENHYWFAR_API GWEN_MSG * | GWEN_Msg_fromBytes (const uint8_t *ptr, uint32_t len)
GWENHYWFAR_API uint8_t * | GWEN_Msg_GetBuffer (GWEN_MSG *msg)
GWENHYWFAR_API uint32_t | GWEN_Msg_GetBytesInBuffer (const GWEN_MSG *msg)
GWENHYWFAR_API const uint8_t * | GWEN_Msg_GetConstBuffer (const GWEN_MSG *msg)
GWENHYWFAR_API uint32_t | GWEN_Msg_GetCurrentPos (const GWEN_MSG *msg)
GWENHYWFAR_API int | GWEN_Msg_GetGroupId (const GWEN_MSG *msg)
GWENHYWFAR_API uint32_t | GWEN_Msg_GetMaxSize (const GWEN_MSG *msg)
GWENHYWFAR_API int | GWEN_Msg_GetRemainingBytes (const GWEN_MSG *msg)
GWENHYWFAR_API int | GWEN_Msg_IncCurrentPos (GWEN_MSG *msg, uint32_t i)
GWENHYWFAR_API GWEN_MSG * | GWEN_Msg_new (uint32_t bufferSize)
GWENHYWFAR_API int | GWEN_Msg_ReadNextByte (GWEN_MSG *msg)
GWENHYWFAR_API int | GWEN_Msg_RewindCurrentPos (GWEN_MSG *msg)
GWENHYWFAR_API void | GWEN_Msg_SetBytesInBuffer (GWEN_MSG *msg, uint32_t i)
GWENHYWFAR_API void | GWEN_Msg_SetGroupId (GWEN_MSG *msg, int groupId)
Parsed Information
This group concerns data which is parsed by e.g. implementations of GWEN_MSG_ENDPOINT
GWENHYWFAR_API void | GWEN_Msg_AddFlags (GWEN_MSG *msg, uint32_t f)
GWENHYWFAR_API int | GWEN_Msg_AddString (GWEN_MSG *msg, const char *s, uint32_t maxSize, uint8_t filler)
GWENHYWFAR_API int | GWEN_Msg_AddStringWithTrailingNull (GWEN_MSG *msg, const char *s, uint32_t maxSize, uint8_t filler)
GWENHYWFAR_API int | GWEN_Msg_AddUint16 (GWEN_MSG *msg, uint16_t v)
GWENHYWFAR_API int | GWEN_Msg_AddUint32 (GWEN_MSG *msg, uint32_t v)
GWENHYWFAR_API int | GWEN_Msg_AddUint64 (GWEN_MSG *msg, uint64_t v)
GWENHYWFAR_API int | GWEN_Msg_AddUint8 (GWEN_MSG *msg, uint8_t v)
GWENHYWFAR_API void | GWEN_Msg_DelFlags (GWEN_MSG *msg, uint32_t f)
GWENHYWFAR_API void | GWEN_Msg_Dump (const GWEN_MSG *msg, GWEN_BUFFER *buf)
GWENHYWFAR_API GWEN_DB_NODE * | GWEN_Msg_GetDbParsedInfo (const GWEN_MSG *msg)
GWENHYWFAR_API uint32_t | GWEN_Msg_GetFlags (const GWEN_MSG *msg)
GWENHYWFAR_API uint32_t | GWEN_Msg_GetParsedPayloadOffset (const GWEN_MSG *msg)
GWENHYWFAR_API uint32_t | GWEN_Msg_GetParsedPayloadSize (const GWEN_MSG *msg)
GWENHYWFAR_API uint16_t | GWEN_Msg_GetUint16At (const GWEN_MSG *msg, int offs, uint16_t defaultValue)
GWENHYWFAR_API uint32_t | GWEN_Msg_GetUint32At (const GWEN_MSG *msg, int offs, uint32_t defaultValue)
GWENHYWFAR_API uint64_t | GWEN_Msg_GetUint64At (const GWEN_MSG *msg, int offs, uint64_t defaultValue)
GWENHYWFAR_API uint8_t | GWEN_Msg_GetUint8At (const GWEN_MSG *msg, int offs, uint8_t defaultValue)
GWENHYWFAR_API void | GWEN_Msg_SetDbParsedInfo (GWEN_MSG *msg, GWEN_DB_NODE *db)
GWENHYWFAR_API void | GWEN_Msg_SetFlags (GWEN_MSG *msg, uint32_t f)
GWENHYWFAR_API void | GWEN_Msg_SetParsedPayloadOffset (GWEN_MSG *msg, uint32_t v)
GWENHYWFAR_API void | GWEN_Msg_SetParsedPayloadSize (GWEN_MSG *msg, uint32_t v)
GWENHYWFAR_API int | GWEN_Msg_WriteBytesAt (GWEN_MSG *msg, uint32_t pos, const uint8_t *bufferPtr, uint32_t bufferLen)
GWENHYWFAR_API int | GWEN_Msg_WriteUint16At (GWEN_MSG *msg, uint32_t pos, uint16_t v)
GWENHYWFAR_API int | GWEN_Msg_WriteUint32At (GWEN_MSG *msg, uint32_t pos, uint32_t v)
GWENHYWFAR_API int | GWEN_Msg_WriteUint64At (GWEN_MSG *msg, uint32_t pos, uint64_t v)
GWENHYWFAR_API int | GWEN_Msg_WriteUint8At (GWEN_MSG *msg, uint32_t pos, uint8_t v)

## Macro Definition Documentation

## GWEN_MSG_FLAGS_PAYLOADINFO_SET

#define GWEN_MSG_FLAGS_PAYLOADINFO_SET 0x80000000u

Definition at line 20 of file msg.h.

## Typedef Documentation

## GWEN_MSG

typedef struct GWEN_MSG GWEN_MSG

Definition at line 24 of file msg.h.

## Function Documentation

## GWEN_Msg_AddByte()

GWENHYWFAR_API int GWEN_Msg_AddByte | ( | GWEN_MSG * | msg,
|  | uint8_t | b )

References GWEN_Msg_AddByte(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_AddByte().

## GWEN_Msg_AddBytes()

GWENHYWFAR_API int GWEN_Msg_AddBytes | ( | GWEN_MSG * | msg,
|  | const uint8_t * | bufferPtr,
|  | uint32_t | bufferLen )

References GWEN_Msg_AddBytes(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_AddBytes().

## GWEN_Msg_AddFlags()

GWENHYWFAR_API void GWEN_Msg_AddFlags | ( | GWEN_MSG * | msg,
|  | uint32_t | f )

References GWEN_Msg_AddFlags(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_AddFlags().

## GWEN_Msg_AddString()

GWENHYWFAR_API int GWEN_Msg_AddString | ( | GWEN_MSG * | msg,
|  | const char * | s,
|  | uint32_t | maxSize,
|  | uint8_t | filler )

References GWEN_Msg_AddString(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_AddString().

## GWEN_Msg_AddStringWithTrailingNull()

GWENHYWFAR_API int GWEN_Msg_AddStringWithTrailingNull | ( | GWEN_MSG * | msg,
|  | const char * | s,
|  | uint32_t | maxSize,
|  | uint8_t | filler )

References GWEN_Msg_AddStringWithTrailingNull(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_AddStringWithTrailingNull().

## GWEN_Msg_AddUint16()

GWENHYWFAR_API int GWEN_Msg_AddUint16 | ( | GWEN_MSG * | msg,
|  | uint16_t | v )

References GWEN_Msg_AddUint16(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_AddUint16().

## GWEN_Msg_AddUint32()

GWENHYWFAR_API int GWEN_Msg_AddUint32 | ( | GWEN_MSG * | msg,
|  | uint32_t | v )

References GWEN_Msg_AddUint32(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_AddUint32().

## GWEN_Msg_AddUint64()

GWENHYWFAR_API int GWEN_Msg_AddUint64 | ( | GWEN_MSG * | msg,
|  | uint64_t | v )

References GWEN_Msg_AddUint64(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_AddUint64().

## GWEN_Msg_AddUint8()

GWENHYWFAR_API int GWEN_Msg_AddUint8 | ( | GWEN_MSG * | msg,
|  | uint8_t | v )

References GWEN_Msg_AddUint8(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_AddUint8().

## GWEN_Msg_Attach()

GWENHYWFAR_API void GWEN_Msg_Attach | ( | GWEN_MSG * | msg | ) |

References GWEN_Msg_Attach(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_Attach().

## GWEN_Msg_DelFlags()

GWENHYWFAR_API void GWEN_Msg_DelFlags | ( | GWEN_MSG * | msg,
|  | uint32_t | f )

References GWEN_Msg_DelFlags(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_DelFlags().

## GWEN_Msg_Dump()

GWENHYWFAR_API void GWEN_Msg_Dump | ( | const GWEN_MSG * | msg,
|  | GWEN_BUFFER * | buf )

References GWEN_Msg_Dump(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_Dump().

## GWEN_Msg_dup()

GWENHYWFAR_API GWEN_MSG * GWEN_Msg_dup | ( | const GWEN_MSG * | srcMsg | ) |

References GWEN_Msg_dup(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_dup().

## GWEN_Msg_free()

GWENHYWFAR_API void GWEN_Msg_free | ( | GWEN_MSG * | msg | ) |

References GWEN_Msg_free(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_free().

## GWEN_Msg_fromBytes()

GWENHYWFAR_API GWEN_MSG * GWEN_Msg_fromBytes | ( | const uint8_t * | ptr,
|  | uint32_t | len )

References GWEN_Msg_fromBytes(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_fromBytes().

## GWEN_Msg_GetBuffer()

GWENHYWFAR_API uint8_t * GWEN_Msg_GetBuffer | ( | GWEN_MSG * | msg | ) |

References GWEN_Msg_GetBuffer(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_GetBuffer().

## GWEN_Msg_GetBytesInBuffer()

GWENHYWFAR_API uint32_t GWEN_Msg_GetBytesInBuffer | ( | const GWEN_MSG * | msg | ) |

References GWEN_Msg_GetBytesInBuffer(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_GetBytesInBuffer().

## GWEN_Msg_GetConstBuffer()

GWENHYWFAR_API const uint8_t * GWEN_Msg_GetConstBuffer | ( | const GWEN_MSG * | msg | ) |

References GWEN_Msg_GetConstBuffer(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_GetConstBuffer().

## GWEN_Msg_GetCurrentPos()

GWENHYWFAR_API uint32_t GWEN_Msg_GetCurrentPos | ( | const GWEN_MSG * | msg | ) |

References GWEN_Msg_GetCurrentPos(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_GetCurrentPos().

## GWEN_Msg_GetDbParsedInfo()

GWENHYWFAR_API GWEN_DB_NODE * GWEN_Msg_GetDbParsedInfo | ( | const GWEN_MSG * | msg | ) |

References GWEN_Msg_GetDbParsedInfo(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_GetDbParsedInfo().

## GWEN_Msg_GetFlags()

GWENHYWFAR_API uint32_t GWEN_Msg_GetFlags | ( | const GWEN_MSG * | msg | ) |

References GWEN_Msg_GetFlags(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_GetFlags().

## GWEN_Msg_GetGroupId()

GWENHYWFAR_API int GWEN_Msg_GetGroupId | ( | const GWEN_MSG * | msg | ) |

References GWEN_Msg_GetGroupId(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_GetGroupId().

## GWEN_Msg_GetMaxSize()

GWENHYWFAR_API uint32_t GWEN_Msg_GetMaxSize | ( | const GWEN_MSG * | msg | ) |

References GWEN_Msg_GetMaxSize(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_GetMaxSize().

## GWEN_Msg_GetParsedPayloadOffset()

GWENHYWFAR_API uint32_t GWEN_Msg_GetParsedPayloadOffset | ( | const GWEN_MSG * | msg | ) |

References GWEN_Msg_GetParsedPayloadOffset(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_GetParsedPayloadOffset().

## GWEN_Msg_GetParsedPayloadSize()

GWENHYWFAR_API uint32_t GWEN_Msg_GetParsedPayloadSize | ( | const GWEN_MSG * | msg | ) |

References GWEN_Msg_GetParsedPayloadSize(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_GetParsedPayloadSize().

## GWEN_Msg_GetRemainingBytes()

GWENHYWFAR_API int GWEN_Msg_GetRemainingBytes | ( | const GWEN_MSG * | msg | ) |

References GWEN_Msg_GetRemainingBytes(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_GetRemainingBytes().

## GWEN_Msg_GetUint16At()

GWENHYWFAR_API uint16_t GWEN_Msg_GetUint16At | ( | const GWEN_MSG * | msg,
|  | int | offs,
|  | uint16_t | defaultValue )

References GWEN_Msg_GetUint16At(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_GetUint16At().

## GWEN_Msg_GetUint32At()

GWENHYWFAR_API uint32_t GWEN_Msg_GetUint32At | ( | const GWEN_MSG * | msg,
|  | int | offs,
|  | uint32_t | defaultValue )

References GWEN_Msg_GetUint32At(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_GetUint32At().

## GWEN_Msg_GetUint64At()

GWENHYWFAR_API uint64_t GWEN_Msg_GetUint64At | ( | const GWEN_MSG * | msg,
|  | int | offs,
|  | uint64_t | defaultValue )

References GWEN_Msg_GetUint64At(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_GetUint64At().

## GWEN_Msg_GetUint8At()

GWENHYWFAR_API uint8_t GWEN_Msg_GetUint8At | ( | const GWEN_MSG * | msg,
|  | int | offs,
|  | uint8_t | defaultValue )

References GWEN_Msg_GetUint8At(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_GetUint8At().

## GWEN_Msg_IncCurrentPos()

GWENHYWFAR_API int GWEN_Msg_IncCurrentPos | ( | GWEN_MSG * | msg,
|  | uint32_t | i )

References GWEN_Msg_IncCurrentPos(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_IncCurrentPos().

## GWEN_Msg_new()

GWENHYWFAR_API GWEN_MSG * GWEN_Msg_new | ( | uint32_t | bufferSize | ) |

References GWEN_Msg_new(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_new().

## GWEN_Msg_ReadNextByte()

GWENHYWFAR_API int GWEN_Msg_ReadNextByte | ( | GWEN_MSG * | msg | ) |

References GWEN_Msg_ReadNextByte(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_ReadNextByte().

## GWEN_Msg_RewindCurrentPos()

GWENHYWFAR_API int GWEN_Msg_RewindCurrentPos | ( | GWEN_MSG * | msg | ) |

References GWEN_Msg_RewindCurrentPos(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_RewindCurrentPos().

## GWEN_Msg_SetBytesInBuffer()

GWENHYWFAR_API void GWEN_Msg_SetBytesInBuffer | ( | GWEN_MSG * | msg,
|  | uint32_t | i )

References GWEN_Msg_SetBytesInBuffer(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_SetBytesInBuffer().

## GWEN_Msg_SetDbParsedInfo()

GWENHYWFAR_API void GWEN_Msg_SetDbParsedInfo | ( | GWEN_MSG * | msg,
|  | GWEN_DB_NODE * | db )

References GWEN_Msg_SetDbParsedInfo(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_SetDbParsedInfo().

## GWEN_Msg_SetFlags()

GWENHYWFAR_API void GWEN_Msg_SetFlags | ( | GWEN_MSG * | msg,
|  | uint32_t | f )

References GWEN_Msg_SetFlags(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_SetFlags().

## GWEN_Msg_SetGroupId()

GWENHYWFAR_API void GWEN_Msg_SetGroupId | ( | GWEN_MSG * | msg,
|  | int | groupId )

References GWEN_Msg_SetGroupId(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_SetGroupId().

## GWEN_Msg_SetParsedPayloadOffset()

GWENHYWFAR_API void GWEN_Msg_SetParsedPayloadOffset | ( | GWEN_MSG * | msg,
|  | uint32_t | v )

References GWEN_Msg_SetParsedPayloadOffset(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_SetParsedPayloadOffset().

## GWEN_Msg_SetParsedPayloadSize()

GWENHYWFAR_API void GWEN_Msg_SetParsedPayloadSize | ( | GWEN_MSG * | msg,
|  | uint32_t | v )

References GWEN_Msg_SetParsedPayloadSize(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_SetParsedPayloadSize().

## GWEN_Msg_WriteBytesAt()

GWENHYWFAR_API int GWEN_Msg_WriteBytesAt | ( | GWEN_MSG * | msg,
|  | uint32_t | pos,
|  | const uint8_t * | bufferPtr,
|  | uint32_t | bufferLen )

References GWEN_Msg_WriteBytesAt(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_WriteBytesAt().

## GWEN_Msg_WriteUint16At()

GWENHYWFAR_API int GWEN_Msg_WriteUint16At | ( | GWEN_MSG * | msg,
|  | uint32_t | pos,
|  | uint16_t | v )

References GWEN_Msg_WriteUint16At(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_WriteUint16At().

## GWEN_Msg_WriteUint32At()

GWENHYWFAR_API int GWEN_Msg_WriteUint32At | ( | GWEN_MSG * | msg,
|  | uint32_t | pos,
|  | uint32_t | v )

References GWEN_Msg_WriteUint32At(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_WriteUint32At().

## GWEN_Msg_WriteUint64At()

GWENHYWFAR_API int GWEN_Msg_WriteUint64At | ( | GWEN_MSG * | msg,
|  | uint32_t | pos,
|  | uint64_t | v )

References GWEN_Msg_WriteUint64At(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_WriteUint64At().

## GWEN_Msg_WriteUint8At()

GWENHYWFAR_API int GWEN_Msg_WriteUint8At | ( | GWEN_MSG * | msg,
|  | uint32_t | pos,
|  | uint8_t | v )

References GWEN_Msg_WriteUint8At(), and GWENHYWFAR_API.

Referenced by GWEN_Msg_WriteUint8At().