Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
ca::DeviceInfo Class Reference

C++ wrapper for the C ca_device_info struct, which owns its own memory. More...

#include <posix/app/chilictl/common/DeviceInfo.hpp>

Inheritance diagram for ca::DeviceInfo:
Collaboration diagram for ca::DeviceInfo:

Public Member Functions

 DeviceInfo ()
 Default constructor for empty instance. More...
 
 DeviceInfo (const ca_device_info *aDeviceInfo)
 Constructor to copy from the c-style struct passed by lower levels. More...
 
 DeviceInfo (const DeviceInfo &aDeviceInfo)
 Copy constructor. More...
 
 DeviceInfo (DeviceInfo &&aDeviceInfo)
 Move constructor. More...
 
 ~DeviceInfo ()
 Destructor to free owned memory. More...
 
DeviceInfooperator= (const DeviceInfo &other)
 Copy assignment. More...
 
DeviceInfooperator= (DeviceInfo &&other)
 Move assignment. More...
 
const char * GetExchangeTypeAsString ()
 Get the exchange type in a string format. More...
 
ca821x_exchange_type GetExchangeType () const
 Exchange type for this device. More...
 
const char * GetPath () const
 Exchange & system specific 'path', unique to this device. More...
 
const char * GetDeviceName () const
 Name of the device, eg 'Chili2'. More...
 
const char * GetAppName () const
 Name of the application running on the device, eg 'ot-cli'. More...
 
const char * GetVersion () const
 Version string of the device. More...
 
const char * GetSerialNo () const
 Serial number of the device. More...
 
bool IsAvailable () const
 Is the device available for use (or not, eg. More...
 
bool IsExternalFlashChipAvailable () const
 Does the device have an external flash chip. More...
 

Detailed Description

C++ wrapper for the C ca_device_info struct, which owns its own memory.

Constructor & Destructor Documentation

◆ DeviceInfo() [1/4]

ca::DeviceInfo::DeviceInfo ( )
inline

Default constructor for empty instance.

◆ DeviceInfo() [2/4]

ca::DeviceInfo::DeviceInfo ( const ca_device_info aDeviceInfo)

Constructor to copy from the c-style struct passed by lower levels.

Parameters
aDeviceInfoPointer to ca_device_info struct.

◆ DeviceInfo() [3/4]

ca::DeviceInfo::DeviceInfo ( const DeviceInfo aDeviceInfo)

Copy constructor.

Parameters
aDeviceInfoinstance to copy from

◆ DeviceInfo() [4/4]

ca::DeviceInfo::DeviceInfo ( DeviceInfo &&  aDeviceInfo)

Move constructor.

Parameters
aDeviceInfoinstance to move from

◆ ~DeviceInfo()

ca::DeviceInfo::~DeviceInfo ( )
inline

Destructor to free owned memory.

Member Function Documentation

◆ GetAppName()

const char* ca::DeviceInfo::GetAppName ( ) const
inline

Name of the application running on the device, eg 'ot-cli'.

Returns

◆ GetDeviceName()

const char* ca::DeviceInfo::GetDeviceName ( ) const
inline

Name of the device, eg 'Chili2'.

Returns

◆ GetExchangeType()

ca821x_exchange_type ca::DeviceInfo::GetExchangeType ( ) const
inline

Exchange type for this device.

Returns

◆ GetExchangeTypeAsString()

const char * ca::DeviceInfo::GetExchangeTypeAsString ( )

Get the exchange type in a string format.

Returns
Exchange type in string format

◆ GetPath()

const char* ca::DeviceInfo::GetPath ( ) const
inline

Exchange & system specific 'path', unique to this device.

Returns

◆ GetSerialNo()

const char* ca::DeviceInfo::GetSerialNo ( ) const
inline

Serial number of the device.

Returns

◆ GetVersion()

const char* ca::DeviceInfo::GetVersion ( ) const
inline

Version string of the device.

Returns

◆ IsAvailable()

bool ca::DeviceInfo::IsAvailable ( ) const
inline

Is the device available for use (or not, eg.

Returns
in use by other application)

◆ IsExternalFlashChipAvailable()

bool ca::DeviceInfo::IsExternalFlashChipAvailable ( ) const
inline

Does the device have an external flash chip.

Returns

◆ operator=() [1/2]

DeviceInfo & ca::DeviceInfo::operator= ( const DeviceInfo other)

Copy assignment.

Parameters
otherinstance to copy from
Returns
reference to this

◆ operator=() [2/2]

DeviceInfo & ca::DeviceInfo::operator= ( DeviceInfo &&  other)

Move assignment.

Parameters
otherinstance to move from
Returns
reference to this

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