More work on aqhome-react.
- added some units - added some types
This commit is contained in:
42
apps/aqhome-react/units/u_timer.c
Normal file
42
apps/aqhome-react/units/u_timer.c
Normal file
@@ -0,0 +1,42 @@
|
||||
/****************************************************************************
|
||||
* 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.
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include <config.h>
|
||||
#endif
|
||||
|
||||
#include "./u_timer.h"
|
||||
#include "./u_passthrough.h"
|
||||
|
||||
#include <gwenhywfar/debug.h>
|
||||
|
||||
|
||||
|
||||
AQHREACT_UNIT *AqHomeReact_UnitTimer_new(void)
|
||||
{
|
||||
AQHREACT_UNIT *unit;
|
||||
|
||||
unit=AqHomeReact_UnitPassthrough_new();
|
||||
AQHREACT_Unit_SetName(unit, "timer");
|
||||
AQHREACT_Unit_SetDescription(unit, "Periodically generate a timer signal");
|
||||
|
||||
return unit;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void AqHomeReact_UnitTimer_GenerateTick(AQHREACT_UNIT *unit)
|
||||
{
|
||||
AQHREACT_Unit_OutputDoubleData(unit, AQHOMEREACT_UNIT_PASSTHROUGH_OUTSLOT_OUTPUT, 1.0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user