Factory Diagnostics - Platform
This module includes the platform abstraction for diagnostics features.
Summary
Enumerations |
|
---|---|
otGpioMode{
|
enum Defines the gpio modes. |
Typedefs |
|
---|---|
otPlatDiagOutputCallback)(const char *aFormat, va_list aArguments, void *aContext)
|
typedefvoid(*
Pointer to callback to output platform diag messages. |
Functions |
|
---|---|
otPlatDiagAlarmCallback(otInstance *aInstance)
|
void
Processes the alarm event.
|
otPlatDiagChannelSet(uint8_t aChannel)
|
void
Sets the channel to use for factory diagnostics.
|
otPlatDiagGpioGet(uint32_t aGpio, bool *aValue)
|
Gets the gpio value.
|
otPlatDiagGpioGetMode(uint32_t aGpio, otGpioMode *aMode)
|
Gets the gpio mode.
|
otPlatDiagGpioSet(uint32_t aGpio, bool aValue)
|
Sets the gpio value.
|
otPlatDiagGpioSetMode(uint32_t aGpio, otGpioMode aMode)
|
Sets the gpio mode.
|
otPlatDiagModeGet(void)
|
bool
Indicates whether or not factory diagnostics mode is enabled.
|
otPlatDiagModeSet(bool aMode)
|
void
Enables/disables the factory diagnostics mode.
|
otPlatDiagProcess(otInstance *aInstance, uint8_t aArgsLength, char *aArgs[])
|
Processes a factory diagnostics command line.
|
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.
|
otPlatDiagRadioGetRawPowerSetting(otInstance *aInstance, uint8_t *aRawPowerSetting, uint16_t *aRawPowerSettingLength)
|
Get the radio raw power setting for diagnostics module.
|
otPlatDiagRadioRawPowerSettingEnable(otInstance *aInstance, bool aEnable)
|
Enable/disable the platform layer to use the raw power setting set by
otPlatDiagRadioSetRawPowerSetting() . |
otPlatDiagRadioReceived(otInstance *aInstance, otRadioFrame *aFrame, otError aError)
|
void
Processes the received radio frame.
|
otPlatDiagRadioSetRawPowerSetting(otInstance *aInstance, const uint8_t *aRawPowerSetting, uint16_t aRawPowerSettingLength)
|
Set the radio raw power setting for diagnostics module.
|
otPlatDiagRadioTransmitCarrier(otInstance *aInstance, bool aEnable)
|
Start/stop the platform layer to transmit continuous carrier wave.
|
otPlatDiagRadioTransmitStream(otInstance *aInstance, bool aEnable)
|
Start/stop the platform layer to transmit stream of characters.
|
otPlatDiagSetOutputCallback(otInstance *aInstance, otPlatDiagOutputCallback aCallback, void *aContext)
|
void
Sets the platform diag output callback.
|
otPlatDiagTxPowerSet(int8_t aTxPower)
|
void
Sets the transmit power to use for factory diagnostics.
|
Enumerations
otGpioMode
otGpioMode
Typedefs
otPlatDiagOutputCallback
void(* otPlatDiagOutputCallback)(const char *aFormat, va_list aArguments, void *aContext)
Pointer to callback to output platform diag messages.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
Functions
otPlatDiagAlarmCallback
void otPlatDiagAlarmCallback( otInstance *aInstance )
Processes the alarm event.
Details | |||
---|---|---|---|
Parameters |
|
otPlatDiagChannelSet
void otPlatDiagChannelSet( uint8_t aChannel )
Sets the channel to use for factory diagnostics.
Details | |||
---|---|---|---|
Parameters |
|
otPlatDiagGpioGet
otError otPlatDiagGpioGet( uint32_t aGpio, bool *aValue )
Gets the gpio value.
Details | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||||
Return Values |
|
otPlatDiagGpioGetMode
otError otPlatDiagGpioGetMode( uint32_t aGpio, otGpioMode *aMode )
Gets the gpio mode.
Details | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||||
Return Values |
|
otPlatDiagGpioSet
otError otPlatDiagGpioSet( uint32_t aGpio, bool aValue )
Sets the gpio value.
Details | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||||
Return Values |
|
otPlatDiagGpioSetMode
otError otPlatDiagGpioSetMode( uint32_t aGpio, otGpioMode aMode )
Sets the gpio mode.
Details | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||||
Return Values |
|
otPlatDiagModeGet
bool otPlatDiagModeGet( void )
Indicates whether or not factory diagnostics mode is enabled.
Details | |
---|---|
Returns |
TRUE if factory diagnostics mode is enabled, FALSE otherwise.
|
otPlatDiagModeSet
void otPlatDiagModeSet( bool aMode )
Enables/disables the factory diagnostics mode.
Details | |||
---|---|---|---|
Parameters |
|
otPlatDiagProcess
otError otPlatDiagProcess( otInstance *aInstance, uint8_t aArgsLength, char *aArgs[] )
Processes a factory diagnostics command line.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
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.
Details | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||||||
Return Values |
|
otPlatDiagRadioGetRawPowerSetting
otError otPlatDiagRadioGetRawPowerSetting( otInstance *aInstance, uint8_t *aRawPowerSetting, uint16_t *aRawPowerSettingLength )
Get the radio raw power setting for diagnostics module.
Details | |||||||||
---|---|---|---|---|---|---|---|---|---|
Parameters |
|
||||||||
Return Values |
|
otPlatDiagRadioRawPowerSettingEnable
otError otPlatDiagRadioRawPowerSettingEnable( otInstance *aInstance, bool aEnable )
Enable/disable the platform layer to use the raw power setting set by otPlatDiagRadioSetRawPowerSetting()
.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otPlatDiagRadioReceived
void otPlatDiagRadioReceived( otInstance *aInstance, otRadioFrame *aFrame, otError aError )
Processes the received radio frame.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
otPlatDiagRadioSetRawPowerSetting
otError otPlatDiagRadioSetRawPowerSetting( otInstance *aInstance, const uint8_t *aRawPowerSetting, uint16_t aRawPowerSettingLength )
Set the radio raw power setting for diagnostics module.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otPlatDiagRadioTransmitCarrier
otError otPlatDiagRadioTransmitCarrier( otInstance *aInstance, bool aEnable )
Start/stop the platform layer to transmit continuous carrier wave.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otPlatDiagRadioTransmitStream
otError otPlatDiagRadioTransmitStream( otInstance *aInstance, bool aEnable )
Start/stop the platform layer to transmit stream of characters.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otPlatDiagSetOutputCallback
void otPlatDiagSetOutputCallback( otInstance *aInstance, otPlatDiagOutputCallback aCallback, void *aContext )
Sets the platform diag output callback.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
otPlatDiagTxPowerSet
void otPlatDiagTxPowerSet( int8_t aTxPower )
Sets the transmit power to use for factory diagnostics.
Details | |||
---|---|---|---|
Parameters |
|
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.