More work on aqhome-react.

This commit is contained in:
Martin Preuss
2024-03-09 01:23:06 +01:00
parent 605d78a2b7
commit a3efa18a61
28 changed files with 1661 additions and 61 deletions

View File

@@ -12,6 +12,7 @@
#include "./inputslot_p.h"
#include "aqhome-react/types/unit.h"
#include <gwenhywfar/list.h>
#include <gwenhywfar/debug.h>
@@ -27,6 +28,8 @@ AQHREACT_INPUT_SLOT *AQHREACT_InputSlot_new()
GWEN_NEW_OBJECT(AQHREACT_INPUT_SLOT, inSlot);
GWEN_LIST_INIT(AQHREACT_INPUT_SLOT, inSlot);
inSlot->idForUnit=-1;
return inSlot;
}
@@ -54,7 +57,7 @@ AQHREACT_INPUT_SLOT *AQHREACT_InputSlot_dup(const AQHREACT_INPUT_SLOT *origSlot)
AQHREACT_InputSlot_SetName(inSlot, origSlot->name);
AQHREACT_InputSlot_SetDescription(inSlot, origSlot->description);
inSlot->idForUnit=origSlot->idForUnit;
inSlot->flags=origSlot->flags;
inSlot->flags=origSlot->flags & ~AQHREACT_UNIT_FLAGS_MULTI; /* don't copy MULTI flag */
inSlot->acceptedDataType=origSlot->acceptedDataType;
/* don't copy current dataObject */
return inSlot;

View File

@@ -25,7 +25,7 @@ AQHREACT_LINK *AQHREACT_Link_new()
GWEN_NEW_OBJECT(AQHREACT_LINK, lnk);
GWEN_LIST_INIT(AQHREACT_LINK, lnk);
lnk->targetInputSlotIdx=-1;
lnk->targetInputSlotIdForUnit=-1;
return lnk;
}
@@ -60,17 +60,17 @@ void AQHREACT_Link_SetTargetUnitId(AQHREACT_LINK *lnk, const char *s)
int AQHREACT_Link_GetTargetInputSlotIdx(const AQHREACT_LINK *lnk)
int AQHREACT_Link_GetTargetInputSlotIdForUnit(const AQHREACT_LINK *lnk)
{
return lnk?lnk->targetInputSlotIdx:-1;
return lnk?lnk->targetInputSlotIdForUnit:-1;
}
void AQHREACT_Link_SetTargetInputSlotIdx(AQHREACT_LINK *lnk, int i)
void AQHREACT_Link_SetTargetInputSlotIdForUnit(AQHREACT_LINK *lnk, int i)
{
if (lnk)
lnk->targetInputSlotIdx=i;;
lnk->targetInputSlotIdForUnit=i;
}

View File

@@ -27,8 +27,8 @@ void AQHREACT_Link_free(AQHREACT_LINK *lnk);
const char *AQHREACT_Link_GetTargetUnitId(const AQHREACT_LINK *lnk);
void AQHREACT_Link_SetTargetUnitId(AQHREACT_LINK *lnk, const char *s);
int AQHREACT_Link_GetTargetInputSlotIdx(const AQHREACT_LINK *lnk);
void AQHREACT_Link_SetTargetInputSlotIdx(AQHREACT_LINK *lnk, int i);
int AQHREACT_Link_GetTargetInputSlotIdForUnit(const AQHREACT_LINK *lnk);
void AQHREACT_Link_SetTargetInputSlotIdForUnit(AQHREACT_LINK *lnk, int i);
AQHREACT_UNIT *AQHREACT_Link_GetTargetUnit(const AQHREACT_LINK *lnk);
void AQHREACT_Link_SetTargetUnit(AQHREACT_LINK *lnk, AQHREACT_UNIT *unit);

View File

@@ -17,7 +17,7 @@ struct AQHREACT_LINK {
GWEN_LIST_ELEMENT(AQHREACT_LINK)
char *targetUnitId;
int targetInputSlotIdx;
int targetInputSlotIdForUnit;
AQHREACT_UNIT *targetUnit;
};

View File

