45 ,connected_latched(
false)
70 DEBUG(
this, <<
key.first<<
" OPEN Local");
72 }
catch(std::exception& e){
77 DEBUG(
this, <<
key.first<<
" OPEN Not local "<<e.what());
81 DEBUG(
this, <<
key.first<<
" OPEN Remote ");
92 ->addNestedStructure(
"field")
94 ->addNestedStructure(
"record")
95 ->addNestedStructure(
"_options")
108 unsigned reqProcess = 0;
110 for(links_t::iterator it(
links.begin()), end(
links.end()); it!=end; ++it)
144 const char *proc =
"passive";
145 if((reqProcess&2) || force) {
147 }
else if(reqProcess&1) {
152 DEBUG(
this, <<
key.first<<
"Start put "<<doit);
165 for(links_t::iterator it(
links.begin()), end(
links.end()); it!=end; ++it)
189 DEBUG(
this, <<
key.first<<
" Put built");
242 pvaGlobal->
queue.
add(shared_from_this());
248 void pvaLinkChannel::run_dbProcess(
size_t idx)
250 dbCommon *precord = scan_records[idx];
252 if(scan_check_passive[idx] && precord->scan!=0) {
258 }
else if (precord->pact) {
262 precord->rpro =
TRUE;
269 void pvaLinkChannel::run()
271 bool requeue =
false;
282 DEBUG(
this, <<
key.first<<
" RUN "<<
"empty");
297 for(links_t::iterator it(
links.begin()), end(
links.end()); it!=end; ++it)
310 for(links_t::iterator it(
links.begin()), end(
links.end()); it!=end; ++it)
327 scan_records.clear();
328 scan_check_passive.clear();
329 scan_changed.clear();
331 for(links_t::iterator it(
links.begin()), end(
links.end()); it!=end; ++it)
336 if(!link->
plink)
continue;
349 DBManyLock ML(scan_records);
351 atomic_lock.swap(ML);
357 if(scan_records.empty()) {
360 }
else if(
isatomic && scan_records.size() > 1u) {
361 DBManyLocker L(atomic_lock);
363 for(
size_t i=0, N=scan_records.size();
i<N;
i++) {
368 for(
size_t i=0, N=scan_records.size();
i<N;
i++) {
376 pvaGlobal->
queue.
add(shared_from_this());
Operation put(PutCallback *cb, epics::pvData::PVStructure::const_shared_pointer pvRequest=epics::pvData::PVStructure::const_shared_pointer(), bool getprevious=false)
std::string message
set for event=Fail
const pvd::PVStructure::const_shared_pointer pvRequest
enum pvalink::pvaLinkConfig::pp_t pp
bool operator()(const pvaLink *L, const pvaLink *R) const
#define assert(exp)
Declare that a condition should be true.
#define epicsThreadPriorityMedium
struct dbCommon * precord
void put(bool force=false)
epics::pvData::BitSet proc_changed
virtual void putBuild(const epics::pvData::StructureConstPtr &build, pvac::ClientChannel::PutCallback::Args &args) OVERRIDE FINAL
std::tr1::shared_ptr< const void > previous_root
shared_ptr< T > static_pointer_cast(shared_ptr< U > const &r) BOOST_NOEXCEPT
LIBCOM_API const char *epicsStdCall epicsThreadGetNameSelf(void)
subscription interrupted due to loss of communication
std::tr1::shared_ptr< const Structure > StructureConstPtr
std::string name() const
Channel name or an empty string.
void add(const value_type &work)
void clear()
Clear contents. size() becomes 0.
std::pair< std::string, std::string > channels_key_t
static size_t num_instances
Handle for in-progress get/put/rpc operation.
subscription ends in cancellation
std::string message
Check when event==Fail.
PVString is special case, since it implements SerializableArray.
Information on put completion.
epics::pvData::PVStructure::const_shared_pointer root
virtual void putDone(const pvac::PutEvent &evt) OVERRIDE FINAL
Put operation is complete.
epics::pvData::PVStructure::const_shared_pointer root
Callee must fill this in with an instance of the Structure passed as the 'build' argument.
pvac::ClientProvider provider_remote
pvd::shared_vector< const void > put_scratch
enum pvac::PutEvent::event_t event
void swap(shared_vector_base &o)
Swap the contents of this vector with another.
bool logical_and(const BitSet &other) const
Returns true if any bit is set in both *this and other.
int errlogPrintf(const char *pFormat,...)
FORCE_INLINE const FieldCreatePtr & getFieldCreate()
virtual void monitorEvent(const pvac::MonitorEvent &evt) OVERRIDE FINAL
std::tr1::shared_ptr< PVStructure > PVStructurePtr
static size_t num_instances
Information on monitor subscription/queue change.
ClientChannel connect(const std::string &name, const ClientChannel::Options &conf=ClientChannel::Options())
const pvaGlobal_t::channels_key_t key
request ends in failure. Check message
enum pvac::MonitorEvent::event_t event
Class that holds the data for each possible scalar type.
std::tr1::shared_ptr< PVField > PVFieldPtr
pvd::shared_vector< const void > put_queue
epics::pvData::BitSet & tosend
Callee must set bits corresponding to the fields of 'root' which will actually be sent...
pvac::ClientProvider provider_local
Data queue not empty. Call Monitor::poll()
long copyDBF2PVD(const pvd::shared_vector< const void > &inbuf, const pvd::PVField::shared_pointer &outraw, pvd::BitSet &changed, const pvd::PVStringArray::const_svector &choices)
virtual ~pvaLinkChannel()
std::string fieldName
sub-field within addressed PVStructure
epics::pvData::BitSet changed
pvaLinkChannel(const pvaGlobal_t::channels_key_t &key, const epics::pvData::PVStructure::const_shared_pointer &pvRequest)
FORCE_INLINE const PVDataCreatePtr & getPVDataCreate()
subscription ends in an error
Monitor monitor(MonitorCallback *cb, epics::pvData::PVStructure::const_shared_pointer pvRequest=epics::pvData::PVStructure::const_shared_pointer())
const pvd::PVDataCreatePtr create
::epics::pvData::shared_vector< const T > const_svector
void start(unsigned nworkers=1, unsigned prio=epicsThreadPriorityLow)