openthread-br  0.3.0-72c0388
Public Types | Public Member Functions | List of all members
otbr::DBus::ThreadApiDBus Class Reference

Public Types

using DeviceRoleHandler = std::function< void(DeviceRole)>
 
using ScanHandler = std::function< void(const std::vector< ActiveScanResult > &)>
 
using EnergyScanHandler = std::function< void(const std::vector< EnergyScanResult > &)>
 
using OtResultHandler = std::function< void(ClientError)>
 

Public Member Functions

 ThreadApiDBus (DBusConnection *aConnection)
 
 ThreadApiDBus (DBusConnection *aConnection, const std::string &aInterfaceName)
 
void AddDeviceRoleHandler (const DeviceRoleHandler &aHandler)
 
ClientError PermitUnsecureJoin (uint16_t aPort, uint32_t aSeconds)
 
ClientError Scan (const ScanHandler &aHandler)
 
ClientError EnergyScan (uint32_t aScanDuration, const EnergyScanHandler &aHandler)
 
ClientError Attach (const std::string &aNetworkName, uint16_t aPanId, uint64_t aExtPanId, const std::vector< uint8_t > &aNetworkKey, const std::vector< uint8_t > &aPSKc, uint32_t aChannelMask, const OtResultHandler &aHandler)
 
ClientError Attach (const OtResultHandler &aHandler)
 
ClientError Detach (const OtResultHandler &aHandler)
 
ClientError AttachAllNodesTo (const std::vector< uint8_t > &aDataset)
 
ClientError FactoryReset (const OtResultHandler &aHandler)
 
ClientError Reset (void)
 
ClientError JoinerStart (const std::string &aPskd, const std::string &aProvisioningUrl, const std::string &aVendorName, const std::string &aVendorModel, const std::string &aVendorSwVersion, const std::string &aVendorData, const OtResultHandler &aHandler)
 
ClientError JoinerStop (void)
 
ClientError AddOnMeshPrefix (const OnMeshPrefix &aPrefix)
 
ClientError RemoveOnMeshPrefix (const Ip6Prefix &aPrefix)
 
ClientError AddExternalRoute (const ExternalRoute &aExternalRoute)
 
ClientError RemoveExternalRoute (const Ip6Prefix &aPrefix)
 
ClientError SetMeshLocalPrefix (const std::array< uint8_t, OTBR_IP6_PREFIX_SIZE > &aPrefix)
 
ClientError SetLegacyUlaPrefix (const std::array< uint8_t, OTBR_IP6_PREFIX_SIZE > &aPrefix)
 
ClientError SetActiveDatasetTlvs (const std::vector< uint8_t > &aDataset)
 
ClientError SetFeatureFlagListData (const std::vector< uint8_t > &aFeatureFlagListData)
 
ClientError SetLinkMode (const LinkModeConfig &aConfig)
 
ClientError SetRadioRegion (const std::string &aRadioRegion)
 
ClientError SetNat64Enabled (bool aEnabled)
 
ClientError GetLinkMode (LinkModeConfig &aConfig)
 
ClientError GetDeviceRole (DeviceRole &aDeviceRole)
 
ClientError GetNetworkName (std::string &aName)
 
ClientError GetPanId (uint16_t &aPanId)
 
ClientError GetExtPanId (uint64_t &aExtPanId)
 
ClientError GetChannel (uint16_t &aChannel)
 
ClientError GetNetworkKey (std::vector< uint8_t > &aNetworkKey)
 
ClientError GetCcaFailureRate (uint16_t &aFailureRate)
 
ClientError GetLinkCounters (MacCounters &aCounters)
 
ClientError GetIp6Counters (IpCounters &aCounters)
 
ClientError GetSupportedChannelMask (uint32_t &aChannelMask)
 
ClientError GetRloc16 (uint16_t &aRloc16)
 
ClientError GetExtendedAddress (uint64_t &aExtendedAddress)
 
ClientError GetRouterId (uint8_t &aRouterId)
 
ClientError GetLeaderData (LeaderData &aLeaderData)
 
ClientError GetNetworkData (std::vector< uint8_t > &aNetworkData)
 
