29#ifndef INC_CINOSPROCESSIMAGECHANNEL_H
30#define INC_CINOSPROCESSIMAGECHANNEL_H
36#define DF_INOS_IMAGE_CHN_DEF_CHAR 0xffff
37#define DF_INOS_IMAGE_CHN_DEF_REAL 1.2345
38#define DF_INOS_IMAGE_CHN_DEF_INT 123456789
57class CINOSBusPortHandler;
64typedef float (*tpHook)(float, intid);
65typedef void (*tpConversion)(
char*, uint32, intid);
76 tpHook m_pInvFunction;
78 tpConversion m_pConversion;
90 uint32 m_uCharacteristics;
93 eFlgUnit = 0x00000001,
96 eFlgChar = 0x00000008,
97 eFlgLast = 0x00000010,
116 const char* GetName();
118 void Rename(
const char* apName);
125 ICACHE
virtual void Set(real64 arValue)
127 ICACHE
virtual void SetControl(real64 arValue)
130 ICACHE
virtual real64 Get()
131 {
return REAL64(0.0);};
134 #if defined(INOS_PROCESSIMAGE_OVERWRITE)
135 virtual void SetOverwrite(
bool abValue);
138 virtual bool GetOverwrite();
142 virtual void SetEnabled(
bool abValue);
144 virtual bool GetEnabled();
147 virtual void SetSimulated(
bool abValue);
149 virtual bool GetSimulated();
152 virtual void SetConfig(uint32 auConfig, uint32 auMask, uint32 auOffset=0);
154 virtual uint32 GetConfig(uint32 auOffset=0);
156 virtual void* GetConfigAdr(uint32 auOffset=0);
161 uint32 auCharacteristics=DF_INOS_IMAGE_CHN_DEF_CHAR,
162 real32 arLower=real32(DF_INOS_IMAGE_CHN_DEF_REAL),
163 real32 arUpper=real32(DF_INOS_IMAGE_CHN_DEF_REAL),
164 tpHook apInvHook=NULL
182 return m_pFirstHook!=NULL;
199 virtual uint32 GetCycleTimeNs();
201 virtual uint16 GetCycleNumber()
206 CINOSBusJob* apBusJob = 0){};
210 virtual uint16 GetCycleId() = 0;
213 virtual void SetCycleId(uint16 auCycleId, uint8 auBusId, CINOSBusPortHandler* apBusPortHandler){};
217 virtual void UpdateCycleId(uint16 auCycleId);
221 virtual uint8 GetBusId() = 0;
224 virtual CINOSBusJob* GetBusJob()
227 virtual CINOSBusPortHandler* GetBusPortHandler();
229 virtual uint32 GetOversampling();
231 virtual uint32 GetArrayLength();
233 virtual bool IsRaw32();
235 virtual bool IsRaw();
238 #ifdef INOS_USE_CUSTOMER_IMAGE_DATA
239 void* GetCustomerSpecificData()
const;
242 void SetCustomerSpecificData(
void* apData);
251 virtual void IwasMoved(uint32 auToNumber){};
253 virtual void SetDescription(
const char* apDescription);
262 friend class CINOSBusPortHandlerAdc;
263 friend class CINOSBusPortHandlerDac;
279 const char* m_pIncoName;
286 CINCOObject* m_pRegister;
290 #ifdef INOS_USE_CUSTOMER_IMAGE_DATA
296 void* m_pCustomerSpecificData;
301 CINCOObject* GetRegister();
307 {
return (strcmp(m_pName, aChannel.m_pName)<0);}
309 {
return (strcmp(m_pName, aChannel.m_pName)==0);}
310 int operator < (
const char* apName)
const
311 {
return (strcmp(m_pName, apName)<0);}
312 int operator == (
const char* apName)
const
313 {
return (strcmp(m_pName, apName)==0);}
321extern const char PROCESS_IMAGE_CHANNEL_DUMMY_NAME[];
#define DF_INOS_BUS_HOOK_ORDER_DEFAULT
bus hook order 'default'
Definition cinosbus.h:137
#define DECLARE_DYNAMIC(aClass)
Definition cinospartitionmemory.h:328
Definition cinosadcchannels.h:78
static CINOSBus * GetFirstBus()
Return first valid bus (aka "g_pBus[0]").
Definition cinosbus.h:604
Definition cinosdacchannels.h:77
Definition cinosposchannels.h:82
Definition cinosprocessimagechannel.h:111
void UnRegisterHook(uintid auHookId)
Unregister channel hook.
CINOSProcessImageChannel(const char *apName, uint16 auNumber, uint8 auParent)
uintid RegisterLastHook(tpHook apHook, intid aiId)
SINOSProcessImageChannelHook * GetFirstHookDescriptor()
Get first hook descriptor.
Definition cinosprocessimagechannel.h:172
virtual void UnRegisterBusHook(uintid auHookId)
unregister a previously registered bus hook
virtual void RegisterBusHook(uintid &auHookId, void *apHandler, void *apObject=0, int32 aiOrder=DF_INOS_BUS_HOOK_ORDER_DEFAULT)
Register hook and return hook id. The registered function will be called in the context of the corres...
uintid RegisterHook(tpHook apHook, intid aiId, char *apUnit=0, uint32 auCharacteristics=0xffff, real32 arLower=real32(1.2345), real32 arUpper=real32(1.2345), tpHook apInvHook=NULL)
register channel hook
SINOSProcessImageChannelHook * GetLastHookDescriptor()
Get last hook descriptor.
bool IsHooked()
Check if this channel has a hook or not.
Definition cinosprocessimagechannel.h:181
Definition cinosprocessimage.h:71
Definition cinosprocessimagechannel.h:71