peary::interface::LoopbackEndpoint
peary::interface::LoopbackEndpoint
Peary Loopback Interface.
#include <peary/interfaces/Loopback/loopback.hpp>
Inherits from peary::interface::Endpoint< LoopbackInterface, uint8_t, uint8_t >
Public Functions
| Name | |
|---|---|
| LoopbackEndpoint(uint8_t id)Constructor for LoopbackEndpoint. | |
| ~LoopbackEndpoint()Destructor for LoopbackEndpoint. | |
| virtual data_t | write_impl(const reg_t & data) overrideWrite data to the loopback interface. |
| virtual vector_t | write_impl(const vector_t & data) overrideWrite multiple data to the loopback interface. |
| virtual pair_t | write_impl(const pair_t & data) overrideWrite data to a specific register of the loopback interface. |
| virtual vector_t | write_impl(const reg_t & reg, const vector_t & data) overrideWrite multiple data to specific registers of the loopback interface. |
| virtual std::vector< pair_t > | write_impl(const std::vector< pair_t > & data) overrideWrite multiple data to specific registers of the loopback interface. |
| virtual vector_t | read_impl(const unsigned int length) overrideRead multiple data from the loopback interface. |
| virtual vector_t | read_impl(const reg_t & reg, const unsigned int length) overrideRead multiple data from a specific register of the loopback interface. |
Additional inherited members
Public Types inherited from peary::interface::Endpoint< LoopbackInterface, uint8_t, uint8_t >
| Name | |
|---|---|
| using RegisterType | reg_t |
| using DataType | data_t |
| using std::pair< RegisterType, DataType > | pair_t |
| using std::vector< DataType > | vector_t |
Public Functions inherited from peary::interface::Endpoint< LoopbackInterface, uint8_t, uint8_t >
| Name | |
|---|---|
| Endpoint(const Endpoint & ) =delete | |
| Endpoint & | operator=(const Endpoint & ) =delete |
| Endpoint(Endpoint && ) =delete | |
| Endpoint & | operator=(Endpoint && ) =delete |
| std::string | info() constReturn human-readable endpoint information. |
| data_t | write(const data_t & value)Write a single data word to a device which does not contain internal registers. |
| vector_t | write(const vector_t & values)Write multiple data words to a device which does not contain internal registers. |
| pair_t | write(const pair_t & regData)Write a single data word to a device containing internal registers. |
| vector_t | write(const reg_t & reg, const vector_t & values)Write multiple data words to a specific register of a device containing internal registers. |
| std::vector< pair_t > | write(const std::vector< pair_t > & regDataVec)Write multiple data words to multiple registers of a device containing internal registers. |
| data_t | read()Read a single data word from a device which does not contain internal registers. |
| vector_t | read(unsigned int count)Read multiple data words from a device which does not contain internal registers. |
| vector_t | read(const reg_t & reg, unsigned int count)Read a single data word from a specific register of a device containing internal registers. |
Protected Functions inherited from peary::interface::Endpoint< LoopbackInterface, uint8_t, uint8_t >
| Name | |
|---|---|
| Endpoint(const std::string & info) | |
| virtual | ~Endpoint() =default |
Public Functions Documentation
function LoopbackEndpoint
LoopbackEndpoint(
uint8_t id
)
Constructor for LoopbackEndpoint.
Parameters:
- id An id for this loopback interface
function ~LoopbackEndpoint
~LoopbackEndpoint()
Destructor for LoopbackEndpoint.
function write_impl
virtual data_t write_impl(
const reg_t & data
) override
Write data to the loopback interface.
Parameters:
- data The data to be written
Return: The data read back from the loopback interface
Reimplements: peary::interface::Endpoint::write_impl
function write_impl
virtual vector_t write_impl(
const vector_t & data
) override
Write multiple data to the loopback interface.
Parameters:
- data The data to be written
Return: A vector containing the data read back from the loopback interface
Reimplements: peary::interface::Endpoint::write_impl
function write_impl
virtual pair_t write_impl(
const pair_t & data
) override
Write data to a specific register of the loopback interface.
Parameters:
- data A pair containing the register address and the data to be written
Return: A pair containing the register address and the data read back from the loopback interface
Reimplements: peary::interface::Endpoint::write_impl
function write_impl
virtual vector_t write_impl(
const reg_t & reg,
const vector_t & data
) override
Write multiple data to specific registers of the loopback interface.
Parameters:
- reg The register address to write to
- data A vector containing the data to be written
Return: A vector containing the data read back from the loopback interface
Reimplements: peary::interface::Endpoint::write_impl
function write_impl
virtual std::vector< pair_t > write_impl(
const std::vector< pair_t > & data
) override
Write multiple data to specific registers of the loopback interface.
Parameters:
- data A vector of pairs containing the register addresses and the data to be written
Return: A vector of pairs containing the register addresses and the data read back from the loopback interface
Reimplements: peary::interface::Endpoint::write_impl
function read_impl
virtual vector_t read_impl(
const unsigned int length
) override
Read multiple data from the loopback interface.
Parameters:
- length The number of data items to read
Return: A vector containing the data read from the loopback interface
Reimplements: peary::interface::Endpoint::read_impl
function read_impl
virtual vector_t read_impl(
const reg_t & reg,
const unsigned int length
) override
Read multiple data from a specific register of the loopback interface.
Parameters:
- reg The register address to read from
- length The number of data items to read
Return: A vector containing the data read from the loopback interface
Reimplements: peary::interface::Endpoint::read_impl
Updated on 2026-01-30 at 22:01:05 +0100