INOS
cinosprocessimagevalue.h
Go to the documentation of this file.
1//******************************************************************************
27//******************************************************************************
28
29#ifndef INC_CINOSPROCESSIMAGEVALUE_H
30#define INC_CINOSPROCESSIMAGEVALUE_H
31
32//------------------------------------------------------------------------------
33// defines
34//------------------------------------------------------------------------------
35//
36//
37//------------------------------------------------------------------------------
38// includes
39//------------------------------------------------------------------------------
40//
41// system
42//
43// C++
44//
45// project
46//
47//------------------------------------------------------------------------------
48// class definition
49//------------------------------------------------------------------------------
50//
52{
53 //--- user interface ---------------------------------------------------
54
55 // public member functions
56 public :
57 virtual uint16 GetCycleNumber() override;
58 //; return bus subcycle number the channel is updated (needed to be
59 //; able to register bus hook in the correct subcycle)
60 virtual void SetCycleNumber(uint16 auCycleNumber, uint8 auBusId = CINOSBus::GetFirstBus()->GetId(),
61 CINOSBusJob* apBusJob = 0) override;
62 //; set bus id and subcycle number the channel is updated (the field bus
63 //; driver has to set this number to inform all others who are
64 //; interested in)
65 virtual uint16 GetCycleId() override;
66 //; return bus cycle id the channel is updated (needed to be
67 //; able to register bus hook in the correct cycle/core)
68 virtual void SetCycleId(uint16 auCycleId, uint8 auBusId, CINOSBusPortHandler* apBusPortHandler) override;
69 //; set bus id and subcycle number the channel is updated (the field bus
70 //; driver has to set this number to inform all others who are
71 //; interested in)
72 virtual uint8 GetBusId() override;
73 //; return bus id the channel belongs to (needed to be
74 //; able to register bus hook)
75 virtual CINOSBusJob* GetBusJob() override;
76 //; return pointer to the according bus job (or 0 if not available)
77 virtual void GetUnit(char* apUnit, uint32 auSize);
78 //; get channel unit
79 virtual uint32 GetCharacteristics();
80 //; get inco characteristics
81 virtual real64 GetMinimum();
82 //; get inco minimum
83 virtual real64 GetMaximum();
84 //; get inco maximum
85 template<class T> T GetValueEx(uint32 auIndex = 0)
86 //; return value in the requested form (calling this method is only
87 //; useful if the caller exactly knows about the type of the channel)
88 { return *((T*)m_pValue+auIndex); };
89 template<class T> void SetValueEx(T aValue, uint32 auIndex = 0)
90 //; return value in the requested form (calling this method is only
91 //; useful if the caller exactly knows about the type of the channel)
92 { *((T*)m_pValue+auIndex) = aValue; };
93
94 //--- internals --------------------------------------------------------
95
96 // constructor / destructor
97 public :
98 CINOSProcessImageValue (const char* apName, uint32 auNumber, uint8 auParent,
99 uint16 auArrayLength);
100 //; object constructor
101
102 // protected members
103 protected :
105 void* m_pValue;
106};
107
108//
109//------------------------------------------------------------------------------
110// global variables
111//------------------------------------------------------------------------------
112//
113//
114//------------------------------------------------------------------------------
115// end of file
116//------------------------------------------------------------------------------
117
118#endif // INC_CINOSPROCESSIMAGEVALUE_H
static CINOSBus * GetFirstBus()
Return first valid bus (aka "g_pBus[0]").
Definition cinosbus.h:604
Definition cinosprocessimagechannel.h:111
Definition cinosprocessimagevalue.h:52
void * m_pValue
pointer to value
Definition cinosprocessimagevalue.h:105