RKH
Related to Framework

Miscellanueos and related with Framework (FWK) More...

Macros

#define RKH_CFG_FWK_MAX_SMA   4u
 Specify the maximum number of state machine applications (SMA) to be used by the application (can be a number in the range [1..64]). More...
 
#define RKH_CFG_FWK_DYN_EVT_EN   RKH_ENABLED
 If the dynamic event support (see RKH_CFG_FWK_DYN_EVT_EN) is set to 1, RKH allows to use event with parameters, defer/recall, allocating and recycling dynamic events, among other features. More...
 
#define RKH_CFG_FWK_MAX_EVT_POOL   0u
 If the dynamic event support is enabled (see RKH_CFG_FWK_DYN_EVT_EN) then the RKH_CFG_FWK_MAX_EVT_POOL can be used to specify the maximum number of fixed-size memory block pools to be used by the application (can be a number in the range [0..256]). Note that a value of 0 will completely suppress the memory pool services. More...
 
#define RKH_CFG_FWK_SIZEOF_EVT   8u
 Specify the size of the event signal. The valid values [in bits] are 8, 16 or 32. Default is 8. The higher the signal size, the higher the event structure size and therefore more memory consumption. See RKH_SIG_T data type. More...
 
#define RKH_CFG_FWK_MAX_SIGNALS   16u
 Specify the maximum number of event signals to be used by the application. More...
 
#define RKH_CFG_FWK_SIZEOF_EVT_SIZE   8u
 Specify the data type of event size. The valid values [in bits] are 8, 16 or 32. Default is 8. See RKH_ES_T, rkh_fwk_epool_register(), and RKH_ALLOC_EVT(). Use a 8 value if the bigger event size is minor to 256 bytes. More...
 
#define RKH_CFG_FWK_DEFER_EVT_EN   RKH_ENABLED
 If the RKH_CFG_FWK_DEFER_EVT_EN is set to 1 and the dynamic event support is enabled (see RKH_CFG_FWK_DYN_EVT_EN), RKH enables the defer and recall event features. More...
 
#define RKH_CFG_FWK_ASSERT_EN   RKH_ENABLED
 If the RKH_CFG_FWK_ASSERT_EN is set to 0 the checking assertions are disabled. In particular macros RKH_ASSERT(), RKH_REQUIRE(), RKH_ENSURE(), RKH_INVARIANT(), and RKH_ERROR() do NOT evaluate the test condition passed as the argument to these macros. One notable exception is the macro RKH_ALLEGE(), that still evaluates the test condition, but does not report assertion failures when the RKH_CFG_FWK_ASSERT_EN is enabled. More...
 
#define RKH_CFG_FWK_PUBSUB_EN   RKH_ENABLED
 If the RKH_CFG_FWK_PUBSUB_EN is set to 1 then RKH will include the native publish-subscriber module. More...
 
#define RKH_CFG_FWK_MAX_SUBS_CHANNELS   16
 Specify the maximum number of channels (topics) to which an active object wants to subscribe (can be a number in the range [1..128]). More...
 
#define RKH_CFG_HOOK_DISPATCH_EN   RKH_ENABLED
 If the RKH_CFG_HOOK_DISPATCH_EN is set to 1, RKH will invoke the dispatch hook function rkh_hook_dispatch() when dispatching an event to a SMA. When this is set the application must provide the hook function. More...
 
#define RKH_CFG_HOOK_SIGNAL_EN   RKH_ENABLED
 If the RKH_CFG_HOOK_SIGNAL_EN is set to 1, RKH will invoke the signal hook function rkh_hook_signal() when the producer of an event directly posts the event to the event queue of the consumer SMA. When this is set the application must provide the hook function. More...
 
#define RKH_CFG_HOOK_TIMEOUT_EN   RKH_ENABLED
 If the RKH_CFG_HOOK_TIMEOUT_EN is set to 1, RKH will invoke the timeout hook function rkh_hook_timeout() when a timer expires just before the assigned event is directly posted into the state machine application queue. When this is set the application must provide the hook function. More...
 
