peary::interface::IPSocketEndpoint

Configuration class for IPSocket interface.

#include <peary/interfaces/IPSocket/ipsocket.hpp>

Inherits from peary::interface::Endpoint< IPSocketInterface, std::string, std::string >

Public Functions

Name
IPSocketEndpoint(const std::string & address, uint32_t port)Constructor for IPSocketEndpoint.
~IPSocketEndpoint() overrideDestructor for IPSocketEndpoint.

Protected Functions

Name
virtual data_t write_impl(const data_t & payload) overrideWrite data to the IPSocket interface.
virtual vector_t read_impl(const reg_t & query, const unsigned int length) overrideRead data from the IPSocket interface.
std::vector< uint8_t > read_binary(const reg_t & query, const unsigned int length)Read binary data from the IPSocket interface.

Additional inherited members

Public Types inherited from peary::interface::Endpoint< IPSocketInterface, std::string, std::string >

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< IPSocketInterface, std::string, std::string >

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< IPSocketInterface, std::string, std::string >

Name
Endpoint(const std::string & info)
virtual ~Endpoint() =default

Public Functions Documentation

function IPSocketEndpoint

  explicit IPSocketEndpoint(
    const std::string & address,
    uint32_t port
)
  

Constructor for IPSocketEndpoint.

Parameters:

  • address IP address
  • port Port

function ~IPSocketEndpoint

  ~IPSocketEndpoint() override
  

Destructor for IPSocketEndpoint.

Protected Functions Documentation

function write_impl

  virtual data_t write_impl(
    const data_t & payload
) override
  

Write data to the IPSocket interface.

Parameters:

  • payload The data to be sent to the IPSocket interface

Return: The response received from the IPSocket interface

Reimplements: peary::interface::Endpoint::write_impl

function read_impl

  virtual vector_t read_impl(
    const reg_t & query,
    const unsigned int length
) override
  

Read data from the IPSocket interface.

Parameters:

  • query The query to be sent to the IPSocket interface
  • length The number of bytes to read from the IPSocket interface

Return: A vector containing the data read from the IPSocket interface

Reimplements: peary::interface::Endpoint::read_impl

function read_binary

  std::vector< uint8_t > read_binary(
    const reg_t & query,
    const unsigned int length
)
  

Read binary data from the IPSocket interface.

Parameters:

  • query The query to be sent to the IPSocket interface
  • length The number of bytes to read from the IPSocket interface

Return: A vector containing the binary data read from the IPSocket interface


Updated on 2026-01-30 at 22:01:05 +0100