mirror of
https://github.com/FreeRTOS/FreeRTOS.git
synced 2025-07-15 00:52:33 +08:00
Update comments about NetworkContext definition (#461)
Small change that simply specifies why the NetworkContext must be defined by each compilation unit along with details on how to include it to your project. Co-authored-by: Cobus van Eeden <35851496+cobusve@users.noreply.github.com>
This commit is contained in:

committed by
GitHub

parent
d264c1f153
commit
1c2c671e7a
FreeRTOS-Plus
Demo
AWS
Device_Defender_Windows_Simulator/Device_Defender_Demo/DemoTasks
Device_Shadow_Windows_Simulator/Device_Shadow_Demo/DemoTasks
Jobs_Windows_Simulator/Jobs_Demo/DemoTasks
Mqtt_Demo_Helpers
coreHTTP_Windows_Simulator
Common
HTTP_Mutual_Auth/DemoTasks
HTTP_Plaintext/DemoTasks
HTTP_S3_Download/DemoTasks
HTTP_S3_Download_Multithreaded/DemoTasks
HTTP_S3_Upload/DemoTasks
coreMQTT_Windows_Simulator
MQTT_Basic_TLS/DemoTasks
MQTT_Keep_Alive/DemoTasks
MQTT_Multitask/DemoTasks
MQTT_Mutual_Auth/DemoTasks
MQTT_Plain_Text/DemoTasks
corePKCS11_MQTT_Mutual_Auth_Windows_Simulator/DemoTasks
Source/Application-Protocols/network_transport/freertos_plus_tcp
using_mbedtls
using_mbedtls_pkcs11
using_plaintext
@ -133,7 +133,13 @@ typedef enum
|
|||||||
ReportStatusRejected
|
ReportStatusRejected
|
||||||
} ReportStatus_t;
|
} ReportStatus_t;
|
||||||
|
|
||||||
/* Each compilation unit must define the NetworkContext struct. */
|
/**
|
||||||
|
* @brief Each compilation unit that consumes the NetworkContext must define it.
|
||||||
|
* It should contain a single pointer to the type of your desired transport.
|
||||||
|
* When using multiple transports in the same compilation unit, define this pointer as void *.
|
||||||
|
*
|
||||||
|
* @note Transport stacks are defined in FreeRTOS-Plus/Source/Application-Protocols/network_transport.
|
||||||
|
*/
|
||||||
struct NetworkContext
|
struct NetworkContext
|
||||||
{
|
{
|
||||||
TlsTransportParams_t * pParams;
|
TlsTransportParams_t * pParams;
|
||||||
|
@ -210,7 +210,13 @@
|
|||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* Each compilation unit must define the NetworkContext struct. */
|
/**
|
||||||
|
* @brief Each compilation unit that consumes the NetworkContext must define it.
|
||||||
|
* It should contain a single pointer to the type of your desired transport.
|
||||||
|
* When using multiple transports in the same compilation unit, define this pointer as void *.
|
||||||
|
*
|
||||||
|
* @note Transport stacks are defined in FreeRTOS-Plus/Source/Application-Protocols/network_transport.
|
||||||
|
*/
|
||||||
struct NetworkContext
|
struct NetworkContext
|
||||||
{
|
{
|
||||||
TlsTransportParams_t * pParams;
|
TlsTransportParams_t * pParams;
|
||||||
|
@ -239,7 +239,13 @@ typedef enum JobActionType
|
|||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* Each compilation unit must define the NetworkContext struct. */
|
/**
|
||||||
|
* @brief Each compilation unit that consumes the NetworkContext must define it.
|
||||||
|
* It should contain a single pointer to the type of your desired transport.
|
||||||
|
* When using multiple transports in the same compilation unit, define this pointer as void *.
|
||||||
|
*
|
||||||
|
* @note Transport stacks are defined in FreeRTOS-Plus/Source/Application-Protocols/network_transport.
|
||||||
|
*/
|
||||||
struct NetworkContext
|
struct NetworkContext
|
||||||
{
|
{
|
||||||
TlsTransportParams_t * pParams;
|
TlsTransportParams_t * pParams;
|
||||||
|
@ -202,7 +202,13 @@ typedef struct PublishPackets
|
|||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* Each compilation unit must define the NetworkContext struct. */
|
/**
|
||||||
|
* @brief Each compilation unit that consumes the NetworkContext must define it.
|
||||||
|
* It should contain a single pointer to the type of your desired transport.
|
||||||
|
* When using multiple transports in the same compilation unit, define this pointer as void *.
|
||||||
|
*
|
||||||
|
* @note Transport stacks are defined in FreeRTOS-Plus/Source/Application-Protocols/network_transport.
|
||||||
|
*/
|
||||||
struct NetworkContext
|
struct NetworkContext
|
||||||
{
|
{
|
||||||
TlsTransportParams_t * pParams;
|
TlsTransportParams_t * pParams;
|
||||||
|
@ -56,8 +56,13 @@
|
|||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* Each compilation unit must define the NetworkContext struct.
|
/**
|
||||||
* void * is used as this utility can be used by both plaintext and TLS demos. */
|
* @brief Each compilation unit that consumes the NetworkContext must define it.
|
||||||
|
* It should contain a single pointer to the type of your desired transport.
|
||||||
|
* This utility is used by both TLS and plaintext HTTP demos, so define this pointer as void *.
|
||||||
|
*
|
||||||
|
* @note Transport stacks are defined in FreeRTOS-Plus/Source/Application-Protocols/network_transport.
|
||||||
|
*/
|
||||||
struct NetworkContext
|
struct NetworkContext
|
||||||
{
|
{
|
||||||
void * pParams;
|
void * pParams;
|
||||||
|
@ -122,7 +122,13 @@
|
|||||||
*/
|
*/
|
||||||
#define IOT_CORE_ALPN_PROTOCOL_NAME "\x0ex-amzn-http-ca"
|
#define IOT_CORE_ALPN_PROTOCOL_NAME "\x0ex-amzn-http-ca"
|
||||||
|
|
||||||
/* Each compilation unit must define the NetworkContext struct. */
|
/**
|
||||||
|
* @brief Each compilation unit that consumes the NetworkContext must define it.
|
||||||
|
* It should contain a single pointer to the type of your desired transport.
|
||||||
|
* When using multiple transports in the same compilation unit, define this pointer as void *.
|
||||||
|
*
|
||||||
|
* @note Transport stacks are defined in FreeRTOS-Plus/Source/Application-Protocols/network_transport.
|
||||||
|
*/
|
||||||
struct NetworkContext
|
struct NetworkContext
|
||||||
{
|
{
|
||||||
TlsTransportParams_t * pParams;
|
TlsTransportParams_t * pParams;
|
||||||
|
@ -164,7 +164,13 @@
|
|||||||
*/
|
*/
|
||||||
#define httpexampleNUMBER_HTTP_PATHS ( 4 )
|
#define httpexampleNUMBER_HTTP_PATHS ( 4 )
|
||||||
|
|
||||||
/* Each compilation unit must define the NetworkContext struct. */
|
/**
|
||||||
|
* @brief Each compilation unit that consumes the NetworkContext must define it.
|
||||||
|
* It should contain a single pointer to the type of your desired transport.
|
||||||
|
* When using multiple transports in the same compilation unit, define this pointer as void *.
|
||||||
|
*
|
||||||
|
* @note Transport stacks are defined in FreeRTOS-Plus/Source/Application-Protocols/network_transport.
|
||||||
|
*/
|
||||||
struct NetworkContext
|
struct NetworkContext
|
||||||
{
|
{
|
||||||
PlaintextTransportParams_t * pParams;
|
PlaintextTransportParams_t * pParams;
|
||||||
|
@ -141,7 +141,13 @@
|
|||||||
*/
|
*/
|
||||||
#define DELAY_BETWEEN_DEMO_RETRY_ITERATIONS_TICKS ( pdMS_TO_TICKS( 5000U ) )
|
#define DELAY_BETWEEN_DEMO_RETRY_ITERATIONS_TICKS ( pdMS_TO_TICKS( 5000U ) )
|
||||||
|
|
||||||
/* Each compilation unit must define the NetworkContext struct. */
|
/**
|
||||||
|
* @brief Each compilation unit that consumes the NetworkContext must define it.
|
||||||
|
* It should contain a single pointer to the type of your desired transport.
|
||||||
|
* When using multiple transports in the same compilation unit, define this pointer as void *.
|
||||||
|
*
|
||||||
|
* @note Transport stacks are defined in FreeRTOS-Plus/Source/Application-Protocols/network_transport.
|
||||||
|
*/
|
||||||
struct NetworkContext
|
struct NetworkContext
|
||||||
{
|
{
|
||||||
TlsTransportParams_t * pParams;
|
TlsTransportParams_t * pParams;
|
||||||
|
@ -194,7 +194,13 @@
|
|||||||
*/
|
*/
|
||||||
#define DELAY_BETWEEN_DEMO_RETRY_ITERATIONS_TICKS ( pdMS_TO_TICKS( 5000U ) )
|
#define DELAY_BETWEEN_DEMO_RETRY_ITERATIONS_TICKS ( pdMS_TO_TICKS( 5000U ) )
|
||||||
|
|
||||||
/* Each compilation unit must define the NetworkContext struct. */
|
/**
|
||||||
|
* @brief Each compilation unit that consumes the NetworkContext must define it.
|
||||||
|
* It should contain a single pointer to the type of your desired transport.
|
||||||
|
* When using multiple transports in the same compilation unit, define this pointer as void *.
|
||||||
|
*
|
||||||
|
* @note Transport stacks are defined in FreeRTOS-Plus/Source/Application-Protocols/network_transport.
|
||||||
|
*/
|
||||||
struct NetworkContext
|
struct NetworkContext
|
||||||
{
|
{
|
||||||
TlsTransportParams_t * pParams;
|
TlsTransportParams_t * pParams;
|
||||||
|
@ -166,7 +166,13 @@
|
|||||||
*/
|
*/
|
||||||
#define DELAY_BETWEEN_DEMO_RETRY_ITERATIONS_TICKS ( pdMS_TO_TICKS( 5000U ) )
|
#define DELAY_BETWEEN_DEMO_RETRY_ITERATIONS_TICKS ( pdMS_TO_TICKS( 5000U ) )
|
||||||
|
|
||||||
/* Each compilation unit must define the NetworkContext struct. */
|
/**
|
||||||
|
* @brief Each compilation unit that consumes the NetworkContext must define it.
|
||||||
|
* It should contain a single pointer to the type of your desired transport.
|
||||||
|
* When using multiple transports in the same compilation unit, define this pointer as void *.
|
||||||
|
*
|
||||||
|
* @note Transport stacks are defined in FreeRTOS-Plus/Source/Application-Protocols/network_transport.
|
||||||
|
*/
|
||||||
struct NetworkContext
|
struct NetworkContext
|
||||||
{
|
{
|
||||||
TlsTransportParams_t * pParams;
|
TlsTransportParams_t * pParams;
|
||||||
|
@ -185,7 +185,13 @@
|
|||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* Each compilation unit must define the NetworkContext struct. */
|
/**
|
||||||
|
* @brief Each compilation unit that consumes the NetworkContext must define it.
|
||||||
|
* It should contain a single pointer to the type of your desired transport.
|
||||||
|
* When using multiple transports in the same compilation unit, define this pointer as void *.
|
||||||
|
*
|
||||||
|
* @note Transport stacks are defined in FreeRTOS-Plus/Source/Application-Protocols/network_transport.
|
||||||
|
*/
|
||||||
struct NetworkContext
|
struct NetworkContext
|
||||||
{
|
{
|
||||||
TlsTransportParams_t * pParams;
|
TlsTransportParams_t * pParams;
|
||||||
|
@ -207,7 +207,13 @@
|
|||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* Each compilation unit must define the NetworkContext struct. */
|
/**
|
||||||
|
* @brief Each compilation unit that consumes the NetworkContext must define it.
|
||||||
|
* It should contain a single pointer to the type of your desired transport.
|
||||||
|
* When using multiple transports in the same compilation unit, define this pointer as void *.
|
||||||
|
*
|
||||||
|
* @note Transport stacks are defined in FreeRTOS-Plus/Source/Application-Protocols/network_transport.
|
||||||
|
*/
|
||||||
struct NetworkContext
|
struct NetworkContext
|
||||||
{
|
{
|
||||||
PlaintextTransportParams_t * pParams;
|
PlaintextTransportParams_t * pParams;
|
||||||
|
@ -375,7 +375,13 @@ typedef struct publishElement
|
|||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* Each compilation unit must define the NetworkContext struct. */
|
/**
|
||||||
|
* @brief Each compilation unit that consumes the NetworkContext must define it.
|
||||||
|
* It should contain a single pointer to the type of your desired transport.
|
||||||
|
* When using multiple transports in the same compilation unit, define this pointer as void *.
|
||||||
|
*
|
||||||
|
* @note Transport stacks are defined in FreeRTOS-Plus/Source/Application-Protocols/network_transport.
|
||||||
|
*/
|
||||||
struct NetworkContext
|
struct NetworkContext
|
||||||
{
|
{
|
||||||
#if defined( democonfigUSE_TLS ) && ( democonfigUSE_TLS == 1 )
|
#if defined( democonfigUSE_TLS ) && ( democonfigUSE_TLS == 1 )
|
||||||
|
@ -274,7 +274,13 @@
|
|||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* Each compilation unit must define the NetworkContext struct. */
|
/**
|
||||||
|
* @brief Each compilation unit that consumes the NetworkContext must define it.
|
||||||
|
* It should contain a single pointer to the type of your desired transport.
|
||||||
|
* When using multiple transports in the same compilation unit, define this pointer as void *.
|
||||||
|
*
|
||||||
|
* @note Transport stacks are defined in FreeRTOS-Plus/Source/Application-Protocols/network_transport.
|
||||||
|
*/
|
||||||
struct NetworkContext
|
struct NetworkContext
|
||||||
{
|
{
|
||||||
TlsTransportParams_t * pParams;
|
TlsTransportParams_t * pParams;
|
||||||
|
@ -176,7 +176,13 @@
|
|||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* Each compilation unit must define the NetworkContext struct. */
|
/**
|
||||||
|
* @brief Each compilation unit that consumes the NetworkContext must define it.
|
||||||
|
* It should contain a single pointer to the type of your desired transport.
|
||||||
|
* When using multiple transports in the same compilation unit, define this pointer as void *.
|
||||||
|
*
|
||||||
|
* @note Transport stacks are defined in FreeRTOS-Plus/Source/Application-Protocols/network_transport.
|
||||||
|
*/
|
||||||
struct NetworkContext
|
struct NetworkContext
|
||||||
{
|
{
|
||||||
PlaintextTransportParams_t * pParams;
|
PlaintextTransportParams_t * pParams;
|
||||||
|
8
FreeRTOS-Plus/Demo/corePKCS11_MQTT_Mutual_Auth_Windows_Simulator/DemoTasks/MutualAuthMQTTExample.c
8
FreeRTOS-Plus/Demo/corePKCS11_MQTT_Mutual_Auth_Windows_Simulator/DemoTasks/MutualAuthMQTTExample.c
@ -160,7 +160,13 @@
|
|||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* Each compilation unit must define the NetworkContext struct. */
|
/**
|
||||||
|
* @brief Each compilation unit that consumes the NetworkContext must define it.
|
||||||
|
* It should contain a single pointer to the type of your desired transport.
|
||||||
|
* When using multiple transports in the same compilation unit, define this pointer as void *.
|
||||||
|
*
|
||||||
|
* @note Transport stacks are defined in FreeRTOS-Plus/Source/Application-Protocols/network_transport.
|
||||||
|
*/
|
||||||
struct NetworkContext
|
struct NetworkContext
|
||||||
{
|
{
|
||||||
TlsTransportParams_t * pParams;
|
TlsTransportParams_t * pParams;
|
||||||
|
@ -51,7 +51,14 @@
|
|||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* Each compilation unit must define the NetworkContext struct. */
|
/**
|
||||||
|
* @brief Each compilation unit that consumes the NetworkContext must define it.
|
||||||
|
* It should contain a single pointer as seen below whenever the header file
|
||||||
|
* of this transport implementation is included to your project.
|
||||||
|
*
|
||||||
|
* @note When using multiple transports in the same compilation unit,
|
||||||
|
* define this pointer as void *.
|
||||||
|
*/
|
||||||
struct NetworkContext
|
struct NetworkContext
|
||||||
{
|
{
|
||||||
TlsTransportParams_t * pParams;
|
TlsTransportParams_t * pParams;
|
||||||
|
@ -60,7 +60,14 @@
|
|||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* Each compilation unit must define the NetworkContext struct. */
|
/**
|
||||||
|
* @brief Each compilation unit that consumes the NetworkContext must define it.
|
||||||
|
* It should contain a single pointer as seen below whenever the header file
|
||||||
|
* of this transport implementation is included to your project.
|
||||||
|
*
|
||||||
|
* @note When using multiple transports in the same compilation unit,
|
||||||
|
* define this pointer as void *.
|
||||||
|
*/
|
||||||
struct NetworkContext
|
struct NetworkContext
|
||||||
{
|
{
|
||||||
TlsTransportParams_t * pParams;
|
TlsTransportParams_t * pParams;
|
||||||
|
@ -42,7 +42,14 @@
|
|||||||
|
|
||||||
/*-----------------------------------------------------------*/
|
/*-----------------------------------------------------------*/
|
||||||
|
|
||||||
/* Each compilation unit must define the NetworkContext struct. */
|
/**
|
||||||
|
* @brief Each compilation unit that consumes the NetworkContext must define it.
|
||||||
|
* It should contain a single pointer as seen below whenever the header file
|
||||||
|
* of this transport implementation is included to your project.
|
||||||
|
*
|
||||||
|
* @note When using multiple transports in the same compilation unit,
|
||||||
|
* define this pointer as void *.
|
||||||
|
*/
|
||||||
struct NetworkContext
|
struct NetworkContext
|
||||||
{
|
{
|
||||||
PlaintextTransportParams_t * pParams;
|
PlaintextTransportParams_t * pParams;
|
||||||
|
Reference in New Issue
Block a user