@@ -28,6 +28,7 @@ AQHREACT_OUTPUT_SLOT *AQHREACT_OutputSlot_new()
GWEN_NEW_OBJECT(AQHREACT_OUTPUT_SLOT, outSlot);
GWEN_LIST_INIT(AQHREACT_OUTPUT_SLOT, outSlot);
outSlot->linkList=AQHREACT_Link_List_new();
outSlot->id=-1;
return outSlot;
}
@@ -46,6 +47,21 @@ void AQHREACT_OutputSlot_free(AQHREACT_OUTPUT_SLOT *outSlot)
int AQHREACT_OutputSlot_GetIdForUnit(const AQHREACT_OUTPUT_SLOT *outSlot)
{
return outSlot?outSlot->id:-1;
}
void AQHREACT_OutputSlot_SetIdForUnit(AQHREACT_OUTPUT_SLOT *outSlot, int i)
{
if (outSlot)
outSlot->id=i;
}
const char *AQHREACT_OutputSlot_GetName(const AQHREACT_OUTPUT_SLOT *outSlot)
{
return outSlot?outSlot->name:NULL;

View File

@@ -31,6 +31,9 @@ void AQHREACT_OutputSlot_SetName(AQHREACT_OUTPUT_SLOT *outSlot, const char *s);
const char *AQHREACT_OutputSlot_GetDescription(const AQHREACT_OUTPUT_SLOT *outSlot);
void AQHREACT_OutputSlot_SetDescription(AQHREACT_OUTPUT_SLOT *outSlot, const char *s);
int AQHREACT_OutputSlot_GetIdForUnit(const AQHREACT_OUTPUT_SLOT *outSlot);
void AQHREACT_OutputSlot_SetIdForUnit(AQHREACT_OUTPUT_SLOT *outSlot, int i);
uint32_t AQHREACT_OutputSlot_GetFlags(const AQHREACT_OUTPUT_SLOT *outSlot);
void AQHREACT_OutputSlot_SetFlags(AQHREACT_OUTPUT_SLOT *outSlot, uint32_t f);
void AQHREACT_OutputSlot_AddFlags(AQHREACT_OUTPUT_SLOT *outSlot, uint32_t f);

View File

@@ -16,8 +16,10 @@
struct AQHREACT_OUTPUT_SLOT {
GWEN_LIST_ELEMENT(AQHREACT_OUTPUT_SLOT)
int id;
char *name;
char *description;
int idForUnit;
uint32_t flags;
int emittedDataType;

View File

@@ -105,6 +105,21 @@ void AQHREACT_Unit_SetId(AQHREACT_UNIT *unit, const char *s)
int AQHREACT_Unit_GetNextInputSlotId(const AQHREACT_UNIT *unit)
{
return unit?unit->nextInputSlotId:-1;
}
void AQHREACT_Unit_SetNextInputSlotId(AQHREACT_UNIT *unit, int i)
{
if (unit)
unit->nextInputSlotId=i;
}
uint32_t AQHREACT_Unit_GetFlags(const AQHREACT_UNIT *unit)
{
return unit?unit->flags:0;
@@ -181,6 +196,108 @@ void AQHREACT_Unit_AddParam(AQHREACT_UNIT *unit, AQHREACT_PARAM *param)
AQHREACT_PARAM *AQHREACT_Unit_GetParamByName(const AQHREACT_UNIT *unit, const char *paramName)
{
if (unit && unit->paramList && paramName && *paramName) {
AQHREACT_PARAM *param;
param=AQHREACT_Param_List_First(unit->paramList);
while(param) {
const char *s;
s=AQHREACT_Param_GetName(param);
if (s && *s && strcasecmp(paramName, s)==0)
return param;
param=AQHREACT_Param_List_Next(param);
}
}
return NULL;
}
double AQHREACT_Unit_GetParamValueDouble(const AQHREACT_UNIT *unit, const char *paramName, double defVal)
{
AQHREACT_PARAM *param;
param=AQHREACT_Unit_GetParamByName(unit, paramName);
if (param) {
if (AQHREACT_Param_GetDataType(param)==AQHREACT_DATAOBJECTTYPE_DOUBLE) {
return AQHREACT_Param_GetDoubleValue(param);
}
else {
DBG_INFO(NULL, "Datatype for param \"%s/%s\" is not DOUBLE", (unit->name)?unit->name:"<unnamed>", paramName);
}
}
return defVal;
}
void AQHREACT_Unit_SetParamValueDouble(AQHREACT_UNIT *unit, const char *paramName, double val)
{
AQHREACT_PARAM *param;
param=AQHREACT_Unit_GetParamByName(unit, paramName);
if (param) {
if (AQHREACT_Param_GetDataType(param)==AQHREACT_DATAOBJECTTYPE_DOUBLE) {
AQHREACT_Param_SetDoubleValue(param, val);
}
else {
DBG_INFO(NULL, "Datatype for param \"%s/%s\" is not DOUBLE", (unit->name)?unit->name:"<unnamed>", paramName);
}
}
else {
DBG_INFO(NULL, "Param \"%s\" not found in unit %s", paramName, (unit->name)?unit->name:"<unnamed>");
}
}
const char *AQHREACT_Unit_GetParamValueString(const AQHREACT_UNIT *unit, const char *paramName, const char *defVal)
{
AQHREACT_PARAM *param;
param=AQHREACT_Unit_GetParamByName(unit, paramName);
if (param) {
if (AQHREACT_Param_GetDataType(param)==AQHREACT_DATAOBJECTTYPE_STRING) {
return AQHREACT_Param_GetStringValue(param);
}
else {
DBG_INFO(NULL, "Datatype for param \"%s/%s\" is not STRING", (unit->name)?unit->name:"<unnamed>", paramName);
}
}
else {
DBG_INFO(NULL, "Param \"%s\" not found in unit %s", paramName, (unit->name)?unit->name:"<unnamed>");
}
return defVal;
}
void AQHREACT_Unit_SetParamValueString(AQHREACT_UNIT *unit, const char *paramName, const char *val)
{
AQHREACT_PARAM *param;
param=AQHREACT_Unit_GetParamByName(unit, paramName);
if (param) {
if (AQHREACT_Param_GetDataType(param)==AQHREACT_DATAOBJECTTYPE_STRING) {
AQHREACT_Param_SetStringValue(param, val);
}
else {
DBG_INFO(NULL, "Datatype for param \"%s\" is not STRING", paramName);
}
}
else {
DBG_INFO(NULL, "Param \"%s\" not found in unit %s", paramName, (unit->name)?unit->name:"<unnamed>");
}
}
AQHREACT_UNIT_INPUTDATA_FN AQHREACT_Unit_SetInputDataFn(AQHREACT_UNIT *unit, AQHREACT_UNIT_INPUTDATA_FN f)
{
if (unit) {
@@ -209,12 +326,12 @@ AQHREACT_UNIT_PROCESS_FN AQHREACT_Unit_SetProcessFn(AQHREACT_UNIT *unit, AQHREAC
void AQHREACT_Unit_OutputData(AQHREACT_UNIT *unit, int slotIndex, const AQHREACT_DATAOBJECT *dataObject)
void AQHREACT_Unit_OutputData(AQHREACT_UNIT *unit, int slotIdForUnit, const AQHREACT_DATAOBJECT *dataObject)
{
if (unit && unit->outputSlotList) {
AQHREACT_OUTPUT_SLOT *slot;
slot=AQHREACT_Unit_GetOutputSlotAt(unit, slotIndex);
slot=AQHREACT_Unit_GetOutputSlotByIdForUnit(unit, slotIdForUnit);
if (slot) {
AQHREACT_LINK_LIST *linkList;
@@ -225,12 +342,12 @@ void AQHREACT_Unit_OutputData(AQHREACT_UNIT *unit, int slotIndex, const AQHREACT
lnk=AQHREACT_Link_List_First(linkList);
while(lnk) {
AQHREACT_UNIT *targetUnit;
int idx;
int targetSlotIdForUnit;
targetUnit=AQHREACT_Link_GetTargetUnit(lnk);
idx=AQHREACT_Link_GetTargetInputSlotIdx(lnk);
if (targetUnit && idx>=0)
AQHREACT_Unit_InputData(targetUnit, idx, dataObject);
targetSlotIdForUnit=AQHREACT_Link_GetTargetInputSlotIdForUnit(lnk);
if (targetUnit && targetSlotIdForUnit>=0)
AQHREACT_Unit_InputData(targetUnit, targetSlotIdForUnit, dataObject);
lnk=AQHREACT_Link_List_Next(lnk);
} /* while */
} /* if linkList */
@@ -240,11 +357,41 @@ void AQHREACT_Unit_OutputData(AQHREACT_UNIT *unit, int slotIndex, const AQHREACT
void AQHREACT_Unit_InputData(AQHREACT_UNIT *unit, int slotIndex, const AQHREACT_DATAOBJECT *dataObject)
void AQHREACT_Unit_OutputDoubleData(AQHREACT_UNIT *unit, int slotIndex, double data)
{
if (unit && unit->outputSlotList) {
AQHREACT_DATAOBJECT *dataObject;
dataObject=AQHREACT_DataObject_new();
AQHREACT_DataObject_SetDataType(dataObject, AQHREACT_DATAOBJECTTYPE_DOUBLE);
AQHREACT_DataObject_SetDoubleData(dataObject, data);
AQHREACT_Unit_OutputData(unit, slotIndex, dataObject);
AQHREACT_DataObject_free(dataObject);
}
}
void AQHREACT_Unit_OutputStringData(AQHREACT_UNIT *unit, int slotIndex, const char *data)
{
if (unit && unit->outputSlotList) {
AQHREACT_DATAOBJECT *dataObject;
dataObject=AQHREACT_DataObject_new();
AQHREACT_DataObject_SetDataType(dataObject, AQHREACT_DATAOBJECTTYPE_STRING);
AQHREACT_DataObject_SetStringData(dataObject, data);
AQHREACT_Unit_OutputData(unit, slotIndex, dataObject);
AQHREACT_DataObject_free(dataObject);
}
}
void AQHREACT_Unit_InputData(AQHREACT_UNIT *unit, int slotIdForUnit, const AQHREACT_DATAOBJECT *dataObject)
{
if (unit) {
if (unit->inputDataFn)
(unit->inputDataFn)(unit, slotIndex, dataObject);
(unit->inputDataFn)(unit, slotIdForUnit, dataObject);
else {
AQHREACT_Unit_ClearChangeFlagsInUnitAndInputSlots(unit);
}
@@ -261,16 +408,8 @@ int AQHREACT_Unit_Process(AQHREACT_UNIT *unit)
if (unit) {
if (unit->processFn)
return (unit->processFn)(unit);
else {
AQHREACT_INPUT_SLOT *slot;
unit->flags&=~AQHREACT_UNIT_FLAGS_CHANGED;
slot=AQHREACT_InputSlot_List_First(unit->inputSlotList);
while(slot) {
AQHREACT_InputSlot_SubFlags(slot, AQHREACT_UNIT_FLAGS_CHANGED);
slot=AQHREACT_InputSlot_List_Next(slot);
}
}
else
AQHREACT_Unit_ClearChangeFlagsInUnitAndInputSlots(unit);
}
return 0;
@@ -278,18 +417,17 @@ int AQHREACT_Unit_Process(AQHREACT_UNIT *unit)
AQHREACT_INPUT_SLOT *AQHREACT_Unit_GetInputSlotAt(AQHREACT_UNIT *unit, int idx)
AQHREACT_INPUT_SLOT *AQHREACT_Unit_GetInputSlotByIdForUnit(const AQHREACT_UNIT *unit, int id)
{
if (unit && unit->inputSlotList && idx>=0) {
if (unit && unit->inputSlotList && id>=0) {
AQHREACT_INPUT_SLOT *slot;
slot=AQHREACT_InputSlot_List_First(unit->inputSlotList);
while(slot && idx) {
while(slot) {
if (AQHREACT_InputSlot_GetIdForUnit(slot)==id)
return slot;
slot=AQHREACT_InputSlot_List_Next(slot);
idx--;
}
return slot;
}
return NULL;
@@ -297,15 +435,92 @@ AQHREACT_INPUT_SLOT *AQHREACT_Unit_GetInputSlotAt(AQHREACT_UNIT *unit, int idx)
AQHREACT_OUTPUT_SLOT *AQHREACT_Unit_GetOutputSlotAt(AQHREACT_UNIT *unit, int idx)
AQHREACT_INPUT_SLOT *AQHREACT_Unit_GetInputSlotByName(const AQHREACT_UNIT *unit, const char *s)
{
if (unit && unit->outputSlotList && idx>=0) {
if (unit && unit->inputSlotList && s && *s) {
AQHREACT_INPUT_SLOT *slot;
slot=AQHREACT_InputSlot_List_First(unit->inputSlotList);
while(slot) {
const char *slotName;
slotName=AQHREACT_InputSlot_GetName(slot);
if (slotName && *slotName && strcasecmp(slotName, s)==0)
return slot;
slot=AQHREACT_InputSlot_List_Next(slot);
}
}
return NULL;
}
AQHREACT_INPUT_SLOT *AQHREACT_Unit_GetOrCreateUnusedInputSlotByName(AQHREACT_UNIT *unit, const char *s)
{
if (unit && unit->inputSlotList && s && *s) {
AQHREACT_INPUT_SLOT *slot;
slot=AQHREACT_Unit_GetInputSlotByName(unit, s);
if (slot) {
uint32_t flags;
const char *slotName;
slotName=AQHREACT_InputSlot_GetName(slot);
flags=AQHREACT_InputSlot_GetFlags(slot);
if (!(flags & AQHREACT_UNIT_FLAGS_INUSE))
return slot;
if (flags & AQHREACT_UNIT_FLAGS_MULTI) { /* can we just duplicate existing? */
AQHREACT_INPUT_SLOT *newSlot;
newSlot=AQHREACT_InputSlot_dup(slot);
AQHREACT_InputSlot_SetIdForUnit(newSlot, (unit->nextInputSlotId)++);
AQHREACT_Unit_AddInputSlot(unit, newSlot);
return newSlot;
}
else {
DBG_INFO(NULL, "Slot \"%s\" found but in use, no multi flag", slotName);
}
}
}
return NULL;
}
AQHREACT_OUTPUT_SLOT *AQHREACT_Unit_GetOutputSlotByIdForUnit(const AQHREACT_UNIT *unit, int id)
{
if (unit && unit->outputSlotList && id>=0) {
AQHREACT_OUTPUT_SLOT *slot;
slot=AQHREACT_OutputSlot_List_First(unit->outputSlotList);
while(slot && idx) {
while(slot) {
if (AQHREACT_OutputSlot_GetIdForUnit(slot)==id)
return slot;
slot=AQHREACT_OutputSlot_List_Next(slot);
}
}
return NULL;
}
AQHREACT_OUTPUT_SLOT *AQHREACT_Unit_GetOutputSlotByName(const AQHREACT_UNIT *unit, const char *s)
{
if (unit && unit->outputSlotList && s && *s) {
AQHREACT_OUTPUT_SLOT *slot;
slot=AQHREACT_OutputSlot_List_First(unit->outputSlotList);
while(slot) {
const char *slotName;
slotName=AQHREACT_OutputSlot_GetName(slot);
if (slotName && *slotName && strcasecmp(slotName, s)==0)
return slot;
slot=AQHREACT_OutputSlot_List_Next(slot);
idx--;
}
return slot;
}
@@ -331,5 +546,25 @@ void AQHREACT_Unit_ClearChangeFlagsInUnitAndInputSlots(AQHREACT_UNIT *unit)
int AQHREACT_Unit_InputHasChanged(const AQHREACT_UNIT *unit)
{
if (unit) {
AQHREACT_INPUT_SLOT *slot;
if (unit->flags & AQHREACT_UNIT_FLAGS_CHANGED)
return 1;
slot=AQHREACT_InputSlot_List_First(unit->inputSlotList);
while(slot) {
if (AQHREACT_InputSlot_GetFlags(slot) & AQHREACT_UNIT_FLAGS_CHANGED)
return 1;
slot=AQHREACT_InputSlot_List_Next(slot);
}
}
return 0;
}

View File

@@ -31,7 +31,7 @@ GWEN_INHERIT_FUNCTION_DEFS(AQHREACT_UNIT)
#include "aqhome-react/types/param.h"
typedef void (*AQHREACT_UNIT_INPUTDATA_FN)(AQHREACT_UNIT *unit, int slotIndex, const AQHREACT_DATAOBJECT *dataObject);
typedef void (*AQHREACT_UNIT_INPUTDATA_FN)(AQHREACT_UNIT *unit, int slotIdForUnit, const AQHREACT_DATAOBJECT *dataObject);
typedef int (*AQHREACT_UNIT_PROCESS_FN)(AQHREACT_UNIT *unit);
@@ -48,6 +48,9 @@ void AQHREACT_Unit_SetDescription(AQHREACT_UNIT *unit, const char *s);
const char *AQHREACT_Unit_GetId(const AQHREACT_UNIT *unit);
void AQHREACT_Unit_SetId(AQHREACT_UNIT *unit, const char *s);
int AQHREACT_Unit_GetNextInputSlotId(const AQHREACT_UNIT *unit);
void AQHREACT_Unit_SetNextInputSlotId(AQHREACT_UNIT *unit, int i);
uint32_t AQHREACT_Unit_GetFlags(const AQHREACT_UNIT *unit);
void AQHREACT_Unit_SetFlags(AQHREACT_UNIT *unit, uint32_t i);
void AQHREACT_Unit_AddFlags(AQHREACT_UNIT *unit, uint32_t i);
@@ -55,22 +58,33 @@ void AQHREACT_Unit_SubFlags(AQHREACT_UNIT *unit, uint32_t i);
AQHREACT_INPUT_SLOT_LIST *AQHREACT_Unit_GetInputSlots(const AQHREACT_UNIT *unit);
void AQHREACT_Unit_AddInputSlot(AQHREACT_UNIT *unit, AQHREACT_INPUT_SLOT *inSlot);
AQHREACT_INPUT_SLOT *AQHREACT_Unit_GetInputSlotAt(AQHREACT_UNIT *unit, int idx);
AQHREACT_INPUT_SLOT *AQHREACT_Unit_GetInputSlotByIdForUnit(const AQHREACT_UNIT *unit, int id);
AQHREACT_INPUT_SLOT *AQHREACT_Unit_GetInputSlotByName(const AQHREACT_UNIT *unit, const char *s);
AQHREACT_OUTPUT_SLOT_LIST *AQHREACT_Unit_GetOutputSlots(const AQHREACT_UNIT *unit);
void AQHREACT_Unit_AddOutputSlot(AQHREACT_UNIT *unit, AQHREACT_OUTPUT_SLOT *outSlot);
AQHREACT_OUTPUT_SLOT *AQHREACT_Unit_GetOutputSlotAt(AQHREACT_UNIT *unit, int idx);
AQHREACT_OUTPUT_SLOT *AQHREACT_Unit_GetOutputSlotByIdForUnit(const AQHREACT_UNIT *unit, int idx);
AQHREACT_OUTPUT_SLOT *AQHREACT_Unit_GetOutputSlotByName(const AQHREACT_UNIT *unit, const char *s);
void AQHREACT_Unit_ClearChangeFlagsInUnitAndInputSlots(AQHREACT_UNIT *unit);
int AQHREACT_Unit_InputHasChanged(const AQHREACT_UNIT *unit);
AQHREACT_PARAM_LIST *AQHREACT_Unit_GetParamList(const AQHREACT_UNIT *unit);
void AQHREACT_Unit_AddParam(AQHREACT_UNIT *unit, AQHREACT_PARAM *param);
AQHREACT_PARAM *AQHREACT_Unit_GetParamByName(const AQHREACT_UNIT *unit, const char *s);
double AQHREACT_Unit_GetParamValueDouble(const AQHREACT_UNIT *unit, const char *s, double defVal);
void AQHREACT_Unit_SetParamValueDouble(AQHREACT_UNIT *unit, const char *paramName, double val);
const char *AQHREACT_Unit_GetParamValueString(const AQHREACT_UNIT *unit, const char *paramName, const char *defVal);
void AQHREACT_Unit_SetParamValueString(AQHREACT_UNIT *unit, const char *paramName, const char *val);
void AQHREACT_Unit_OutputData(AQHREACT_UNIT *unit, int slotIndex, const AQHREACT_DATAOBJECT *dataObject);
void AQHREACT_Unit_OutputDoubleData(AQHREACT_UNIT *unit, int slotIndex, double data);
void AQHREACT_Unit_OutputStringData(AQHREACT_UNIT *unit, int slotIndex, const char *data);
void AQHREACT_Unit_InputData(AQHREACT_UNIT *unit, int slotIndex, const AQHREACT_DATAOBJECT *dataObject);
void AQHREACT_Unit_InputData(AQHREACT_UNIT *unit, int slotIdForUnit, const AQHREACT_DATAOBJECT *dataObject);
int AQHREACT_Unit_Process(AQHREACT_UNIT *unit);

View File

@@ -23,6 +23,8 @@ struct AQHREACT_UNIT {
uint32_t flags;
int nextInputSlotId;
AQHREACT_INPUT_SLOT_LIST *inputSlotList;
AQHREACT_OUTPUT_SLOT_LIST *outputSlotList;