mqtt: added more message types, added test for them.

This commit is contained in:
Martin Preuss
2023-03-29 00:42:49 +02:00
parent a104b78f62
commit 40c3a3ee4e
10 changed files with 477 additions and 2 deletions

View File

@@ -133,6 +133,26 @@ const char *AQH_MqttMsg_MsgTypeToString(uint8_t t)
uint8_t AQH_MqttMsg_GetMsgTypeAndFlags(const GWEN_MSG *msg)
{
uint32_t msgLen;
msgLen=GWEN_Msg_GetBytesInBuffer(msg);
if (msgLen>0) {
const uint8_t *msgPtr;
msgPtr=GWEN_Msg_GetConstBuffer(msg);
return msgPtr[0];
}
return 0;
}
void _flagsToDb(uint8_t flags, GWEN_DB_NODE *dbDest, const char *varNameFlags, const char *varNameQos)
{
GWEN_DB_DeleteVar(dbDest, varNameFlags);