42#ifndef _DUNEDAQ_UHALLIBS_PROTOCOLFLX_V0_HPP_
43#define _DUNEDAQ_UHALLIBS_PROTOCOLFLX_V0_HPP_
56#include "uhal/ClientInterface.hpp"
57#include "uhal/log/exception.hpp"
58#include "uhal/ProtocolIPbus.hpp"
60#include "flxcard/FlxCard.h"
83 uhal::exception::ClientTimeout,
84 "Exception class to handle the case in which the Felix device is invalid."
89 uhal::exception::ClientTimeout,
90 "Exception class to handle the case in which the Felix connection timed out."
94 FlxInitialisationError ,
95 uhal::exception::TransportLayerError ,
96 "Exception class to handle a failure to read from the specified device files during initialisation."
100 FlxCommunicationError ,
101 uhal::exception::TransportLayerError ,
102 "Exception class to handle a low-level seek/read/write
error after initialisation."
112 Card(
const std::string& aPath, u_int aLockMask);
115 const std::string& getPath()
const;
117 int getDeviceId()
const;
123 void read(
const uint32_t aAddr,
const uint32_t aNrWords, std::vector<uint32_t>& aValues);
125 void write(
const uint32_t aAddr,
const std::vector<std::pair<const uint8_t*, size_t> >& aData);
127 bool haveLock()
const;
135 static regmap_register_t* find_reg(
const std::string& aName );
151 template <
typename T>
154 operator T()
const {
return value;}
157 in >> std::hex >> out.value;
172 Flx (
const std::string& aId,
const uhal::URI& aUri );
186 void implementDispatch ( std::shared_ptr< uhal::Buffers > aBuffers );
189 virtual void Flush( );
193 virtual void dispatchExceptionHandler();
195 static std::string getSharedMemName(
const std::string& aPath);
205 uint32_t getMaxSendSize();
211 uint32_t getMaxReplySize();
223 void write(
const std::shared_ptr<uhal::Buffers>& aBuffers);
239 uint32_t mNumberOfPages, mPageSize,
mIndexNextPage, mPublishedReplyPageCount, mReadReplyPageCount;
Transport protocol to transfer an IPbus buffer via device file, using mmap.
std::deque< std::shared_ptr< uhal::Buffers > > mReplyQueue
The list of buffers still awaiting a reply.
std::chrono::microseconds mSleepDuration
bool mIPCExternalSessionActive
ipc::SharedMemObject< IPCMutex_t > mIPCMutex
std::chrono::steady_clock SteadyClock_t
std::unique_lock< IPCMutex_t > IPCScopedLock_t
uhal::exception::exception * mAsynchronousException
ipc::RobustMutex IPCMutex_t
IPbus< 2, 0 > InnerProtocol
uint64_t mIPCSessionCount
caught dunedaq::conffwk::Exception exception
UHAL_DEFINE_DERIVED_EXCEPTION_CLASS(Axi4LiteTimeout, uhal::exception::ClientTimeout, "Exception class to handle the case in " "which the Axi4Lite connection timed out.") UHAL_DEFINE_DERIVED_EXCEPTION_CLASS(Axi4LiteInitialisationError
friend std::istream & operator>>(std::istream &in, HexTo &out)
Factory couldn t std::string alg_name Invalid configuration error