AWS IoT Device SDK C: Platform
Platform portability layer
Return to main page ↑
iot_platform_types.h
Go to the documentation of this file.
1 /*
2  * IoT Platform V1.1.0
3  * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a copy of
6  * this software and associated documentation files (the "Software"), to deal in
7  * the Software without restriction, including without limitation the rights to
8  * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9  * the Software, and to permit persons to whom the Software is furnished to do so,
10  * subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included in all
13  * copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17  * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18  * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19  * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21  */
22 
28 #ifndef IOT_PLATFORM_TYPES_H_
29 #define IOT_PLATFORM_TYPES_H_
30 
31 /* The config header is always included first. */
32 #include "iot_config.h"
33 
34 /* Linear containers (lists and queues) include for metrics types. */
35 #include "iot_linear_containers.h"
36 
37 /*------------------------- Thread management types -------------------------*/
38 
43 #define IOT_THREAD_IGNORE_PRIORITY ( -1 )
44 
49 #define IOT_THREAD_IGNORE_STACK_SIZE ( 0 )
50 
54 #ifndef IOT_THREAD_DEFAULT_PRIORITY
55  #define IOT_THREAD_DEFAULT_PRIORITY IOT_THREAD_IGNORE_PRIORITY
56 #endif
57 
61 #ifndef IOT_THREAD_DEFAULT_STACK_SIZE
62  #define IOT_THREAD_DEFAULT_STACK_SIZE IOT_THREAD_IGNORE_STACK_SIZE
63 #endif
64 
82 typedef _IotSystemMutex_t IotMutex_t;
83 
102 typedef _IotSystemSemaphore_t IotSemaphore_t;
103 
110 typedef void ( * IotThreadRoutine_t )( void * pArgument );
111 
112 /*-------------------------- Clock and timer types --------------------------*/
113 
129 typedef _IotSystemTimer_t IotTimer_t;
130 
131 /*--------------------------- Network stack types ---------------------------*/
132 
145 typedef _IotNetworkServerInfo_t IotNetworkServerInfo_t;
146 
160 typedef _IotNetworkCredentials_t IotNetworkCredentials_t;
161 
170 typedef _IotNetworkConnection_t IotNetworkConnection_t;
171 
172 /*------------------------------ Metrics types ------------------------------*/
173 
180 #define IOT_METRICS_IP_ADDRESS_LENGTH 54
181 
187 typedef struct IotMetricsTcpConnection
188 {
189  IotLink_t link;
191  size_t addressLength;
199  char pRemoteAddress[ IOT_METRICS_IP_ADDRESS_LENGTH ];
201 
202 #endif /* ifndef IOT_PLATFORM_TYPES_H_ */
_IotNetworkCredentials_t IotNetworkCredentials_t
The type used to represent network credentials, configured with the type _IotNetworkCredentials_t.
Definition: iot_platform_types.h:160
IotLink_t link
List link member.
Definition: iot_platform_types.h:189
#define IOT_METRICS_IP_ADDRESS_LENGTH
The length of the buffer used to store IP addresses for metrics.
Definition: iot_platform_types.h:180
_IotNetworkConnection_t IotNetworkConnection_t
The type used to represent network connections, configured with the type _IotNetworkConnection_t.
Definition: iot_platform_types.h:170
_IotSystemTimer_t IotTimer_t
The type used to represent timers, configured with the type _IotSystemTimer_t.
Definition: iot_platform_types.h:129
size_t addressLength
The length of the address stored in IotMetricsTcpConnection_t.pRemoteAddress.
Definition: iot_platform_types.h:191
Represents a TCP connection to a remote IPv4 server.
Definition: iot_platform_types.h:187
_IotSystemSemaphore_t IotSemaphore_t
The type used to represent semaphores, configured with the type _IotSystemSemaphore_t.
Definition: iot_platform_types.h:102
void * pNetworkContext
Context that may be used by metrics or Defender.
Definition: iot_platform_types.h:190
_IotSystemMutex_t IotMutex_t
The type used to represent mutexes, configured with the type _IotSystemMutex_t.
Definition: iot_platform_types.h:82
void(* IotThreadRoutine_t)(void *pArgument)
Thread routine function.
Definition: iot_platform_types.h:110
_IotNetworkServerInfo_t IotNetworkServerInfo_t
The type used to represent network server info, configured with the type _IotNetworkServerInfo_t.
Definition: iot_platform_types.h:145