5 #ifndef PVATESTCLIENT_H 6 #define PVATESTCLIENT_H 19 namespace epics {
namespace pvAccess {
20 class ChannelProvider;
55 virtual std::string name()
const =0;
56 virtual void cancel() =0;
57 virtual void show(std::ostream&)
const =0;
61 Operation(
const std::tr1::shared_ptr<Impl>&);
64 std::string name()
const;
69 bool valid()
const {
return !!impl; }
71 #if __cplusplus>=201103L 72 explicit operator bool()
const {
return valid(); }
75 typedef bool (
Operation::*bool_type)()
const;
77 operator bool_type()
const {
return valid() ? &Operation::valid : 0; }
83 friend epicsShareFunc ::std::ostream& operator<<(::std::ostream& strm,
const Operation&
op);
84 std::tr1::shared_ptr<Impl>
impl;
102 epics::pvData::PVStructure::const_shared_pointer
value;
105 epics::pvData::BitSet::const_shared_pointer
valid;
121 Monitor(
const std::tr1::shared_ptr<Impl>&);
125 std::string name()
const;
144 bool complete()
const;
160 epics::pvData::PVStructure::const_shared_pointer
root;
164 bool valid()
const {
return !!impl; }
166 #if __cplusplus>=201103L 167 explicit operator bool()
const {
return valid(); }
170 typedef bool (
Monitor::*bool_type)()
const;
172 operator bool_type()
const {
return valid() ? &Monitor::valid : 0; }
178 std::tr1::shared_ptr<Impl> impl;
233 std::tr1::shared_ptr<SImpl> simpl;
268 #if defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ < 305) 274 std::tr1::shared_ptr<Impl> impl;
297 ClientChannel(
const std::tr1::shared_ptr<epics::pvAccess::ChannelProvider>& provider,
298 const std::string& name,
303 std::string name()
const;
305 bool valid()
const {
return !!impl; }
307 #if __cplusplus>=201103L 308 explicit operator bool()
const {
return valid(); }
313 operator bool_type()
const {
return valid() ? &ClientChannel::valid : 0; }
322 virtual void getDone(
const GetEvent& evt)=0;
329 epics::pvData::PVStructure::const_shared_pointer pvRequest = epics::pvData::PVStructure::const_shared_pointer());
335 epics::pvData::PVStructure::const_shared_pointer
337 epics::pvData::PVStructure::const_shared_pointer pvRequest = epics::pvData::PVStructure::const_shared_pointer());
345 const epics::pvData::PVStructure::const_shared_pointer& arguments,
346 epics::pvData::PVStructure::const_shared_pointer pvRequest = epics::pvData::PVStructure::const_shared_pointer());
352 epics::pvData::PVStructure::const_shared_pointer
354 const epics::pvData::PVStructure::const_shared_pointer& arguments,
355 epics::pvData::PVStructure::const_shared_pointer pvRequest = epics::pvData::PVStructure::const_shared_pointer());
363 epics::pvData::PVStructure::const_shared_pointer
root;
371 epics::pvData::PVStructure::const_shared_pointer
previous;
385 virtual void putDone(
const PutEvent& evt)=0;
395 epics::pvData::PVStructure::const_shared_pointer pvRequest = epics::pvData::PVStructure::const_shared_pointer(),
396 bool getprevious =
false);
400 detail::PutBuilder put(
const epics::pvData::PVStructure::const_shared_pointer &pvRequest = epics::pvData::PVStructure::const_shared_pointer());
418 epics::pvData::PVStructure::const_shared_pointer pvRequest = epics::pvData::PVStructure::const_shared_pointer());
430 MonitorSync monitor(
const epics::pvData::PVStructure::const_shared_pointer& pvRequest = epics::pvData::PVStructure::const_shared_pointer(),
436 virtual void infoDone(
const InfoEvent& evt) =0;
445 const std::string& subfld = std::string());
458 void show(std::ostream& strm)
const;
460 std::tr1::shared_ptr<epics::pvAccess::Channel> getChannel();
469 epics::pvData::PVStructure::const_shared_pointer
request;
476 triple(
const std::string& name,
const V& value,
bool required =
true)
477 :name(name), required(required), value(value)
481 typedef std::list<triple<epics::pvData::AnyScalar> > scalars_t;
484 typedef std::list<triple<epics::pvData::shared_vector<const void> > > arrays_t;
491 :channel(channel), request(request)
495 scalars.push_back(scalars_t::value_type(name, value, required));
503 arrays.push_back(arrays_t::value_type(name, value, required));
508 return set(
name, epics::pvData::static_shared_vector_cast<
const void>(value), required);
510 void exec(
double timeout=3.0);
520 std::tr1::shared_ptr<Impl> impl;
535 const std::tr1::shared_ptr<epics::pvAccess::Configuration>& conf = std::tr1::shared_ptr<epics::pvAccess::Configuration>());
536 explicit ClientProvider(
const std::tr1::shared_ptr<epics::pvAccess::ChannelProvider>& provider);
539 std::string name()
const;
551 bool disconnect(
const std::string& name,
557 bool valid()
const {
return !!impl; }
559 #if __cplusplus>=201103L 560 explicit operator bool()
const {
return valid(); }
565 operator bool_type()
const {
return valid() ? &ClientProvider::valid : 0; }
580 epicsShareFunc ::std::ostream&
operator<<(::std::ostream& strm,
const Monitor& op);
588 #endif // PVATESTCLIENT_H Thrown by blocking methods of ClientChannel on operation timeout.
std::string message
set for event=Fail
ClientProvider()
Construct a null provider. All methods throw. May later be assigned from a valid ClientProvider.
std::tr1::shared_ptr< detail::SharedPut > put
Information on get/rpc completion.
TODO only here because of the Lockable.
Args(epics::pvData::BitSet &tosend, epics::pvData::BitSet &previousmask)
std::tr1::shared_ptr< const Structure > StructureConstPtr
epics::pvData::BitSet overrun
std::string name() const
Channel name or an empty string.
Handle for monitor subscription.
std::tr1::shared_ptr< Impl > impl
callback for get() and rpc()
epics::pvData::FieldConstPtr type
Type description resulting from getField operation. NULL unless event==Success.
Handle for in-progress get/put/rpc operation.
std::string message
Check when event==Fail.
virtual ~MonitorCallback()
bool connected
Is this a connection, or disconnection, event.
Information on put completion.
epics::pvData::PVStructure::const_shared_pointer root
epics::pvData::PVStructure::const_shared_pointer value
New data. NULL unless event==Success.
epics::pvData::BitSet::const_shared_pointer valid
const epics::pvData::BitSet & previousmask
epics::pvData::PVStructure::const_shared_pointer root
Callee must fill this in with an instance of the Structure passed as the 'build' argument.
std::basic_ostream< E, T > & operator<<(std::basic_ostream< E, T > &os, shared_ptr< Y > const &p)
APIs for the epicsMutex mutual exclusion semaphore.
bool operator<(shared_ptr< T > const &a, shared_ptr< U > const &b) BOOST_NOEXCEPT
Connection state change CB.
virtual ~ConnectCallback()
rtems_configuration_table Configuration
information on connect/disconnect
ClientChannel()
Construct a null channel. All methods throw. May later be assigned from a valid ClientChannel.
std::tr1::shared_ptr< const Field > FieldConstPtr
request cancelled before completion
Information on monitor subscription/queue change.
request ends in failure. Check message
epics::pvData::BitSet & tosend
Callee must set bits corresponding to the fields of 'root' which will actually be sent...
epics::pvData::PVStructure::const_shared_pointer previous
ChannelPut::shared_pointer op
Monitor event notification.
Channel creation options.