1 #ifndef PROCESSVARIABLE_H_
2 #define PROCESSVARIABLE_H_
8 #include "tools/Guard.h"
9 #include "tools/ConcurrentList.h"
12 #include "storage/RawValue.h"
13 #include "storage/CtrlInfo.h"
16 #include "engine/Named.h"
17 #include "engine/ProcessVariableContext.h"
18 #include "engine/ProcessVariableListener.h"
151 size_t outstanding_gets;
157 static void connection_handler(
struct connection_handler_args arg);
158 static void control_callback(
struct event_handler_args arg);
159 static void value_callback(
struct event_handler_args);
161 bool setup_ctrl_info(
Guard &guard,
DbrType type,
const void *dbr_ctrl_xx);
162 void firePvConnected();
163 void firePvDisconnected();
190 state_listeners.
add(listener);
196 state_listeners.
remove(listener);
202 value_listeners.
add(listener);
208 value_listeners.
remove(listener);
Listener for ProcessVariable info.
Definition: ProcessVariableListener.h:31
bool isRunning(Guard &guard)
unsigned short DbrType
DbrType is used to hold dbr_time_xxx types.
Definition: RawValue.h:24
Not connected, but trying to connect.
Definition: ProcessVariable.h:57
void remove(T *item)
Definition: ConcurrentList.h:178
A mutex with informational name and lock order.
Definition: OrderedMutex.h:34
Meta-information for values: Units, limits, etc .
Definition: CtrlInfo.h:75
A named thingy.
Definition: Named.h:28
void subscribe(Guard &guard)
Subscribe for value updates.
void removeStateListener(ProcessVariableStateListener *listener)
Remove a ProcessVariableStateListener.
Definition: ProcessVariable.h:193
ProcessVariable(ProcessVariableContext &ctx, const char *name)
Create a ProcessVariable with given name.
const char * getCAStateStr(Guard &guard) const
void addValueListener(ProcessVariableValueListener *listener)
Add a ProcessVariableValueListener.
Definition: ProcessVariable.h:199
One process variable.
Definition: ProcessVariable.h:39
State getState(Guard &guard) const
DbrCount getDbrCount(Guard &guard) const
Get the array size of this PV.
Definition: ProcessVariable.h:177
Listener for ProcessVariable state info.
Definition: ProcessVariableListener.h:10
void addStateListener(ProcessVariableStateListener *listener)
Add a ProcessVariableStateListener.
Definition: ProcessVariable.h:187
Automatically takes and releases an epicsMutex.
Definition: Guard.h:63
const char * getStateStr(Guard &guard) const
Listener for ProcessVariable info.
Definition: ProcessVariableListener.h:47
unsigned short DbrCount
DbrCount is used to hold the array size of CA channels.
Definition: RawValue.h:27
void removeValueListener(ProcessVariableValueListener *listener)
Remove a ProcessVariableValueListener.
Definition: ProcessVariable.h:205
void unsubscribe(Guard &guard)
Unsubscribe, no more updates.
Received CA connection callback, getting control info.
Definition: ProcessVariable.h:59
Fully connected.
Definition: ProcessVariable.h:61
Interface for something that can be protected by a Guard.
Definition: Guard.h:49
Context for ProcessVariable instances.
Definition: ProcessVariableContext.h:18
void removeListener(ProcessVariableListener *listener)
Remove a ProcessVariableListener.
Definition: ProcessVariable.h:217
const CtrlInfo & getCtrlInfo(Guard &guard) const
Definition: ProcessVariable.h:182
void start(Guard &guard)
Start the connection mechanism.
OrderedMutex & getMutex()
bool isSubscribed(Guard &guard) const
Definition: ProcessVariable.h:223
void getValue(Guard &guard)
Perform a single 'get'.
bool isConnected(Guard &guard) const
Definition: ProcessVariable.h:167
virtual ~ProcessVariable()
Destructor.
void stop(Guard &guard)
Disconnect.
void add(T *item)
Definition: ConcurrentList.h:164
dbr_time_double Data
Type for accessing the raw data and its common fields.
Definition: RawValue.h:55
DbrType getDbrType(Guard &guard) const
Get the DBR_TIME_...
Definition: ProcessVariable.h:172
Not initialized.
Definition: ProcessVariable.h:55
void addListener(ProcessVariableListener *listener)
Add a ProcessVariableListener.
Definition: ProcessVariable.h:211
State
Possible states of a ProcessVariable.
Definition: ProcessVariable.h:52