Skip to content

Release Candidate 2

Pre-release
Pre-release
Compare
Choose a tag to compare
@flplv flplv released this 24 Dec 20:29
· 10 commits to master since this release

Whats new?

A new Context and Context Factory subsystem was introduced.

You can use it to initialize the whole react.o system from static allocation, with a single function call.

reacto_context_factory(main_loop_strategy_priority_queue,
                           &timed_queue_context,
                           &queues_context);

(rot13_factory example)

Time unit is now configurable

If your platform time_now function return in milliseconds, then thats the time unit of your application. react.o is time agnostic itself.

#ifndef REACTO_TIME_TYPE
typedef unsigned long reacto_time_t;
#else
typedef REACTO_TIME_TYPE reacto_time_t;
#endif
reacto_time_t time_now ();

(time.h header)

An improved cross platform build system

A separated folder and an abstract base class were created to hold platform environment construction and configuration. Each platform derives from the base class now. You can create new platform files easily.
(built_platforms folder)

Real Time monitoring

A new module called ab_timing was introduced to keep record of the time spent during a request, this way, you can monitor whenever a real time constraint is missed and take action upon.

ab_timing_start(&ev.ab);
ab_timing_copy(&ev_out.ab, &ev_in.ab);
ab_timing_check_criteria_failed(&event.ab, 10)

(msp430_realtime_blink example)

Main Loop sleep made easier

A new function main_loop_sleep_timeout was added, it informs the handler the time duration that the system can sleep. No busy loop anymore, sleep and save energy.

reacto_time_t sleep = main_loop_sleep_timeout(loop);
usleep((uint32_t)sleep * 1000);

(rot13)