Skip to content

Commit 57c8958

Browse files
committed
6.9.2rc2
1 parent 1e8b37b commit 57c8958

File tree

9 files changed

+88
-137
lines changed

9 files changed

+88
-137
lines changed

doxygen/metrics.dox

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
/** @page metrics Code Metrics
1+
/** @page metrics Code Metrics
22

3-
@code{cpp}
4-
Code Metrics for QP/C
3+
@code{cpp}
4+
Code Metrics for QP/C
55
================================================
6-
NLOC CCN token PARAM length location
6+
NLOC CCN token PARAM length location
77
------------------------------------------------
88
6 1 23 1 15 Q_DEFINE_THIS_MODULE@50-64@..\src\qf\qep_hsm.c
99
10 2 56 2 12 QHsm_ctor@133-144@..\src\qf\qep_hsm.c
@@ -159,12 +159,12 @@ NLOC Avg.NLOC AvgCCN Avg.token function_cnt file
159159
=========================================================================================================
160160
!!!! Warnings (cyclomatic_complexity > 20 or length > 500 or nloc > 1000000 or parameter_count > 10) !!!!
161161
================================================
162-
NLOC CCN token PARAM length location
162+
NLOC CCN token PARAM length location
163163
------------------------------------------------
164164
122 23 845 2 185 QMsm_dispatch_@231-415@..\src\qf\qep_msm.c
165165
==========================================================================================
166166
Total nloc Avg.NLOC AvgCCN Avg.token Fun Cnt Warning cnt Fun Rt nloc Rt
167167
------------------------------------------------------------------------------------------
168168
3621 25.0 4.4 156.3 110 1 0.01 0.04
169-
@endcode
170-
*/
169+
@endcode
170+
*/

include/qep.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@
5353
*/
5454
#define QP_VERSION_STR "6.9.2"
5555

56-
/*! Encrypted current QP release (6.9.2) and date (2020-12-22) */
57-
#define QP_RELEASE 0x880FF2EBU
56+
/*! Encrypted current QP release (6.9.2) and date (2021-01-18) */
57+
#define QP_RELEASE 0x82C286EBU
5858

5959

6060
/****************************************************************************/

ports/posix-qutest/qutest_port.c

