This commit is contained in:
QL 2020-05-14 11:20:25 -04:00
parent 4646482066
commit 01a4ab0766
4 changed files with 202 additions and 175 deletions

5
.gitignore vendored
View File

@ -25,6 +25,7 @@
*.suo
*.chw
*.sfr
*.ewt
*.user
*.avrsuo
*.Debug
@ -35,6 +36,7 @@ lint*.txt
*.qlc
JLink*.*
version-*
metrics.dox
html/
test_priv/
@ -57,6 +59,3 @@ QSpy/
lib/
obj/
output/
lint/*.txt
lint/MISRA_Exemplar_Suite_test/*.txt

View File

@ -20,10 +20,10 @@ Also, this release updates the QP/C ports and examples for workstations (Windows
- `FREAD_S()` -> `fread_s()`
- `FOPEN_S()` -> `fopen_s()`
- `LOCALTIME_S()` -> `localtime_s()`
These "safe" functions are mapped to the best approximation of these services available on a given platform. For example, `STRCPY_S()` is mapped to `strcpy_s()` on Windows and `strcpy()` on POSIX (Linux/MacOS/etc.).
Finally, this release improves the comments in the QF_stop() function. The comments now make it very clear that after calling QF_stop() the application must terminate and cannot continue. In particular, QF_stop() is **not** intended to be followed by a call to QF_init() to "resurrect" the application. The previous comments apparently were confusing and some developers attempted to "restart" a running application, which led to system crashes.
Finally, this release improves the comments in the QF_stop() function. The comments now make it very clear that after calling QF_stop() the application must terminate and cannot continue. In particular, QF_stop() is **not** intended to be followed by a call to QF_init() to "resurrect" the application. The previous comments apparently were confusing and some developers attempted to "restart" a running application, which led to system crashes.
------------------------------------------------------------------------------

View File

@ -1,167 +1,167 @@
/** @page metrics Code Metrics
@code{cpp}
Code Metrics for QP/C
================================================
NLOC CCN token PARAM length location
------------------------------------------------
6 1 23 1 15 Q_DEFINE_THIS_MODULE@50-64@..\src\qf\qep_hsm.c
9 1 53 2 9 QHsm_ctor@128-136@..\src\qf\qep_hsm.c
48 8 379 2 71 QHsm_init_@148-218@..\src\qf\qep_hsm.c
5 1 32 2 5 QHsm_top@235-239@..\src\qf\qep_hsm.c
102 15 700 2 147 QHsm_dispatch_@254-400@..\src\qf\qep_hsm.c
98 15 492 2 133 QHsm_tran_@413-545@..\src\qf\qep_hsm.c
16 3 105 2 22 QHsm_isIn@561-582@..\src\qf\qep_hsm.c
22 4 131 2 30 QHsm_childState_@607-636@..\src\qf\qep_hsm.c
4 1 10 1 8 Q_DEFINE_THIS_MODULE@50-57@..\src\qf\qep_msm.c
9 1 50 2 10 QMsm_ctor@113-122@..\src\qf\qep_msm.c
23 4 213 2 38 QMsm_init_@135-172@..\src\qf\qep_msm.c
112 21 773 2 164 QMsm_dispatch_@187-350@..\src\qf\qep_msm.c
50 9 368 2 62 QMsm_execTatbl_@367-428@..\src\qf\qep_msm.c
20 4 128 3 27 QMsm_exitToTranSource_@441-467@..\src\qf\qep_msm.c
40 6 254 2 48 QMsm_enterHistory_@482-529@..\src\qf\qep_msm.c
11 3 69 2 12 QMsm_isInState@546-557@..\src\qf\qep_msm.c
22 4 101 2 28 QMsm_childStateObj_@577-604@..\src\qf\qep_msm.c
10 3 64 1 17 QF_add_@70-86@..\src\qf\qf_act.c
10 3 78 1 16 QF_remove_@103-118@..\src\qf\qf_act.c
8 2 50 2 8 QF_bzero@144-151@..\src\qf\qf_act.c
24 6 143 1 29 QF_LOG2@156-184@..\src\qf\qf_act.c
86 15 478 4 125 QActive_post_@94-218@..\src\qf\qf_actq.c
47 8 295 2 70 QActive_postLIFO_@238-307@..\src\qf\qf_actq.c
37 3 247 1 47 QActive_get_@331-377@..\src\qf\qf_actq.c
10 2 61 1 13 QF_getQueueMin@398-410@..\src\qf\qf_actq.c
12 1 68 2 14 QTicker_ctor@439-452@..\src\qf\qf_actq.c
5 1 35 2 5 QTicker_init_@454-458@..\src\qf\qf_actq.c
12 2 83 2 15 QTicker_dispatch_@460-474@..\src\qf\qf_actq.c
28 2 155 4 37 QTicker_post_@480-516@..\src\qf\qf_actq.c
5 1 30 2 5 QTicker_postLIFO_@518-522@..\src\qf\qf_actq.c
15 1 89 3 18 QActive_defer@78-95@..\src\qf\qf_defer.c
34 3 174 2 54 QActive_recall@119-172@..\src\qf\qf_defer.c
12 2 66 2 14 QActive_flushDeferred@190-203@..\src\qf\qf_defer.c
5 1 37 2 6 QEvt_ctor@69-74@..\src\qf\qf_dyn.c
15 3 107 3 23 QF_poolInit@113-135@..\src\qf\qf_dyn.c
31 5 174 3 41 QF_newX_@164-204@..\src\qf\qf_dyn.c
26 3 167 1 40 QF_gc@230-269@..\src\qf\qf_dyn.c
15 2 97 2 23 QF_newRef_@286-308@..\src\qf\qf_dyn.c
10 1 70 1 12 QF_deleteRef_@320-331@..\src\qf\qf_dyn.c
3 1 17 1 3 QF_poolGetMaxBlockSize@338-340@..\src\qf\qf_dyn.c
32 5 233 4 47 QMPool_init@89-135@..\src\qf\qf_mem.c
15 2 111 2 22 QMPool_put@159-180@..\src\qf\qf_mem.c
42 4 243 2 65 QMPool_get@211-275@..\src\qf\qf_mem.c
10 3 60 1 14 QF_getPoolMin@290-303@..\src\qf\qf_mem.c
5 1 35 2 10 QF_psInit@87-96@..\src\qf\qf_ps.c
37 5 220 2 65 QF_publish_@121-185@..\src\qf\qf_ps.c
17 5 117 2 23 QActive_subscribe@206-228@..\src\qf\qf_ps.c
16 5 117 2 25 QActive_unsubscribe@255-279@..\src\qf\qf_ps.c
21 5 140 1 26 QActive_unsubscribeAll@304-329@..\src\qf\qf_ps.c
12 1 68 2 17 QActive_ctor@66-82@..\src\qf\qf_qact.c
13 2 85 3 13 QEQueue_init@72-84@..\src\qf\qf_qeq.c
57 8 310 3 76 QEQueue_post@115-190@..\src\qf\qf_qeq.c
34 5 202 2 45 QEQueue_postLIFO@215-259@..\src\qf\qf_qeq.c
38 4 226 1 48 QEQueue_get@280-327@..\src\qf\qf_qeq.c
12 1 68 2 28 QMActive_ctor@67-94@..\src\qf\qf_qmact.c
68 7 393 2 99 QF_tickX_@79-177@..\src\qf\qf_time.c
13 3 66 1 14 QF_noTimeEvtsActiveX@206-219@..\src\qf\qf_time.c
13 2 99 4 30 QTimeEvt_ctorX@239-268@..\src\qf\qf_time.c
30 7 212 3 54 QTimeEvt_armX@298-351@..\src\qf\qf_time.c
32 2 174 1 39 QTimeEvt_disarm@372-410@..\src\qf\qf_time.c
32 7 218 2 57 QTimeEvt_rearm@433-489@..\src\qf\qf_time.c
5 2 41 1 5 QTimeEvt_wasDisarmed@513-517@..\src\qf\qf_time.c
8 1 31 1 10 QTimeEvt_currCtr@535-544@..\src\qf\qf_time.c
11 2 76 1 16 QF_init@72-87@..\src\qk\qk.c
3 1 10 1 4 QF_stop@107-110@..\src\qk\qk.c
6 2 26 1 8 initial_events@115-122@..\src\qk\qk.c
10 3 36 1 14 QF_run@133-146@..\src\qk\qk.c
21 5 140 7 32 QActive_start_@170-201@..\src\qk\qk.c
22 2 121 1 33 QK_schedLock@225-257@..\src\qk\qk.c
21 4 131 1 33 QK_schedUnlock@275-307@..\src\qk\qk.c
15 3 78 1 19 QK_sched_@323-341@..\src\qk\qk.c
62 16 375 1 106 QK_activate_@353-458@..\src\qk\qk.c
9 2 64 1 13 QF_init@73-85@..\src\qv\qv.c
3 1 10 1 4 QF_stop@104-107@..\src\qv\qv.c
40 9 202 1 75 QF_run@117-191@..\src\qv\qv.c
14 3 110 7 20 QActive_start_@215-234@..\src\qv\qv.c
14 2 108 1 22 QF_init@75-96@..\src\qxk\qxk.c
3 1 10 1 4 QF_stop@115-118@..\src\qxk\qxk.c
6 2 26 1 8 initial_events@123-130@..\src\qxk\qxk.c
10 3 36 1 15 QF_run@140-154@..\src\qxk\qxk.c
23 6 160 7 34 QActive_start_@179-212@..\src\qxk\qxk.c
25 3 144 1 35 QXK_schedLock@244-278@..\src\qxk\qxk.c
21 4 134 1 33 QXK_schedUnlock@301-333@..\src\qxk\qxk.c
53 7 281 1 68 QXK_sched_@348-415@..\src\qxk\qxk.c
79 16 503 1 132 QXK_activate_@427-558@..\src\qxk\qxk.c
13 2 76 1 20 QXK_current@561-580@..\src\qxk\qxk.c
16 4 113 2 25 QXMutex_init@86-110@..\src\qxk\qxk_mutex.c
69 12 541 2 109 QXMutex_lock@133-241@..\src\qxk\qxk_mutex.c
45 10 323 1 69 QXMutex_tryLock@264-332@..\src\qxk\qxk_mutex.c
69 16 508 1 115 QXMutex_unlock@354-468@..\src\qxk\qxk_mutex.c
8 1 49 3 10 QXSemaphore_init@79-88@..\src\qxk\qxk_sema.c
44 7 324 2 69 QXSemaphore_wait@115-183@..\src\qxk\qxk_sema.c
15 2 61 1 20 QXSemaphore_tryWait@200-219@..\src\qxk\qxk_sema.c
30 6 197 1 49 QXSemaphore_signal@241-289@..\src\qxk\qxk_sema.c
18 1 109 3 21 QXThread_ctor@108-128@..\src\qxk\qxk_xthr.c
5 1 30 2 5 QXThread_init_@132-136@..\src\qxk\qxk_xthr.c
5 1 30 2 5 QXThread_dispatch_@139-143@..\src\qxk\qxk_xthr.c
25 6 202 7 47 QXThread_start_@170-216@..\src\qxk\qxk_xthr.c
99 13 535 4 133 QXThread_post_@259-391@..\src\qxk\qxk_xthr.c
5 1 30 2 5 QXThread_postLIFO_@404-408@..\src\qxk\qxk_xthr.c
62 7 505 1 88 QXThread_queueGet@430-517@..\src\qxk\qxk_xthr.c
5 1 51 1 7 QXThread_block_@527-533@..\src\qxk\qxk_xthr.c
8 3 58 1 8 QXThread_unblock_@543-550@..\src\qxk\qxk_xthr.c
19 3 155 3 37 QXThread_teArm_@561-597@..\src\qxk\qxk_xthr.c
11 2 46 1 13 QXThread_teDisarm_@607-619@..\src\qxk\qxk_xthr.c
21 3 195 1 37 QXThread_delay@623-659@..\src\qxk\qxk_xthr.c
14 2 68 1 16 QXThread_delayCancel@663-678@..\src\qxk\qxk_xthr.c
15 2 108 1 25 QXK_threadRet_@691-715@..\src\qxk\qxk_xthr.c
35 file analyzed.
==============================================================
NLOC Avg.NLOC AvgCCN Avg.token function_cnt file
--------------------------------------------------------------
5 0.0 0.0 0.0 0 ..\include\qassert.h
87 0.0 0.0 0.0 0 ..\include\qep.h
18 0.0 0.0 0.0 0 ..\include\qequeue.h
85 0.0 0.0 0.0 0 ..\include\qf.h
20 0.0 0.0 0.0 0 ..\include\qk.h
19 0.0 0.0 0.0 0 ..\include\qmpool.h
9 0.0 0.0 0.0 0 ..\include\qpc.h
10 0.0 0.0 0.0 0 ..\include\qpset.h
256 0.0 0.0 0.0 0 ..\include\qs.h
4 0.0 0.0 0.0 0 ..\include\qstamp.c
0 0.0 0.0 0.0 0 ..\include\qs_dummy.h
5 0.0 0.0 0.0 0 ..\include\qv.h
23 0.0 0.0 0.0 0 ..\include\qxk.h
32 0.0 0.0 0.0 0 ..\include\qxthread.h
319 38.2 6.0 239.4 8 ..\src\qf\qep_hsm.c
308 32.3 5.9 218.4 9 ..\src\qf\qep_msm.c
60 13.0 3.5 83.8 4 ..\src\qf\qf_act.c
260 26.9 3.9 161.3 9 ..\src\qf\qf_actq.c
68 20.3 2.0 109.7 3 ..\src\qf\qf_defer.c
114 15.0 2.3 95.6 7 ..\src\qf\qf_dyn.c
106 24.8 3.5 161.8 4 ..\src\qf\qf_mem.c
106 19.2 4.2 125.8 5 ..\src\qf\qf_ps.c
14 12.0 1.0 68.0 1 ..\src\qf\qf_qact.c
149 35.5 4.8 205.8 4 ..\src\qf\qf_qeq.c
14 12.0 1.0 68.0 1 ..\src\qf\qf_qmact.c
210 25.1 3.9 154.2 8 ..\src\qf\qf_time.c
180 19.0 4.2 110.3 9 ..\src\qk\qk.c
74 16.5 3.8 96.5 4 ..\src\qv\qv.c
257 24.7 4.6 147.8 10 ..\src\qxk\qxk.c
206 49.8 10.5 371.2 4 ..\src\qxk\qxk_mutex.c
104 24.2 4.0 157.8 4 ..\src\qxk\qxk_sema.c
332 22.3 3.3 151.6 14 ..\src\qxk\qxk_xthr.c
19 0.0 0.0 0.0 0 ..\src\qf_pkg.h
13 0.0 0.0 0.0 0 ..\src\qs_pkg.h
16 0.0 0.0 0.0 0 ..\src\qxk_pkg.h
=========================================================================================================
!!!! Warnings (cyclomatic_complexity > 20 or nloc > 1000000 or length > 500 or parameter_count > 10) !!!!
================================================
NLOC CCN token PARAM length location
------------------------------------------------
112 21 773 2 164 QMsm_dispatch_@187-350@..\src\qf\qep_msm.c
==========================================================================================
Total nloc Avg.NLOC AvgCCN Avg.token Fun Cnt Warning cnt Fun Rt nloc Rt
------------------------------------------------------------------------------------------
3502 25.1 4.3 159.5 108 1 0.01 0.04
@endcode
*/
/** @page metrics Code Metrics
@code{cpp}
Code Metrics for QP/C
================================================
NLOC CCN token PARAM length location
------------------------------------------------
6 1 23 1 15 Q_DEFINE_THIS_MODULE@50-64@..\src\qf\qep_hsm.c
9 1 53 2 9 QHsm_ctor@128-136@..\src\qf\qep_hsm.c
48 8 379 2 71 QHsm_init_@148-218@..\src\qf\qep_hsm.c
5 1 32 2 5 QHsm_top@235-239@..\src\qf\qep_hsm.c
102 15 700 2 147 QHsm_dispatch_@254-400@..\src\qf\qep_hsm.c
98 15 492 2 133 QHsm_tran_@413-545@..\src\qf\qep_hsm.c
16 3 105 2 22 QHsm_isIn@561-582@..\src\qf\qep_hsm.c
22 4 131 2 30 QHsm_childState_@607-636@..\src\qf\qep_hsm.c
4 1 10 1 8 Q_DEFINE_THIS_MODULE@50-57@..\src\qf\qep_msm.c
9 1 50 2 10 QMsm_ctor@113-122@..\src\qf\qep_msm.c
23 4 213 2 38 QMsm_init_@135-172@..\src\qf\qep_msm.c
112 21 773 2 164 QMsm_dispatch_@187-350@..\src\qf\qep_msm.c
50 9 368 2 62 QMsm_execTatbl_@367-428@..\src\qf\qep_msm.c
20 4 128 3 27 QMsm_exitToTranSource_@441-467@..\src\qf\qep_msm.c
40 6 254 2 48 QMsm_enterHistory_@482-529@..\src\qf\qep_msm.c
11 3 69 2 12 QMsm_isInState@546-557@..\src\qf\qep_msm.c
22 4 101 2 28 QMsm_childStateObj_@577-604@..\src\qf\qep_msm.c
10 3 64 1 17 QF_add_@70-86@..\src\qf\qf_act.c
10 3 78 1 16 QF_remove_@103-118@..\src\qf\qf_act.c
8 2 50 2 8 QF_bzero@144-151@..\src\qf\qf_act.c
24 6 143 1 29 QF_LOG2@156-184@..\src\qf\qf_act.c
86 15 478 4 125 QActive_post_@94-218@..\src\qf\qf_actq.c
47 8 295 2 70 QActive_postLIFO_@238-307@..\src\qf\qf_actq.c
37 3 247 1 47 QActive_get_@331-377@..\src\qf\qf_actq.c
10 2 61 1 13 QF_getQueueMin@398-410@..\src\qf\qf_actq.c
12 1 68 2 14 QTicker_ctor@439-452@..\src\qf\qf_actq.c
5 1 35 2 5 QTicker_init_@454-458@..\src\qf\qf_actq.c
12 2 83 2 15 QTicker_dispatch_@460-474@..\src\qf\qf_actq.c
28 2 155 4 37 QTicker_post_@480-516@..\src\qf\qf_actq.c
5 1 30 2 5 QTicker_postLIFO_@518-522@..\src\qf\qf_actq.c
15 1 89 3 18 QActive_defer@78-95@..\src\qf\qf_defer.c
34 3 174 2 54 QActive_recall@119-172@..\src\qf\qf_defer.c
12 2 66 2 14 QActive_flushDeferred@190-203@..\src\qf\qf_defer.c
5 1 37 2 6 QEvt_ctor@69-74@..\src\qf\qf_dyn.c
15 3 107 3 23 QF_poolInit@113-135@..\src\qf\qf_dyn.c
31 5 174 3 41 QF_newX_@164-204@..\src\qf\qf_dyn.c
26 3 167 1 40 QF_gc@230-269@..\src\qf\qf_dyn.c
15 2 97 2 23 QF_newRef_@286-308@..\src\qf\qf_dyn.c
10 1 70 1 12 QF_deleteRef_@320-331@..\src\qf\qf_dyn.c
3 1 17 1 3 QF_poolGetMaxBlockSize@338-340@..\src\qf\qf_dyn.c
32 5 233 4 47 QMPool_init@89-135@..\src\qf\qf_mem.c
15 2 111 2 22 QMPool_put@159-180@..\src\qf\qf_mem.c
42 4 243 2 65 QMPool_get@211-275@..\src\qf\qf_mem.c
10 3 60 1 14 QF_getPoolMin@290-303@..\src\qf\qf_mem.c
5 1 35 2 10 QF_psInit@87-96@..\src\qf\qf_ps.c
37 5 220 2 65 QF_publish_@121-185@..\src\qf\qf_ps.c
17 5 117 2 23 QActive_subscribe@206-228@..\src\qf\qf_ps.c
16 5 117 2 25 QActive_unsubscribe@255-279@..\src\qf\qf_ps.c
21 5 140 1 26 QActive_unsubscribeAll@304-329@..\src\qf\qf_ps.c
12 1 68 2 17 QActive_ctor@66-82@..\src\qf\qf_qact.c
13 2 85 3 13 QEQueue_init@72-84@..\src\qf\qf_qeq.c
57 8 310 3 76 QEQueue_post@115-190@..\src\qf\qf_qeq.c
34 5 202 2 45 QEQueue_postLIFO@215-259@..\src\qf\qf_qeq.c
38 4 226 1 48 QEQueue_get@280-327@..\src\qf\qf_qeq.c
12 1 68 2 28 QMActive_ctor@67-94@..\src\qf\qf_qmact.c
68 7 393 2 99 QF_tickX_@79-177@..\src\qf\qf_time.c
13 3 66 1 14 QF_noTimeEvtsActiveX@206-219@..\src\qf\qf_time.c
13 2 99 4 30 QTimeEvt_ctorX@239-268@..\src\qf\qf_time.c
30 7 212 3 54 QTimeEvt_armX@298-351@..\src\qf\qf_time.c
32 2 174 1 39 QTimeEvt_disarm@372-410@..\src\qf\qf_time.c
32 7 218 2 57 QTimeEvt_rearm@433-489@..\src\qf\qf_time.c
5 2 41 1 5 QTimeEvt_wasDisarmed@513-517@..\src\qf\qf_time.c
8 1 31 1 10 QTimeEvt_currCtr@535-544@..\src\qf\qf_time.c
11 2 76 1 16 QF_init@72-87@..\src\qk\qk.c
3 1 10 1 4 QF_stop@107-110@..\src\qk\qk.c
6 2 26 1 8 initial_events@115-122@..\src\qk\qk.c
10 3 36 1 14 QF_run@133-146@..\src\qk\qk.c
21 5 140 7 32 QActive_start_@170-201@..\src\qk\qk.c
22 2 121 1 33 QK_schedLock@225-257@..\src\qk\qk.c
21 4 131 1 33 QK_schedUnlock@275-307@..\src\qk\qk.c
15 3 78 1 19 QK_sched_@323-341@..\src\qk\qk.c
62 16 375 1 106 QK_activate_@353-458@..\src\qk\qk.c
9 2 64 1 13 QF_init@73-85@..\src\qv\qv.c
3 1 10 1 4 QF_stop@104-107@..\src\qv\qv.c
40 9 202 1 75 QF_run@117-191@..\src\qv\qv.c
14 3 110 7 20 QActive_start_@215-234@..\src\qv\qv.c
14 2 108 1 22 QF_init@75-96@..\src\qxk\qxk.c
3 1 10 1 4 QF_stop@115-118@..\src\qxk\qxk.c
6 2 26 1 8 initial_events@123-130@..\src\qxk\qxk.c
10 3 36 1 15 QF_run@140-154@..\src\qxk\qxk.c
23 6 160 7 34 QActive_start_@179-212@..\src\qxk\qxk.c
25 3 144 1 35 QXK_schedLock@244-278@..\src\qxk\qxk.c
21 4 134 1 33 QXK_schedUnlock@301-333@..\src\qxk\qxk.c
53 7 281 1 68 QXK_sched_@348-415@..\src\qxk\qxk.c
79 16 503 1 132 QXK_activate_@427-558@..\src\qxk\qxk.c
13 2 76 1 20 QXK_current@561-580@..\src\qxk\qxk.c
16 4 113 2 25 QXMutex_init@86-110@..\src\qxk\qxk_mutex.c
69 12 541 2 109 QXMutex_lock@133-241@..\src\qxk\qxk_mutex.c
45 10 323 1 69 QXMutex_tryLock@264-332@..\src\qxk\qxk_mutex.c
69 16 508 1 115 QXMutex_unlock@354-468@..\src\qxk\qxk_mutex.c
8 1 49 3 10 QXSemaphore_init@79-88@..\src\qxk\qxk_sema.c
44 7 324 2 69 QXSemaphore_wait@115-183@..\src\qxk\qxk_sema.c
15 2 61 1 20 QXSemaphore_tryWait@200-219@..\src\qxk\qxk_sema.c
30 6 197 1 49 QXSemaphore_signal@241-289@..\src\qxk\qxk_sema.c
18 1 109 3 21 QXThread_ctor@108-128@..\src\qxk\qxk_xthr.c
5 1 30 2 5 QXThread_init_@132-136@..\src\qxk\qxk_xthr.c
5 1 30 2 5 QXThread_dispatch_@139-143@..\src\qxk\qxk_xthr.c
25 6 202 7 47 QXThread_start_@170-216@..\src\qxk\qxk_xthr.c
99 13 535 4 133 QXThread_post_@259-391@..\src\qxk\qxk_xthr.c
5 1 30 2 5 QXThread_postLIFO_@404-408@..\src\qxk\qxk_xthr.c
62 7 505 1 88 QXThread_queueGet@430-517@..\src\qxk\qxk_xthr.c
5 1 51 1 7 QXThread_block_@527-533@..\src\qxk\qxk_xthr.c
8 3 58 1 8 QXThread_unblock_@543-550@..\src\qxk\qxk_xthr.c
19 3 155 3 37 QXThread_teArm_@561-597@..\src\qxk\qxk_xthr.c
11 2 46 1 13 QXThread_teDisarm_@607-619@..\src\qxk\qxk_xthr.c
21 3 195 1 37 QXThread_delay@623-659@..\src\qxk\qxk_xthr.c
14 2 68 1 16 QXThread_delayCancel@663-678@..\src\qxk\qxk_xthr.c
15 2 108 1 25 QXK_threadRet_@691-715@..\src\qxk\qxk_xthr.c
35 file analyzed.
==============================================================
NLOC Avg.NLOC AvgCCN Avg.token function_cnt file
--------------------------------------------------------------
5 0.0 0.0 0.0 0 ..\include\qassert.h
87 0.0 0.0 0.0 0 ..\include\qep.h
18 0.0 0.0 0.0 0 ..\include\qequeue.h
85 0.0 0.0 0.0 0 ..\include\qf.h
20 0.0 0.0 0.0 0 ..\include\qk.h
19 0.0 0.0 0.0 0 ..\include\qmpool.h
9 0.0 0.0 0.0 0 ..\include\qpc.h
10 0.0 0.0 0.0 0 ..\include\qpset.h
256 0.0 0.0 0.0 0 ..\include\qs.h
4 0.0 0.0 0.0 0 ..\include\qstamp.c
0 0.0 0.0 0.0 0 ..\include\qs_dummy.h
5 0.0 0.0 0.0 0 ..\include\qv.h
23 0.0 0.0 0.0 0 ..\include\qxk.h
32 0.0 0.0 0.0 0 ..\include\qxthread.h
319 38.2 6.0 239.4 8 ..\src\qf\qep_hsm.c
308 32.3 5.9 218.4 9 ..\src\qf\qep_msm.c
60 13.0 3.5 83.8 4 ..\src\qf\qf_act.c
260 26.9 3.9 161.3 9 ..\src\qf\qf_actq.c
68 20.3 2.0 109.7 3 ..\src\qf\qf_defer.c
114 15.0 2.3 95.6 7 ..\src\qf\qf_dyn.c
106 24.8 3.5 161.8 4 ..\src\qf\qf_mem.c
106 19.2 4.2 125.8 5 ..\src\qf\qf_ps.c
14 12.0 1.0 68.0 1 ..\src\qf\qf_qact.c
149 35.5 4.8 205.8 4 ..\src\qf\qf_qeq.c
14 12.0 1.0 68.0 1 ..\src\qf\qf_qmact.c
210 25.1 3.9 154.2 8 ..\src\qf\qf_time.c
180 19.0 4.2 110.3 9 ..\src\qk\qk.c
74 16.5 3.8 96.5 4 ..\src\qv\qv.c
257 24.7 4.6 147.8 10 ..\src\qxk\qxk.c
206 49.8 10.5 371.2 4 ..\src\qxk\qxk_mutex.c
104 24.2 4.0 157.8 4 ..\src\qxk\qxk_sema.c
332 22.3 3.3 151.6 14 ..\src\qxk\qxk_xthr.c
19 0.0 0.0 0.0 0 ..\src\qf_pkg.h
13 0.0 0.0 0.0 0 ..\src\qs_pkg.h
16 0.0 0.0 0.0 0 ..\src\qxk_pkg.h
=========================================================================================================
!!!! Warnings (cyclomatic_complexity > 20 or nloc > 1000000 or length > 500 or parameter_count > 10) !!!!
================================================
NLOC CCN token PARAM length location
------------------------------------------------
112 21 773 2 164 QMsm_dispatch_@187-350@..\src\qf\qep_msm.c
==========================================================================================
Total nloc Avg.NLOC AvgCCN Avg.token Fun Cnt Warning cnt Fun Rt nloc Rt
------------------------------------------------------------------------------------------
3502 25.1 4.3 159.5 108 1 0.01 0.04
@endcode
*/

