10 #ifdef epicsExportSharedSymbols
11 # define remoteEpicsExportSharedSymbols
12 # undef epicsExportSharedSymbols
20 #include <pv/serialize.h>
21 #include <pv/pvType.h>
22 #include <pv/byteBuffer.h>
24 #include <pv/pvData.h>
25 #include <pv/sharedPtr.h>
27 #ifdef remoteEpicsExportSharedSymbols
28 # define epicsExportSharedSymbols
29 # undef remoteEpicsExportSharedSymbols
32 #include <pv/pvaConstants.h>
33 #include <pv/configuration.h>
34 #include <pv/fairQueue.h>
35 #include <pv/pvaDefs.h>
38 #include <pv/pvAccess.h>
43 class TransportRegistry;
44 class ClientChannelImpl;
85 enum ApplicationCommands {
87 CMD_CONNECTION_VALIDATION = 1,
90 CMD_SEARCH_RESPONSE = 4,
93 CMD_CREATE_CHANNEL = 7,
94 CMD_DESTROY_CHANNEL = 8,
95 CMD_CONNECTION_VALIDATED = 9,
101 CMD_DESTROY_REQUEST = 15,
105 CMD_MULTIPLE_DATA = 19,
107 CMD_CANCEL_REQUEST = 21,
111 enum ControlCommands {
114 CMD_SET_ENDIANESS = 2
117 void hackAroundRTEMSSocketInterrupt();
128 virtual void startMessage(epics::pvData::int8 command, std::size_t ensureCapacity, epics::pvData::int32 payloadSize = 0) = 0;
129 virtual void endMessage() = 0;
131 virtual void flush(
bool lastMessageCompleted) = 0;
133 virtual void setRecipient(osiSockAddr
const & sendTo) = 0;
160 class ClientChannelImpl;
161 class SecuritySession;
166 class epicsShareClass
Transport :
public epics::pvData::DeserializableControl {
170 static size_t num_instances;
180 virtual bool acquire(std::tr1::shared_ptr<ClientChannelImpl>
const & client) = 0;
186 virtual void release(pvAccessID clientId) = 0;
194 virtual const osiSockAddr& getRemoteAddress()
const = 0;
196 virtual const std::string& getRemoteName()
const = 0;
204 virtual std::size_t getReceiveBufferSize()
const = 0;
210 virtual epics::pvData::int16 getPriority()
const = 0;
216 virtual void setRemoteTransportReceiveBufferSize(std::size_t receiveBufferSize) = 0;
222 virtual void setRemoteTransportSocketReceiveBufferSize(std::size_t socketReceiveBufferSize) = 0;
229 virtual void setByteOrder(
int byteOrder) = 0;
235 virtual void enqueueSendRequest(TransportSender::shared_pointer
const & sender) = 0;
240 virtual void flushSendQueue() = 0;
246 virtual void verified(epics::pvData::Status
const & status) = 0;
252 virtual bool verify(epics::pvData::int32 timeoutMs) = 0;
257 virtual void close() = 0;
266 virtual bool isClosed() = 0;
272 virtual void authNZMessage(epics::pvData::PVStructure::shared_pointer
const & data) = 0;
274 size_t _totalBytesSent;
275 size_t _totalBytesRecv;
279 class SecurityPlugin;
280 class AuthenticationRegistry;
291 virtual epics::pvData::Timer::shared_pointer getTimer() = 0;
293 virtual TransportRegistry* getTransportRegistry() = 0;
298 virtual Configuration::const_shared_pointer getConfiguration() = 0;
306 virtual std::tr1::shared_ptr<Channel> getChannel(pvAccessID
id) = 0;
307 virtual Transport::shared_pointer getSearchTransport() = 0;
317 static size_t num_instances;
333 handleResponse(osiSockAddr* responseFrom, Transport::shared_pointer
const & transport,
334 epics::pvData::int8 version, epics::pvData::int8 command, std::size_t payloadSize,
335 epics::pvData::ByteBuffer* payloadBuffer);
363 virtual pvAccessID
getIOID()
const = 0;
373 virtual void cancel() = 0;
386 virtual std::tr1::shared_ptr<ChannelBaseRequester>
getRequester() = 0;
394 virtual void response(Transport::shared_pointer
const & transport, epics::pvData::int8 version, epics::pvData::ByteBuffer* payloadBuffer) = 0;
virtual pvAccessID getIOID() const =0
Get I/O ID.
virtual void timeout()=0
Timeout notification.
ConnectionState
Channel connection status.
Interface defining transport (connection).
Not public IF, used by Transports, etc.
Interface defining transport send control.
Interface defining response handler.
Require reply (acknowledgment for reliable operation).
std::string _description
Response hanlder description.
virtual std::tr1::shared_ptr< ChannelBaseRequester > getRequester()=0
used by MessageHandler and reportChannelStateChange().
Best-effort option (no reply).
epics::pvData::int32 _debugLevel
Debug flag.
virtual void send(epics::pvData::ByteBuffer *buffer, TransportSendControl *control)=0
Called by transport.
virtual void response(Transport::shared_pointer const &transport, epics::pvData::int8 version, epics::pvData::ByteBuffer *payloadBuffer)=0
Notification response.
virtual void waitJoin()
Call after close() to wait for any worker threads to exit.
virtual void newServerDetected()=0
due to ClientContextImpl
Interface defining transport sender (instance sending data over transport).
virtual void cancel()=0
Cancel response request (always to be called to complete/destroy).
A request that expects an response.
virtual void handleResponse(osiSockAddr *responseFrom, Transport::shared_pointer const &transport, epics::pvData::int8 version, epics::pvData::int8 command, std::size_t payloadSize, epics::pvData::ByteBuffer *payloadBuffer)
Handle response.
virtual void reportStatus(Channel::ConnectionState status)=0
Report status to clients (e.g.