ClientError GetStableNetworkData (std::vector< uint8_t > &aNetworkData)
 
ClientError GetLocalLeaderWeight (uint8_t &aWeight)
 
ClientError GetChannelMonitorSampleCount (uint32_t &aSampleCount)
 
ClientError GetChannelMonitorAllChannelQualities (std::vector< ChannelQuality > &aChannelQualities)
 
ClientError GetChildTable (std::vector< ChildInfo > &aChildTable)
 
ClientError GetNeighborTable (std::vector< NeighborInfo > &aNeighborTable)
 
ClientError GetPartitionId (uint32_t &aPartitionId)
 
ClientError GetInstantRssi (int8_t &aRssi)
 
ClientError GetRadioTxPower (int8_t &aTxPower)
 
ClientError GetExternalRoutes (std::vector< ExternalRoute > &aExternalRoutes)
 
ClientError GetOnMeshPrefixes (std::vector< OnMeshPrefix > &aOnMeshPrefixes)
 
ClientError GetActiveDatasetTlvs (std::vector< uint8_t > &aDataset)
 
ClientError GetFeatureFlagListData (std::vector< uint8_t > &aFeatureFlagListData)
 
ClientError GetRadioRegion (std::string &aRadioRegion)
 
ClientError GetSrpServerInfo (SrpServerInfo &aSrpServerInfo)
 
ClientError GetMdnsTelemetryInfo (MdnsTelemetryInfo &aMdnsTelemetryInfo)
 
std::string GetInterfaceName (void)
 
ClientError UpdateVendorMeshCopTxtEntries (std::vector< TxtEntry > &aUpdate)
 
ClientError GetNat64State (Nat64ComponentState &aState)
 
ClientError GetNat64Mappings (std::vector< Nat64AddressMapping > &aMappings)
 
ClientError GetNat64ProtocolCounters (Nat64ProtocolCounters &aCounters)
 
ClientError GetNat64ErrorCounters (Nat64ErrorCounters &aCounters)
 

Constructor & Destructor Documentation

◆ ThreadApiDBus() [1/2]

otbr::DBus::ThreadApiDBus::ThreadApiDBus ( DBusConnection *  aConnection)

The constructor of a d-bus object.

Will use the default interfacename

Parameters
[in]aConnectionThe dbus connection.

◆ ThreadApiDBus() [2/2]

otbr::DBus::ThreadApiDBus::ThreadApiDBus ( DBusConnection *  aConnection,
const std::string &  aInterfaceName 
)

The constructor of a d-bus object.

Parameters
[in]aConnectionThe dbus connection.
[in]aInterfaceNameThe network interface name.

Member Function Documentation

◆ AddDeviceRoleHandler()

void otbr::DBus::ThreadApiDBus::AddDeviceRoleHandler ( const DeviceRoleHandler &  aHandler)

This method adds a callback for device role change.

Parameters
[in]aHandlerThe device role handler.

◆ AddExternalRoute()

ClientError otbr::DBus::ThreadApiDBus::AddExternalRoute ( const ExternalRoute aExternalRoute)

This method adds an external route.

Parameters
[in]aExternalrouteThe external route config
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ AddOnMeshPrefix()

ClientError otbr::DBus::ThreadApiDBus::AddOnMeshPrefix ( const OnMeshPrefix aPrefix)

This method adds a on-mesh address prefix.

Parameters
[in]aPrefixThe address prefix.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ Attach() [1/2]

ClientError otbr::DBus::ThreadApiDBus::Attach ( const OtResultHandler &  aHandler)

This method attaches the device to the Thread network.

The network parameters will be set with the active dataset under this circumstance.

Parameters
[in]aHandlerThe attach result handler.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ Attach() [2/2]

ClientError otbr::DBus::ThreadApiDBus::Attach ( const std::string &  aNetworkName,
uint16_t  aPanId,
uint64_t  aExtPanId,
const std::vector< uint8_t > &  aNetworkKey,
const std::vector< uint8_t > &  aPSKc,
uint32_t  aChannelMask,
const OtResultHandler &  aHandler 
)

