diff --git a/README.md b/README.md index 3dad337..6f3be57 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,12 @@ Minimalistic implementation of Active Object pattern + FSM for embedded systems. [Request: retry/timeout, transition table demo](./examples/request-fsm/README.md) +## Advantages + +Preprocessor templates allow strict typings and debugger suggestions, all types and enums have human-readable names, e.g. from [Request demo](./examples/request-fsm/README.md): + +![types](./docs/active-object-typings.png) + TODO: make naming conventions e.g.: - types diff --git a/examples/request-fsm/main.c b/examples/request-fsm/main.c index 1574db1..c6d2d25 100644 --- a/examples/request-fsm/main.c +++ b/examples/request-fsm/main.c @@ -6,7 +6,7 @@ #include "../../src/fsm/fsm.h" #define REQUEST_AO REQUEST_AO -#define REQUEST_QUEUE_MAX_CAPACITY (8) +#define REQUEST_QUEUE_MAX_CAPACITY (4) #define NO_RETRIES_LEFT (0) #define MAX_RETRIES (1) @@ -15,6 +15,7 @@ typedef enum { } ACTIVE_OBJECT_ID; typedef enum { + NO_SIG, MAKE_REQUEST_SIG, REQUEST_SUCCESS_SIG, REQUEST_ERROR_SIG, diff --git a/main b/main index fe3a9e9..ba2c3e4 100755 Binary files a/main and b/main differ