Steering Data

This module includes helper functions for the MeshCoP Steering Data.

Summary

All the functions in this header require OPENTHREAD_CONFIG_MESHCOP_STEERING_DATA_API_ENABLE to be enabled.

Typedefs

otSteeringData typedef
Represents the steering data.

Functions

otSteeringDataContainsDiscerner(const otSteeringData *aSteeringData, const otJoinerDiscerner *aDiscerner)
bool
Checks if the Steering Data contains a Joiner Discerner.
otSteeringDataContainsJoinerId(const otSteeringData *aSteeringData, const otExtAddress *aJoinerId)
bool
Checks if the Steering Data contains a Joiner ID.
otSteeringDataInit(otSteeringData *aSteeringData, uint8_t aLength)
Initializes the Steering Data.
otSteeringDataIsEmpty(const otSteeringData *aSteeringData)
bool
Checks if the Steering Data is empty.
otSteeringDataIsValid(const otSteeringData *aSteeringData)
bool
Checks whether the Steering Data has a valid length.
otSteeringDataMerge(otSteeringData *aSteeringData, const otSteeringData *aOtherSteeringData)
Merges two Steering Data bloom filters.
otSteeringDataPermitsAllJoiners(const otSteeringData *aSteeringData)
bool
Checks if the Steering Data permits all joiners.
otSteeringDataSetToPermitAllJoiners(otSteeringData *aSteeringData)
void
Sets the Steering Data to permit all joiners.
otSteeringDataUpdateWithDiscerner(otSteeringData *aSteeringData, const otJoinerDiscerner *aDiscerner)
Updates the Steering Data's bloom filter with a Joiner Discerner.
otSteeringDataUpdateWithJoinerId(otSteeringData *aSteeringData, const otExtAddress *aJoinerId)
Updates the Steering Data's bloom filter with a Joiner ID.

Macros

OT_STEERING_DATA_MAX_LENGTH 16
Max Steering Data length (bytes)
OT_STEERING_DATA_MIN_LENGTH 1
Min Steering Data length (bytes)

Structs

otSteeringData

Represents the steering data.

Typedefs

otSteeringData

struct otSteeringData otSteeringData

Represents the steering data.

Functions

otSteeringDataContainsDiscerner

bool otSteeringDataContainsDiscerner(
  const otSteeringData *aSteeringData,
  const otJoinerDiscerner *aDiscerner
)

Checks if the Steering Data contains a Joiner Discerner.

Details
Parameters
[in] aSteeringData
The Steering Data to check.
[in] aDiscerner
The Joiner Discerner.
Return Values
TRUE
If the Steering Data contains the Joiner Discerner.
FALSE
If the Steering Data does not contain the Joiner Discerner.

otSteeringDataContainsJoinerId

bool otSteeringDataContainsJoinerId(
  const otSteeringData *aSteeringData,
  const otExtAddress *aJoinerId
)

Checks if the Steering Data contains a Joiner ID.

Details
Parameters
[in] aSteeringData
The Steering Data to check.
[in] aJoinerId
The Joiner ID.
Return Values
TRUE
If the Steering Data contains the Joiner ID.
FALSE
If the Steering Data does not contain the Joiner ID.

otSteeringDataInit

otError otSteeringDataInit(
  otSteeringData *aSteeringData,
  uint8_t aLength
)

Initializes the Steering Data.

Details
Parameters
[out] aSteeringData
The Steering Data to initialize.
[in] aLength
The length of the Steering Data in bytes.
Return Values
OT_ERROR_NONE
Successfully initialized the Steering Data.
OT_ERROR_INVALID_ARGS
The aLength is invalid.

otSteeringDataIsEmpty

bool otSteeringDataIsEmpty(
  const otSteeringData *aSteeringData
)

Checks if the Steering Data is empty.

Details
Parameters
[in] aSteeringData
The Steering Data to check.
Return Values
TRUE
If the Steering Data is empty.
FALSE
If the Steering Data is not empty.

otSteeringDataIsValid

bool otSteeringDataIsValid(
  const otSteeringData *aSteeringData
)

Checks whether the Steering Data has a valid length.

Details
Parameters
[in] aSteeringData
The Steering Data to check.
Return Values
TRUE
If the Steering Data's length is valid.
FALSE
If the Steering Data's length is not valid.

otSteeringDataMerge

otError otSteeringDataMerge(
  otSteeringData *aSteeringData,
  const otSteeringData *aOtherSteeringData
)

Merges two Steering Data bloom filters.

The aOtherSteeringData must have a length that is a divisor of the aSteeringData length.

Details
Parameters
[out] aSteeringData
The Steering Data to merge into.
[in] aOtherSteeringData
The other Steering Data to merge from.
Return Values
OT_ERROR_NONE
Successfully merged the Steering Data.
OT_ERROR_INVALID_ARGS
The Steering Data lengths are not valid or they cannot be merged.

otSteeringDataPermitsAllJoiners

bool otSteeringDataPermitsAllJoiners(
  const otSteeringData *aSteeringData
)

Checks if the Steering Data permits all joiners.

Details
Parameters
[in] aSteeringData
The Steering Data to check.
Return Values
TRUE
If the Steering Data permits all joiners.
FALSE
If the Steering Data does not permit all joiners.

otSteeringDataSetToPermitAllJoiners

void otSteeringDataSetToPermitAllJoiners(
  otSteeringData *aSteeringData
)

Sets the Steering Data to permit all joiners.

Details
Parameters
[out] aSteeringData
The Steering Data to update.

otSteeringDataUpdateWithDiscerner

otError otSteeringDataUpdateWithDiscerner(
  otSteeringData *aSteeringData,
  const otJoinerDiscerner *aDiscerner
)

Updates the Steering Data's bloom filter with a Joiner Discerner.

Details
Parameters
[out] aSteeringData
The Steering Data to update
[in] aDiscerner
The Joiner Discerner to add.
Return Values
OT_ERROR_NONE
Successfully updated the Steering Data.
OT_ERROR_INVALID_ARGS
The Steering Data is not valid (incorrect length).

otSteeringDataUpdateWithJoinerId

otError otSteeringDataUpdateWithJoinerId(
  otSteeringData *aSteeringData,
  const otExtAddress *aJoinerId
)

Updates the Steering Data's bloom filter with a Joiner ID.

Details
Parameters
[out] aSteeringData
The Steering Data to update.
[in] aJoinerId
The Joiner ID to add.
Return Values
OT_ERROR_NONE
Successfully updated the Steering Data.
OT_ERROR_INVALID_ARGS
The Steering Data is not valid (incorrect length).

Macros

OT_STEERING_DATA_MAX_LENGTH

 OT_STEERING_DATA_MAX_LENGTH 16

Max Steering Data length (bytes)

OT_STEERING_DATA_MIN_LENGTH

 OT_STEERING_DATA_MIN_LENGTH 1

Min Steering Data length (bytes)

Resources

OpenThread API Reference topics originate from the source code, available on GitHub. For more information, or to contribute to our documentation, refer to Resources.