This method attaches the device to the Thread network.

Parameters
[in]aNetworkNameThe network name.
[in]aPanIdThe pan id, UINT16_MAX for random.
[in]aExtPanIdThe extended pan id, UINT64_MAX for random.
[in]aNetworkKeyThe network key, empty for random.
[in]aPSKcThe pre-shared commissioner key, empty for random.
[in]aChannelMaskA bitmask for valid channels, will random select one.
[in]aHandlerThe attach result handler.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ AttachAllNodesTo()

ClientError otbr::DBus::ThreadApiDBus::AttachAllNodesTo ( const std::vector< uint8_t > &  aDataset)

This method attaches the device to the specified Thread network.

If the device has already attached to a network, send a request to migrate the existing network.

Parameters
[in]aDatasetThe Operational Dataset that contains parameter values of the Thread network to attach to. It must have a valid Delay Timer and Pending Timestamp.
Return values
ERROR_NONESuccessfully requested the Thread network migration.
ERROR_DBUSD-Bus encode/decode error.
OT_ERROR_REJECTEDThe request was rejected by the leader.
OT_ERROR_FAILEDFailed to send the request.
OT_ERROR_INVALID_STATEThe device is attaching.
OT_ERROR_INVALID_ARGSArguments are invalid.
OT_ERROR_BUSYThere is an ongoing request.

◆ Detach()

ClientError otbr::DBus::ThreadApiDBus::Detach ( const OtResultHandler &  aHandler)

This method detaches the device from the Thread network.

Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ EnergyScan()

ClientError otbr::DBus::ThreadApiDBus::EnergyScan ( uint32_t  aScanDuration,
const EnergyScanHandler &  aHandler 
)

This method performs an IEEE 802.15.4 Energy Scan.

Parameters
[in]aScanDurationThe duration for the scan for each channel, in milliseconds. Note that maximum value for the duration is currently 65535. If it's the duration is larger than that, the handler will get an INVALID_ARGS error code.
[in]aHandlerThe energy scan result handler.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ FactoryReset()

ClientError otbr::DBus::ThreadApiDBus::FactoryReset ( const OtResultHandler &  aHandler)

This method performs a factory reset.

Parameters
[in]aHandlerThe reset result handler.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetActiveDatasetTlvs()

ClientError otbr::DBus::ThreadApiDBus::GetActiveDatasetTlvs ( std::vector< uint8_t > &  aDataset)

This method gets the active operational dataset

Parameters
[out]aDatasetThe active operational dataset
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetCcaFailureRate()

ClientError otbr::DBus::ThreadApiDBus::GetCcaFailureRate ( uint16_t &  aFailureRate)

This method gets the Clear Channel Assessment failure rate.

Parameters
[out]aFailureRateThe failure rate.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetChannel()

ClientError otbr::DBus::ThreadApiDBus::GetChannel ( uint16_t &  aChannel)

This method gets the extended pan id.

Parameters
[out]aChannelThe extended pan id.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetChannelMonitorAllChannelQualities()

ClientError otbr::DBus::ThreadApiDBus::GetChannelMonitorAllChannelQualities ( std::vector< ChannelQuality > &  aChannelQualities)

This method gets the channel qualities

Parameters
[out]aChannelQualitiesThe channel qualities.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetChannelMonitorSampleCount()

ClientError otbr::DBus::ThreadApiDBus::GetChannelMonitorSampleCount ( uint32_t &  aSampleCount)

This method gets the channel monitor sample count.

Parameters
[out]aSampleCountThe channel monitor sample count.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetChildTable()

ClientError otbr::DBus::ThreadApiDBus::GetChildTable ( std::vector< ChildInfo > &  aChildTable)

This method gets the child table.

Parameters
[out]aChildTableThe child table.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetDeviceRole()

ClientError otbr::DBus::ThreadApiDBus::GetDeviceRole ( DeviceRole &  aDeviceRole)

This method gets the current device role.

Parameters
[out]aDeviceRoleThe device role
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetExtendedAddress()

ClientError otbr::DBus::ThreadApiDBus::GetExtendedAddress ( uint64_t &  aExtendedAddress)

