1 #ifndef ARCHIVECHANNEL_H_
2 #define ARCHIVECHANNEL_H_
5 #include "tools/AutoPtr.h"
8 #include "storage/Index.h"
11 #include "engine/Named.h"
12 #include "engine/SampleMechanism.h"
13 #include "engine/EngineConfig.h"
14 #include "engine/ScanList.h"
29 const char* channel_name,
91 inline const stdList<class GroupInfo *>
getGroups(
Guard &guard)
const;
150 bool sample_mechanism_busy;
153 void waitWhileSampleMechanismBusy(
Guard &guard);
157 stdList<class GroupInfo *> disable_groups;
160 stdList<class GroupInfo *> groups;
166 inline bool canDisable(
Guard &guard)
const;
169 bool currently_disabling;
172 size_t disable_count;
176 inline const stdList<class GroupInfo *>
181 inline const stdList<class GroupInfo *>
183 return disable_groups;
190 return disable_count == groups.size();
193 inline bool ArchiveChannel::canDisable(
Guard& guard)
const {
194 return !disable_groups.empty();
198 return currently_disabling;
std::string getSampleInfo(Guard &guard)
const stdList< class GroupInfo * > getGroupsToDisable(Guard &guard) const
Definition: ArchiveChannel.h:182
A mutex with informational name and lock order.
Definition: OrderedMutex.h:34
bool isDisabling(Guard &guard) const
Definition: ArchiveChannel.h:197
void start(Guard &guard)
Start the sample mechanism.
bool isRunning(Guard &guard)
A named thingy.
Definition: Named.h:28
bool isConnected(Guard &guard) const
void disable(Guard &guard, const epicsTime &when)
Temporarily disable sampling.
virtual ~ArchiveChannel()
Destructor.
One process variable.
Definition: ProcessVariable.h:39
Global engine configuration parameters.
Definition: EngineConfig.h:14
void configure(ProcessVariableContext &ctx, ScanList &scan_list, double scan_period, bool monitor)
Configure or re-configure channel.
Automatically takes and releases an epicsMutex.
Definition: Guard.h:63
Sample Mechanism base, has a ProcessVariable and filters its values.
Definition: SampleMechanism.h:33
Listener for ProcessVariable info.
Definition: ProcessVariableListener.h:47
virtual OrderedMutex & getMutex()
void stop(Guard &guard)
Stop sampling.
bool isDisabled(Guard &guard) const
Definition: ArchiveChannel.h:186
virtual void pvDisconnected(ProcessVariable &pv, const epicsTime &when)
Implements ProcessVariableStateListener by forwrding connect/disconnect info to ArchiveChannelStateLi...
Interface for something that can be protected by a Guard.
Definition: Guard.h:49
Context for ProcessVariable instances.
Definition: ProcessVariableContext.h:18
unsigned long write(Guard &guard, Index &index)
Write samples to index.
virtual void pvConnected(ProcessVariable &pv, const epicsTime &when)
Implements ProcessVariableStateListener by forwrding connect/disconnect info to ArchiveChannelStateLi...
One archived channel.
Definition: ArchiveChannel.h:19
ArchiveChannel(EngineConfig &config, ProcessVariableContext &ctx, ScanList &scan_list, const char *channel_name, double scan_period, bool monitor)
Create channel with given name.
virtual void pvValue(ProcessVariable &pv, const RawValue::Data *data)
Implements ProcessVariableValueListener for handling enable/disable.
Base interface for the archiver's indices.
Definition: Index.h:16
void addToGroup(Guard &group_guard, class GroupInfo *group, Guard &channel_guard, bool disabling)
Add channel to a group.
A ScanList keeps track of Scannable items.
Definition: ScanList.h:43
void enable(Guard &guard, const epicsTime &when)
Re-enable sampling.
One element in the FUX tree.
Definition: FUX.h:51
A Group of channels.
Definition: GroupInfo.h:42
dbr_time_double Data
Type for accessing the raw data and its common fields.
Definition: RawValue.h:55
void addToFUX(Guard &guard, class FUX::Element *doc)
Append this channel to a FUX document.
const stdList< class GroupInfo * > getGroups(Guard &guard) const
Definition: ArchiveChannel.h:177