![]() |
This is Unofficial EPICS BASE Doxygen Site
|
#include "client.h"
Classes | |
struct | ConnectCallback |
Connection state change CB. More... | |
struct | GetCallback |
callback for get() and rpc() More... | |
struct | Impl |
struct | InfoCallback |
struct | MonitorCallback |
Monitor event notification. More... | |
struct | Options |
Channel creation options. More... | |
struct | PutCallback |
callbacks for put() More... | |
Public Member Functions | |
ClientChannel () | |
Construct a null channel. All methods throw. May later be assigned from a valid ClientChannel. More... | |
ClientChannel (const std::tr1::shared_ptr< epics::pvAccess::ChannelProvider > &provider, const std::string &name, const Options &opt=Options()) | |
~ClientChannel () | |
std::string | name () const |
Channel name or an empty string. More... | |
bool | valid () const |
operator bool_type () const | |
void | reset () |
Operation | get (GetCallback *cb, epics::pvData::PVStructure::const_shared_pointer pvRequest=epics::pvData::PVStructure::const_shared_pointer()) |
epics::pvData::PVStructure::const_shared_pointer | get (double timeout=3.0, epics::pvData::PVStructure::const_shared_pointer pvRequest=epics::pvData::PVStructure::const_shared_pointer()) |
Operation | rpc (GetCallback *cb, const epics::pvData::PVStructure::const_shared_pointer &arguments, epics::pvData::PVStructure::const_shared_pointer pvRequest=epics::pvData::PVStructure::const_shared_pointer()) |
epics::pvData::PVStructure::const_shared_pointer | rpc (double timeout, const epics::pvData::PVStructure::const_shared_pointer &arguments, epics::pvData::PVStructure::const_shared_pointer pvRequest=epics::pvData::PVStructure::const_shared_pointer()) |
Operation | put (PutCallback *cb, epics::pvData::PVStructure::const_shared_pointer pvRequest=epics::pvData::PVStructure::const_shared_pointer(), bool getprevious=false) |
detail::PutBuilder | put (const epics::pvData::PVStructure::const_shared_pointer &pvRequest=epics::pvData::PVStructure::const_shared_pointer()) |
Synchronious put operation. More... | |
Monitor | monitor (MonitorCallback *cb, epics::pvData::PVStructure::const_shared_pointer pvRequest=epics::pvData::PVStructure::const_shared_pointer()) |
MonitorSync | monitor (const epics::pvData::PVStructure::const_shared_pointer &pvRequest=epics::pvData::PVStructure::const_shared_pointer(), epicsEvent *event=0) |
Operation | info (InfoCallback *cb, const std::string &subfld=std::string()) |
epics::pvData::FieldConstPtr | info (double timeout=3.0, const std::string &subfld=std::string()) |
Synchronious getField opreation. More... | |
void | addConnectListener (ConnectCallback *) |
void | removeConnectListener (ConnectCallback *) |
Remove from list of listeners. More... | |
void | show (std::ostream &strm) const |
Friends | |
class | ClientProvider |
void | detail::registerRefTrack () |
epicsShareFunc::std::ostream & | operator<< (::std::ostream &strm, const ClientChannel &op) |
Represents a single channel
This class has two sets of methods, those which block for completion, and those which use callbacks to signal completion.
Those which block accept a 'timeout' argument (in seconds).
Those which use callbacks accept a 'cb' argument and return an Operation or Monitor handle object.
|
inline |
Construct a null channel. All methods throw. May later be assigned from a valid ClientChannel.
pvac::ClientChannel::ClientChannel | ( | const std::tr1::shared_ptr< epics::pvAccess::ChannelProvider > & | provider, |
const std::string & | name, | ||
const Options & | opt = Options() |
||
) |
Construct a ClientChannel using epics::pvAccess::ChannelProvider::createChannel()
Does not block.
std::logic_error | if the provider is NULL or name is an empty string |
std::runtime_error | if the ChannelProvider can't provide |
pvac::ClientChannel::~ClientChannel | ( | ) |
Definition at line 156 of file client.cpp.
void pvac::ClientChannel::addConnectListener | ( | ConnectCallback * | cb | ) |
Append to list of listeners
cb | Channel dis/connect notification callback. Must outlive ClientChannel or call to removeConnectListener() |
Definition at line 163 of file client.cpp.
Operation pvac::ClientChannel::get | ( | ClientChannel::GetCallback * | cb, |
epics::pvData::PVStructure::const_shared_pointer | pvRequest = epics::pvData::PVStructure::const_shared_pointer() |
||
) |
Issue request to retrieve current PV value
cb | Completion notification callback. Must outlive Operation (call Operation::cancel() to force release) |
pvRequest | if NULL defaults to "field()". |
Definition at line 151 of file clientGet.cpp.
epics::pvData::PVStructure::const_shared_pointer pvac::ClientChannel::get | ( | double | timeout = 3.0 , |
epics::pvData::PVStructure::const_shared_pointer | pvRequest = epics::pvData::PVStructure::const_shared_pointer() |
||
) |
Block and retrieve current PV value
timeout | in seconds |
pvRequest | if NULL defaults to "field()". |
Timeout | or std::runtime_error |
Operation pvac::ClientChannel::info | ( | InfoCallback * | cb, |
const std::string & | subfld = std::string() |
||
) |
Request PV type info.
Definition at line 99 of file clientInfo.cpp.
epics::pvData::FieldConstPtr pvac::ClientChannel::info | ( | double | timeout = 3.0 , |
const std::string & | subfld = std::string() |
||
) |
Synchronious getField opreation.
Definition at line 407 of file clientSync.cpp.
Monitor pvac::ClientChannel::monitor | ( | MonitorCallback * | cb, |
epics::pvData::PVStructure::const_shared_pointer | pvRequest = epics::pvData::PVStructure::const_shared_pointer() |
||
) |
Begin subscription
cb | Completion notification callback. Must outlive Monitor (call Monitor::cancel() to force release) |
Definition at line 241 of file clientMonitor.cpp.
MonitorSync pvac::ClientChannel::monitor | ( | const epics::pvData::PVStructure::const_shared_pointer & | pvRequest = epics::pvData::PVStructure::const_shared_pointer() , |
epicsEvent * | event = 0 |
||
) |
Begin subscription w/o callbacks
event | If not NULL, then subscription events are signaled to this epicsEvent. Use MonitorSync::test() to see if a subscription has an event waiting. Otherwise an internal epicsEvent is allocated for use with MonitorSync::wait() |
Definition at line 371 of file clientSync.cpp.
std::string pvac::ClientChannel::name | ( | ) | const |
Channel name or an empty string.
Definition at line 158 of file client.cpp.
Operation pvac::ClientChannel::put | ( | PutCallback * | cb, |
epics::pvData::PVStructure::const_shared_pointer | pvRequest = epics::pvData::PVStructure::const_shared_pointer() , |
||
bool | getprevious = false |
||
) |
Initiate request to change PV
cb | Completion notification callback. Must outlive Operation (call Operation::cancel() to force release) |
pvRequest | if NULL defaults to "field()". |
getprevious | If true, fetch a previous value of the PV and make this available as PutCallback::Args::previous and previousmask. If false, then previous=NULL |
Definition at line 211 of file clientPut.cpp.
void pvac::ClientChannel::removeConnectListener | ( | ConnectCallback * | cb | ) |
Remove from list of listeners.
Definition at line 185 of file client.cpp.
|
inline |
Operation pvac::ClientChannel::rpc | ( | GetCallback * | cb, |
const epics::pvData::PVStructure::const_shared_pointer & | arguments, | ||
epics::pvData::PVStructure::const_shared_pointer | pvRequest = epics::pvData::PVStructure::const_shared_pointer() |
||
) |
Start an RPC call
cb | Completion notification callback. Must outlive Operation (call Operation::cancel() to force release) |
arguments | encoded call arguments |
pvRequest | if NULL defaults to "field()". |
Definition at line 158 of file clientRPC.cpp.
pvd::PVStructure::const_shared_pointer pvac::ClientChannel::rpc | ( | double | timeout, |
const epics::pvData::PVStructure::const_shared_pointer & | arguments, | ||
epics::pvData::PVStructure::const_shared_pointer | pvRequest = epics::pvData::PVStructure::const_shared_pointer() |
||
) |
Block and execute remote call
timeout | in seconds |
arguments | encoded call arguments |
pvRequest | if NULL defaults to "field()". |
Definition at line 91 of file clientSync.cpp.
void pvac::ClientChannel::show | ( | std::ostream & | strm | ) | const |
Definition at line 206 of file client.cpp.
|
inline |
|
friend |
|
friend |
|
friend |
Definition at line 346 of file client.cpp.