Factory Diagnostics - Platform#
This module includes the platform abstraction for diagnostics features.
Enumerations#
Typedefs#
Pointer to callback to output platform diag messages.
Functions#
Sets the platform diag output callback.
Processes a factory diagnostics command line.
Enables/disables the factory diagnostics mode.
Indicates whether or not factory diagnostics mode is enabled.
Sets the channel to use for factory diagnostics.
Sets the transmit power to use for factory diagnostics.
Processes the received radio frame.
Processes the alarm event.
Sets the gpio value.
Gets the gpio value.
Sets the gpio mode.
Gets the gpio mode.
Set the radio raw power setting for diagnostics module.
Get the radio raw power setting for diagnostics module.
Enable/disable the platform layer to use the raw power setting set by otPlatDiagRadioSetRawPowerSetting()
.
Start/stop the platform layer to transmit continuous carrier wave.
Start/stop the platform layer to transmit stream of characters.
Get the power settings for the given channel.
Enumeration Documentation#
otGpioMode#
otGpioMode
Defines the gpio modes.
Enumerator | |
---|---|
OT_GPIO_MODE_INPUT | Input mode without pull resistor. |
OT_GPIO_MODE_OUTPUT | Output mode. |
60
of file include/openthread/platform/diag.h
Typedef Documentation#
otPlatDiagOutputCallback#
typedef void(* otPlatDiagOutputCallback) (const char *aFormat, va_list aArguments, void *aContext) )(const char *aFormat, va_list aArguments, void *aContext)
Pointer to callback to output platform diag messages.
[in] | aFormat | The format string. |
[in] | aArguments | The format string arguments. |
[out] | aContext | A pointer to the user context. |
73
of file include/openthread/platform/diag.h
Function Documentation#
otPlatDiagSetOutputCallback#
void otPlatDiagSetOutputCallback (otInstance * aInstance, otPlatDiagOutputCallback aCallback, void * aContext)
Sets the platform diag output callback.
[in] | aInstance | The OpenThread instance structure. |
[in] | aCallback | A pointer to a function that is called on outputting diag messages. |
[in] | aContext | A pointer to the user context. |
82
of file include/openthread/platform/diag.h
otPlatDiagProcess#
otError otPlatDiagProcess (otInstance * aInstance, uint8_t aArgsLength, char * aArgs)
Processes a factory diagnostics command line.
[in] | aInstance | The OpenThread instance for current request. |
[in] | aArgsLength | The number of arguments in |
[in] | aArgs | The arguments of diagnostics command line. |
95
of file include/openthread/platform/diag.h
otPlatDiagModeSet#
void otPlatDiagModeSet (bool aMode)
Enables/disables the factory diagnostics mode.
[in] | aMode | TRUE to enable diagnostics mode, FALSE otherwise. |
102
of file include/openthread/platform/diag.h
otPlatDiagModeGet#
bool otPlatDiagModeGet (void )
Indicates whether or not factory diagnostics mode is enabled.
N/A |
Returns
TRUE if factory diagnostics mode is enabled, FALSE otherwise.
109
of file include/openthread/platform/diag.h
otPlatDiagChannelSet#
void otPlatDiagChannelSet (uint8_t aChannel)
Sets the channel to use for factory diagnostics.
[in] | aChannel | The channel value. |
116
of file include/openthread/platform/diag.h
otPlatDiagTxPowerSet#
void otPlatDiagTxPowerSet (int8_t aTxPower)
Sets the transmit power to use for factory diagnostics.
[in] | aTxPower | The transmit power value. |
123
of file include/openthread/platform/diag.h
otPlatDiagRadioReceived#
void otPlatDiagRadioReceived (otInstance * aInstance, otRadioFrame * aFrame, otError aError)
Processes the received radio frame.
[in] | aInstance | The OpenThread instance for current request. |
[in] | aFrame | The received radio frame. |
[in] | aError | The received radio frame status. |
132
of file include/openthread/platform/diag.h
otPlatDiagAlarmCallback#
void otPlatDiagAlarmCallback (otInstance * aInstance)
Processes the alarm event.
[in] | aInstance | The OpenThread instance for current request. |
139
of file include/openthread/platform/diag.h
otPlatDiagGpioSet#
otError otPlatDiagGpioSet (uint32_t aGpio, bool aValue)
Sets the gpio value.
[in] | aGpio | The gpio number. |
[in] | aValue | true to set the gpio to high level, or false otherwise. |
153
of file include/openthread/platform/diag.h
otPlatDiagGpioGet#
otError otPlatDiagGpioGet (uint32_t aGpio, bool * aValue)
Gets the gpio value.
[in] | aGpio | The gpio number. |
[out] | aValue | A pointer where to put gpio value. |
167
of file include/openthread/platform/diag.h
otPlatDiagGpioSetMode#
otError otPlatDiagGpioSetMode (uint32_t aGpio, otGpioMode aMode)
Sets the gpio mode.
[in] | aGpio | The gpio number. |
[out] | aMode | The gpio mode. |
181
of file include/openthread/platform/diag.h
otPlatDiagGpioGetMode#
otError otPlatDiagGpioGetMode (uint32_t aGpio, otGpioMode * aMode)
Gets the gpio mode.
[in] | aGpio | The gpio number. |
[out] | aMode | A pointer where to put gpio mode. |
196
of file include/openthread/platform/diag.h
otPlatDiagRadioSetRawPowerSetting#
otError otPlatDiagRadioSetRawPowerSetting (otInstance * aInstance, const uint8_t * aRawPowerSetting, uint16_t aRawPowerSettingLength)
Set the radio raw power setting for diagnostics module.
[in] | aInstance | The OpenThread instance structure. |
[in] | aRawPowerSetting | A pointer to the raw power setting byte array. |
[in] | aRawPowerSettingLength | The length of the |
209
of file include/openthread/platform/diag.h
otPlatDiagRadioGetRawPowerSetting#
otError otPlatDiagRadioGetRawPowerSetting (otInstance * aInstance, uint8_t * aRawPowerSetting, uint16_t * aRawPowerSettingLength)
Get the radio raw power setting for diagnostics module.
[in] | aInstance | The OpenThread instance structure. |
[out] | aRawPowerSetting | A pointer to the raw power setting byte array. |
[inout] | aRawPowerSettingLength | On input, a pointer to the size of |
227
of file include/openthread/platform/diag.h
otPlatDiagRadioRawPowerSettingEnable#
otError otPlatDiagRadioRawPowerSettingEnable (otInstance * aInstance, bool aEnable)
Enable/disable the platform layer to use the raw power setting set by otPlatDiagRadioSetRawPowerSetting()
.
[in] | aInstance | The OpenThread instance structure. |
[in] | aEnable | TRUE to enable or FALSE to disable the raw power setting. |
240
of file include/openthread/platform/diag.h
otPlatDiagRadioTransmitCarrier#
otError otPlatDiagRadioTransmitCarrier (otInstance * aInstance, bool aEnable)
Start/stop the platform layer to transmit continuous carrier wave.
[in] | aInstance | The OpenThread instance structure. |
[in] | aEnable | TRUE to enable or FALSE to disable the platform layer to transmit continuous carrier wave. |
252
of file include/openthread/platform/diag.h
otPlatDiagRadioTransmitStream#
otError otPlatDiagRadioTransmitStream (otInstance * aInstance, bool aEnable)
Start/stop the platform layer to transmit stream of characters.
[in] | aInstance | The OpenThread instance structure. |
[in] | aEnable | TRUE to enable or FALSE to disable the platform layer to transmit stream. |
264
of file include/openthread/platform/diag.h
otPlatDiagRadioGetPowerSettings#
otError otPlatDiagRadioGetPowerSettings (otInstance * aInstance, uint8_t aChannel, int16_t * aTargetPower, int16_t * aActualPower, uint8_t * aRawPowerSetting, uint16_t * aRawPowerSettingLength)
Get the power settings for the given channel.
[in] | aInstance | The OpenThread instance structure. |
[in] | aChannel | The radio channel. |
[out] | aTargetPower | The target power in 0.01 dBm. |
[out] | aActualPower | The actual power in 0.01 dBm. |
[out] | aRawPowerSetting | A pointer to the raw power setting byte array. |
[inout] | aRawPowerSettingLength | On input, a pointer to the size of |
283
of file include/openthread/platform/diag.h