OpenThread  1.05.02.06
Namespaces | Functions | Variables
posix/platform/radio.cpp File Reference

Detailed Description

This file implements the radio apis on posix platform.

#include "platform-posix.h"
#include <string.h>
#include "common/new.hpp"
#include "lib/spinel/radio_spinel.hpp"
#include "posix/platform/radio.hpp"
#include "hdlc_interface.hpp"
+ Include dependency graph for posix/platform/radio.cpp:

Namespaces

 ot
 
 ot::Posix
 

Functions

otError otPlatRadioAddSrcMatchExtEntry (otInstance *aInstance, const otExtAddress *aExtAddress)
 
otError otPlatRadioAddSrcMatchShortEntry (otInstance *aInstance, uint16_t aShortAddress)
 
void otPlatRadioClearSrcMatchExtEntries (otInstance *aInstance)
 
otError otPlatRadioClearSrcMatchExtEntry (otInstance *aInstance, const otExtAddress *aExtAddress)
 
void otPlatRadioClearSrcMatchShortEntries (otInstance *aInstance)
 
otError otPlatRadioClearSrcMatchShortEntry (otInstance *aInstance, uint16_t aShortAddress)
 
otError otPlatRadioDisable (otInstance *aInstance)
 
otError otPlatRadioEnable (otInstance *aInstance)
 
void otPlatRadioEnableSrcMatch (otInstance *aInstance, bool aEnable)
 
otError otPlatRadioEnergyScan (otInstance *aInstance, uint8_t aScanChannel, uint16_t aScanDuration)
 
uint32_t otPlatRadioGetBusSpeed (otInstance *aInstance)
 
otRadioCaps otPlatRadioGetCaps (otInstance *aInstance)
 
otError otPlatRadioGetCcaEnergyDetectThreshold (otInstance *aInstance, int8_t *aThreshold)
 
uint8_t otPlatRadioGetCslAccuracy (otInstance *aInstance)
 
otError otPlatRadioGetFemLnaGain (otInstance *aInstance, int8_t *aGain)
 
void otPlatRadioGetIeeeEui64 (otInstance *aInstance, uint8_t *aIeeeEui64)
 
uint64_t otPlatRadioGetNow (otInstance *aInstance)
 
uint32_t otPlatRadioGetPreferredChannelMask (otInstance *aInstance)
 
bool otPlatRadioGetPromiscuous (otInstance *aInstance)
 
int8_t otPlatRadioGetReceiveSensitivity (otInstance *aInstance)
 
otError otPlatRadioGetRegion (otInstance *aInstance, uint16_t *aRegionCode)
 
int8_t otPlatRadioGetRssi (otInstance *aInstance)
 
otRadioState otPlatRadioGetState (otInstance *aInstance)
 
uint32_t otPlatRadioGetSupportedChannelMask (otInstance *aInstance)
 
otRadioFrameotPlatRadioGetTransmitBuffer (otInstance *aInstance)
 
otError otPlatRadioGetTransmitPower (otInstance *aInstance, int8_t *aPower)
 
const char * otPlatRadioGetVersionString (otInstance *aInstance)
 
bool otPlatRadioIsEnabled (otInstance *aInstance)
 
otError otPlatRadioReceive (otInstance *aInstance, uint8_t aChannel)
 
otError otPlatRadioReceiveAt (otInstance *aInstance, uint8_t aChannel, uint32_t aStart, uint32_t aDuration)
 
otError otPlatRadioSetCcaEnergyDetectThreshold (otInstance *aInstance, int8_t aThreshold)
 
otError otPlatRadioSetChannelMaxTransmitPower (otInstance *aInstance, uint8_t aChannel, int8_t aMaxPower)
 
void otPlatRadioSetExtendedAddress (otInstance *aInstance, const otExtAddress *aAddress)
 
otError otPlatRadioSetFemLnaGain (otInstance *aInstance, int8_t aGain)
 
void otPlatRadioSetMacFrameCounter (otInstance *aInstance, uint32_t aMacFrameCounter)
 
void otPlatRadioSetMacKey (otInstance *aInstance, uint8_t aKeyIdMode, uint8_t aKeyId, const otMacKeyMaterial *aPrevKey, const otMacKeyMaterial *aCurrKey, const otMacKeyMaterial *aNextKey, otRadioKeyType aKeyType)
 
void otPlatRadioSetPanId (otInstance *aInstance, uint16_t panid)
 
void otPlatRadioSetPromiscuous (otInstance *aInstance, bool aEnable)
 
otError otPlatRadioSetRegion (otInstance *aInstance, uint16_t aRegionCode)
 
void otPlatRadioSetShortAddress (otInstance *aInstance, uint16_t aAddress)
 
otError otPlatRadioSetTransmitPower (otInstance *aInstance, int8_t aPower)
 
otError otPlatRadioSleep (otInstance *aInstance)
 
otError otPlatRadioTransmit (otInstance *aInstance, otRadioFrame *aFrame)
 
void platformRadioDeinit (void)
 
void platformRadioProcess (otInstance *aInstance, const fd_set *aReadFdSet, const fd_set *aWriteFdSet)
 
void platformRadioUpdateFdSet (fd_set *aReadFdSet, fd_set *aWriteFdSet, int *aMaxFd, struct timeval *aTimeout)
 

Variables

static ot::Spinel::RadioSpinel< ot::Posix::HdlcInterface, RadioProcessContextsRadioSpinel
 

Function Documentation

§ platformRadioDeinit()

void platformRadioDeinit ( void  )

This function shuts down the radio service used by OpenThread.

References RadioSpinel< InterfaceType, ProcessContextType >::Deinit().

Referenced by platformDeinit().

§ platformRadioUpdateFdSet()

void platformRadioUpdateFdSet ( fd_set *  aReadFdSet,
fd_set *  aWriteFdSet,
int *  aMaxFd,
struct timeval *  aTimeout 
)

§ platformRadioProcess()

void platformRadioProcess ( otInstance aInstance,
const fd_set *  aReadFdSet,
const fd_set *  aWriteFdSet 
)

This function performs radio driver processing.

Parameters
[in]aInstanceA pointer to the OpenThread instance.
[in]aReadFdSetA pointer to the read file descriptors.
[in]aWriteFdSetA pointer to the write file descriptors.

References OT_UNUSED_VARIABLE, and RadioSpinel< InterfaceType, ProcessContextType >::Process().

Referenced by otSysMainloopProcess().

Variable Documentation

§ sRadioSpinel

© Copyright 1995-2022, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale