plptools
Loading...
Searching...
No Matches
DeviceEndpoint Class Reference

#include <deviceendpoint.h>

Public Member Functions

std::string id () const
 Device identifier. More...
 
bool hasPersistentId () const
 
Enum< RFSV::errsgetName (std::string &name) const
 Get the device name. More...
 
Enum< RFSV::errssetName (const std::string &name)
 Set the device name. More...
 

Static Public Member Functions

static std::unique_ptr< DeviceEndpointconnect (const std::string host, int port, Enum< ConnectionError > *error)
 

Public Attributes

const std::unique_ptr< RFSVrfsv_
 
const std::unique_ptr< RPCSrpcs_
 
const std::unique_ptr< rclipclip_
 

Private Member Functions

 DeviceEndpoint (const std::string &id, bool hasPersistentConfiguration, std::unique_ptr< RFSV > rfsv, std::unique_ptr< RPCS > rpcs, std::unique_ptr< rclip > clip)
 

Private Attributes

const std::string id_
 
bool hasPersistentConfiguration_
 

Detailed Description

Definition at line 35 of file deviceendpoint.h.

Constructor & Destructor Documentation

◆ DeviceEndpoint()

DeviceEndpoint::DeviceEndpoint ( const std::string &  id,
bool  hasPersistentConfiguration,
std::unique_ptr< RFSV rfsv,
std::unique_ptr< RPCS rpcs,
std::unique_ptr< rclip clip 
)
private

Definition at line 72 of file deviceendpoint.cc.

Member Function Documentation

◆ connect()

std::unique_ptr< DeviceEndpoint > DeviceEndpoint::connect ( const std::string  host,
int  port,
Enum< ConnectionError > *  error 
)
static

Definition at line 34 of file deviceendpoint.cc.

◆ getName()

Enum< RFSV::errs > DeviceEndpoint::getName ( std::string &  name) const

Get the device name.

Parameters
nameOut-param for the device name.

A return value of RFSV::E_PSI_FILE_RECORD indicates that the device name has not been set.

Returns
RFSV::E_PSI_GEN_NONE on success; error otherwise.

Definition at line 91 of file deviceendpoint.cc.

◆ hasPersistentId()

bool DeviceEndpoint::hasPersistentId ( ) const

Definition at line 87 of file deviceendpoint.cc.

◆ id()

std::string DeviceEndpoint::id ( ) const

Device identifier.

The device identifier is guaranteed to be session-stable but isn't guaranteed to be persisted to disk. Use hasPersistentId to check if the identifier is persistent. The identifier can be persisted by setting the device name using setName.

Returns
String containing the device identifier.

Definition at line 83 of file deviceendpoint.cc.

◆ setName()

Enum< RFSV::errs > DeviceEndpoint::setName ( const std::string &  name)

Set the device name.

Parameters
nameNew device name.
Returns
RFSV::E_PSI_GEN_NONE on success; error otherwise.

Definition at line 117 of file deviceendpoint.cc.

Member Data Documentation

◆ clip_

const std::unique_ptr<rclip> DeviceEndpoint::clip_

Definition at line 75 of file deviceendpoint.h.

◆ hasPersistentConfiguration_

bool DeviceEndpoint::hasPersistentConfiguration_
private

Definition at line 86 of file deviceendpoint.h.

◆ id_

const std::string DeviceEndpoint::id_
private

Definition at line 85 of file deviceendpoint.h.

◆ rfsv_

const std::unique_ptr<RFSV> DeviceEndpoint::rfsv_

Definition at line 73 of file deviceendpoint.h.

◆ rpcs_

const std::unique_ptr<RPCS> DeviceEndpoint::rpcs_

Definition at line 74 of file deviceendpoint.h.


The documentation for this class was generated from the following files: