2
3
4
5
6
7
8
9
11#ifndef GIMBAL_MAIN_LOOP_H
12#define GIMBAL_MAIN_LOOP_H
14#include "../meta/instances/gimbal_object.h"
15#include "../meta/signals/gimbal_signal.h"
16#include "../containers/gimbal_linked_list.h"
18#define GBL_SELF_TYPE GblMainLoop
28 GBL_PRIORITY_HIGH_IDLE,
36
37
38
39
40
41
42
44 GBL_RESULT (*pFnEnqueueTask)(
GBL_SELF, GblTask* pTask);
45 GBL_RESULT (*pFnExecTask) (
GBL_SELF, GblTask* pTask);
46 GBL_RESULT (*pFnCancelTask) (
GBL_SELF, GblTask* pTask);
47 GBL_RESULT (*pFnExecIdle) (
GBL_SELF);
52
53
54
55
56
57
58
62 GblLinkedListNode listNode;
63 } taskQueue[GBL_PRIORITY_COUNT];
67 GBL_PRIORITY_LEVEL prevTaskPriority;
71 (execIdle, GBL_INSTANCE_TYPE),
72 (taskEnqueued, GBL_INSTANCE_TYPE, GBL_INSTANCE_TYPE)
#define GBL_FORWARD_DECLARE_STRUCT(S)
#define GBL_INSTANCE_DERIVE(derivedInstance, baseInstance)
#define GBL_CLASS_DERIVE(...)
GBL_PRIORITY_LEVEL
Enumeration for.
#define GBL_SIGNALS(instanceStruct,...)
uint8_t GblBool
Basic boolean type, standardized to sizeof(char)
Sequentially executing priority queue of GblTask objects.