Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
Loading...
Searching...
No Matches
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.
 
 DeviceInfo (const ca_device_info *aDeviceInfo)
 Constructor to copy from the c-style struct passed by lower levels.
 
 DeviceInfo (const DeviceInfo &aDeviceInfo)
 Copy constructor.
 
 DeviceInfo (DeviceInfo &&aDeviceInfo)
 Move constructor.
 
 ~DeviceInfo ()
 Destructor to free owned memory.
 
DeviceInfooperator= (const DeviceInfo &other)
 Copy assignment.
 
DeviceInfooperator= (DeviceInfo &&other)
 Move assignment.
 
const char * GetExchangeTypeAsString ()
 Get the exchange type in a string format.
 
ca821x_exchange_type GetExchangeType () const
 
const char * GetPath () const
 
const char * GetDeviceName () const
 
const char * GetAppName () const
 
const char * GetVersion () const
 
const char * GetSerialNo () const
 
bool IsAvailable () const
 
bool IsExternalFlashChipAvailable () const
 

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
Returns
Name of the application running on the device, eg 'ot-cli'.

◆ GetDeviceName()

const char * ca::DeviceInfo::GetDeviceName ( ) const
inline
Returns
Name of the device, eg 'Chili2'.

◆ GetExchangeType()

ca821x_exchange_type ca::DeviceInfo::GetExchangeType ( ) const
inline
Returns
Exchange type for this device.

◆ 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
Returns
Exchange & system specific 'path', unique to this device.

◆ GetSerialNo()

const char * ca::DeviceInfo::GetSerialNo ( ) const
inline
Returns
Serial number of the device.

◆ GetVersion()

const char * ca::DeviceInfo::GetVersion ( ) const
inline
Returns
Version string of the device.

◆ IsAvailable()

bool ca::DeviceInfo::IsAvailable ( ) const
inline
Returns
Is the device available for use (or not, eg.

in use by other application)

◆ IsExternalFlashChipAvailable()

bool ca::DeviceInfo::IsExternalFlashChipAvailable ( ) const
inline
Returns
Does the device have an external flash chip.

◆ 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: