reactor-uc 0.1
Loading...
Searching...
No Matches
Platform Struct Reference

#include <platform.h>

Data Fields

lf_ret_t(* initialize )(Platform *self)
 Perform any platform initialization such as initializing semaphores, configuring clocks, etc.
 
instant_t(* get_physical_time )(Platform *self)
 Return the current physical time in nanoseconds.
 
lf_ret_t(* wait_until )(Platform *self, instant_t wakeup_time)
 Put system to sleep until the wakeup time.
 
lf_ret_t(* wait_for )(Platform *self, interval_t duration)
 Put system to sleep until the wakeup time.
 
lf_ret_t(* wait_until_interruptible )(Platform *self, instant_t wakeup_time)
 Put the system to sleep until the wakeup time or until an asynchronous event occurs.
 
void(* new_async_event )(Platform *self)
 Signal the occurrence of an asynchronous event.
 
void(* enter_critical_section )(Platform *self)
 Enter and leave a critical section.
 
void(* leave_critical_section )(Platform *self)
 

Field Documentation

◆ enter_critical_section

void(* Platform::enter_critical_section) (Platform *self)

Enter and leave a critical section.

This is used so that an asynchronous context such as an ISR or another thread can safely schedule an event onto the event queue.

◆ get_physical_time

instant_t(* Platform::get_physical_time) (Platform *self)

Return the current physical time in nanoseconds.

◆ initialize

lf_ret_t(* Platform::initialize) (Platform *self)

Perform any platform initialization such as initializing semaphores, configuring clocks, etc.

Called once after construction.

◆ leave_critical_section

void(* Platform::leave_critical_section) (Platform *self)

◆ new_async_event

void(* Platform::new_async_event) (Platform *self)

Signal the occurrence of an asynchronous event.

This should wake up the platform if it is sleeping on wait_until_interruptible.

◆ wait_for

lf_ret_t(* Platform::wait_for) (Platform *self, interval_t duration)

Put system to sleep until the wakeup time.

Asynchronous events does not need to be handled.

◆ wait_until

lf_ret_t(* Platform::wait_until) (Platform *self, instant_t wakeup_time)

Put system to sleep until the wakeup time.

Asynchronous events does not need to be handled.

◆ wait_until_interruptible

lf_ret_t(* Platform::wait_until_interruptible) (Platform *self, instant_t wakeup_time)

Put the system to sleep until the wakeup time or until an asynchronous event occurs.


The documentation for this struct was generated from the following file: