Cascoda SDK
Cascoda SDK for building software to run with CA-821x transceivers
platform.c File Reference

This file includes the platform-specific initializers. More...

#include <assert.h>
#include <errno.h>
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include <sys/stat.h>
#include <sys/time.h>
#include "ca821x-posix-thread/posix-platform.h"
#include "openthread/platform/alarm-milli.h"
#include "openthread/tasklet.h"
#include "selfpipe.h"
Include dependency graph for platform.c:

Functions

void posixPlatformSetOrigArgs (int argc, char *argv[])
 This method stores the original arguments given to the program. More...
 
int posixPlatformInit (void)
 This method performs all platform-specific initialization. More...
 
void otTaskletsSignalPending (otInstance *aInstance)
 
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 posixPlatformProcessDriversQuick (otInstance *aInstance)
 This method performs all platform-specific processing without sleeping at the end. More...
 
void posixPlatformProcessDrivers (otInstance *aInstance)
 This method performs all platform-specific processing. More...
 

Variables

int gArgumentsCount = 0
 
char ** gArguments = NULL
 
uint32_t NODE_ID = 1
 Unique node ID. More...
 

Detailed Description

This file includes the platform-specific initializers.

Function Documentation

◆ otTaskletsSignalPending()

void otTaskletsSignalPending ( otInstance *  aInstance)

◆ posixPlatformGetTimeout()

void posixPlatformGetTimeout ( otInstance *  aInstance,
struct timeval *  timeout 
)

This method gets the timeout for the sleep function, and places it in the timeout struct.

◆ posixPlatformInit()

int posixPlatformInit ( void  )

This method performs all platform-specific initialization.

◆ posixPlatformProcessDrivers()

void posixPlatformProcessDrivers ( otInstance *  aInstance)

This method performs all platform-specific processing.

◆ posixPlatformProcessDriversQuick()

void posixPlatformProcessDriversQuick ( otInstance *  aInstance)

This method performs all platform-specific processing without sleeping at the end.

Should be used in conjunction with posixPlatformSleep.

◆ posixPlatformSetOrigArgs()

void posixPlatformSetOrigArgs ( int  argc,
char *  argv[] 
)

This method stores the original arguments given to the program.

◆ posixPlatformSleep()

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!

Variable Documentation

◆ gArguments

char** gArguments = NULL

◆ gArgumentsCount

int gArgumentsCount = 0

◆ NODE_ID

uint32_t NODE_ID = 1

Unique node ID.