3#include "PGenericSocketManager.h"
5#include "PMockBackend.h"
6#include "data_stream_assert.h"
7#include "uhal/uhal.hpp"
14typedef PGenericSocketManager<std::string, PIpBusBackend, PMockBackend>
SocketManager;
16typedef SocketManager::Mock
Mock;
24 uint32_t
read()
const;
25 std::vector<uint32_t>
readBlock(
const uint32_t &aSize)
const;
28 bool write(
const uint32_t &aValue)
const;
29 bool writeBlock(
const std::vector<uint32_t> &aValues)
const;
43 PSocketMode::PSocketMode _mock_mode,
55 std::map<std::string, std::unique_ptr<Node>>
nodes;
56 bool write(
const std::string &nodeId,
const uint32_t &aValue);
57 uint32_t
read(
const std::string nodeId)
const;
59 const std::vector<uint32_t> &aValues)
const;
60 std::vector<uint32_t>
readBlock(
const std::string &nodeId,
61 const uint32_t &aSize)
const;
PSocketMode::PSocketMode mock_mode
virtual ~HwInterface()
Destructor for the HwInterface class.
std::vector< uint32_t > readBlock(const std::string &nodeId, const uint32_t &aSize) const
Reads a block of data from a specific node.
std::string connectionFilePath
bool write(const std::string &nodeId, const uint32_t &aValue)
Writes data to a specific node.
Node & getNode(const std::string nodeId)
Retrieves a node by its identifier.
bool writeBlock(const std::string &nodeId, const std::vector< uint32_t > &aValues) const
Writes a block of data to a specific node.
static SocketManager manager
std::map< std::string, std::unique_ptr< Node > > nodes
std::string mock_directory
uint32_t read(const std::string nodeId) const
Reads data from a specific node.
HwInterface(std::string connectionFilePath, std::string connectionId, PSocketMode::PSocketMode _mock_mode, std::string mock_directory="")
Constructor for the HwInterface class.
bool writeBlock(const std::vector< uint32_t > &aValues) const
Writes a block of data to a specific node.
uint32_t read() const
Reads a value from the node.
~Node()
Destructor for the Node class.
Node(HwInterface *_hwInterface, const std::string _nodeId)
Constructor for the Node class.
bool write(const uint32_t &aValue) const
Writes a value to the node.
std::vector< uint32_t > readBlock(const uint32_t &aSize) const
Reads a block of data from the node.
HwInterface * hwInterface
SocketManager::Backend Backend
PGenericSocketManager< std::string, PIpBusBackend, PMockBackend > SocketManager