This method gets 802.15.4 extended address

Parameters
[out]aExtendedAddressThe extended address
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetExternalRoutes()

ClientError otbr::DBus::ThreadApiDBus::GetExternalRoutes ( std::vector< ExternalRoute > &  aExternalRoutes)

This method gets the external route table

Parameters
[out]aExternalRoutesThe external route table
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetExtPanId()

ClientError otbr::DBus::ThreadApiDBus::GetExtPanId ( uint64_t &  aExtPanId)

This method gets the extended pan id.

Parameters
[out]aExtPanIdThe extended pan id.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetFeatureFlagListData()

ClientError otbr::DBus::ThreadApiDBus::GetFeatureFlagListData ( std::vector< uint8_t > &  aFeatureFlagListData)

This method gets the feature flag list proto serialized byte data.

Parameters
[out]aFeatureFlagListDataThe feature flag list proto serialized byte data (see proto/feature_flag.proto)
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetInstantRssi()

ClientError otbr::DBus::ThreadApiDBus::GetInstantRssi ( int8_t &  aRssi)

This method gets the rssi of the latest packet.

Parameters
[out]aRssiThe rssi of the latest packet.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetInterfaceName()

std::string otbr::DBus::ThreadApiDBus::GetInterfaceName ( void  )

This method returns the network interface name the client is bound to.

Returns
The network interface name.

◆ GetIp6Counters()

ClientError otbr::DBus::ThreadApiDBus::GetIp6Counters ( IpCounters aCounters)

This method gets the ip level statistics counters.

Parameters
[out]aCountersThe statistic counters.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetLeaderData()

ClientError otbr::DBus::ThreadApiDBus::GetLeaderData ( LeaderData aLeaderData)

This method gets the network's leader data.

Parameters
[out]aLeaderDataThe leader data.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetLinkCounters()

ClientError otbr::DBus::ThreadApiDBus::GetLinkCounters ( MacCounters aCounters)

This method gets the mac level statistics counters.

Parameters
[out]aCountersThe statistic counters.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetLinkMode()

ClientError otbr::DBus::ThreadApiDBus::GetLinkMode ( LinkModeConfig aConfig)

This method gets the link operating mode.

Parameters
[out]aConfigThe operating mode config.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetLocalLeaderWeight()

ClientError otbr::DBus::ThreadApiDBus::GetLocalLeaderWeight ( uint8_t &  aWeight)

This method gets the node's local leader weight.

Parameters
[out]aWeightThe local leader weight.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetMdnsTelemetryInfo()

ClientError otbr::DBus::ThreadApiDBus::GetMdnsTelemetryInfo ( MdnsTelemetryInfo aMdnsTelemetryInfo)

This method gets the MDNS telemetry information.

Parameters
[out]aMdnsTelemetryInfoThe MDNS telemetry information.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetNat64ErrorCounters()

ClientError otbr::DBus::ThreadApiDBus::GetNat64ErrorCounters ( Nat64ErrorCounters aCounters)

This method gets the NAT64 error counters.

Parameters
[out]aCountersThe NAT64 error counters.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetNat64Mappings()

ClientError otbr::DBus::ThreadApiDBus::GetNat64Mappings ( std::vector< Nat64AddressMapping > &  aMappings)

This method gets the active NAT64 mappings.

Parameters
[out]aMappingsThe active NAT64 mappings.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetNat64ProtocolCounters()

ClientError otbr::DBus::ThreadApiDBus::GetNat64ProtocolCounters ( Nat64ProtocolCounters aCounters)

This method gets the NAT64 traffic counters.

Parameters
[out]aCountersThe NAT64 traffic counters.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetNat64State()

ClientError otbr::DBus::ThreadApiDBus::GetNat64State ( Nat64ComponentState aState)

This method gets the state of NAT64.

Parameters
[out]aStateThe NAT64 state of each components.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetNeighborTable()

ClientError otbr::DBus::ThreadApiDBus::GetNeighborTable ( std::vector< NeighborInfo > &  aNeighborTable)

This method gets the neighbor table.

