48 template <
typename InnerProtocol >
50 InnerProtocol ( aId , aUri )
52 std::string lPCIePath(
'/' + aUri.mPath );
54 std::cout <<
"Id: " << aId <<
", Path: " << lPCIePath << std::endl;
59 template <
typename InnerProtocol >
64 template <
typename InnerProtocol >
68 template <
typename InnerProtocol >
74 template <
typename InnerProtocol >
81 mDispatchBuffers = aBuffers;
86 template <
typename InnerProtocol >
90 if ( !mDispatchBuffers )
92 log (
Error() , __PRETTY_FUNCTION__ ,
" called when 'mDispatchBuffers' was NULL" );
100 mReplyBuffers = mDispatchBuffers;
101 mDispatchBuffers.reset();
106 template <
typename InnerProtocol >
109 if ( !mReplyBuffers )
111 log (
Error() , __PRETTY_FUNCTION__ ,
" called when 'mReplyBuffers' was NULL" );
122 mReplyBuffers.reset();
126 template <
typename InnerProtocol >
131 template <
typename InnerProtocol >
134 InnerProtocol::dispatchExceptionHandler();
PCIe & operator=(const PCIe &aPCIe)
void read()
Read next pending reply packet from appropriate page of FPGA-to-host device file, and validate conten...
An abstract base exception class providing an interface to a throw/ThrowAsDerivedType mechanism which...
virtual void dispatchExceptionHandler()
Function which tidies up this protocol layer in the event of an exception.
virtual void Flush()
Concrete implementation of the synchronization function to block until all buffers have been sent...
ValHeader write(const uint32_t &aValue) const
Write a single, unmasked word to a register.
void write(const boost::shared_ptr< Buffers > &aBuffers)
Write request packet to next page in host-to-FPGA device file.
void implementDispatch(boost::shared_ptr< Buffers > aBuffers)
Send the IPbus buffer to the target, read back the response and call the packing-protocol's validate ...
virtual exception::exception * validate(boost::shared_ptr< Buffers > aBuffers)
Function which dispatch calls when the reply is received to check that the headers are as expected...
Transport protocol to transfer an IPbus buffer via PCIe.
ValWord< uint32_t > read() const
Read a single, unmasked, unsigned word.
virtual ~PCIe()
Destructor.