![]() |
![]() |
|
OpenThread
1.05.02.06
|
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 | |
Variables | |
| static ot::Spinel::RadioSpinel< ot::Posix::HdlcInterface, RadioProcessContext > | sRadioSpinel |
| void platformRadioDeinit | ( | void | ) |
This function shuts down the radio service used by OpenThread.
References RadioSpinel< InterfaceType, ProcessContextType >::Deinit().
Referenced by platformDeinit().
| void platformRadioUpdateFdSet | ( | fd_set * | aReadFdSet, |
| fd_set * | aWriteFdSet, | ||
| int * | aMaxFd, | ||
| struct timeval * | aTimeout | ||
| ) |
This function updates the file descriptor sets with file descriptors used by the radio driver.
| [in,out] | aReadFdSet | A pointer to the read file descriptors. |
| [in,out] | aWriteFdSet | A pointer to the write file descriptors. |
| [in,out] | aMaxFd | A pointer to the max file descriptor. |
| [in,out] | aTimeout | A pointer to the timeout. |
References RadioSpinel< InterfaceType, ProcessContextType >::GetNextRadioTimeRecalcStart(), RadioSpinel< InterfaceType, ProcessContextType >::GetSpinelInterface(), RadioSpinel< InterfaceType, ProcessContextType >::GetTxRadioEndUs(), RadioSpinel< InterfaceType, ProcessContextType >::HasPendingFrame(), RadioSpinel< InterfaceType, ProcessContextType >::IsTransmitDone(), RadioSpinel< InterfaceType, ProcessContextType >::IsTransmitting(), OT_UNUSED_VARIABLE, otPlatTimeGet(), RadioSpinel< InterfaceType, ProcessContextType >::Process(), US_PER_S, and virtualTimeRadioSpinelProcess().
Referenced by otSysMainloopUpdate().
| void platformRadioProcess | ( | otInstance * | aInstance, |
| const fd_set * | aReadFdSet, | ||
| const fd_set * | aWriteFdSet | ||
| ) |
This function performs radio driver processing.
| [in] | aInstance | A pointer to the OpenThread instance. |
| [in] | aReadFdSet | A pointer to the read file descriptors. |
| [in] | aWriteFdSet | A pointer to the write file descriptors. |
References OT_UNUSED_VARIABLE, and RadioSpinel< InterfaceType, ProcessContextType >::Process().
Referenced by otSysMainloopProcess().
|
static |