Parameters
[out]aNeighborTableThe neighbor table.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetNetworkData()

ClientError otbr::DBus::ThreadApiDBus::GetNetworkData ( std::vector< uint8_t > &  aNetworkData)

This method gets the network data.

Parameters
[out]aNetworkDataThe network data.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetNetworkKey()

ClientError otbr::DBus::ThreadApiDBus::GetNetworkKey ( std::vector< uint8_t > &  aNetworkKey)

This method gets the network network key.

Parameters
[out]aNetworkKeyThe network network key.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetNetworkName()

ClientError otbr::DBus::ThreadApiDBus::GetNetworkName ( std::string &  aName)

This method gets the network name.

Parameters
[out]aNameThe network name.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetOnMeshPrefixes()

ClientError otbr::DBus::ThreadApiDBus::GetOnMeshPrefixes ( std::vector< OnMeshPrefix > &  aOnMeshPrefixes)

This method gets the on-mesh prefixes

Parameters
[out]aOnMeshPrefixesThe on-mesh prefixes
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetPanId()

ClientError otbr::DBus::ThreadApiDBus::GetPanId ( uint16_t &  aPanId)

This method gets the network pan id.

Parameters
[out]aPanIdThe pan id.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetPartitionId()

ClientError otbr::DBus::ThreadApiDBus::GetPartitionId ( uint32_t &  aPartitionId)

This method gets the network's parition id.

Parameters
[out]aPartitionIdThe partition id.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetRadioRegion()

ClientError otbr::DBus::ThreadApiDBus::GetRadioRegion ( std::string &  aRadioRegion)

This method gets the radio region.

Parameters
[out]aRadioRegionThe radio region.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetRadioTxPower()

ClientError otbr::DBus::ThreadApiDBus::GetRadioTxPower ( int8_t &  aTxPower)

This method gets the radio transmit power.

Parameters
[out]aTxPowerThe radio transmit power.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetRloc16()

ClientError otbr::DBus::ThreadApiDBus::GetRloc16 ( uint16_t &  aRloc16)

This method gets the Thread routing locator

Parameters
[out]aRloc16The routing locator
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetRouterId()

ClientError otbr::DBus::ThreadApiDBus::GetRouterId ( uint8_t &  aRouterId)

This method gets the node's router id.

Parameters
[out]aRouterIdThe router id.
Return values
ERROR_NONESuccessfully performed the dbus function call.
ERROR_DBUSdbus encode/decode error.
OT_ERROR_INVALID_STATEThe node is not a router.
...OpenThread defined error value otherwise.

◆ GetSrpServerInfo()

ClientError otbr::DBus::ThreadApiDBus::GetSrpServerInfo ( SrpServerInfo aSrpServerInfo)

This method gets the SRP server information.

Parameters
[out]aSrpServerInfoThe SRP server information.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetStableNetworkData()

ClientError otbr::DBus::ThreadApiDBus::GetStableNetworkData ( std::vector< uint8_t > &  aNetworkData)

This method gets the stable network data.

Parameters
[out]aNetworkDataThe stable network data.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ GetSupportedChannelMask()

ClientError otbr::DBus::ThreadApiDBus::GetSupportedChannelMask ( uint32_t &  aChannelMask)

This method gets the supported channel mask.

Parameters
[out]aChannelMaskThe channel mask.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ JoinerStart()

ClientError otbr::DBus::ThreadApiDBus::JoinerStart ( const std::string &  aPskd,
const std::string &  aProvisioningUrl,
const std::string &  aVendorName,
const std::string &  aVendorModel,
const std::string &  aVendorSwVersion,
const std::string &  aVendorData,
const OtResultHandler &  aHandler 
)

This method triggers a thread join process.

Note
The joiner start and the attach proccesses are exclusive
Parameters
[in]aPskdThe pre-shared key for device.
[in]aProvisioningUrlThe provision url.
[in]aVendorNameThe vendor name.
[in]aVendorModelThe vendor model.
[in]aVendorSwVersionThe vendor software version.
[in]aVendorDataThe vendor custom data.
[in]aHandlerThe join result handler.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ JoinerStop()

