reactor-uc 0.1
Loading...
Searching...
No Matches
macros_api.h File Reference

Go to the source code of this file.

Macros

#define lf_set(port, val)
 
#define lf_set_array(port, array)
 
#define lf_get(trigger)
 Retreive the value of a trigger and cast it to the expected type.
 
#define lf_is_present(trigger)
 Retrieve the is_present field of the trigger.
 
#define lf_schedule_with_val(action, offset, val)
 
#define lf_schedule_without_val(action, offset)
 

Macro Definition Documentation

◆ lf_get

#define lf_get ( trigger)
Value:
(&(trigger)->value)

Retreive the value of a trigger and cast it to the expected type.

◆ lf_is_present

#define lf_is_present ( trigger)
Value:
(((Trigger *)(trigger))->is_present)

Retrieve the is_present field of the trigger.

◆ lf_schedule_with_val

#define lf_schedule_with_val ( action,
offset,
val )
Value:
do { \
__typeof__(val) __val = (val); \
lf_ret_t ret = (action)->super.schedule(&(action)->super, (offset), (const void *)&__val); \
if (ret == LF_FATAL) { \
LF_ERR(TRIG, "Scheduling an value, that doesn't have value!"); \
Scheduler *sched = (action)->super.super.parent->env->scheduler; \
sched->do_shutdown(sched, sched->current_tag(sched)); \
throw("Tried to schedule a value onto an action without a type!"); \
} \
} while (0)

◆ lf_schedule_without_val

#define lf_schedule_without_val ( action,
offset )
Value:
do { \
(action)->super.schedule(&(action)->super, (offset), NULL); \
} while (0)

◆ lf_set

#define lf_set ( port,
val )
Value:
do { \
__typeof__(val) __val = (val); \
Port *_port = (Port *)(port); \
_port->set(_port, &__val); \
} while (0)

◆ lf_set_array

#define lf_set_array ( port,
array )
Value:
do { \
Port *_port = (Port *)(port); \
_port->set(_port, array); \
} while (0)