26 #ifndef __CCNOOS_TESTS__
27 #define __CCNOOS_TESTS__
29 #include "../../../executionSystem/execution_system.h"
30 #include "../../../consoleMenu/console_menu.h"
32 #define Mn ccNOosTests
34 #define charBuffMax 80
39 float float_0, float_1;
40 double double_0, double_1;
49 UI_8 charsRead, chars2Write;
52 UI_16 SerializationTestReturn;
53 UI_16 TimedExecutionTestReturn;
54 UI_16 ExceptionsTestReturn;
58 #define MODdeclareCREATEINS
59 #define MODcallCREATEINS
69 #ifdef __USINGCONSOLEMENU
75 #define RETURN_TEST_PASSED (0x0000)
76 #define RETURN_TEST_IN_PROGRESS (0x0001)
77 #define RETURN_FAILED_TIMEDEXECUTION (0x0010)
78 #define RETURN_FAILED_SERIALIZATION (0x0100)
79 #define RETURN_FAILED_DESERIALIZATION (0x0110)
80 #define RETURN_FAILED_COMPARISON (0x0120)
86 #ifdef __USINGCONSOLEMENU
95 #define __PLATFORM_APP_CTEMPLATE(MODNAME) \
96 struct linkedEntryPointStruct setupListHead = {\
98 (struct computeModuleStruct*)&MODdataINST(Mn),\
101 struct linkedEntryPointStruct loopListHead = {\
103 (struct computeModuleStruct*)&MODdataINST(Mn),\
106 struct executionEntryStruct exeEntryPoints = {\
112 void applicationConfig()\
114 exeSystem = CreateExecutionSystemStruct(uSEC_PER_CLOCK);\
115 MODdataINST(Mn) = MODstructCREATE(Mn)();\
117 #define PLATFORM_APP_CTEMPLATE(MODNAME) __PLATFORM_APP_CTEMPLATE(MODNAME)
122 class MODCLASS_NAME(Mn) :
public computeModuleClass {
127 MODCLASS_SETUP_INLINE(
Mn);
128 MODCLASS_LOOP_INLINE(
Mn);
129 MODCLASS_SYSTICK_INLINE(
Mn);
130 MODCLASS_ExcpHndlr_INLINE(
Mn);
135 #define __PLATFORM_APP_CLASS(MODNAME) class theApplicationClass{\
137 linkedEntryPointClass setupListHead;\
138 linkedEntryPointClass loopListHead;\
139 linkedEntryPointClass systickListHead;\
140 linkedEntryPointClass exceptionListHead;\
141 MODCLASS_NAME(MODNAME) MODNAME##CompMod;\
142 executionSystemClass* theExecutionSystemPtr;\
143 theApplicationClass() :\
145 setupListHead(& MODNAME##CompMod, nullptr),\
146 loopListHead(& MODNAME##CompMod, nullptr),\
147 systickListHead(nullptr, nullptr),\
148 exceptionListHead(&MODNAME##CompMod, nullptr)\
150 theExecutionSystemPtr = &exeSystem;\
151 theExecutionSystemPtr->LinkTheListsHead(\
159 #define PLATFORM_APP_CLASS(MODNAME) __PLATFORM_APP_CLASS(MODNAME)
162 #endif // !__cplusplus
164 #endif // !__CCNOOS_TESTS__