+9-17
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
* @ingroup ports
55
* @cond
66
******************************************************************************
7-
* Last updated for version 6.9.0
8-
* Last updated on 2020-08-24
7+
* Last updated for version 6.9.2
8+
* Last updated on 2021-01-14
99
*
1010
* Q u a n t u m L e a P s
1111
* ------------------------
1212
* Modern Embedded Software
1313
*
14-
* Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved.
14+
* Copyright (C) 2005-2021 Quantum Leaps, LLC. All rights reserved.
1515
*
1616
* This program is open source software: you can redistribute it and/or
1717
* modify it under the terms of the GNU General Public License as published
@@ -265,20 +265,12 @@ void QS_onTestLoop() {
265265
exit(-2);
266266
}
267267
else if (FD_ISSET(l_sock, &readSet)) { /* socket ready to read? */
268-
uint8_t buf[QS_RX_SIZE];
269-
int status = recv(l_sock, (char *)buf, (int)sizeof(buf), 0);
270-
while (status > 0) { /* any data received? */
271-
uint8_t *pb;
272-
int i = (int)QS_rxGetNfree();
273-
if (i > status) {
274-
i = status;
275-
}
276-
status -= i;
277-
/* reorder the received bytes into QS-RX buffer */
278-
for (pb = &buf[0]; i > 0; --i, ++pb) {
279-
QS_RX_PUT(*pb);
280-
}
281-
QS_rxParse(); /* parse all n-bytes of RX data */
268+
int status = recv(l_sock,
269+
(char *)QS_rxPriv_.buf, (int)QS_rxPriv_.end, 0);
270+
if (status > 0) { /* any data received? */
271+
QS_rxPriv_.tail = 0U;
272+
QS_rxPriv_.head = status; /* # bytes received */
273+
QS_rxParse(); /* parse all received bytes */
282274
}
283275
}
284276

ports/posix-qv/qs_port.c

+11-18
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
* @ingroup ports
55
* @cond
66
******************************************************************************
7-
* Last updated for version 6.9.1
8-
* Last updated on 2020-10-03
7+
* Last updated for version 6.9.2
8+
* Last updated on 2021-01-14
99
*
1010
* Q u a n t u m L e a P s
1111
* ------------------------
1212
* Modern Embedded Software
1313
*
14-
* Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved.
14+
* Copyright (C) 2005-2021 Quantum Leaps, LLC. All rights reserved.
1515
*
1616
* This program is open source software: you can redistribute it and/or
1717
* modify it under the terms of the GNU General Public License as published
@@ -47,7 +47,8 @@
4747
#define QP_IMPL /* this is QP implementation */
4848
#include "qf_port.h" /* QF port */
4949
#include "qassert.h" /* QP embedded systems-friendly assertions */
50-
#include "qs_port.h" /* include QS port */
50+
#include "qs_port.h" /* QS port */
51+
#include "qs_pkg.h" /* QS package-scope interface */
5152

5253
#include "safe_std.h" /* portable "safe" <stdio.h>/<string.h> facilities */
5354
#include <stdlib.h>
@@ -293,20 +294,12 @@ void QS_output(void) {
293294
}
294295
/*..........................................................................*/
295296
void QS_rx_input(void) {
296-
uint8_t buf[QS_RX_SIZE];
297-
int status = recv(l_sock, (char *)buf, (int)sizeof(buf), 0);
298-
if (status != SOCKET_ERROR) { /* any data received? */
299-
uint8_t *pb;
300-
int i = (int)QS_rxGetNfree();
301-
if (i > status) {
302-
i = status;
303-
}
304-
status -= i;
305-
/* reorder the received bytes into QS-RX buffer */
306-
for (pb = &buf[0]; i > 0; --i, ++pb) {
307-
QS_RX_PUT(*pb);
308-
}
309-
QS_rxParse(); /* parse all n-bytes of data */
297+
int status = recv(l_sock,
298+
(char *)QS_rxPriv_.buf, (int)QS_rxPriv_.end, 0);
299+
if (status > 0) { /* any data received? */
300+
QS_rxPriv_.tail = 0U;
301+
QS_rxPriv_.head = status; /* # bytes received */
302+
QS_rxParse(); /* parse all received bytes */
310303
}
311304
}
312305

ports/posix/qs_port.c

+14-21
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
* @ingroup ports
55
* @cond
66
******************************************************************************
7-
* Last Updated for Version: 6.5.1
8-
* Date of the Last Update: 2019-06-18
7+
* Last updated for version 6.9.2
8+
* Last updated on 2021-01-14
99
*
1010
* Q u a n t u m L e a P s
1111
* ------------------------
1212
* Modern Embedded Software
1313
*
14-
* Copyright (C) 2005-2019 Quantum Leaps, LLC. All rights reserved.
14+
* Copyright (C) 2005-2021 Quantum Leaps, LLC. All rights reserved.
1515
*
1616
* This program is open source software: you can redistribute it and/or
1717
* modify it under the terms of the GNU General Public License as published
@@ -29,7 +29,7 @@
2929
* GNU General Public License for more details.
3030
*
3131
* You should have received a copy of the GNU General Public License
32-
* along with this program. If not, see <www.gnu.org/licenses/>.
32+
* along with this program. If not, see <www.gnu.org/licenses>.
3333
*
3434
* Contact information:
3535
* <www.state-machine.com/licensing>
@@ -47,7 +47,8 @@
4747
#define QP_IMPL /* this is QP implementation */
4848
#include "qf_port.h" /* QF port */
4949
#include "qassert.h" /* QP embedded systems-friendly assertions */
50-
#include "qs_port.h" /* include QS port */
50+
#include "qs_port.h" /* QS port */
51+
#include "qs_pkg.h" /* QS package-scope interface */
5152

5253
#include "safe_std.h" /* portable "safe" <stdio.h>/<string.h> facilities */
5354
#include <stdlib.h>
@@ -196,7 +197,7 @@ void QS_onFlush(void) {
196197
QS_CRIT_STAT_
197198

198199
if (l_sock == INVALID_SOCKET) { /* socket NOT initialized? */
199-
FPRINTF_S(stderr, "<TARGET> ERROR invalid TCP socket\n");
200+
FPRINTF_S(stderr, "<TARGET> ERROR %s\n", "invalid TCP socket");
200201
return;
201202
}
202203

@@ -253,7 +254,7 @@ void QS_output(void) {
253254
QS_CRIT_STAT_
254255

255256
if (l_sock == INVALID_SOCKET) { /* socket NOT initialized? */
256-
FPRINTF_S(stderr, "<TARGET> ERROR invalid TCP socket\n");
257+
FPRINTF_S(stderr, "<TARGET> ERROR %s\n", "invalid TCP socket");
257258
return;
258259
}
259260

@@ -293,20 +294,12 @@ void QS_output(void) {
293294
}
294295
/*..........................................................................*/
295296
void QS_rx_input(void) {
296-
uint8_t buf[QS_RX_SIZE];
297-
int status = recv(l_sock, (char *)buf, (int)sizeof(buf), 0);
298-
if (status != SOCKET_ERROR) { /* any data received? */
299-
uint8_t *pb;
300-
int i = (int)QS_rxGetNfree();
301-
if (i > status) {
302-
i = status;
303-
}
304-
status -= i;
305-
/* reorder the received bytes into QS-RX buffer */
306-
for (pb = &buf[0]; i > 0; --i, ++pb) {
307-
QS_RX_PUT(*pb);
308-
}
309-
QS_rxParse(); /* parse all n-bytes of data */
297+
int status = recv(l_sock,
298+
(char *)QS_rxPriv_.buf, (int)QS_rxPriv_.end, 0);
299+
if (status > 0) { /* any data received? */
300+
QS_rxPriv_.tail = 0U;
301+
QS_rxPriv_.head = status; /* # bytes received */
302+
QS_rxParse(); /* parse all received bytes */
310303
}
311304
}
312305

ports/win32-qutest/qutest_port.c

+9-17
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
* @ingroup ports
55
* @cond
66
******************************************************************************
7-
* Last updated for version 6.9.1
8-
* Last updated on 2020-09-11
7+
* Last updated for version 6.9.2
8+
* Last updated on 2021-01-14
99
*
1010
* Q u a n t u m L e a P s
1111
* ------------------------
1212
* Modern Embedded Software
1313
*
14-
* Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved.
14+
* Copyright (C) 2005-2021 Quantum Leaps, LLC. All rights reserved.
1515
*
1616
* This program is open source software: you can redistribute it and/or
1717
* modify it under the terms of the GNU General Public License as published
@@ -259,20 +259,12 @@ void QS_onTestLoop() {
259259
exit(-2);
260260
}
261261
else if (FD_ISSET(l_sock, &readSet)) { /* socket ready to read? */
262-
uint8_t buf[QS_RX_SIZE];
263-
status = recv(l_sock, (char *)buf, (int)sizeof(buf), 0);
264-
while (status > 0) { /* any data received? */
265-
uint8_t *pb;
266-
int i = (int)QS_rxGetNfree();
267-
if (i > status) {
268-
i = status;
269-
}
270-
status -= i;
271-
/* reorder the received bytes into QS-RX buffer */
272-
for (pb = &buf[0]; i > 0; --i, ++pb) {
273-
QS_RX_PUT(*pb);
274-
}
275-
QS_rxParse(); /* parse all n-bytes of data */
262+
status = recv(l_sock,
263+
(char *)QS_rxPriv_.buf, (int)QS_rxPriv_.end, 0);
264+
if (status > 0) { /* any data received? */
265+
QS_rxPriv_.tail = 0U;
266+
QS_rxPriv_.head = status; /* # bytes received */
267+
QS_rxParse(); /* parse all received bytes */
276268
}
277269
}
278270

ports/win32-qv/qs_port.c

+11-18
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
* @ingroup ports
55
* @cond
66
******************************************************************************
7-
* Last updated for version 6.8.0
8-
* Last updated on 2020-03-31
7+
* Last updated for version 6.9.2
8+
* Last updated on 2021-01-14
99
*
1010
* Q u a n t u m L e a P s
1111
* ------------------------
1212
* Modern Embedded Software
1313
*
14-
* Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved.
14+
* Copyright (C) 2005-2021 Quantum Leaps, LLC. All rights reserved.
1515
*
1616
* This program is open source software: you can redistribute it and/or
1717
* modify it under the terms of the GNU General Public License as published
@@ -44,7 +44,8 @@
4444
#define QP_IMPL /* this is QP implementation */
4545
#include "qf_port.h" /* QF port */
4646
#include "qassert.h" /* QP embedded systems-friendly assertions */
47-
#include "qs_port.h" /* include QS port */
47+
#include "qs_port.h" /* QS port */
48+
#include "qs_pkg.h" /* QS package-scope interface */
4849

4950
#include "safe_std.h" /* portable "safe" <stdio.h>/<string.h> facilities */
5051
#include <stdlib.h>
@@ -295,20 +296,12 @@ void QS_output(void) {
295296
}
296297
/*..........................................................................*/
297298
void QS_rx_input(void) {
298-
uint8_t buf[QS_RX_SIZE];
299-
int status = recv(l_sock, (char *)buf, (int)sizeof(buf), 0);
300-
if (status != SOCKET_ERROR) { /* any data received? */
301-
uint8_t *pb;
302-
int i = (int)QS_rxGetNfree();
303-
if (i > status) {
304-
i = status;
305-
}
306-
status -= i;
307-
/* reorder the received bytes into QS-RX buffer */
308-
for (pb = &buf[0]; i > 0; --i, ++pb) {
309-
QS_RX_PUT(*pb);
310-
}
311-
QS_rxParse(); /* parse all n-bytes of data */
299+
int status = recv(l_sock,
300+
(char *)QS_rxPriv_.buf, (int)QS_rxPriv_.end, 0);
301+
if (status > 0) { /* any data received? */
302+
QS_rxPriv_.tail = 0U;
303+
QS_rxPriv_.head = status; /* # bytes received */
304+
QS_rxParse(); /* parse all received bytes */
312305
}
313306
}
314307

ports/win32/qs_port.c

+11-18
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
* @ingroup ports
55
* @cond
66
******************************************************************************
7-
* Last updated for version 6.8.0
8-
* Last updated on 2020-03-31
7+
* Last updated for version 6.9.2
8+
* Last updated on 2021-01-14
99
*
1010
* Q u a n t u m L e a P s
1111
* ------------------------
1212
* Modern Embedded Software
1313
*
14-
* Copyright (C) 2005-2020 Quantum Leaps, LLC. All rights reserved.
14+
* Copyright (C) 2005-2021 Quantum Leaps, LLC. All rights reserved.
1515
*
1616
* This program is open source software: you can redistribute it and/or
1717
* modify it under the terms of the GNU General Public License as published
@@ -44,7 +44,8 @@
4444
#define QP_IMPL /* this is QP implementation */
4545
#include "qf_port.h" /* QF port */
4646
#include "qassert.h" /* QP embedded systems-friendly assertions */
47-
#include "qs_port.h" /* include QS port */
47+
#include "qs_port.h" /* QS port */
48+
#include "qs_pkg.h" /* QS package-scope interface */
4849

4950
#include "safe_std.h" /* portable "safe" <stdio.h>/<string.h> facilities */
5051
#include <stdlib.h>
@@ -295,20 +296,12 @@ void QS_output(void) {
295296
}
296297
/*..........................................................................*/
297298
void QS_rx_input(void) {
298-
uint8_t buf[QS_RX_SIZE];
299-
int status = recv(l_sock, (char *)buf, (int)sizeof(buf), 0);
300-
if (status != SOCKET_ERROR) { /* any data received? */
301-
uint8_t *pb;
302-
int i = (int)QS_rxGetNfree();
303-
if (i > status) {
304-
i = status;
305-
}
306-
status -= i;
307-
/* reorder the received bytes into QS-RX buffer */
308-
for (pb = &buf[0]; i > 0; --i, ++pb) {
309-
QS_RX_PUT(*pb);
310-
}
311-
QS_rxParse(); /* parse all n-bytes of data */
299+
int status = recv(l_sock,
300+
(char *)QS_rxPriv_.buf, (int)QS_rxPriv_.end, 0);
301+
if (status > 0) { /* any data received? */
302+
QS_rxPriv_.tail = 0U;
303+
QS_rxPriv_.head = status; /* # bytes received */
304+
QS_rxParse(); /* parse all received bytes */
312305
}
313306
}
314307

0 commit comments

Comments
 (0)