Kodi Development 22.0
for Binary and Script based Add-Ons
 
Loading...
Searching...
No Matches

Detailed Description

Wrapper class providing peripheral information
Classes can extend Peripheral to inherit peripheral properties.

Used on kodi::addon::CInstancePeripheral::PerformDeviceScan().


The following table contains values that can be set with class Peripheral :

Name Type Set call Get call
Peripheral type PERIPHERAL_TYPE SetType Type
Peripheral name const std::string& SetName Name
Peripheral vendor id uint16_t SetVendorID VendorID
Peripheral product id uint16_t SetProductID ProductID
Peripheral index unsigned int SetIndex Index

Further are following included:

Topics

 Value Help
 

Function Documentation

◆ Peripheral()

Peripheral ( PERIPHERAL_TYPE type = PERIPHERAL_TYPE_UNKNOWN,
const std::string & strName = "" )
inline

Constructor.

Parameters
[in]type[optional] Peripheral type, or PERIPHERAL_TYPE_UNKNOWN as default
[in]strName[optional] Name of related peripheral

◆ ~Peripheral()

virtual ~Peripheral ( void )
virtualdefault

Destructor.

◆ operator==()

bool operator== ( const Peripheral & rhs) const
inline

Comparison operator.

Note
The index is not included in the comparison because it is affected by the presence of other peripherals

◆ Type()

PERIPHERAL_TYPE Type ( void ) const
inline

Get peripheral type.

Returns
Type defined with PERIPHERAL_TYPE

◆ Name()

const std::string & Name ( void ) const
inline

Get peripheral name.

Returns
Name string of peripheral

◆ VendorID()

uint16_t VendorID ( void ) const
inline

Get peripheral vendor id.

Returns
Vendor id

◆ ProductID()

uint16_t ProductID ( void ) const
inline

Get peripheral product id.

Returns
Product id

◆ Index()

unsigned int Index ( void ) const
inline

Get peripheral index identifier.

Returns
Index number

◆ IsVidPidKnown()

bool IsVidPidKnown ( void ) const
inline

Check VID and PID are known.

Returns
true if VID and PID are not 0
Note
Derived property: VID and PID are 0x0000 if unknown

◆ SetType()

void SetType ( PERIPHERAL_TYPE type)
inline

Set peripheral type.

Parameters
[in]typeType to set

◆ SetName()

void SetName ( const std::string & strName)
inline

Set peripheral name.

Parameters
[in]strNameName to set

◆ SetVendorID()

void SetVendorID ( uint16_t vendorId)
inline

Set peripheral vendor id.

Parameters
[in]vendorIdType to set

◆ SetProductID()

void SetProductID ( uint16_t productId)
inline

Set peripheral product identifier.

Parameters
[in]productIdType to set

◆ SetIndex()

void SetIndex ( unsigned int index)
inline

Set peripheral index.

Parameters
[in]indexType to set