View File

@ -4,8 +4,8 @@
* @ingroup qs
* @cond
******************************************************************************
* Last updated for version 6.8.0
* Last updated on 2020-03-31
* Last updated for version 6.8.1
* Last updated on 2020-05-13
*
* Q u a n t u m L e a P s
* ------------------------
@ -333,7 +333,7 @@ void QS_rxParse(void) {
QS_rxPriv_.tail = QS_rxPriv_.end;
}
if (l_rx.esc) { /* escaped byte arrived? */
if (l_rx.esc != 0U) { /* escaped byte arrived? */
l_rx.esc = 0U;
b ^= QS_ESC_XOR;
@ -823,11 +823,14 @@ static void QS_rxParseData_(uint8_t b) {
static void QS_rxHandleGoodFrame_(uint8_t state) {
uint8_t i;
uint8_t *ptr;
QS_CRIT_STAT_
switch (state) {
case WAIT4_INFO_FRAME: {
/* no need to report Ack or Done */
QS_CRIT_ENTRY_();
QS_target_info_pre_(0U); /* send only Target info */
QS_CRIT_EXIT_();
break;
}
case WAIT4_RESET_FRAME: {
@ -860,7 +863,9 @@ static void QS_rxHandleGoodFrame_(uint8_t state) {
break;
}
case WAIT4_PEEK_FRAME: {
/* no need to report Ack or Done */
QS_CRIT_ENTRY_();
QS_beginRec_((uint_fast8_t)QS_PEEK_DATA);
ptr = ((uint8_t *)QS_rxPriv_.currObj[AP_OBJ]
+ l_rx.var.peek.offs);
@ -884,6 +889,8 @@ static void QS_rxHandleGoodFrame_(uint8_t state) {
}
}
QS_endRec_();
QS_CRIT_EXIT_();
QS_REC_DONE(); /* user callback (if defined) */
break;
}
@ -968,6 +975,7 @@ static void QS_rxHandleGoodFrame_(uint8_t state) {
i = l_rx.var.obj.kind;
ptr = (uint8_t *)QS_rxPriv_.currObj[i];
if (ptr != (void *)0) {
QS_CRIT_ENTRY_();
QS_beginRec_((uint_fast8_t)QS_QUERY_DATA);
QS_TIME_PRE_(); /* timestamp */
QS_U8_PRE_(i); /* object kind */
@ -1003,6 +1011,8 @@ static void QS_rxHandleGoodFrame_(uint8_t state) {
break;
}
QS_endRec_();
QS_CRIT_EXIT_();
QS_REC_DONE(); /* user callback (if defined) */
}
else {
@ -1175,26 +1185,38 @@ static void QS_rxHandleBadFrame_(uint8_t state) {
/****************************************************************************/
static void QS_rxReportAck_(enum QSpyRxRecords recId) {
QS_CRIT_STAT_
QS_CRIT_ENTRY_();
QS_beginRec_((uint_fast8_t)QS_RX_STATUS);
QS_U8_PRE_(recId); /* record ID */
QS_endRec_();
QS_CRIT_EXIT_();
QS_REC_DONE(); /* user callback (if defined) */
}
/****************************************************************************/
static void QS_rxReportError_(uint8_t code) {
QS_CRIT_STAT_
QS_CRIT_ENTRY_();
QS_beginRec_((uint_fast8_t)QS_RX_STATUS);
QS_U8_PRE_(0x80U | code); /* error code */
QS_endRec_();
QS_CRIT_EXIT_();
QS_REC_DONE(); /* user callback (if defined) */
}
/****************************************************************************/
static void QS_rxReportDone_(enum QSpyRxRecords recId) {
QS_CRIT_STAT_
QS_CRIT_ENTRY_();
QS_beginRec_((uint_fast8_t)QS_TARGET_DONE);
QS_TIME_PRE_(); /* timestamp */
QS_U8_PRE_(recId); /* record ID */
QS_endRec_();
QS_CRIT_EXIT_();
QS_REC_DONE(); /* user callback (if defined) */
}
@ -1245,12 +1267,18 @@ uint32_t QS_getTestProbe_(void (* const api)(void)) {
uint_fast8_t j;
if (l_testData.tpBuf[i].addr == (QSFun)api) {
QS_CRIT_STAT_
data = l_testData.tpBuf[i].data;
QS_CRIT_ENTRY_();
QS_beginRec_((uint_fast8_t)QS_TEST_PROBE_GET);
QS_TIME_PRE_(); /* timestamp */
QS_FUN_PRE_(api); /* the calling API */
QS_U32_PRE_(data); /* the Test-Probe data */
QS_endRec_();
QS_CRIT_EXIT_();
QS_REC_DONE(); /* user callback (if defined) */
--l_testData.tpNum; /* one less Test-Probe */