From 73a6cf83313b9563cd4a2d29ce3730c3feb7f7eb Mon Sep 17 00:00:00 2001 From: apolisskyi Date: Mon, 31 Jul 2023 00:05:44 +0300 Subject: [PATCH] README: add AO debugger screenshot --- README.md | 6 ++++++ examples/request-fsm/main.c | 3 ++- main | Bin 51361 -> 53345 bytes 3 files changed, 8 insertions(+), 1 deletion(-) 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 fe3a9e94f6fd20c3a9a245b6318ed2971d84c527..ba2c3e4a10dcab06a6249d041a0279a21e08f658 100755 GIT binary patch delta 3243 zcmai0du&tJ89&$84kjVx5n3K5*eThXh?1KXC$aMw4v#_9LY`F-Z81(_CvM`{u@fEx zYNK>p+ewq%LshDx)>K_(+R?g8Ct`t`goK1>9ZLBFAyr!wkeKtwGz3NSot9#SYzPP>EgGp0_oY4}J1K$l$&{|ko18o-+4LzkZ=%SFRjWp)bu(oK0`S)MFIaE_~ zG!eah%njcjZ`1yY6OT2L#9WR|jy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