Unify Framework Lib 1.6.0
uic_main_externals_platform.c File Reference
#include <sys/select.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
#include "contiki-conf.h"
#include "sl_log.h"
#include "uic_main_externals.h"
#include "uic_main_externals_internal.h"

Macros

#define LOG_TAG   "uic_main_externals_platform"
 

Functions

static void uic_main_ext_setup (void)
 
static void set_fdr_from_registration (const uic_main_ext_fd_registration_t *reg)
 
static void uic_main_check_registration (const uic_main_ext_fd_registration_t *reg)
 
void uic_main_ext_select (clock_time_t delay)
 

Variables

static fd_set fdrs
 
static int fd_max = -1
 

Macro Definition Documentation

◆ LOG_TAG

#define LOG_TAG   "uic_main_externals_platform"

Function Documentation

◆ set_fdr_from_registration()

static void set_fdr_from_registration ( const uic_main_ext_fd_registration_t reg)
static

Set one registered file desriptor on the fdrs set.

Parameters
regThe external event registration whose descriptor should be set.

◆ uic_main_check_registration()

static void uic_main_check_registration ( const uic_main_ext_fd_registration_t reg)
static

Call the registered handlers in reg if the fd is set.

This function is called from uic_main_ext_registration_iter().

Parameters
regThe external event registration whose fd should be checked.

◆ uic_main_ext_setup()

static void uic_main_ext_setup ( void  )
static

Set the registered file desriptors before the select call.

Variable Documentation

◆ fd_max

int fd_max = -1
static

The highest numbered file descriptor.

◆ fdrs

fd_set fdrs
static

The set of readable file descriptors.