Files
aqhomecontrol/aqhome/msg/node/m_time.h
2026-03-15 20:21:30 +01:00

35 lines
1.5 KiB
C

/****************************************************************************
* This file is part of the project AqHome.
* AqHome (c) by 2026 Martin Preuss, all rights reserved.
*
* The license for this file can be found in the file COPYING which you
* should have received along with this file.
****************************************************************************/
#ifndef AQH_M_TIME_H
#define AQH_M_TIME_H
#include <aqhome/api.h>
#include <aqhome/ipc2/message.h>
#include <gwenhywfar/debug.h>
#include <gwenhywfar/timestamp.h>
AQHOME_API AQH_MESSAGE *AQH_TimeMessage_new(uint8_t destAddr, uint8_t srcAddr, uint8_t code, uint16_t msgId, const GWEN_TIMESTAMP *ts);
AQHOME_API uint32_t AQH_TimeMessage_GetUid(const AQH_MESSAGE *msg);
AQHOME_API uint16_t AQH_TimeMessage_GetMsgId(const AQH_MESSAGE *msg);
AQHOME_API uint16_t AQH_TimeMessage_GetYear(const AQH_MESSAGE *msg);
AQHOME_API uint8_t AQH_TimeMessage_GetMonth(const AQH_MESSAGE *msg);
AQHOME_API uint8_t AQH_TimeMessage_GetDayOfMonth(const AQH_MESSAGE *msg);
AQHOME_API uint8_t AQH_TimeMessage_GetDayOfWeek(const AQH_MESSAGE *msg);
AQHOME_API uint8_t AQH_TimeMessage_GetHour(const AQH_MESSAGE *msg);
AQHOME_API uint8_t AQH_TimeMessage_GetMinute(const AQH_MESSAGE *msg);
AQHOME_API uint8_t AQH_TimeMessage_GetSecond(const AQH_MESSAGE *msg);
AQHOME_API GWEN_TIMESTAMP *AQH_TimeMessage_GetTime(const AQH_MESSAGE *msg);
AQHOME_API void AQH_TimeMessage_DumpToBuffer(const AQH_MESSAGE *msg, GWEN_BUFFER *dbuf, const char *sText);
#endif