#define RKH_CFG_HOOK_START_EN   RKH_ENABLED
 If the RKH_CFG_HOOK_START_EN is set to 1, RKH will invoke the start hook function rkh_hook_start() just before the RKH takes over control of the application. When this is set the application must provide the hook function. More...
 
#define RKH_CFG_HOOK_EXIT_EN   RKH_ENABLED
 If the RKH_CFG_HOOK_EXIT_EN is set to 1, RKH will invoke the exit hook function just before it returns to the underlying OS/RTOS. Usually, the rkh_hook_exit() is useful when executing clean-up code upon SMA terminate or framework exit. When this is set the application must provide the hook function. More...
 
#define RKH_CFG_HOOK_TIMETICK_EN   RKH_ENABLED
 If the RKH_CFG_HOOK_TIMETICK_EN is set to 1, RKH will invoke the time tick hook function from rkh_tmr_tick(), at the very beginning of that, to give priority to user or port-specific code when the tick interrupt occurs. More...
 
#define RKH_CFG_HOOK_PUT_TRCEVT_EN   RKH_DISABLED
 If the RKH_CFG_HOOK_PUT_TRCEVT_EN is set to 1, RKH will invoke the rkh_hook_putTrcEvt() function from rkh_trc_end() function, at the end of that, to allow to the application to extend the functionality of RKH, giving the port developer the opportunity to add code that will be called when is put a trace event into the stream buffer. When this is set the application must provide the hook function. More...
 
#define RKH_CFG_FWK_TICK_RATE_HZ   100u
 Specify the frequency of the framework tick interrupt (number of ticks in one second). It's the rate at which the rkh_tmr_tick() function is invoked. This configuration constant is not used by RKH, it is just a value to allow an application to deal with time when using timer services, converting ticks to time. See RKH_TICK_RATE_MS constant. More...
 
#define RKH_CFG_FWK_AWARE_ISR_PRIO   0
 This number divides interrupts into "aware" and "unware" interrupts, which are never disabled, and "aware" interrupts, which are disabled in the RKH critical section. For example, an interrupt priority number lower than RKH_CFG_FWK_AWARE_ISR_PRIO indicates an "unware" interrupt, whereas an interrupt priority number equal or higher than RKH_CFG_FWK_AWARE_ISR_PRIO indicates an "aware" interrupt. More...
 

Detailed Description

Miscellanueos and related with Framework (FWK)

Macro Definition Documentation

◆ RKH_CFG_FWK_MAX_SMA

#define RKH_CFG_FWK_MAX_SMA   4u

Specify the maximum number of state machine applications (SMA) to be used by the application (can be a number in the range [1..64]).

Type value Integer
Range value [1..64]
Default configuration: 4

Definition at line 88 of file rkhcfg.h.

◆ RKH_CFG_FWK_DYN_EVT_EN

#define RKH_CFG_FWK_DYN_EVT_EN   RKH_ENABLED

If the dynamic event support (see RKH_CFG_FWK_DYN_EVT_EN) is set to 1, RKH allows to use event with parameters, defer/recall, allocating and recycling dynamic events, among other features.

Type value Boolean
Range value
Default configuration: RKH_DISABLED

Definition at line 100 of file rkhcfg.h.

◆ RKH_CFG_FWK_MAX_EVT_POOL

#define RKH_CFG_FWK_MAX_EVT_POOL   0u

If the dynamic event support is enabled (see RKH_CFG_FWK_DYN_EVT_EN) then the RKH_CFG_FWK_MAX_EVT_POOL can be used to specify the maximum number of fixed-size memory block pools to be used by the application (can be a number in the range [0..256]). Note that a value of 0 will completely suppress the memory pool services.

Type value Integer
Range value [0..255]
Default configuration: 0

Definition at line 114 of file rkhcfg.h.

◆ RKH_CFG_FWK_SIZEOF_EVT

#define RKH_CFG_FWK_SIZEOF_EVT   8u

Specify the size of the event signal. The valid values [in bits] are 8, 16 or 32. Default is 8. The higher the signal size, the higher the event structure size and therefore more memory consumption. See RKH_SIG_T data type.

