aqhome-react: added unit for timer programs.
This commit is contained in:
49
apps/aqhome-react/units/u_timeprogram_p.h
Normal file
49
apps/aqhome-react/units/u_timeprogram_p.h
Normal file
@@ -0,0 +1,49 @@
|
||||
/****************************************************************************
|
||||
* This file is part of the project AqHome.
|
||||
* AqHome (c) by 2024 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 AQHOMEREACT_U_TIMEPROGRAM_P_H
|
||||
#define AQHOMEREACT_U_TIMEPROGRAM_P_H
|
||||
|
||||
|
||||
#include "./u_timeprogram.h"
|
||||
|
||||
#include "aqhome-react/aqhome_react.h"
|
||||
#include "aqhome-react/types/unit.h"
|
||||
#include "aqhome-react/types/prgrule.h"
|
||||
|
||||
#include <gwenhywfar/list.h>
|
||||
|
||||
|
||||
|
||||
typedef struct MODULE_TIMER_ACTION MODULE_TIMER_ACTION;
|
||||
typedef struct AQHREACT_UNIT_TIMEPROGRAM AQHREACT_UNIT_TIMEPROGRAM;
|
||||
|
||||
GWEN_LIST_FUNCTION_DEFS(MODULE_TIMER_ACTION, ModuleTimerAction)
|
||||
|
||||
|
||||
|
||||
struct MODULE_TIMER_ACTION {
|
||||
GWEN_LIST_ELEMENT(MODULE_TIMER_ACTION)
|
||||
|
||||
int hourMinutes;
|
||||
double value;
|
||||
};
|
||||
|
||||
|
||||
|
||||
struct AQHREACT_UNIT_TIMEPROGRAM {
|
||||
AQHREACT_PRGRULE_LIST *ruleList;
|
||||
MODULE_TIMER_ACTION_LIST *actionList;
|
||||
|
||||
int lastActionHour;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user