Platform API Reference
Platform portability layer
iot_platform_types.h
Go to the documentation of this file.
1 /*
2  * Amazon FreeRTOS 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  * http://aws.amazon.com/freertos
23  * http://www.FreeRTOS.org
24  */
25 
31 #ifndef IOT_PLATFORM_TYPES_H_
32 #define IOT_PLATFORM_TYPES_H_
33 
34 /* The config header is always included first. */
35 #include "iot_config.h"
36 
37 /* Linear containers (lists and queues) include for metrics types. */
38 #include "iot_linear_containers.h"
39 
40 /*------------------------- Thread management types -------------------------*/
41 
45 #ifndef IOT_THREAD_DEFAULT_PRIORITY
46  #define IOT_THREAD_DEFAULT_PRIORITY 0
47 #endif
48 
52 #ifndef IOT_THREAD_DEFAULT_STACK_SIZE
53  #define IOT_THREAD_DEFAULT_STACK_SIZE 0
54 #endif
55 
75 typedef _IotSystemMutex_t IotMutex_t;
76 
97 typedef _IotSystemSemaphore_t IotSemaphore_t;
98 
105 typedef void ( * IotThreadRoutine_t )( void * );
106 
107 /*-------------------------- Clock and timer types --------------------------*/
108 
126 typedef _IotSystemTimer_t IotTimer_t;
127 
128 /*------------------------------ Metrics types ------------------------------*/
129 
136 #define IOT_METRICS_IP_ADDRESS_LENGTH 54
137 
143 typedef struct IotMetricsTcpConnection
144 {
145  IotLink_t link;
147  size_t addressLength;
155  char pRemoteAddress[ IOT_METRICS_IP_ADDRESS_LENGTH ];
157 
158 #endif /* ifndef IOT_PLATFORM_TYPES_H_ */
IotSemaphore_t
_IotSystemSemaphore_t IotSemaphore_t
The type used to represent semaphores, configured with the type _IotSystemSemaphore_t.
Definition: iot_platform_types.h:97
IotMutex_t
_IotSystemMutex_t IotMutex_t
The type used to represent mutexes, configured with the type _IotSystemMutex_t.
Definition: iot_platform_types.h:75
IotTimer_t
_IotSystemTimer_t IotTimer_t
The type used to represent timers, configured with the type _IotSystemTimer_t.
Definition: iot_platform_types.h:126
IotMetricsTcpConnection_t::pNetworkContext
void * pNetworkContext
Context that may be used by metrics or Defender.
Definition: iot_platform_types.h:146
IotMetricsTcpConnection_t::link
IotLink_t link
List link member.
Definition: iot_platform_types.h:145
IOT_METRICS_IP_ADDRESS_LENGTH
#define IOT_METRICS_IP_ADDRESS_LENGTH
The length of the buffer used to store IP addresses for metrics.
Definition: iot_platform_types.h:136
IotMetricsTcpConnection_t
Represents a TCP connection to a remote IPv4 server.
Definition: iot_platform_types.h:143
IotThreadRoutine_t
void(* IotThreadRoutine_t)(void *)
Thread routine function.
Definition: iot_platform_types.h:105
IotMetricsTcpConnection_t::addressLength
size_t addressLength
The length of the address stored in IotMetricsTcpConnection_t.pRemoteAddress.
Definition: iot_platform_types.h:147