/****************************************************************************
 * This file is part of the project AqHome.
 * AqHome (c) by 2023 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 AQHOME_REACT_UNIT_P_H
#define AQHOME_REACT_UNIT_P_H


#include "aqhome-react/types/unit.h"


struct AQHREACT_UNIT {
  GWEN_INHERIT_ELEMENT(AQHREACT_UNIT)
  GWEN_LIST_ELEMENT(AQHREACT_UNIT)

  AQH_OBJECT *aqHomeReact;
  char *typeName;
  char *description;
  char *id;

  uint32_t flags;
  uint64_t gpTimestamp;
  int gpInt;

  int nextInputPortId;

  AQHREACT_PORT_LIST *inputPortList;
  AQHREACT_PORT_LIST *outputPortList;

  AQHREACT_PARAM_LIST *paramList;

  AQHREACT_UNIT_INPUTDATA_FN inputDataFn;
  AQHREACT_UNIT_OUTPUTDATA_FN outputDataFn;
  AQHREACT_UNIT_GETPARAMBYNAME_FN getParamByNameFn;
  AQHREACT_UNIT_PROCESS_FN processFn;
  AQHREACT_UNIT_DUMP_FN dumpFn;
};


#endif

