From: Kevin Day Date: Mon, 12 Apr 2021 22:55:21 +0000 (-0500) Subject: Update: add comments, fix action type error reporting, and fix entry documentation. X-Git-Tag: 0.5.3~49 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=cff621b5e1e0a7e8dfe852c0d3f1c12e183a0dd8;p=fll Update: add comments, fix action type error reporting, and fix entry documentation. Be consistent and add comments when dealing with nanoseconds. Action types "consider" and "rule" should be the ".. or more.." error messages. The entry documentation should be using the word "need" and not "require". Improve wording. --- diff --git a/level_3/controller/c/private-common.h b/level_3/controller/c/private-common.h index 29a6be4..045e2c7 100644 --- a/level_3/controller/c/private-common.h +++ b/level_3/controller/c/private-common.h @@ -1085,9 +1085,9 @@ extern "C" { #define controller_thread_wait_timeout_3_before 28 #define controller_thread_wait_timeout_1_seconds 0 - #define controller_thread_wait_timeout_1_nanoseconds 20000000 + #define controller_thread_wait_timeout_1_nanoseconds 20000000 // 0.02 seconds in nanoseconds. #define controller_thread_wait_timeout_2_seconds 0 - #define controller_thread_wait_timeout_2_nanoseconds 200000000 + #define controller_thread_wait_timeout_2_nanoseconds 200000000 // 0.2 seconds in nanoseconds. #define controller_thread_wait_timeout_3_seconds 2 #define controller_thread_wait_timeout_3_nanoseconds 0 #define controller_thread_wait_timeout_4_seconds 20 @@ -1148,7 +1148,6 @@ extern "C" { /** * A wrapper used for passing a set of entry processing and execution related data. * - * status: The return status of entry processing, processed by the main thread. * name: A string representing the entry name. * main: The main data. * setting: The setting data. diff --git a/level_3/controller/c/private-entry.c b/level_3/controller/c/private-entry.c index 3c4534e..1b6a604 100644 --- a/level_3/controller/c/private-entry.c +++ b/level_3/controller/c/private-entry.c @@ -243,7 +243,7 @@ extern "C" { fprintf(main.data->error.to.stream, "%s%s%s%s", main.data->error.context.after->string, main.data->error.notable.before->string, cache->action.name_action.string, main.data->error.notable.after->string); fprintf(main.data->error.to.stream, "%s' requires ", main.data->error.context.before->string); - if (action->type == controller_entry_action_type_failsafe || action->type == controller_entry_action_type_item) { + if (action->type == controller_entry_action_type_consider || action->type == controller_entry_action_type_rule) { fprintf(main.data->error.to.stream, "%s%s%llu%s", main.data->error.context.after->string, main.data->error.notable.before->string, cache->action.line_action, main.data->error.notable.after->string); fprintf(main.data->error.to.stream, "%s or more parameters.%s%c", main.data->error.context.before->string, main.data->error.context.after->string, f_string_eol_s[0]); } diff --git a/level_3/controller/documents/entry.txt b/level_3/controller/documents/entry.txt index 12047fb..88ba038 100644 --- a/level_3/controller/documents/entry.txt +++ b/level_3/controller/documents/entry.txt @@ -14,8 +14,8 @@ Entry Documentation: The "consider" Action is a special case of a "rule" Action. All Action Parameters are the same as with the "rule" Action Parameters. - The difference is that "consider" is only processed at this spot at this time if and when some "rule" Action (or another "consider" Action) designates that this consideration is required (via "require"), wanted (via "want"), or wished (via "wish") from the within the referenced Rule file. - If this is determined to be executed, then this is immediately executed in the designated position and applies all properties as appropriate (such as "asynchronous", for example). + The difference is that "consider" is only processed (instead of being processed and executed) and when some "rule" Action designates that this consideration is required (via "need"), wanted (via "want"), or wished for (via "wish") from the within the Rule file. + If this is determined to be executed, then this is immediately executed when needed, wanted or wished for and applies all properties as appropriate (such as "asynchronous", for example). If this is determined not to be executed, then this "consider" is ignored as if it was never there in the first place. The "failsafe" Action accepts only a valid Item Name in which will be executed when a failure is detected.