Type value Integer
Range value [8, 16, 32]
Default configuration: 8

Definition at line 127 of file rkhcfg.h.

◆ RKH_CFG_FWK_MAX_SIGNALS

#define RKH_CFG_FWK_MAX_SIGNALS   16u

Specify the maximum number of event signals to be used by the application.

Type value Integer
Range value [1..65536]
Default configuration: 16

Definition at line 138 of file rkhcfg.h.

◆ RKH_CFG_FWK_SIZEOF_EVT_SIZE

#define RKH_CFG_FWK_SIZEOF_EVT_SIZE   8u

Specify the data type of event size. The valid values [in bits] are 8, 16 or 32. Default is 8. See RKH_ES_T, rkh_fwk_epool_register(), and RKH_ALLOC_EVT(). Use a 8 value if the bigger event size is minor to 256 bytes.

Type value Integer
Range value [8, 16, 32]
Default configuration: 8

Definition at line 151 of file rkhcfg.h.

◆ RKH_CFG_FWK_DEFER_EVT_EN

#define RKH_CFG_FWK_DEFER_EVT_EN   RKH_ENABLED

If the RKH_CFG_FWK_DEFER_EVT_EN is set to 1 and the dynamic event support is enabled (see RKH_CFG_FWK_DYN_EVT_EN), RKH enables the defer and recall event features.

Type value Boolean
Range value
Default configuration: RKH_DISABLED

Definition at line 163 of file rkhcfg.h.

◆ RKH_CFG_FWK_ASSERT_EN

#define RKH_CFG_FWK_ASSERT_EN   RKH_ENABLED

If the RKH_CFG_FWK_ASSERT_EN is set to 0 the checking assertions are disabled. In particular macros RKH_ASSERT(), RKH_REQUIRE(), RKH_ENSURE(), RKH_INVARIANT(), and RKH_ERROR() do NOT evaluate the test condition passed as the argument to these macros. One notable exception is the macro RKH_ALLEGE(), that still evaluates the test condition, but does not report assertion failures when the RKH_CFG_FWK_ASSERT_EN is enabled.

Type value Boolean
Range value
Default configuration: RKH_ENABLED

Definition at line 179 of file rkhcfg.h.

◆ RKH_CFG_FWK_PUBSUB_EN

#define RKH_CFG_FWK_PUBSUB_EN   RKH_ENABLED

If the RKH_CFG_FWK_PUBSUB_EN is set to 1 then RKH will include the native publish-subscriber module.

Type value Boolean
Range value
Default configuration: RKH_ENABLED

Definition at line 190 of file rkhcfg.h.

◆ RKH_CFG_FWK_MAX_SUBS_CHANNELS

#define RKH_CFG_FWK_MAX_SUBS_CHANNELS   16

Specify the maximum number of channels (topics) to which an active object wants to subscribe (can be a number in the range [1..128]).

Type value Integer
Range value [1..128]
Default configuration: 16

Definition at line 201 of file rkhcfg.h.

◆ RKH_CFG_HOOK_DISPATCH_EN

#define RKH_CFG_HOOK_DISPATCH_EN   RKH_ENABLED

If the RKH_CFG_HOOK_DISPATCH_EN is set to 1, RKH will invoke the dispatch hook function rkh_hook_dispatch() when dispatching an event to a SMA. When this is set the application must provide the hook function.

Type value Boolean
Range value
Default configuration: RKH_DISABLED

Definition at line 214 of file rkhcfg.h.

◆ RKH_CFG_HOOK_SIGNAL_EN

#define RKH_CFG_HOOK_SIGNAL_EN   RKH_ENABLED

If the RKH_CFG_HOOK_SIGNAL_EN is set to 1, RKH will invoke the signal hook function rkh_hook_signal() when the producer of an event directly posts the event to the event queue of the consumer SMA. When this is set the application must provide the hook function.

Type value Boolean
Range value
Default configuration: RKH_DISABLED

Definition at line 227 of file rkhcfg.h.

◆ RKH_CFG_HOOK_TIMEOUT_EN

#define RKH_CFG_HOOK_TIMEOUT_EN   RKH_ENABLED

