Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
|
This file includes the posix platform-specific initializers. More...
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/select.h>
#include <sys/time.h>
#include "openthread/instance.h"
#include "ca821x_api.h"
Go to the source code of this file.
Functions | |
int | posixPlatformInit (void) |
This method performs all platform-specific initialization. More... | |
struct ca821x_dev * | PlatformGetDeviceRef () |
Get the radio device currently in use by Openthread. More... | |
void | posixPlatformSetOrigArgs (int argc, char *argv[]) |
This method stores the original arguments given to the program. More... | |
void | posixPlatformProcessDrivers (otInstance *aInstance) |
This method performs all platform-specific processing. More... | |
void | posixPlatformProcessDriversQuick (otInstance *aInstance) |
This method performs all platform-specific processing without sleeping at the end. More... | |
void | posixPlatformGetTimeout (otInstance *aInstance, struct timeval *timeout) |
This method gets the timeout for the sleep function, and places it in the timeout struct. More... | |
void | posixPlatformSleep (otInstance *aInstance, struct timeval *timeout) |
This method sleeps until there is further work to do (allowing the application to access the openthread API) -Must run immediately after posixPlatformGetTimeout! More... | |
void | posixPlatformAlarmInit (void) |
This method initializes the alarm service used by OpenThread. More... | |
void | posixPlatformAlarmUpdateTimeout (struct timeval *tv) |
This method retrieves the time remaining until the alarm fires. More... | |
void | posixPlatformAlarmProcess (otInstance *aInstance) |
This method performs alarm driver processing. More... | |
int | PlatformRadioInit (void) |
This method initializes the radio service used by OpenThread. More... | |
int | PlatformRadioInitWithDev (struct ca821x_dev *pDeviceRef) |
This method initializes the radio service used by OpenThread using a pDeviceRef that has already been fully initialised by the caller. More... | |
int | PlatformRadioProcess (void) |
This method performs radio driver processing. More... | |
void | PlatformRadioStop (void) |
This method cleanly stops the radio. More... | |
void | posixPlatformRestoreTerminal (void) |
This method restores the terminal to it's pre-openthread state. More... | |
void | posixPlatformRandomInit (void) |
This method initializes the random number service used by OpenThread. More... | |
void | platformUartUpdateFdSet (fd_set *aReadFdSet, fd_set *aWriteFdSet, int *aMaxFd) |
This method updates the file descriptor sets with file descriptors used by the serial driver. More... | |
void | platformUartProcess (void) |
This method performs radio driver processing. More... | |
Variables | |
uint32_t | NODE_ID |
Unique node ID. More... | |
uint32_t | WELLKNOWN_NODE_ID |
Well-known Unique ID used by a simulated radio that supports promiscuous mode. More... | |
This file includes the posix platform-specific initializers.
int PlatformRadioProcess | ( | void | ) |
This method performs radio driver processing.
void platformUartProcess | ( | void | ) |
This method performs radio driver processing.
void platformUartUpdateFdSet | ( | fd_set * | aReadFdSet, |
fd_set * | aWriteFdSet, | ||
int * | aMaxFd | ||
) |
This method updates the file descriptor sets with file descriptors used by the serial 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. |
void posixPlatformAlarmInit | ( | void | ) |
This method initializes the alarm service used by OpenThread.
void posixPlatformAlarmProcess | ( | otInstance * | aInstance | ) |
This method performs alarm driver processing.
void posixPlatformAlarmUpdateTimeout | ( | struct timeval * | tv | ) |
This method retrieves the time remaining until the alarm fires.
[out] | tv | A pointer to the timeval struct. |
void posixPlatformGetTimeout | ( | otInstance * | aInstance, |
struct timeval * | timeout | ||
) |
This method gets the timeout for the sleep function, and places it in the timeout struct.
int posixPlatformInit | ( | void | ) |
This method performs all platform-specific initialization.
void posixPlatformProcessDrivers | ( | otInstance * | aInstance | ) |
This method performs all platform-specific processing.
void posixPlatformProcessDriversQuick | ( | otInstance * | aInstance | ) |
This method performs all platform-specific processing without sleeping at the end.
Should be used in conjunction with posixPlatformSleep.
void posixPlatformRandomInit | ( | void | ) |
This method initializes the random number service used by OpenThread.
void posixPlatformRestoreTerminal | ( | void | ) |
This method restores the terminal to it's pre-openthread state.
void posixPlatformSetOrigArgs | ( | int | argc, |
char * | argv[] | ||
) |
This method stores the original arguments given to the program.
void posixPlatformSleep | ( | otInstance * | aInstance, |
struct timeval * | timeout | ||
) |
This method sleeps until there is further work to do (allowing the application to access the openthread API) -Must run immediately after posixPlatformGetTimeout!
|
extern |
Unique node ID.
|
extern |
Well-known Unique ID used by a simulated radio that supports promiscuous mode.