/************************************************************************************************************************
* control.c
**************************************************************************************************************************/
#ifndef MODULES_CONTROL_CONTROL_H_
#define MODULES_CONTROL_CONTROL_H_
////////////////////////////////State machine operation////////////////////////////////////
//the state machine operation is used to operate in runtime correct profile flow execution
//by recieved esign flow of the user from the UI
///////////////////////////////////////////////////////////////////////////////////////////
#include "include.h"
//typedef uint32_t (* DeviceDataFunction)(uint32_t deviceID, uint32_t *Value);
typedef uint32_t (* ControlCBFunction)(uint32_t IfIndex, uint32_t ReadValue);
typedef uint32_t (* DataReadCBFunction)( uint32_t Parameter1);
typedef enum {
eNoControl = 0,
eOneMillisecond = 1,
eTenMillisecond = 10,
eHundredMillisecond = 100,
eOneSecond = 1000,
eOneMinute = 60000
}CTRL_TIMING_ENUM;
typedef enum
{
IfTypeNone,
IfTypeThread,
IfTypeWinder,
IfTypeIDS,
IfTypeHeaters,
IfTypeWaste,
IfTypeMotors,
MAX_INTERFACE_TYPES
}SYSTEM_INTERFACE_TYPES_ID_ENUM;
void ControlInit(void);
void ControlStop(void);
void ControlStart(void);
uint32_t AddControlCallback( ControlCBFunction Callback, CTRL_TIMING_ENUM CtrlFrequency, DataReadCBFunction DriverfPtr, uint32_t IfIndex, uint32_t Parameter1, uint32_t Parameter2 );
int RemoveControlCallback(uint32_t deviceId, ControlCBFunction Callback );
uint32_t TemplateDataReadCBFunction (uint32_t deviceId, uint32_t Parameter1);
extern Task_Handle Control_Task_Handle;
#endif