Skip to content

Commit 51c8067

Browse files
Update version and add C++ guards (#168)
* Update version numbers * Update CHANGELOG.md * Add guards for C++ linkage * Link to Memory estimates markdown from README * Make possible to override CMake C Standard for tests
1 parent a108af5 commit 51c8067

File tree

57 files changed

+138
-59
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+138
-59
lines changed

Diff for: .github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,4 +115,4 @@ jobs:
115115
uses: FreeRTOS/CI-CD-Github-Actions/memory_statistics@main
116116
with:
117117
config: .github/memory_statistics_config.json
118-
check_against: docs/doxygen/include/size_table.html
118+
check_against: docs/doxygen/include/size_table.md

Diff for: .github/workflows/memory_statistics.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ jobs:
1919
uses: actions/upload-artifact@v2
2020
with:
2121
name: size_table
22-
path: size_table.html
22+
path: size_table.md

Diff for: CHANGELOG.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
# Changelog for coreMQTT Client Library
22

3-
## Commits to `main`
3+
## v1.1.2 (July 2021)
44

55
### Updates
6+
- [#168](https://github.com/FreeRTOS/coreMQTT/pull/168) Add header guards for C++ linkage.
67
- [#163](https://github.com/FreeRTOS/coreMQTT/pull/163) Fix bug to check for ping responses within `MQTT_PINGRESP_TIMEOUT_MS` instead of the entire keep alive interval.
78
- [#159](https://github.com/FreeRTOS/coreMQTT/pull/159) Add more checks for malformed packets when deserializing acknowledgments.
89

Diff for: README.md

+15-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ This repository contains the coreMQTT library that has been optimized for a low
44

55
This library has gone through code quality checks including verification that no function has a [GNU Complexity](https://www.gnu.org/software/complexity/manual/complexity.html) score over 8, and checks against deviations from mandatory rules in the [MISRA coding standard](https://www.misra.org.uk). Deviations from the MISRA C:2012 guidelines are documented under [MISRA Deviations](MISRA.md). This library has also undergone both static code analysis from [Coverity static analysis](https://scan.coverity.com/), and validation of memory safety through the [CBMC automated reasoning tool](https://www.cprover.org/cbmc/).
66

7-
See memory requirements for this library [here](https://docs.aws.amazon.com/embedded-csdk/202103.00/lib-ref/libraries/standard/coreMQTT/docs/doxygen/output/html/index.html#mqtt_memory_requirements).
7+
See memory requirements for this library [here](./docs/doxygen/include/size_table.md).
88

99
**coreMQTT v1.1.0 [source code](https://github.com/FreeRTOS/coreMQTT/tree/v1.1.0/source) is part of the [FreeRTOS 202012.00 LTS](https://github.com/FreeRTOS/FreeRTOS-LTS/tree/202012.00-LTS) release.**
1010

@@ -120,7 +120,20 @@ Please refer to the demos of the MQTT client library in the following locations
120120
| FreeRTOS | [FreeRTOS AWS Reference Integrations](https://github.com/aws/amazon-freertos/tree/master/demos/coreMQTT) | Based on Secure Sockets Abstraction |
121121

122122

123-
## Generating documentation
123+
## Documentation
124+
125+
### Existing Documentation
126+
127+
For pre-generated documentation, please see the documentation linked in the locations below:
128+
129+
| Location |
130+
| :-: |
131+
| [AWS IoT Device SDK for Embedded C](https://github.com/aws/aws-iot-device-sdk-embedded-C#releases-and-documentation) |
132+
| [FreeRTOS.org](https://freertos.org/Documentation/api-ref/coreMQTT/docs/doxygen/output/html/index.html) |
133+
134+
Note that the latest included version of coreMQTT may differ across repositories.
135+
136+
### Generating Documentation
124137

125138
The Doxygen references were created using Doxygen version 1.8.20. To generate the
126139
Doxygen pages, please run the following command from the root of this repository:

Diff for: docs/doxygen/config.doxyfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = "coreMQTT"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = "v1.1.1"
41+
PROJECT_NUMBER = "v1.1.2"
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a
File renamed without changes.

Diff for: docs/doxygen/pages.dox

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Please see https://github.com/aws/aws-iot-device-sdk-embedded-C/tree/main/demos/
1616
@section mqtt_memory_requirements Memory Requirements
1717
@brief Memory requirements of the MQTT library.
1818

19-
@include{doc} size_table.html
19+
@include{doc} size_table.md
2020
*/
2121

2222
/**

Diff for: lexicon.txt

+1
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ mainpage
129129
malloc
130130
managekeepalive
131131
matchtopic
132+
md
132133
mdash
133134
memcpy
134135
memset

Diff for: manifest.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name : "coreMQTT"
2-
version: "v1.1.1"
2+
version: "v1.1.2"
33
description: |
44
"Client implementation of the MQTT 3.1.1 specification for embedded devices.\n"
55
license: "MIT"

Diff for: source/core_mqtt.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* coreMQTT v1.1.1
2+
* coreMQTT v1.1.2
33
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy of

Diff for: source/core_mqtt_serializer.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* coreMQTT v1.1.1
2+
* coreMQTT v1.1.2
33
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy of

Diff for: source/core_mqtt_state.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* coreMQTT v1.1.1
2+
* coreMQTT v1.1.2
33
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy of

Diff for: source/include/core_mqtt.h

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* coreMQTT v1.1.1
2+
* coreMQTT v1.1.2
33
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy of
@@ -27,6 +27,12 @@
2727
#ifndef CORE_MQTT_H
2828
#define CORE_MQTT_H
2929

30+
/* *INDENT-OFF* */
31+
#ifdef __cplusplus
32+
extern "C" {
33+
#endif
34+
/* *INDENT-ON* */
35+
3036
/* MQTT_DO_NOT_USE_CUSTOM_CONFIG allows building the MQTT library
3137
* without a custom config. If a custom config is provided, the
3238
* MQTT_DO_NOT_USE_CUSTOM_CONFIG macro should not be defined. */
@@ -49,7 +55,7 @@
4955
* @cond DOXYGEN_IGNORE
5056
* The current version of this library.
5157
*/
52-
#define MQTT_LIBRARY_VERSION "v1.1.1"
58+
#define MQTT_LIBRARY_VERSION "v1.1.2"
5359
/** @endcond */
5460

5561
/**
@@ -887,4 +893,10 @@ MQTTStatus_t MQTT_GetSubAckStatusCodes( const MQTTPacketInfo_t * pSubackPacket,
887893
const char * MQTT_Status_strerror( MQTTStatus_t status );
888894
/* @[declare_mqtt_status_strerror] */
889895

896+
/* *INDENT-OFF* */
897+
#ifdef __cplusplus
898+
}
899+
#endif
900+
/* *INDENT-ON* */
901+
890902
#endif /* ifndef CORE_MQTT_H */

Diff for: source/include/core_mqtt_config_defaults.h

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* coreMQTT v1.1.1
2+
* coreMQTT v1.1.2
33
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy of
@@ -35,6 +35,12 @@
3535
#ifndef CORE_MQTT_CONFIG_DEFAULTS_H_
3636
#define CORE_MQTT_CONFIG_DEFAULTS_H_
3737

38+
/* *INDENT-OFF* */
39+
#ifdef __cplusplus
40+
extern "C" {
41+
#endif
42+
/* *INDENT-ON* */
43+
3844
/* The macro definition for MQTT_DO_NOT_USE_CUSTOM_CONFIG is for Doxygen
3945
* documentation only. */
4046

@@ -247,4 +253,10 @@
247253
#define LogDebug( message )
248254
#endif
249255

256+
/* *INDENT-OFF* */
257+
#ifdef __cplusplus
258+
}
259+
#endif
260+
/* *INDENT-ON* */
261+
250262
#endif /* ifndef CORE_MQTT_CONFIG_DEFAULTS_H_ */

Diff for: source/include/core_mqtt_serializer.h

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* coreMQTT v1.1.1
2+
* coreMQTT v1.1.2
33
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy of
@@ -34,6 +34,12 @@
3434
#include <stdint.h>
3535
#include <stdbool.h>
3636

37+
/* *INDENT-OFF* */
38+
#ifdef __cplusplus
39+
extern "C" {
40+
#endif
41+
/* *INDENT-ON */
42+
3743
/* MQTT_DO_NOT_USE_CUSTOM_CONFIG allows building the MQTT library
3844
* without a custom config. If a custom config is provided, the
3945
* MQTT_DO_NOT_USE_CUSTOM_CONFIG macro should not be defined. */
@@ -1171,4 +1177,10 @@ MQTTStatus_t MQTT_GetIncomingPacketTypeAndLength( TransportRecv_t readFunc,
11711177
MQTTPacketInfo_t * pIncomingPacket );
11721178
/* @[declare_mqtt_getincomingpackettypeandlength] */
11731179

1180+
/* *INDENT-OFF* */
1181+
#ifdef __cplusplus
1182+
}
1183+
#endif
1184+
/* *INDENT-ON* */
1185+
11741186
#endif /* ifndef CORE_MQTT_SERIALIZER_H */

Diff for: source/include/core_mqtt_state.h

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* coreMQTT v1.1.1
2+
* coreMQTT v1.1.2
33
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy of
@@ -27,6 +27,12 @@
2727
#ifndef CORE_MQTT_STATE_H
2828
#define CORE_MQTT_STATE_H
2929

30+
/* *INDENT-OFF* */
31+
#ifdef __cplusplus
32+
extern "C" {
33+
#endif
34+
/* *INDENT-ON* */
35+
3036
#include "core_mqtt.h"
3137

3238
/**
@@ -275,4 +281,10 @@ uint16_t MQTT_PublishToResend( const MQTTContext_t * pMqttContext,
275281
const char * MQTT_State_strerror( MQTTPublishState_t state );
276282
/** @endcond */
277283

284+
/* *INDENT-OFF* */
285+
#ifdef __cplusplus
286+
}
287+
#endif
288+
/* *INDENT-ON* */
289+
278290
#endif /* ifndef CORE_MQTT_STATE_H */

Diff for: source/interface/transport_interface.h

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* coreMQTT v1.1.1
2+
* coreMQTT v1.1.2
33
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy of
@@ -31,6 +31,12 @@
3131
#include <stdint.h>
3232
#include <stddef.h>
3333

34+
/* *INDENT-OFF* */
35+
#ifdef __cplusplus
36+
extern "C" {
37+
#endif
38+
/* *INDENT-ON* */
39+
3440
/**
3541
* @transportpage
3642
* @brief The transport interface definition.
@@ -250,4 +256,10 @@ typedef struct TransportInterface
250256
} TransportInterface_t;
251257
/* @[define_transportinterface] */
252258

259+
/* *INDENT-OFF* */
260+
#ifdef __cplusplus
261+
}
262+
#endif
263+
/* *INDENT-ON* */
264+
253265
#endif /* ifndef TRANSPORT_INTERFACE_H_ */

Diff for: test/CMakeLists.txt

+7-3
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,13 @@ project ( "CoreMQTT unit test"
66
# Allow the project to be organized into folders.
77
set_property( GLOBAL PROPERTY USE_FOLDERS ON )
88

9-
# Use C90.
10-
set( CMAKE_C_STANDARD 90 )
11-
set( CMAKE_C_STANDARD_REQUIRED ON )
9+
# Use C90 if not specified.
10+
if( NOT DEFINED CMAKE_C_STANDARD )
11+
set( CMAKE_C_STANDARD 90 )
12+
endif()
13+
if( NOT DEFINED CMAKE_C_STANDARD_REQUIRED )
14+
set( CMAKE_C_STANDARD_REQUIRED ON )
15+
endif()
1216

1317
# Do not allow in-source build.
1418
if( ${PROJECT_SOURCE_DIR} STREQUAL ${PROJECT_BINARY_DIR} )

Diff for: test/cbmc/include/core_mqtt_config.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* coreMQTT v1.1.1
2+
* coreMQTT v1.1.2
33
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy of

Diff for: test/cbmc/include/event_callback_stub.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* coreMQTT v1.1.1
2+
* coreMQTT v1.1.2
33
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy of

Diff for: test/cbmc/include/get_time_stub.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* coreMQTT v1.1.1
2+
* coreMQTT v1.1.2
33
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy of

Diff for: test/cbmc/include/mqtt_cbmc_state.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* coreMQTT v1.1.1
2+
* coreMQTT v1.1.2
33
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy of

Diff for: test/cbmc/include/network_interface_stubs.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* coreMQTT v1.1.1
2+
* coreMQTT v1.1.2
33
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy of

Diff for: test/cbmc/proofs/MQTT_Connect/MQTT_Connect_harness.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* coreMQTT v1.1.1
2+
* coreMQTT v1.1.2
33
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy of

Diff for: test/cbmc/proofs/MQTT_DeserializeAck/MQTT_DeserializeAck_harness.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* coreMQTT v1.1.1
2+
* coreMQTT v1.1.2
33
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy of

Diff for: test/cbmc/proofs/MQTT_DeserializePublish/MQTT_DeserializePublish_harness.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* coreMQTT v1.1.1
2+
* coreMQTT v1.1.2
33
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy of

Diff for: test/cbmc/proofs/MQTT_Disconnect/MQTT_Disconnect_harness.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* coreMQTT v1.1.1
2+
* coreMQTT v1.1.2
33
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy of

Diff for: test/cbmc/proofs/MQTT_GetIncomingPacketTypeAndLength/MQTT_GetIncomingPacketTypeAndLength_harness.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* coreMQTT v1.1.1
2+
* coreMQTT v1.1.2
33
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy of

Diff for: test/cbmc/proofs/MQTT_GetPacketId/MQTT_GetPacketId_harness.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* coreMQTT v1.1.1
2+
* coreMQTT v1.1.2
33
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy of

Diff for: test/cbmc/proofs/MQTT_GetSubAckStatusCodes/MQTT_GetSubAckStatusCodes_harness.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* coreMQTT v1.1.1
2+
* coreMQTT v1.1.2
33
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy of

Diff for: test/cbmc/proofs/MQTT_Init/MQTT_Init_harness.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* coreMQTT v1.1.1
2+
* coreMQTT v1.1.2
33
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy of

Diff for: test/cbmc/proofs/MQTT_MatchTopic/MQTT_MatchTopic_harness.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* coreMQTT v1.1.1
2+
* coreMQTT v1.1.2
33
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy of

Diff for: test/cbmc/proofs/MQTT_Ping/MQTT_Ping_harness.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* coreMQTT v1.1.1
2+
* coreMQTT v1.1.2
33
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
44
*
55
* Permission is hereby granted, free of charge, to any person obtaining a copy of

0 commit comments

Comments
 (0)