If the RKH_CFG_HOOK_TIMEOUT_EN is set to 1, RKH will invoke the timeout hook function rkh_hook_timeout() when a timer expires just before the assigned event is directly posted into the state machine application queue. When this is set the application must provide the hook function.

Type value Boolean
Range value
Default configuration: RKH_DISABLED

Definition at line 241 of file rkhcfg.h.

◆ RKH_CFG_HOOK_START_EN

#define RKH_CFG_HOOK_START_EN   RKH_ENABLED

If the RKH_CFG_HOOK_START_EN is set to 1, RKH will invoke the start hook function rkh_hook_start() just before the RKH takes over control of the application. When this is set the application must provide the hook function.

Type value Boolean
Range value
Default configuration: RKH_DISABLED

Definition at line 255 of file rkhcfg.h.

◆ RKH_CFG_HOOK_EXIT_EN

#define RKH_CFG_HOOK_EXIT_EN   RKH_ENABLED

If the RKH_CFG_HOOK_EXIT_EN is set to 1, RKH will invoke the exit hook function just before it returns to the underlying OS/RTOS. Usually, the rkh_hook_exit() is useful when executing clean-up code upon SMA terminate or framework exit. When this is set the application must provide the hook function.

Type value Boolean
Range value
Default configuration: RKH_DISABLED

Definition at line 269 of file rkhcfg.h.

◆ RKH_CFG_HOOK_TIMETICK_EN

#define RKH_CFG_HOOK_TIMETICK_EN   RKH_ENABLED

If the RKH_CFG_HOOK_TIMETICK_EN is set to 1, RKH will invoke the time tick hook function from rkh_tmr_tick(), at the very beginning of that, to give priority to user or port-specific code when the tick interrupt occurs.

Usually, the rkh_hook_timetick() allows to the application to extend the functionality of RKH, giving the port developer the opportunity to add code that will be called by rkh_tmr_tick(). Frequently, the rkh_hook_timetick() is called from the tick ISR and must not make any blocking calls and must execute as quickly as possible. When this is set the application must provide the hook function.

Type value Boolean
Range value
Default configuration: RKH_DISABLED

Definition at line 289 of file rkhcfg.h.

◆ RKH_CFG_HOOK_PUT_TRCEVT_EN

#define RKH_CFG_HOOK_PUT_TRCEVT_EN   RKH_DISABLED

If the RKH_CFG_HOOK_PUT_TRCEVT_EN is set to 1, RKH will invoke the rkh_hook_putTrcEvt() function from rkh_trc_end() function, at the end of that, to allow to the application to extend the functionality of RKH, giving the port developer the opportunity to add code that will be called when is put a trace event into the stream buffer. When this is set the application must provide the hook function.

Type value Boolean
Range value
Default configuration: RKH_DISABLED

Definition at line 304 of file rkhcfg.h.

◆ RKH_CFG_FWK_TICK_RATE_HZ

#define RKH_CFG_FWK_TICK_RATE_HZ   100u

Specify the frequency of the framework tick interrupt (number of ticks in one second). It's the rate at which the rkh_tmr_tick() function is invoked. This configuration constant is not used by RKH, it is just a value to allow an application to deal with time when using timer services, converting ticks to time. See RKH_TICK_RATE_MS constant.

Type value Integer
Range value [1..1000]
Default configuration: 100

Definition at line 318 of file rkhcfg.h.

◆ RKH_CFG_FWK_AWARE_ISR_PRIO

#define RKH_CFG_FWK_AWARE_ISR_PRIO   0

This number divides interrupts into "aware" and "unware" interrupts, which are never disabled, and "aware" interrupts, which are disabled in the RKH critical section. For example, an interrupt priority number lower than RKH_CFG_FWK_AWARE_ISR_PRIO indicates an "unware" interrupt, whereas an interrupt priority number equal or higher than RKH_CFG_FWK_AWARE_ISR_PRIO indicates an "aware" interrupt.

Type value Integer
Range value [1..255]
Default configuration: 0

Definition at line 334 of file rkhcfg.h.