15#include <peak/dll_interface/peak_dll_interface_util.hpp>
16#include <peak/error_handling/peak_error_handling.hpp>
93 void Write(
const std::vector<uint8_t>& bytes);
96 friend ClassCreator<RegisterNode>;
119 , m_backendHandle(registerNodeHandle)
124 return QueryNumericFromCInterfaceFunction<uint64_t>([&](uint64_t* address) {
131 return QueryNumericFromCInterfaceFunction<size_t>(
138 std::vector<uint8_t> bytes(numBytes);
139 ExecuteAndMapReturnCodes([&] {
149 ExecuteAndMapReturnCodes(
Represents a GenAPI node.
Definition peak_node.hpp:122
Represents a GenAPI register node.
Definition peak_register_node.hpp:37
~RegisterNode() override=default
size_t Length() const
Returns the length.
Definition peak_register_node.hpp:129
RegisterNode & operator=(RegisterNode &&other)=delete
RegisterNode & operator=(const RegisterNode &other)=delete
std::vector< uint8_t > Read(size_t numBytes, NodeCacheUsePolicy cacheUsePolicy=NodeCacheUsePolicy::UseCache) const
Reads a given amount of bytes.
Definition peak_register_node.hpp:135
RegisterNode(RegisterNode &&other)=delete
void Write(const std::vector< uint8_t > &bytes)
Writes a given amount of bytes.
Definition peak_register_node.hpp:147
RegisterNode(const RegisterNode &other)=delete
uint64_t Address() const
Returns the address.
Definition peak_register_node.hpp:122
NodeCacheUsePolicy
Definition peak_common_node_enums.hpp:25
The "peak" namespace directly contains convenience functionality like the DeviceManager as well as th...
Definition peak_dynamic_loader.h:32
struct PEAK_NODE * PEAK_NODE_HANDLE
Definition peak_backend.h:412
int32_t PEAK_NODE_CACHE_USE_POLICY
Definition peak_backend.h:225
PEAK_C_API PEAK_RegisterNode_GetAddress(PEAK_REGISTER_NODE_HANDLE registerNodeHandle, uint64_t *address)
Asks the given register node for its address.
PEAK_C_API PEAK_RegisterNode_ToNode(PEAK_REGISTER_NODE_HANDLE registerNodeHandle, PEAK_NODE_HANDLE *nodeHandle)
Casts the given register node to a node.
struct PEAK_REGISTER_NODE * PEAK_REGISTER_NODE_HANDLE
Definition peak_backend.h:436
PEAK_C_API PEAK_RegisterNode_GetLength(PEAK_REGISTER_NODE_HANDLE registerNodeHandle, size_t *length)
Asks the given register node for its length.
PEAK_C_API PEAK_RegisterNode_Write(PEAK_REGISTER_NODE_HANDLE registerNodeHandle, const uint8_t *bytesToWrite, size_t bytesToWriteSize)
Tells the given register node to write the given bytes.
PEAK_C_API PEAK_RegisterNode_Read(PEAK_REGISTER_NODE_HANDLE registerNodeHandle, PEAK_NODE_CACHE_USE_POLICY cacheUsePolicy, uint8_t *bytesToRead, size_t bytesToReadSize)
Tells the given register node to read the given amount of bytes.
#define PEAK_C_ABI_PREFIX
Definition peak_dll_defines.h:16