![]() |
This is Unofficial EPICS BASE Doxygen Site
|
#include "codec.h"
Public Member Functions | |
AbstractCodec (bool serverFlag, size_t sendBufferSize, size_t receiveBufferSize, int32_t socketSendBufferSize, bool blockingProcessQueue) | |
virtual void | processControlMessage ()=0 |
virtual void | processApplicationMessage ()=0 |
virtual const osiSockAddr * | getLastReadBufferSocketAddress ()=0 |
virtual void | invalidDataStreamHandler ()=0 |
virtual void | readPollOne ()=0 |
virtual void | writePollOne ()=0 |
virtual void | scheduleSend ()=0 |
virtual void | sendCompleted ()=0 |
virtual bool | terminated ()=0 |
virtual int | write (epics::pvData::ByteBuffer *src)=0 |
virtual int | read (epics::pvData::ByteBuffer *dst)=0 |
virtual bool | isOpen ()=0 |
virtual | ~AbstractCodec () |
virtual void | alignBuffer (std::size_t alignment) OVERRIDE FINAL |
virtual void | ensureData (std::size_t size) OVERRIDE FINAL |
virtual void | alignData (std::size_t alignment) OVERRIDE FINAL |
virtual void | startMessage (epics::pvData::int8 command, std::size_t ensureCapacity=0, epics::pvData::int32 payloadSize=0) OVERRIDE FINAL |
void | putControlMessage (epics::pvData::int8 command, epics::pvData::int32 data) |
virtual void | endMessage () OVERRIDE FINAL |
virtual void | ensureBuffer (std::size_t size) OVERRIDE FINAL |
virtual void | flushSerializeBuffer () OVERRIDE FINAL |
virtual void | flush (bool lastMessageCompleted) OVERRIDE FINAL |
void | processWrite () |
void | processRead () |
void | processSendQueue () |
virtual void | enqueueSendRequest (TransportSender::shared_pointer const &sender) OVERRIDE FINAL |
void | enqueueSendRequest (TransportSender::shared_pointer const &sender, std::size_t requiredBufferSize) |
void | setSenderThread () |
virtual void | setRecipient (osiSockAddr const &sendTo) OVERRIDE FINAL |
virtual void | setByteOrder (int byteOrder) OVERRIDE FINAL |
virtual bool | directSerialize (epics::pvData::ByteBuffer *, const char *, std::size_t, std::size_t) OVERRIDE |
virtual bool | directDeserialize (epics::pvData::ByteBuffer *, char *, std::size_t, std::size_t) OVERRIDE |
bool | sendQueueEmpty () const |
epics::pvData::int8 | getRevision () const |
![]() | |
POINTER_DEFINITIONS (TransportSendControl) | |
virtual | ~TransportSendControl () |
![]() | |
virtual | ~SerializableControl () |
virtual void | cachedSerialize (std::tr1::shared_ptr< const Field > const &field, ByteBuffer *buffer)=0 |
![]() | |
POINTER_DEFINITIONS (Transport) | |
Transport () | |
virtual | ~Transport () |
virtual bool | acquire (std::tr1::shared_ptr< ClientChannelImpl > const &client)=0 |
virtual void | release (pvAccessID clientId)=0 |
virtual std::string | getType () const =0 |
virtual const osiSockAddr & | getRemoteAddress () const =0 |
virtual const std::string & | getRemoteName () const =0 |
virtual std::size_t | getReceiveBufferSize () const =0 |
virtual epics::pvData::int16 | getPriority () const =0 |
virtual void | setRemoteTransportReceiveBufferSize (std::size_t receiveBufferSize)=0 |
virtual void | setRemoteTransportSocketReceiveBufferSize (std::size_t socketReceiveBufferSize)=0 |
virtual void | flushSendQueue ()=0 |
virtual void | verified (epics::pvData::Status const &status)=0 |
virtual bool | verify (epics::pvData::int32 timeoutMs)=0 |
virtual void | close ()=0 |
virtual void | waitJoin () |
Call after close() to wait for any worker threads to exit. More... | |
virtual bool | isClosed ()=0 |
virtual void | authNZMessage (epics::pvData::PVStructure::shared_pointer const &data)=0 |
![]() | |
virtual | ~DeserializableControl () |
virtual std::tr1::shared_ptr< const Field > | cachedDeserialize (ByteBuffer *buffer)=0 |
Static Public Member Functions | |
static std::size_t | alignedValue (std::size_t value, std::size_t alignment) |
Public Attributes | |
epics::pvData::Mutex | _mutex |
![]() | |
size_t | _totalBytesSent |
size_t | _totalBytesRecv |
Static Public Attributes | |
static const std::size_t | MAX_MESSAGE_PROCESS = 100 |
static const std::size_t | MAX_MESSAGE_SEND = 100 |
static const std::size_t | MAX_ENSURE_SIZE = 1024 |
static const std::size_t | MAX_ENSURE_DATA_SIZE = MAX_ENSURE_SIZE/2 |
static const std::size_t | MAX_ENSURE_BUFFER_SIZE = MAX_ENSURE_SIZE |
static const std::size_t | MAX_ENSURE_DATA_BUFFER_SIZE = 1024 |
![]() | |
static size_t | num_instances |
Protected Member Functions | |
virtual void | sendBufferFull (int tries)=0 |
void | send (epics::pvData::ByteBuffer *buffer) |
void | flushSendBuffer () |
virtual void | setRxTimeout (bool ena) |
Protected Attributes | |
ReadMode | _readMode |
int8_t | _version |
int8_t | _flags |
int8_t | _command |
int32_t | _payloadSize |
epics::pvData::int32 | _remoteTransportSocketReceiveBufferSize |
osiSockAddr | _sendTo |
epicsThreadId | _senderThread |
WriteMode | _writeMode |
bool | _writeOpReady |
epics::pvData::ByteBuffer | _socketBuffer |
epics::pvData::ByteBuffer | _sendBuffer |
fair_queue< TransportSender > | _sendQueue |
const epics::pvData::int8 | _clientServerFlag |
epics::pvAccess::detail::AbstractCodec::AbstractCodec | ( | bool | serverFlag, |
size_t | sendBufferSize, | ||
size_t | receiveBufferSize, | ||
int32_t | socketSendBufferSize, | ||
bool | blockingProcessQueue | ||
) |
Definition at line 90 of file codec.cpp.
|
inlinevirtual |
|
virtual |
Add pad bytes to buffer.
alignment | alignment required. |
Implements epics::pvData::SerializableControl.
Definition at line 580 of file codec.cpp.
|
virtual |
Align buffer. Note that this takes care only current buffer alignment. If streaming protocol is used, care must be taken that entire stream is aligned.
alignment | size in bytes, must be power of two. |
Implements epics::pvData::DeserializableControl.
Definition at line 546 of file codec.cpp.
|
static |
Definition at line 537 of file codec.cpp.
|
virtual |
Method for deserializing array data. Hook for supplying custom deserialization implementation. The deserialization implementation need not be provided. Returns true if method performs deserialization, false otherwise. This should only be used for arrays of primitive types. i.e. boolean, byte,..., double. It cannot be called for string, structure, or union arrays.
existingBuffer | the existing buffer from the caller. |
deserializeTo | location of data. |
elementCount | number of elements. |
elementSize | element size. |
Implements epics::pvData::DeserializableControl.
|
virtual |
Method for serializing primitive array data. Hook for supplying custom serialization implementation. The serialization implementation need not be provided. Returns true if method performs serialization, false otherwise. This should only be used for arrays of primitive types, i. e. boolean, byte,..., double. It cannot be called for string, structure, or union arrays.
existingBuffer | the existing buffer from the caller. |
toSerialize | location of data to be put into buffer. |
elementCount | number of elements. |
elementSize | element size. |
Implements epics::pvData::SerializableControl.
Definition at line 961 of file codec.cpp.
|
virtual |
Implements epics::pvAccess::TransportSendControl.
Definition at line 632 of file codec.cpp.
|
virtual |
Enqueue send request.
sender |
Implements epics::pvAccess::Transport.
Definition at line 873 of file codec.cpp.
void epics::pvAccess::detail::AbstractCodec::enqueueSendRequest | ( | TransportSender::shared_pointer const & | sender, |
std::size_t | requiredBufferSize | ||
) |
Definition at line 928 of file codec.cpp.
|
virtual |
Make sure buffer has at least size bytes remaining. If not flush existing buffer and provide a new one.
size | The number of bytes. |
Implements epics::pvData::SerializableControl.
Definition at line 701 of file codec.cpp.
|
virtual |
Helper method. Ensures specified size of bytes, provides it if necessary.
size | The number of bytes. |
Implements epics::pvData::DeserializableControl.
Definition at line 423 of file codec.cpp.
|
virtual |
Implements epics::pvAccess::TransportSendControl.
Definition at line 747 of file codec.cpp.
|
protected |
Definition at line 726 of file codec.cpp.
|
virtual |
Done with this buffer. Flush it.
Implements epics::pvData::SerializableControl.
Definition at line 722 of file codec.cpp.
|
pure virtual |
Implemented in epics::pvAccess::detail::BlockingTCPTransportCodec.
|
inline |
Definition at line 205 of file codec.h.
|
pure virtual |
Implemented in epics::pvAccess::detail::BlockingTCPTransportCodec.
|
pure virtual |
Implemented in epics::pvAccess::detail::BlockingTCPTransportCodec.
|
pure virtual |
Implemented in epics::pvAccess::detail::BlockingTCPTransportCodec.
|
pure virtual |
Implemented in epics::pvAccess::detail::BlockingTCPTransportCodec.
void epics::pvAccess::detail::AbstractCodec::processRead | ( | ) |
void epics::pvAccess::detail::AbstractCodec::processSendQueue | ( | ) |
Definition at line 833 of file codec.cpp.
void epics::pvAccess::detail::AbstractCodec::processWrite | ( | ) |
Definition at line 762 of file codec.cpp.
void epics::pvAccess::detail::AbstractCodec::putControlMessage | ( | epics::pvData::int8 | command, |
epics::pvData::int32 | data | ||
) |
Definition at line 617 of file codec.cpp.
|
pure virtual |
Implemented in epics::pvAccess::detail::BlockingTCPTransportCodec.
|
pure virtual |
Implemented in epics::pvAccess::detail::BlockingTCPTransportCodec.
|
pure virtual |
Implemented in epics::pvAccess::detail::BlockingTCPTransportCodec.
|
protected |
Definition at line 776 of file codec.cpp.
|
protectedpure virtual |
Implemented in epics::pvAccess::detail::BlockingTCPTransportCodec.
|
pure virtual |
Implemented in epics::pvAccess::detail::BlockingTCPTransportCodec.
|
inline |
Definition at line 201 of file codec.h.
|
virtual |
Set byte order.
byteOrder | byte order to set. |
Implements epics::pvAccess::Transport.
Definition at line 952 of file codec.cpp.
|
virtual |
|
inlineprotectedvirtual |
Reimplemented in epics::pvAccess::detail::BlockingTCPTransportCodec.
void epics::pvAccess::detail::AbstractCodec::setSenderThread | ( | ) |
Definition at line 880 of file codec.cpp.
|
virtual |
Implements epics::pvAccess::TransportSendControl.
Definition at line 594 of file codec.cpp.
|
pure virtual |
Implemented in epics::pvAccess::detail::BlockingTCPTransportCodec.
|
pure virtual |
Implemented in epics::pvAccess::detail::BlockingTCPTransportCodec.
|
pure virtual |
Implemented in epics::pvAccess::detail::BlockingTCPTransportCodec.
|
protected |
|
protected |
|
protected |
|
mutable |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |