PAL A Platform Abstraction Layer connects the mbed-client with the underlying platform.

- Main Page
- Data Structures
- Files

- File List
- Globals

pal_errors.h
Go to the documentation of this file.
1 /*
2 * Copyright (c) 2016 ARM Limited. All rights reserved.
3 * SPDX-License-Identifier: Apache-2.0
4 * Licensed under the Apache License, Version 2.0 (the License); you may
5 * not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
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, WITHOUT
12 * 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
18 #ifndef _PAL_ERRORS_H
19 #define _PAL_ERRORS_H
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25 #include "pal_types.h"
26
27
28 typedef enum {
29 PAL_ERR_MODULE_GENERAL = 0x4,
30 PAL_ERR_MODULE_PAL = 0x6,
31 PAL_ERR_MODULE_C = 0x8,
32 PAL_ERR_MODULE_RTOS = 0xC,
33 PAL_ERR_MODULE_NET = 0x10,
34 PAL_ERR_MODULE_TLS = 0x14,
35 PAL_ERR_MODULE_CRYPTO = 0x18,
36 PAL_ERR_MODULE_UPDATE = 0x1C,
37 } palErrorModules_t;
38
39
40 typedef enum {
41 // generic errors
42 PAL_ERR_GENERAL_BASE = (-1 << PAL_ERR_MODULE_GENERAL),
43 PAL_ERR_GENERIC_FAILURE = PAL_ERR_GENERAL_BASE, // try to use a more specific error message whenever possible
44 PAL_ERR_INVALID_ARGUMENT = PAL_ERR_GENERAL_BASE + 1,
45 PAL_ERR_NO_MEMORY = PAL_ERR_GENERAL_BASE + 2,
46 PAL_ERR_BUFFER_TOO_SMALL = PAL_ERR_GENERAL_BASE + 3,
47 PAL_ERR_NOT_SUPPORTED = PAL_ERR_GENERAL_BASE + 4,
48 PAL_ERR_TIMEOUT_EXPIRED = PAL_ERR_GENERAL_BASE + 5,
49 PAL_ERR_NOT_INITIALIZED = PAL_ERR_GENERAL_BASE + 6,
50 PAL_ERR_NULL_POINTER = PAL_ERR_GENERAL_BASE + 7,
51 PAL_ERR_CREATION_FAILED = PAL_ERR_GENERAL_BASE + 8,
52 // pal errors
53 PAL_ERR_NOT_IMPLEMENTED = (-1 << PAL_ERR_MODULE_PAL),
54 // c errors
55 // RTOS errors
56 PAL_ERR_RTOS_ERROR_BASE = (-1 << PAL_ERR_MODULE_RTOS), // try to use a more specific error message whenever possible
57 PAL_ERR_RTOS_PARAMETER = PAL_ERR_RTOS_ERROR_BASE + 0x80,
58 PAL_ERR_RTOS_RESOURCE = PAL_ERR_RTOS_ERROR_BASE + 0x81,
59 PAL_ERR_RTOS_TIMEOUT = PAL_ERR_RTOS_ERROR_BASE + 0xC1,
60 PAL_ERR_RTOS_ISR = PAL_ERR_RTOS_ERROR_BASE + 0x82,
61 PAL_ERR_RTOS_ISR_RECURSIVE = PAL_ERR_RTOS_ERROR_BASE + 0x83,
62 PAL_ERR_RTOS_PRIORITY = PAL_ERR_RTOS_ERROR_BASE + 0x84,
63 PAL_ERR_RTOS_NO_MEMORY = PAL_ERR_RTOS_ERROR_BASE + 0x85,
64 PAL_ERR_RTOS_VALUE = PAL_ERR_RTOS_ERROR_BASE + 0x86,
65 PAL_ERR_RTOS_OS = PAL_ERR_RTOS_ERROR_BASE + 0xFF,
66 // network errors
67 PAL_ERR_SOCKET_ERROR_BASE = (-1 << PAL_ERR_MODULE_NET),
68 PAL_ERR_SOCKET_GENERIC = PAL_ERR_SOCKET_ERROR_BASE,
69 PAL_ERR_SOCKET_NO_BUFFERS = PAL_ERR_SOCKET_ERROR_BASE + 1,
70 PAL_ERR_SOCKET_HOST_UNREACHABLE = PAL_ERR_SOCKET_ERROR_BASE + 2,
71 PAL_ERR_SOCKET_IN_PROGRES = PAL_ERR_SOCKET_ERROR_BASE + 3,
72 PAL_ERR_SOCKET_INVALID_VALUE = PAL_ERR_SOCKET_ERROR_BASE + 4,
73 PAL_ERR_SOCKET_WOULD_BLOCK = PAL_ERR_SOCKET_ERROR_BASE + 5,
74 PAL_ERR_SOCKET_ADDRESS_IN_USE = PAL_ERR_SOCKET_ERROR_BASE + 6,
75 PAL_ERR_SOCKET_ALREADY_CONNECTED = PAL_ERR_SOCKET_ERROR_BASE + 7,
76 PAL_ERR_SOCKET_CONNECTION_ABORTED = PAL_ERR_SOCKET_ERROR_BASE + 8,
77 PAL_ERR_SOCKET_CONNECTION_RESET = PAL_ERR_SOCKET_ERROR_BASE + 9,
78 PAL_ERR_SOCKET_NOT_CONNECTED = PAL_ERR_SOCKET_ERROR_BASE + 10,
79 PAL_ERR_SOCKET_INPUT_OUTPUT_ERROR = PAL_ERR_SOCKET_ERROR_BASE + 11,
80 PAL_ERR_SOCKET_CONNECTION_CLOSED = PAL_ERR_SOCKET_ERROR_BASE + 12,
81 PAL_ERR_SOCKET_FAILED_TO_SET_SOCKET_TO_NON_BLOCKING = PAL_ERR_SOCKET_ERROR_BASE + 13,
82 PAL_ERR_SOCKET_INVALID_ADDRESS_FAMILY = PAL_ERR_SOCKET_ERROR_BASE + 14,
83 PAL_ERR_SOCKET_INVALID_ADDRESS = PAL_ERR_SOCKET_ERROR_BASE + 15,
84 PAL_ERR_SOCKET_DNS_ERROR = PAL_ERR_SOCKET_ERROR_BASE + 16,
85 PAL_ERR_SOCKET_HDCP_ERROR = PAL_ERR_SOCKET_ERROR_BASE + 17,
86 PAL_ERR_SOCKET_AUTH_ERROR = PAL_ERR_SOCKET_ERROR_BASE + 18,
87 PAL_ERR_SOCKET_OPTION_NOT_SUPPORTED = PAL_ERR_SOCKET_ERROR_BASE + 19,
88 //update Error
89 PAL_ERR_UPDATE_ERROR_BASE = (-1 << PAL_ERR_MODULE_UPDATE),
90 PAL_ERR_UPDATE_ERROR = PAL_ERR_UPDATE_ERROR_BASE,
91 PAL_ERR_UPDATE_BUSY = PAL_ERR_UPDATE_ERROR_BASE + 1,
92 PAL_ERR_UPDATE_TIMEOUT = PAL_ERR_UPDATE_ERROR_BASE + 2,
93 PAL_ERR_UPDATE_OUT_OF_BOUNDS = PAL_ERR_UPDATE_ERROR_BASE + 3,
94 PAL_ERR_UPDATE_PALFROM_API = PAL_ERR_UPDATE_ERROR_BASE + 4,
95 PAL_ERR_UPDATE_PALFROM_IO = PAL_ERR_UPDATE_ERROR_BASE + 5,
96 PAL_ERR_UPDATE_END_OF_IMAGE = PAL_ERR_UPDATE_ERROR_BASE + 6,
97 PAL_ERR_UPDATE_CHUNK_TO_SMALL = PAL_ERR_UPDATE_ERROR_BASE + 7,
99 } palError_t;
102 #ifdef __cplusplus
103 }
104 #endif
105 #endif //_PAL_ERRORS
PAL_ERR_RTOS_TIMEOUT
Definition: pal_errors.h:59
PAL_ERR_MODULE_C
Definition: pal_errors.h:31
PAL_ERR_SOCKET_INVALID_ADDRESS_FAMILY
Definition: pal_errors.h:82
PAL_ERR_SOCKET_ERROR_BASE
Definition: pal_errors.h:67
PAL_ERR_SOCKET_HOST_UNREACHABLE
Definition: pal_errors.h:70
PAL_ERR_GENERIC_FAILURE
Definition: pal_errors.h:43
PAL_ERR_UPDATE_BUSY
Definition: pal_errors.h:91
PAL_ERR_RTOS_NO_MEMORY
Definition: pal_errors.h:63
PAL_ERR_GENERAL_BASE
Definition: pal_errors.h:42
PAL_ERR_SOCKET_FAILED_TO_SET_SOCKET_TO_NON_BLOCKING
Definition: pal_errors.h:81
PAL_ERR_MODULE_UPDATE
Definition: pal_errors.h:36
PAL_ERR_SOCKET_INVALID_VALUE
Definition: pal_errors.h:72
PAL_ERR_MODULE_RTOS
Definition: pal_errors.h:32
PAL_ERR_UPDATE_PALFROM_API
Definition: pal_errors.h:94
PAL_ERR_SOCKET_ALREADY_CONNECTED
Definition: pal_errors.h:75
PAL_ERR_SOCKET_NO_BUFFERS
Definition: pal_errors.h:69
PAL_ERR_INVALID_ARGUMENT
Definition: pal_errors.h:44
PAL_ERR_NO_MEMORY
Definition: pal_errors.h:45
PAL_ERR_UPDATE_ERROR
Definition: pal_errors.h:90
PAL_ERR_BUFFER_TOO_SMALL
Definition: pal_errors.h:46
PAL_ERR_SOCKET_CONNECTION_ABORTED
Definition: pal_errors.h:76
palError_t
palError_t
Definition: pal_errors.h:40
PAL_ERR_SOCKET_HDCP_ERROR
Definition: pal_errors.h:85
PAL_ERR_RTOS_PARAMETER
Definition: pal_errors.h:57
PAL_ERR_MODULE_TLS
Definition: pal_errors.h:34
PAL_ERR_NOT_SUPPORTED
Definition: pal_errors.h:47
PAL_ERR_TIMEOUT_EXPIRED
Definition: pal_errors.h:48
palErrorModules_t
palErrorModules_t
Definition: pal_errors.h:28
PAL_ERR_UPDATE_PALFROM_IO
Definition: pal_errors.h:95
PAL_ERR_UPDATE_CHUNK_TO_SMALL
Definition: pal_errors.h:97
PAL_ERR_CREATION_FAILED
Definition: pal_errors.h:51
PAL_ERR_RTOS_VALUE
Definition: pal_errors.h:64
PAL_ERR_RTOS_ERROR_BASE
Definition: pal_errors.h:56
PAL_ERR_SOCKET_WOULD_BLOCK
Definition: pal_errors.h:73
PAL_ERR_RTOS_RESOURCE
Definition: pal_errors.h:58
PAL_ERR_UPDATE_END_OF_IMAGE
Definition: pal_errors.h:96
PAL_ERR_MODULE_CRYPTO
Definition: pal_errors.h:35
PAL_ERR_SOCKET_CONNECTION_RESET
Definition: pal_errors.h:77
PAL_ERR_RTOS_OS
Definition: pal_errors.h:65
PAL_ERR_UPDATE_TIMEOUT
Definition: pal_errors.h:92
PAL_ERR_SOCKET_IN_PROGRES
Definition: pal_errors.h:71
PAL_ERR_SOCKET_NOT_CONNECTED
Definition: pal_errors.h:78
PAL_ERR_SOCKET_GENERIC
Definition: pal_errors.h:68
pal_types.h
PAL_ERR_SOCKET_DNS_ERROR
Definition: pal_errors.h:84
PAL_ERR_SOCKET_CONNECTION_CLOSED
Definition: pal_errors.h:80
PAL_ERR_MODULE_PAL
Definition: pal_errors.h:30
PAL_ERR_UPDATE_ERROR_BASE
Definition: pal_errors.h:89
PAL_ERR_MODULE_NET
Definition: pal_errors.h:33
PAL_ERR_NULL_POINTER
Definition: pal_errors.h:50
PAL_ERR_RTOS_PRIORITY
Definition: pal_errors.h:62
PAL_ERR_NOT_INITIALIZED
Definition: pal_errors.h:49
PAL_ERR_SOCKET_INVALID_ADDRESS
Definition: pal_errors.h:83
PAL_ERR_MODULE_GENERAL
Definition: pal_errors.h:29
PAL_ERR_SOCKET_INPUT_OUTPUT_ERROR
Definition: pal_errors.h:79
PAL_ERR_SOCKET_ADDRESS_IN_USE
Definition: pal_errors.h:74
PAL_ERR_NOT_IMPLEMENTED
Definition: pal_errors.h:53
PAL_ERR_SOCKET_AUTH_ERROR
Definition: pal_errors.h:86
PAL_ERR_UPDATE_OUT_OF_BOUNDS
Definition: pal_errors.h:93
PAL_ERR_SOCKET_OPTION_NOT_SUPPORTED
Definition: pal_errors.h:87
PAL_ERR_RTOS_ISR_RECURSIVE
Definition: pal_errors.h:61
PAL_ERR_RTOS_ISR
Definition: pal_errors.h:60