39#ifndef _uhal_ProtocolControlHub_hpp_
40#define _uhal_ProtocolControlHub_hpp_
63 UHAL_DEFINE_EXCEPTION_CLASS ( XMLfileMissingRequiredParameters , "Exception class to
handle the case where the received header does not match the expected header." )
84 template < typename InnerProtocol >
105 virtual void preamble ( std::shared_ptr< Buffers > aBuffers );
111 virtual uint32_t getPreambleSize();
117 virtual void predispatch ( std::shared_ptr< Buffers > aBuffers );
128 uint8_t* aSendBufferEnd ,
129 std::deque< std::pair< uint8_t* , uint32_t > >
::iterator aReplyStartIt ,
130 std::deque< std::pair< uint8_t* , uint32_t > >
::iterator aReplyEndIt );
139 virtual uint32_t getMaxNumberOfBuffers();
142 virtual void dispatchExceptionHandler();
145 static void translateErrorCode(std::ostream& aStream,
const uint16_t& aErrorCode);
Wrapper to generate a new Python exception type.
\rst Holds a reference to a Python object (no reference counting)
\rst Wraps a Python iterator so that it can also be used as a C++ input iterator
Transport protocol to transfer an IPbus buffer via ControlHub.
std::deque< tpreamble > mPreambles
A queue of preample structs making the memory used by the preambles persistent during the dispatch....
uint32_t mDeviceIPaddress
The IP address of the target device that is connected to the Control Hub.
std::mutex mPreamblesMutex
Mutex to be used when accessing mPreambles.
uint16_t mDevicePort
The port number of the target device that is connected to the Control Hub.
An abstract base exception class, including an interface to throw as the derived type (for passing ex...
#define UHAL_DEFINE_DERIVED_EXCEPTION_CLASS(ClassName, BaseClassName, ClassDescription)
Macro for simplifying the declaration and definition of derived exception types.
#define UHAL_DEFINE_EXCEPTION_CLASS(ClassName, ClassDescription)
std::pair< uint32_t, uint16_t > ExtractTargetID(const URI &aUri)
Extract an IP-address and port number from a URI object.
A struct representing the preamble which will be prepended to an IPbus buffer for the benefit of the ...
uint16_t * mSendWordCountPtr
The number of 32-bit words in the IPbus packet (legacy and could be removed)
uint32_t mReplyChunkByteCounter
A legacy counter.
uint16_t mReplyDevicePort
The returned target device ID (port number)
uint16_t mReplyErrorCode
An error code returned describing the status of the control hub.
uint32_t mReplyDeviceIPaddress
The returned target device ID (IP address)
Struct to store a URI when parsed by boost spirit.