μHAL (v2.8.17)
Part of the IPbus software repository
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
DummyClient.hpp
Go to the documentation of this file.
1#ifndef _uhal_tests_DummyClient_hpp_
2#define _uhal_tests_DummyClient_hpp_
3
5
6#include <iostream>
7
8
9namespace uhal {
10 namespace tests {
11
14 public:
15 DummyClient ( const std::string& aId, const URI& aUri );
17
18 private:
19
20 void implementDispatch ( std::shared_ptr< Buffers > aBuffers );
21
23
24 ValHeader implementWrite ( const uint32_t& aAddr, const uint32_t& aValue );
25
26 ValHeader implementWriteBlock ( const uint32_t& aAddr, const std::vector< uint32_t >& aValues, const defs::BlockReadWriteMode& aMode );
27
28 ValWord< uint32_t > implementRead ( const uint32_t& aAddr, const uint32_t& aMask );
29
30 ValVector< uint32_t > implementReadBlock ( const uint32_t& aAddr, const uint32_t& aSize, const defs::BlockReadWriteMode& aMode );
31
32 ValWord< uint32_t > implementRMWbits ( const uint32_t& aAddr , const uint32_t& aANDterm , const uint32_t& aORterm );
33
34 ValWord< uint32_t > implementRMWsum ( const uint32_t& aAddr , const int32_t& aAddend );
35
36 exception::exception* validate ( uint8_t* aSendBufferStart ,
37 uint8_t* aSendBufferEnd ,
38 std::deque< std::pair< uint8_t* , uint32_t > >::iterator aReplyStartIt ,
39 std::deque< std::pair< uint8_t* , uint32_t > >::iterator aReplyEndIt );
40
41 uint32_t getMaxNumberOfBuffers();
42
43 uint32_t getMaxSendSize();
44
45 uint32_t getMaxReplySize();
46 };
47
48 }
49}
50#endif
\rst Wraps a Python iterator so that it can also be used as a C++ input iterator
Definition: pytypes.h:1102
An abstract base class for defining the interface to the various IPbus clients as well as providing t...
A class which wraps a single word of data and marks whether or not it is valid.
Definition: ValMem.hpp:147
An abstract base exception class, including an interface to throw as the derived type (for passing ex...
Definition: exception.hpp:71
Empty client class, written to test registration.
Definition: DummyClient.hpp:13
ValVector< uint32_t > implementReadBlock(const uint32_t &aAddr, const uint32_t &aSize, const defs::BlockReadWriteMode &aMode)
Read a block of unsigned data from a block of registers or a block-read port.
Definition: DummyClient.cpp:45
void implementDispatch(std::shared_ptr< Buffers > aBuffers)
Pure virtual function which actually performs the dispatch operation.
Definition: DummyClient.cpp:21
ValWord< uint32_t > implementRMWsum(const uint32_t &aAddr, const int32_t &aAddend)
Read the value of a register, add the addend, set the register to this new value and return a copy of...
Definition: DummyClient.cpp:55
exception::exception * validate(uint8_t *aSendBufferStart, uint8_t *aSendBufferEnd, std::deque< std::pair< uint8_t *, uint32_t > >::iterator aReplyStartIt, std::deque< std::pair< uint8_t *, uint32_t > >::iterator aReplyEndIt)
Function which the dispatch calls when the reply is received to check that the headers are as expecte...
Definition: DummyClient.cpp:60
ValHeader implementWriteBlock(const uint32_t &aAddr, const std::vector< uint32_t > &aValues, const defs::BlockReadWriteMode &aMode)
Write a block of data to a block of registers or a block-write port.
Definition: DummyClient.cpp:35
ValWord< uint32_t > implementRead(const uint32_t &aAddr, const uint32_t &aMask)
Read a single, masked, unsigned word.
Definition: DummyClient.cpp:40
ValHeader implementBOT()
Send a byte order transaction.
Definition: DummyClient.cpp:25
uint32_t getMaxSendSize()
Return the maximum size to be sent based on the buffer size in the target.
Definition: DummyClient.cpp:73
ValWord< uint32_t > implementRMWbits(const uint32_t &aAddr, const uint32_t &aANDterm, const uint32_t &aORterm)
Read the value of a register, apply the AND-term, apply the OR-term, set the register to this new val...
Definition: DummyClient.cpp:50
uint32_t getMaxNumberOfBuffers()
Return the maximum number of packets in flight.
Definition: DummyClient.cpp:68
ValHeader implementWrite(const uint32_t &aAddr, const uint32_t &aValue)
Write a single, unmasked word to a register.
Definition: DummyClient.cpp:30
uint32_t getMaxReplySize()
Return the maximum size of reply packet based on the buffer size in the target.
Definition: DummyClient.cpp:78
None tests(nox.Session session)
Definition: noxfile.py:19
BlockReadWriteMode
define whether transactions target a single register, a block of registers, a block-read/write port o...
Definition: definitions.hpp:53
Struct to store a URI when parsed by boost spirit.
Definition: URI.hpp:50