Google Cloud IoT Device SDK for Embedded C API
include
iotc_error.h
Go to the documentation of this file.
1
/* Copyright 2018-2019 Google LLC
2
*
3
* This is part of the Google Cloud IoT Device SDK for Embedded C,
4
* it is licensed under the BSD 3-Clause license; you may not use this file
5
* except in compliance with the License.
6
*
7
* You may obtain a copy of the License at:
8
* https://opensource.org/licenses/BSD-3-Clause
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
17
#ifndef __IOTC_ERROR_H__
18
#define __IOTC_ERROR_H__
19
20
#ifdef __cplusplus
21
extern
"C"
{
22
#endif
23
30
typedef
enum
{
31
IOTC_STATE_OK
= 0,
/* 0 */
32
IOTC_STATE_TIMEOUT
,
/* 1 */
33
IOTC_STATE_WANT_READ
,
/* 2 */
34
IOTC_STATE_WANT_WRITE
,
/* 3 */
35
IOTC_STATE_WRITTEN
,
/* 4 */
36
IOTC_STATE_FAILED_WRITING
,
/* 5 */
37
IOTC_BACKOFF_TERMINAL
,
/* 6 */
38
IOTC_OUT_OF_MEMORY
,
/* 7 */
39
IOTC_SOCKET_INITIALIZATION_ERROR
,
/* 8 */
40
IOTC_SOCKET_GETHOSTBYNAME_ERROR
,
/* 9 */
41
IOTC_SOCKET_GETSOCKOPT_ERROR
,
/* 10 */
42
IOTC_SOCKET_ERROR
,
/* 11 */
43
IOTC_SOCKET_CONNECTION_ERROR
,
/* 12 */
44
IOTC_SOCKET_SHUTDOWN_ERROR
,
/* 13 */
45
IOTC_SOCKET_WRITE_ERROR
,
/* 14 */
46
IOTC_SOCKET_READ_ERROR
,
/* 15 */
47
IOTC_SOCKET_NO_ACTIVE_CONNECTION_ERROR
,
/* 16 */
48
IOTC_CONNECTION_RESET_BY_PEER_ERROR
,
/* 17 */
49
IOTC_FD_HANDLER_NOT_FOUND
,
/* 18 */
50
IOTC_TLS_INITALIZATION_ERROR
,
/* 19 */
51
IOTC_TLS_FAILED_LOADING_CERTIFICATE
,
/* 20 */
52
IOTC_TLS_CONNECT_ERROR
,
/* 21 */
53
IOTC_TLS_WRITE_ERROR
,
/* 22 */
54
IOTC_TLS_READ_ERROR
,
/* 23 */
55
IOTC_MQTT_SERIALIZER_ERROR
,
/* 24 */
56
IOTC_MQTT_PARSER_ERROR
,
/* 25 */
57
IOTC_MQTT_UNKNOWN_MESSAGE_ID
,
/* 26 */
58
IOTC_MQTT_LOGIC_UNKNOWN_TASK_ID
,
/* 27 */
59
IOTC_MQTT_LOGIC_WRONG_SCENARIO_TYPE
,
/* 28 */
60
IOTC_MQTT_LOGIC_WRONG_MESSAGE_RECEIVED
,
/* 29 */
61
IOTC_MQTT_UNACCEPTABLE_PROTOCOL_VERSION
,
/* 30 */
62
IOTC_MQTT_IDENTIFIER_REJECTED
,
/* 31 */
63
IOTC_MQTT_SERVER_UNAVAILIBLE
,
/* 32 */
64
IOTC_MQTT_BAD_USERNAME_OR_PASSWORD
,
/* 33 */
65
IOTC_MQTT_NOT_AUTHORIZED
,
/* 34 */
66
IOTC_MQTT_CONNECT_UNKNOWN_RETURN_CODE
,
/* 35 */
67
IOTC_MQTT_MESSAGE_CLASS_UNKNOWN_ERROR
,
/* 36 */
68
IOTC_MQTT_PAYLOAD_SIZE_TOO_LARGE
,
/* 37 */
69
IOTC_MQTT_SUBSCRIPTION_FAILED
,
/* 38 */
70
IOTC_MQTT_SUBSCRIPTION_SUCCESSFULL
,
/* 39 */
71
IOTC_INTERNAL_ERROR
,
/* 40 */
72
IOTC_NOT_INITIALIZED
,
/* 41 */
73
IOTC_FAILED_INITIALIZATION
,
/* 42 */
74
IOTC_ALREADY_INITIALIZED
,
/* 43 */
75
IOTC_INVALID_PARAMETER
,
/* 44 */
76
IOTC_UNSET_HANDLER_ERROR
,
/* 45 */
77
IOTC_NOT_IMPLEMENTED
,
/* 46 */
78
IOTC_ELEMENT_NOT_FOUND
,
/* 47 */
79
IOTC_SERIALIZATION_ERROR
,
/* 48 */
80
IOTC_TRUNCATION_WARNING
,
/* 49 */
81
IOTC_BUFFER_OVERFLOW
,
/* 50 */
82
IOTC_THREAD_ERROR
,
/* 51 */
83
IOTC_NULL_CONTEXT
,
/* 52 */
84
IOTC_NULL_WILL_TOPIC
,
/* 53 */
85
IOTC_NULL_WILL_MESSAGE
,
/* 54 */
86
IOTC_NO_MORE_RESOURCE_AVAILABLE
,
/* 55 */
87
IOTC_FS_RESOURCE_NOT_AVAILABLE
,
/* 56 */
88
IOTC_FS_ERROR
,
/* 57 */
89
IOTC_NOT_SUPPORTED
,
/* 58 */
90
IOTC_EVENT_PROCESS_STOPPED
,
/* 59 */
91
IOTC_STATE_RESEND
,
/* 60 */
92
IOTC_NULL_HOST
,
/* 61 */
93
IOTC_TLS_FAILED_CERT_ERROR
,
/* 62 */
94
IOTC_FS_OPEN_ERROR
,
/* 63 */
95
IOTC_FS_OPEN_READ_ONLY
,
/* 64 */
96
IOTC_FS_READ_ERROR
,
/* 65 */
97
IOTC_FS_WRITE_ERROR
,
/* 66 */
98
IOTC_FS_CLOSE_ERROR
,
/* 67 */
99
IOTC_FS_REMOVE_ERROR
,
/* 68 */
100
IOTC_NULL_PROJECT_ID_ERROR
,
/* 69 */
101
IOTC_ALG_NOT_SUPPORTED_ERROR
,
/* 70 */
102
IOTC_JWT_FORMATTION_ERROR
,
/* 71 */
103
IOTC_JWT_PROJECTID_TOO_LONG_ERROR
,
/* 72 */
104
IOTC_NULL_DEVICE_PATH_ERROR
,
/* 73 */
105
IOTC_BUFFER_TOO_SMALL_ERROR
,
/* 74 */
106
IOTC_NULL_KEY_DATA_ERROR
,
/* 75 */
107
IOTC_NULL_CLIENT_ID_ERROR
,
/* 76 */
108
109
IOTC_ERROR_COUNT
/* add above this line, and this sould always be last. */
110
}
iotc_state_t
;
111
112
#ifdef __cplusplus
113
}
114
#endif
115
116
#endif
/* __IOTC_ERR_H__ */
IOTC_TLS_WRITE_ERROR
Definition:
iotc_error.h:53
IOTC_STATE_WANT_READ
Definition:
iotc_error.h:33
IOTC_FS_RESOURCE_NOT_AVAILABLE
Definition:
iotc_error.h:87
IOTC_NULL_HOST
Definition:
iotc_error.h:92
IOTC_FAILED_INITIALIZATION
Definition:
iotc_error.h:73
IOTC_SOCKET_SHUTDOWN_ERROR
Definition:
iotc_error.h:44
IOTC_MQTT_CONNECT_UNKNOWN_RETURN_CODE
Definition:
iotc_error.h:66
IOTC_INTERNAL_ERROR
Definition:
iotc_error.h:71
IOTC_STATE_WANT_WRITE
Definition:
iotc_error.h:34
IOTC_NOT_IMPLEMENTED
Definition:
iotc_error.h:77
IOTC_BACKOFF_TERMINAL
Definition:
iotc_error.h:37
IOTC_SOCKET_CONNECTION_ERROR
Definition:
iotc_error.h:43
IOTC_MQTT_SUBSCRIPTION_FAILED
Definition:
iotc_error.h:69
IOTC_TLS_FAILED_LOADING_CERTIFICATE
Definition:
iotc_error.h:51
IOTC_STATE_WRITTEN
Definition:
iotc_error.h:35
IOTC_INVALID_PARAMETER
Definition:
iotc_error.h:75
IOTC_ALG_NOT_SUPPORTED_ERROR
Definition:
iotc_error.h:101
IOTC_TLS_CONNECT_ERROR
Definition:
iotc_error.h:52
IOTC_UNSET_HANDLER_ERROR
Definition:
iotc_error.h:76
IOTC_MQTT_MESSAGE_CLASS_UNKNOWN_ERROR
Definition:
iotc_error.h:67
IOTC_NOT_SUPPORTED
Definition:
iotc_error.h:89
IOTC_SOCKET_GETHOSTBYNAME_ERROR
Definition:
iotc_error.h:40
IOTC_JWT_PROJECTID_TOO_LONG_ERROR
Definition:
iotc_error.h:103
IOTC_CONNECTION_RESET_BY_PEER_ERROR
Definition:
iotc_error.h:48
IOTC_STATE_TIMEOUT
Definition:
iotc_error.h:32
IOTC_NOT_INITIALIZED
Definition:
iotc_error.h:72
IOTC_NULL_PROJECT_ID_ERROR
Definition:
iotc_error.h:100
IOTC_FS_READ_ERROR
Definition:
iotc_error.h:96
IOTC_FS_ERROR
Definition:
iotc_error.h:88
IOTC_SOCKET_READ_ERROR
Definition:
iotc_error.h:46
IOTC_NULL_WILL_TOPIC
Definition:
iotc_error.h:84
IOTC_FS_OPEN_ERROR
Definition:
iotc_error.h:94
IOTC_SOCKET_ERROR
Definition:
iotc_error.h:42
IOTC_MQTT_LOGIC_UNKNOWN_TASK_ID
Definition:
iotc_error.h:58
IOTC_EVENT_PROCESS_STOPPED
Definition:
iotc_error.h:90
IOTC_FS_REMOVE_ERROR
Definition:
iotc_error.h:99
IOTC_ERROR_COUNT
Definition:
iotc_error.h:109
IOTC_ALREADY_INITIALIZED
Definition:
iotc_error.h:74
IOTC_FS_CLOSE_ERROR
Definition:
iotc_error.h:98
IOTC_MQTT_SERVER_UNAVAILIBLE
Definition:
iotc_error.h:63
IOTC_FD_HANDLER_NOT_FOUND
Definition:
iotc_error.h:49
iotc_state_t
iotc_state_t
Definition:
iotc_error.h:30
IOTC_OUT_OF_MEMORY
Definition:
iotc_error.h:38
IOTC_MQTT_IDENTIFIER_REJECTED
Definition:
iotc_error.h:62
IOTC_MQTT_PARSER_ERROR
Definition:
iotc_error.h:56
IOTC_MQTT_SERIALIZER_ERROR
Definition:
iotc_error.h:55
IOTC_NULL_CLIENT_ID_ERROR
Definition:
iotc_error.h:107
IOTC_THREAD_ERROR
Definition:
iotc_error.h:82
IOTC_BUFFER_TOO_SMALL_ERROR
Definition:
iotc_error.h:105
IOTC_STATE_OK
Definition:
iotc_error.h:31
IOTC_NO_MORE_RESOURCE_AVAILABLE
Definition:
iotc_error.h:86
IOTC_ELEMENT_NOT_FOUND
Definition:
iotc_error.h:78
IOTC_SOCKET_GETSOCKOPT_ERROR
Definition:
iotc_error.h:41
IOTC_JWT_FORMATTION_ERROR
Definition:
iotc_error.h:102
IOTC_STATE_FAILED_WRITING
Definition:
iotc_error.h:36
IOTC_NULL_KEY_DATA_ERROR
Definition:
iotc_error.h:106
IOTC_TLS_FAILED_CERT_ERROR
Definition:
iotc_error.h:93
IOTC_SOCKET_INITIALIZATION_ERROR
Definition:
iotc_error.h:39
IOTC_SOCKET_WRITE_ERROR
Definition:
iotc_error.h:45
IOTC_SOCKET_NO_ACTIVE_CONNECTION_ERROR
Definition:
iotc_error.h:47
IOTC_MQTT_LOGIC_WRONG_MESSAGE_RECEIVED
Definition:
iotc_error.h:60
IOTC_MQTT_PAYLOAD_SIZE_TOO_LARGE
Definition:
iotc_error.h:68
IOTC_TLS_READ_ERROR
Definition:
iotc_error.h:54
IOTC_MQTT_LOGIC_WRONG_SCENARIO_TYPE
Definition:
iotc_error.h:59
IOTC_TRUNCATION_WARNING
Definition:
iotc_error.h:80
IOTC_NULL_CONTEXT
Definition:
iotc_error.h:83
IOTC_MQTT_NOT_AUTHORIZED
Definition:
iotc_error.h:65
IOTC_MQTT_UNKNOWN_MESSAGE_ID
Definition:
iotc_error.h:57
IOTC_MQTT_SUBSCRIPTION_SUCCESSFULL
Definition:
iotc_error.h:70
IOTC_NULL_WILL_MESSAGE
Definition:
iotc_error.h:85
IOTC_FS_OPEN_READ_ONLY
Definition:
iotc_error.h:95
IOTC_TLS_INITALIZATION_ERROR
Definition:
iotc_error.h:50
IOTC_FS_WRITE_ERROR
Definition:
iotc_error.h:97
IOTC_BUFFER_OVERFLOW
Definition:
iotc_error.h:81
IOTC_NULL_DEVICE_PATH_ERROR
Definition:
iotc_error.h:104
IOTC_STATE_RESEND
Definition:
iotc_error.h:91
IOTC_SERIALIZATION_ERROR
Definition:
iotc_error.h:79
IOTC_MQTT_BAD_USERNAME_OR_PASSWORD
Definition:
iotc_error.h:64
IOTC_MQTT_UNACCEPTABLE_PROTOCOL_VERSION
Definition:
iotc_error.h:61
Generated by
1.8.13