-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Features: * Updated Anjay to version 2.14.0: - Used pre-implemented event loop. - Provided threading compatibility sources. - Used IPSO Objects API to implement sensors and push button. * Changed displayed sensor units.
- Loading branch information
Showing
54 changed files
with
15,809 additions
and
16,224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ | |
Projects/*/.cproject | ||
Projects/*/.mxproject | ||
Projects/*/.project | ||
__pycache__/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright 2017-2021 AVSystem <[email protected]> | ||
* Copyright 2020-2021 AVSystem <[email protected]> | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
|
@@ -81,7 +81,7 @@ | |
* | ||
* Only meaningful if <c>ANJAY_WITH_LOGS</c> is enabled. | ||
*/ | ||
//#define ANJAY_WITH_TRACE_LOGS | ||
/* #undef ANJAY_WITH_TRACE_LOGS */ | ||
|
||
/** | ||
* Enable core support for Access Control mechanisms. | ||
|
@@ -91,7 +91,7 @@ | |
* <c>ANJAY_WITH_MODULE_ACCESS_CONTROL</c>, or a custom application-provided one | ||
* may be used. | ||
*/ | ||
#define ANJAY_WITH_ACCESS_CONTROL | ||
/* #undef ANJAY_WITH_ACCESS_CONTROL */ | ||
|
||
/** | ||
* Enable support for the <c>anjay_download()</c> API. | ||
|
@@ -148,6 +148,28 @@ | |
*/ | ||
#define ANJAY_WITH_OBSERVATION_STATUS | ||
|
||
/** | ||
* Enable guarding of all accesses to <c>anjay_t</c> with a mutex. | ||
*/ | ||
/* #undef ANJAY_WITH_THREAD_SAFETY */ | ||
|
||
/** | ||
* Enable standard implementation of an event loop. | ||
* | ||
* Requires C11 <c>stdatomic.h</c> header to be available, and either a platform | ||
* that provides a BSD-compatible socket API, or a compatibility layer file (see | ||
* <c>AVS_COMMONS_POSIX_COMPAT_HEADER</c> in <c>avs_commons_config.h</c>). This | ||
* is designed to best work with the defalt implementation of avs_net sockets | ||
* (see <c>AVS_COMMONS_NET_WITH_POSIX_AVS_SOCKET</c>), but alternative socket | ||
* implementations can also be used. | ||
* | ||
* The event loop is most useful when thread safety features | ||
* (@ref ANJAY_WITH_THREAD_SAFETY and <c>AVS_COMMONS_SCHED_THREAD_SAFE</c>) are | ||
* enabled as well, but this is not a hard requirement. See the documentation | ||
* for <c>anjay_event_loop_run()</c> for details. | ||
*/ | ||
#define ANJAY_WITH_EVENT_LOOP | ||
|
||
/** | ||
* Enable support for features new to LwM2M protocol version 1.1. | ||
* | ||
|
@@ -319,18 +341,6 @@ | |
*/ | ||
#define ANJAY_MAX_PK_OR_IDENTITY_SIZE 256 | ||
|
||
/** | ||
* Maximum size in bytes supported for the "Server Public Key" resource in the | ||
* LwM2M Security object. | ||
* | ||
* If editing this file manually, <c>256</c> shall | ||
* be replaced with a positive integer literal. | ||
* | ||
* The default value defined in CMake build scripts is 2048. | ||
* Minimal suggested setting for low-resource builds is 256. | ||
*/ | ||
#define ANJAY_MAX_SERVER_PK_OR_IDENTITY_SIZE 256 | ||
|
||
/** | ||
* Maximum size in bytes supported for the "Secret Key" resource in the LwM2M | ||
* Security Object. | ||
|
@@ -428,11 +438,15 @@ | |
|
||
/** | ||
* Enable fw_update module (implementation of the Firmware Update object). | ||
* | ||
* Requires <c>ANJAY_WITH_DOWNLOADER</c> to be enabled. | ||
*/ | ||
#define ANJAY_WITH_MODULE_FW_UPDATE | ||
|
||
/** | ||
* Enables ipso_objects module (generic implementation of the following kinds of | ||
* the basic sensor and three axis sensor IPSO objects). | ||
*/ | ||
#define ANJAY_WITH_MODULE_IPSO_OBJECTS | ||
|
||
/** | ||
* Enable at_sms module (implementation of an SMS driver for AT modem devices). | ||
* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright 2017-2021 AVSystem <[email protected]> | ||
* Copyright 2020-2021 AVSystem <[email protected]> | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
|
@@ -52,14 +52,14 @@ | |
* In the repository, this file is provided as <c>avs_coap_config.h.in</c>, | ||
* intended to be processed by CMake. If editing this file manually, please copy | ||
* or rename it to <c>avs_coap_config.h</c> and for each of the | ||
* <c>#cmakedefine</c> directives, please either replace it with regular | ||
* <c>#define</c> to enable it, or comment it out to disable. You may also need | ||
* <c>\#cmakedefine</c> directives, please either replace it with regular | ||
* <c>\#define</c> to enable it, or comment it out to disable. You may also need | ||
* to replace variables wrapped in <c>\@</c> signs with concrete values. Please | ||
* refer to the comments above each of the specific definition for details. | ||
* | ||
* If you are editing a file previously generated by CMake, these | ||
* <c>#cmakedefine</c>s will be already replaced by either <c>#define</c> or | ||
* commented out <c>#undef</c> directives. | ||
* <c>\#cmakedefine</c>s will be already replaced by either <c>\#define</c> or | ||
* commented out <c>\#undef</c> directives. | ||
*/ | ||
|
||
/** | ||
|
@@ -161,7 +161,7 @@ | |
/** | ||
* Enable poisoning of unwanted symbols when compiling avs_coap. | ||
* | ||
* Requires a compiler that supports #pragma GCC poison. | ||
* Requires a compiler that supports <c>\#pragma GCC poison</c>. | ||
* | ||
* This is mostly useful during development, to ensure that avs_commons do not | ||
* attempt to call functions considered harmful in this library, such as printf. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright 2017-2021 AVSystem <[email protected]> | ||
* Copyright 2020-2021 AVSystem <[email protected]> | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
|
@@ -217,7 +217,7 @@ | |
* This implementation is usually very inefficient, and requires C11 stdatomic.h | ||
* header to be available. | ||
*/ | ||
#define AVS_COMMONS_COMPAT_THREADING_WITH_ATOMIC_SPINLOCK | ||
/* #undef AVS_COMMONS_COMPAT_THREADING_WITH_ATOMIC_SPINLOCK */ | ||
|
||
/** | ||
* Enable implementation based on the POSIX Threads library. | ||
|
@@ -258,6 +258,16 @@ | |
#define AVS_COMMONS_WITH_MBEDTLS | ||
/* #undef AVS_COMMONS_WITH_OPENSSL */ | ||
/* #undef AVS_COMMONS_WITH_TINYDTLS */ | ||
|
||
/** | ||
* Enable support for custom TLS socket implementation. | ||
* | ||
* If enabled, the user needs to provide their own implementations of | ||
* <c>_avs_net_create_ssl_socket()</c>, <c>_avs_net_create_dtls_socket()</c>, | ||
* <c>_avs_net_initialize_global_ssl_state() and | ||
* <c>_avs_net_cleanup_global_ssl_state()</c>. | ||
*/ | ||
/* #undef AVS_COMMONS_WITH_CUSTOM_TLS */ | ||
/**@}*/ | ||
|
||
/** | ||
|
@@ -266,7 +276,8 @@ | |
/**@{*/ | ||
/** | ||
* Enable AEAD and HKDF support in avs_crypto. Requires MbedTLS in version at | ||
* least 2.14.0 or OpenSSL in version at least 1.1.0. | ||
* least 2.14.0, OpenSSL in version at least 1.1.0, or custom implementation in | ||
* case of <c>AVS_COMMONS_WITH_CUSTOM_TLS</c>. | ||
*/ | ||
/* #undef AVS_COMMONS_WITH_AVS_CRYPTO_ADVANCED_FEATURES */ | ||
|
||
|
@@ -292,8 +303,9 @@ | |
* generating and managing keys and certificates via external engines. | ||
* | ||
* An actual implementation is required to use this feature. In the commercial | ||
* version, you may use one of the default ones utilizing the PKCS#11 API (see | ||
* @ref AVS_COMMONS_WITH_MBEDTLS_PKCS11_ENGINE and | ||
* version, you may use one of the default ones (see | ||
* @ref AVS_COMMONS_WITH_MBEDTLS_PKCS11_ENGINE, | ||
* @ref AVS_COMMONS_WITH_MBEDTLS_PSA_ENGINE and | ||
* @ref AVS_COMMONS_WITH_OPENSSL_PKCS11_ENGINE) or provide your own. | ||
* | ||
* The functions that need to be provided in case of a custom implementation: | ||
|
@@ -314,7 +326,7 @@ | |
* - <c>_avs_crypto_openssl_engine_load_crls()</c> | ||
* - <c>_avs_crypto_openssl_engine_load_private_key()</c> | ||
* | ||
* External engines are supported only in OpenSSL and Mbed TLS backends. | ||
* External engines are NOT supported in the TinyDTLS backend. | ||
*/ | ||
/* #undef AVS_COMMONS_WITH_AVS_CRYPTO_ENGINE */ | ||
|
||
|
@@ -324,13 +336,58 @@ | |
* | ||
* Requires @ref AVS_COMMONS_WITH_AVS_CRYPTO_ENGINE to be enabled. | ||
* | ||
* NOTE: Query string format for this engine is a subset of the PKCS#11 URI | ||
* scheme (see RFC 7512), modelled after the format accepted by libp11 OpenSSL | ||
* engine. | ||
* | ||
* NOTE: The unit tests for this feature depend on SoftHSM and pkcs11-tool. | ||
* These must be installed for the tests to pass. | ||
* | ||
* IMPORTANT: Only available in the commercial version. Ignored in the open | ||
* source version. */ | ||
* source version. | ||
*/ | ||
/* #undef AVS_COMMONS_WITH_MBEDTLS_PKCS11_ENGINE */ | ||
|
||
/** | ||
* Enables the default implementation of avs_crypto engine, based on Mbed TLS | ||
* and Platform Security Architecture (PSA). | ||
* | ||
* Requires @ref AVS_COMMONS_WITH_AVS_CRYPTO_ENGINE to be enabled. | ||
* | ||
* NOTE: Query string format for this engine is: | ||
* | ||
* <pre> | ||
* kid=<key_ID>[,lifetime=<lifetime>]|uid=<persistent_storage_UID> | ||
* </pre> | ||
* | ||
* The values are parsed using strtoull() with base=0, so may be in decimal, | ||
* 0-prefixed octal or 0x-prefixed hexadecimal. On key generation and | ||
* certificate storage, the specified lifetime will be used, or lifetime 1 | ||
* (default persistent storage) will be used if not. On key or certificate use, | ||
* the lifetime of the actual key will be verified if present on the query | ||
* string and the key will be rejected if different. | ||
* | ||
* Certificates are stored as PSA_KEY_TYPE_RAW_DATA key entries containing | ||
* X.509 DER data. Alternatively, the PSA Protected Storage API can be used if | ||
* @ref AVS_COMMONS_WITH_MBEDTLS_PSA_ENGINE_PROTECTED_STORAGE is enabled, by | ||
* using the <c>uid=...</c> syntax. | ||
* | ||
* IMPORTANT: Only available in the commercial version. Ignored in the open | ||
* source version. | ||
*/ | ||
/* #undef AVS_COMMONS_WITH_MBEDTLS_PSA_ENGINE */ | ||
|
||
/** | ||
* Enables support for the PSA Protected Storage API in the PSA-based avs_crypto | ||
* engine. | ||
* | ||
* Requires @ref AVS_COMMONS_WITH_MBEDTLS_PSA_ENGINE to be enabled. | ||
* | ||
* IMPORTANT: Only available in the commercial version. Ignored in the open | ||
* source version. | ||
*/ | ||
/* #undef AVS_COMMONS_WITH_MBEDTLS_PSA_ENGINE_PROTECTED_STORAGE */ | ||
|
||
/** | ||
* Is the <c>dlsym()</c> function available? | ||
* | ||
|
@@ -352,11 +409,16 @@ | |
* | ||
* Requires @ref AVS_COMMONS_WITH_AVS_CRYPTO_ENGINE to be enabled. | ||
* | ||
* NOTE: Query string format for this engine is a subset of the PKCS#11 URI | ||
* scheme (see RFC 7512), modelled after the format accepted by libp11 OpenSSL | ||
* engine. | ||
* | ||
* NOTE: The unit tests for this feature depend on SoftHSM and pkcs11-tool. | ||
* These must be installed for the tests to pass. | ||
* | ||
* IMPORTANT: Only available in the commercial version. Ignored in the open | ||
* source version. */ | ||
* source version. | ||
*/ | ||
/* #undef AVS_COMMONS_WITH_OPENSSL_PKCS11_ENGINE */ | ||
/**@}*/ | ||
|
||
|
@@ -440,6 +502,13 @@ | |
* components. | ||
*/ | ||
/* #undef AVS_COMMONS_WITH_INTERNAL_TRACE */ | ||
|
||
/** | ||
* Enables external implementation of logger subsystem with provided header. | ||
* | ||
* Default logger implementation can be found in avs_log_impl.h | ||
*/ | ||
/* #undef AVS_COMMONS_WITH_EXTERNAL_LOGGER_HEADER */ | ||
/**@}*/ | ||
|
||
/** | ||
|
@@ -573,14 +642,6 @@ | |
*/ | ||
/* #undef AVS_COMMONS_NET_POSIX_AVS_SOCKET_HAVE_INET_NTOP */ | ||
|
||
/** | ||
* Is the <c>inet_pton()</c> function available? | ||
* | ||
* Disabling this flag will cause an internal implementation of this function | ||
* adapted from BIND 4.9.4 to be used instead. | ||
*/ | ||
/* #undef AVS_COMMONS_NET_POSIX_AVS_SOCKET_HAVE_INET_PTON */ | ||
|
||
/** | ||
* Is the <c>poll()</c> function available? | ||
* | ||
|
@@ -606,7 +667,7 @@ | |
* Makes all scheduler accesses synchronized and thread-safe, at the cost of | ||
* requiring avs_compat_threading to be enabled, and higher resource usage. | ||
*/ | ||
/* #undef AVS_COMMONS_SCHED_THREAD_SAFE */ | ||
#define AVS_COMMONS_SCHED_THREAD_SAFE | ||
|
||
/** | ||
* Enable support for file I/O in avs_stream. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,4 @@ void lwm2m_init(void); | |
|
||
void lwm2m_start(void); | ||
|
||
void lwm2m_notify_start(void); | ||
|
||
#endif // LWM2M_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.