ClientError otbr::DBus::ThreadApiDBus::JoinerStop ( void  )

This method stops the joiner process

Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ PermitUnsecureJoin()

ClientError otbr::DBus::ThreadApiDBus::PermitUnsecureJoin ( uint16_t  aPort,
uint32_t  aSeconds 
)

This method permits unsecure join on port.

Parameters
[in]aPortThe port number.
[in]aSecondsThe timeout to close the port, 0 for never close.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ RemoveExternalRoute()

ClientError otbr::DBus::ThreadApiDBus::RemoveExternalRoute ( const Ip6Prefix aPrefix)

This method removes an external route.

Parameters
[in]aPrefixThe route prefix.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ RemoveOnMeshPrefix()

ClientError otbr::DBus::ThreadApiDBus::RemoveOnMeshPrefix ( const Ip6Prefix aPrefix)

This method removes a on-mesh address prefix.

Parameters
[in]aPrefixThe address prefix.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ Reset()

ClientError otbr::DBus::ThreadApiDBus::Reset ( void  )

This method performs a soft reset.

Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ Scan()

ClientError otbr::DBus::ThreadApiDBus::Scan ( const ScanHandler &  aHandler)

This method performs a Thread network scan.

Parameters
[in]aHandlerThe scan result handler.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ SetActiveDatasetTlvs()

ClientError otbr::DBus::ThreadApiDBus::SetActiveDatasetTlvs ( const std::vector< uint8_t > &  aDataset)

This method sets the active operational dataset.

Parameters
[out]aDatasetThe active operational dataset
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ SetFeatureFlagListData()

ClientError otbr::DBus::ThreadApiDBus::SetFeatureFlagListData ( const std::vector< uint8_t > &  aFeatureFlagListData)

This method sets the feature flag list data.

Parameters
[out]aFeatureFlagListDataThe feature flag list proto serialized byte data (see proto/feature_flag.proto)
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ SetLegacyUlaPrefix()

ClientError otbr::DBus::ThreadApiDBus::SetLegacyUlaPrefix ( const std::array< uint8_t, OTBR_IP6_PREFIX_SIZE > &  aPrefix)

This method sets the legacy prefix of ConnectIP.

Parameters
[in]aPrefixThe address prefix.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ SetLinkMode()

ClientError otbr::DBus::ThreadApiDBus::SetLinkMode ( const LinkModeConfig aConfig)

This method sets the link operating mode.

Parameters
[in]aConfigThe operating mode config.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ SetMeshLocalPrefix()

ClientError otbr::DBus::ThreadApiDBus::SetMeshLocalPrefix ( const std::array< uint8_t, OTBR_IP6_PREFIX_SIZE > &  aPrefix)

This method sets the mesh-local prefix.

Parameters
[in]aPrefixThe address prefix.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ SetNat64Enabled()

ClientError otbr::DBus::ThreadApiDBus::SetNat64Enabled ( bool  aEnabled)

This method sets the NAT64 switch.

Parameters
[in]aEnableA boolean to enable/disable the NAT64.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ SetRadioRegion()

ClientError otbr::DBus::ThreadApiDBus::SetRadioRegion ( const std::string &  aRadioRegion)

This method sets the radio region.

Parameters
[in]aRadioRegionThe radio region.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

◆ UpdateVendorMeshCopTxtEntries()

ClientError otbr::DBus::ThreadApiDBus::UpdateVendorMeshCopTxtEntries ( std::vector< TxtEntry > &  aUpdate)

This method sets multiple vendor-specific entries for the TXT record of the MeshCoP service.

Note
  • The aUpdate must contain all vendor-specific TXT entries you want to update. The latest call will supersede previous calls.
  • If aUpdate contains thread-specific entries like 'nn', 'at', the whole update will be rejected.
  • If aUpdate contains a key which is already published in TXT record, it will be updated according to aUpdate.
Parameters
[in]aUpdateThe updated key-value entries.
Return values
ERROR_NONESuccessfully performed the dbus function call
ERROR_DBUSdbus encode/decode error
...OpenThread defined error value otherwise

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