Started working on aqhome-nodes which will replace aqhomed.

This commit is contained in:
Martin Preuss
2023-09-13 23:31:02 +02:00
parent 161b979e84
commit 9b7d043682
49 changed files with 3143 additions and 258 deletions

View File

@@ -94,6 +94,22 @@ const char *AQH_Value2Msg_GetValueAsWindowStateString(const GWEN_MSG *msg)
const char *AQH_Value2Msg_GetValueTypeUnits(const GWEN_MSG *msg)
{
uint8_t t;
t=AQH_Value2Msg_GetValueType(msg);
switch(t) {
case AQH_MSG_VALUE2_TYPE_TEMP: return "Celsius";
case AQH_MSG_VALUE2_TYPE_HUMIDITY: return "%";
case AQH_MSG_VALUE2_TYPE_DOOR: return NULL;
default: break;
}
return NULL;
}
double AQH_Value2Msg_GetValue(const GWEN_MSG *msg)
{
if ((AQH_NodeMsg_GetMsgType(msg)==AQH_MSG_TYPE_VALUE2) &&

View File

@@ -34,6 +34,7 @@ AQHOME_API double AQH_Value2Msg_GetValue(const GWEN_MSG *msg);
AQHOME_API const char *AQH_Value2Msg_GetValueAsWindowStateString(const GWEN_MSG *msg);
AQHOME_API const char *AQH_Value2Msg_GetValueTypeName(const GWEN_MSG *msg);
AQHOME_API const char *AQH_Value2Msg_GetValueTypeUnits(const GWEN_MSG *msg);
AQHOME_API void AQH_Value2Msg_DumpToBuffer(const GWEN_MSG *msg, GWEN_BUFFER *dbuf, const char *sText);