13 #include <pv/pvAccess.h>
16 #include "pvahelper.h"
23 std::string type, channel, trigger, id;
26 Field() :putorder(std::numeric_limits<int>::min()) {}
29 std::swap(type, o.type);
30 std::swap(channel, o.channel);
31 std::swap(trigger, o.trigger);
32 std::swap(putorder, o.putorder);
38 typedef std::map<std::string, Field> fields_t;
40 bool atomic, atomic_set;
43 Group() :atomic(
true), atomic_set(
false) {}
46 std::swap(fields, o.fields);
47 std::swap(atomic, o.atomic);
48 std::swap(atomic_set, o.atomic_set);
53 typedef std::map<std::string, Group> groups_t;
58 std::swap(groups, o.groups);
59 std::swap(warning, o.warning);
62 static void parse(
const char *txt,
const char *recname,
68 void pdb_group_event(
void *user_arg,
struct dbChannel *chan,
69 int eventsRemaining,
struct db_field_log *pfl);
74 weak_pointer weakself;
75 inline shared_pointer shared_from_this() {
return shared_pointer(weakself); }
79 epics::pvData::BitSet scratch;
83 bool pgatomic, monatomic;
92 std::tr1::shared_ptr<PVIFBuilder> builder;
94 typedef std::vector<size_t> triggers_t;
97 p2p::auto_ptr<PVIF> pvif;
98 DBEvent evt_VALUE, evt_PROPERTY;
99 bool had_initial_VALUE, had_initial_PROPERTY, allowProc;
101 Info() :had_initial_VALUE(
false), had_initial_PROPERTY(
false), allowProc(
false) {}
103 typedef epics::pvData::shared_vector<Info> members_t;
108 epics::pvData::PVStructurePtr complete;
110 typedef std::set<PDBGroupMonitor*> interested_t;
111 bool interested_iterating;
112 interested_t interested, interested_add;
114 typedef std::set<BaseMonitor::shared_pointer> interested_remove_t;
115 interested_remove_t interested_remove;
117 size_t initial_waits;
119 static size_t num_instances;
125 epics::pvAccess::Channel::shared_pointer
126 connect(
const std::tr1::shared_ptr<PDBProvider>& prov,
127 const epics::pvAccess::ChannelRequester::shared_pointer& req) OVERRIDE FINAL;
131 void finalizeMonitor();
133 virtual void show(
int lvl) OVERRIDE;
137 public std::tr1::enable_shared_from_this<PDBGroupChannel>
141 PDBGroupPV::shared_pointer pv;
142 std::vector<ASCLIENT> aspvt;
146 static size_t num_instances;
149 const std::tr1::shared_ptr<epics::pvAccess::ChannelProvider>& prov,
150 const epics::pvAccess::ChannelRequester::shared_pointer& req);
153 virtual epics::pvAccess::ChannelPut::shared_pointer createChannelPut(
154 epics::pvAccess::ChannelPutRequester::shared_pointer
const & requester,
155 epics::pvData::PVStructure::shared_pointer
const & pvRequest) OVERRIDE FINAL;
156 virtual epics::pvData::Monitor::shared_pointer createMonitor(
157 epics::pvData::MonitorRequester::shared_pointer
const & requester,
158 epics::pvData::PVStructure::shared_pointer
const & pvRequest) OVERRIDE FINAL;
160 virtual void printInfo(std::ostream& out) OVERRIDE FINAL;
164 public std::tr1::enable_shared_from_this<PDBGroupPut>
167 typedef epics::pvAccess::ChannelPutRequester requester_t;
168 PDBGroupChannel::shared_pointer channel;
169 requester_type::weak_pointer requester;
175 epics::pvData::BitSetPtr changed;
176 epics::pvData::PVStructurePtr pvf;
177 std::vector<std::tr1::shared_ptr<PVIF> > pvif;
179 static size_t num_instances;
181 PDBGroupPut(
const PDBGroupChannel::shared_pointer &channel,
182 const epics::pvAccess::ChannelPutRequester::shared_pointer &requester,
183 const epics::pvData::PVStructure::shared_pointer& pvReq);
186 virtual void destroy() OVERRIDE FINAL { pvif.clear(); channel.reset(); requester.reset(); }
187 virtual std::tr1::shared_ptr<epics::pvAccess::Channel> getChannel() OVERRIDE FINAL {
return channel; }
188 virtual void cancel() OVERRIDE FINAL {}
189 virtual void lastRequest() OVERRIDE FINAL {}
191 epics::pvData::PVStructure::shared_pointer
const & pvPutStructure,
192 epics::pvData::BitSet::shared_pointer
const & putBitSet) OVERRIDE FINAL;
193 virtual void get() OVERRIDE FINAL;
200 PDBGroupPV::shared_pointer pv;
204 static size_t num_instances;
207 const requester_type::weak_pointer& requester,
208 const epics::pvData::PVStructure::shared_pointer& pvReq);
211 virtual void onStart() OVERRIDE FINAL;
212 virtual void onStop() OVERRIDE FINAL;
215 virtual void destroy() OVERRIDE FINAL;
virtual void requestUpdate() OVERRIDE FINAL