iceoryx_binding_c  2.0.2
enums.h
1 // Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved.
2 // Copyright (c) 2020 - 2022 by Apex.AI Inc. All rights reserved.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may 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,
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 // SPDX-License-Identifier: Apache-2.0
17 
18 #ifndef IOX_BINDING_C_ENUMS_H
19 #define IOX_BINDING_C_ENUMS_H
20 
22 enum iox_SubscriberState
23 {
24  SubscriberState_HAS_DATA,
25 };
26 
28 enum iox_SubscriberEvent
29 {
30  SubscriberEvent_DATA_RECEIVED,
31 };
32 
34 enum iox_SubscribeState
35 {
36  SubscribeState_NOT_SUBSCRIBED = 0,
37  SubscribeState_SUBSCRIBE_REQUESTED,
38  SubscribeState_SUBSCRIBED,
39  SubscribeState_UNSUBSCRIBE_REQUESTED,
40  SubscribeState_WAIT_FOR_OFFER,
41  SubscribeState_UNDEFINED_ERROR,
42 };
43 
45 enum iox_ClientEvent
46 {
47  ClientEvent_RESPONSE_RECEIVED
48 };
49 
51 enum iox_ClientState
52 {
53  ClientState_HAS_RESPONSE
54 };
55 
57 enum iox_ServerEvent
58 {
59  ServerEvent_REQUEST_RECEIVED
60 };
61 
63 enum iox_ServerState
64 {
65  ServerState_HAS_REQUEST
66 };
67 
69 enum iox_ConnectionState
70 {
71  ConnectionState_NOT_CONNECTED = 0,
72  ConnectionState_CONNECT_REQUESTED,
73  ConnectionState_CONNECTED,
74  ConnectionState_DISCONNECT_REQUESTED,
75  ConnectionState_WAIT_FOR_OFFER
76 };
77 
79 enum iox_ChunkReceiveResult
80 {
81  ChunkReceiveResult_TOO_MANY_CHUNKS_HELD_IN_PARALLEL,
82  ChunkReceiveResult_NO_CHUNK_AVAILABLE,
83  ChunkReceiveResult_UNDEFINED_ERROR,
84  ChunkReceiveResult_SUCCESS,
85 };
86 
88 enum iox_ServiceDiscoveryEvent
89 {
90  ServiceDiscoveryEvent_SERVICE_REGISTRY_CHANGED
91 };
92 
95 enum iox_QueueFullPolicy
96 {
97  QueueFullPolicy_BLOCK_PRODUCER,
98  QueueFullPolicy_DISCARD_OLDEST_DATA,
99 };
100 
103 enum iox_ConsumerTooSlowPolicy
104 {
105  ConsumerTooSlowPolicy_WAIT_FOR_CONSUMER,
106  ConsumerTooSlowPolicy_DISCARD_OLDEST_DATA,
107 };
108 
110 enum iox_AllocationResult
111 {
112  AllocationResult_NO_MEMPOOLS_AVAILABLE,
113  AllocationResult_RUNNING_OUT_OF_CHUNKS,
114  AllocationResult_TOO_MANY_CHUNKS_ALLOCATED_IN_PARALLEL,
115  AllocationResult_INVALID_CHUNK,
116  AllocationResult_INVALID_PARAMETER_FOR_USER_PAYLOAD_OR_USER_HEADER,
117  AllocationResult_UNDEFINED_ERROR,
118  AllocationResult_INVALID_PARAMETER_FOR_CHUNK,
119  AllocationResult_INVALID_PARAMETER_FOR_REQUEST_HEADER,
120  AllocationResult_SUCCESS,
121 };
122 
124 enum iox_ClientSendResult
125 {
126  ClientSendResult_SUCCESS,
127  ClientSendResult_UNDEFINED_ERROR,
128  ClientSendResult_NO_CONNECT_REQUESTED,
129  ClientSendResult_SERVER_NOT_AVAILABLE,
130  ClientSendResult_INVALID_REQUEST,
131 };
132 
134 enum iox_ServerSendResult
135 {
136  ServerSendResult_SUCCESS,
137  ServerSendResult_UNDEFINED_ERROR,
138  ServerSendResult_NOT_OFFERED,
139  ServerSendResult_CLIENT_NOT_AVAILABLE,
140  ServerSendResult_INVALID_RESPONSE,
141 };
142 
144 enum iox_WaitSetResult
145 {
146  WaitSetResult_WAIT_SET_FULL,
147  WaitSetResult_ALREADY_ATTACHED,
148  WaitSetResult_UNDEFINED_ERROR,
149  WaitSetResult_SUCCESS
150 };
151 
153 enum iox_ListenerResult
154 {
155  ListenerResult_LISTENER_FULL,
156  ListenerResult_EVENT_ALREADY_ATTACHED,
157  ListenerResult_EMPTY_EVENT_CALLBACK,
158  ListenerResult_EMPTY_INVALIDATION_CALLBACK,
159  ListenerResult_UNDEFINED_ERROR,
160  ListenerResult_SUCCESS
161 };
162 
163 enum iox_ServerRequestResult
164 {
165  ServerRequestResult_TOO_MANY_REQUESTS_HELD_IN_PARALLEL,
166  ServerRequestResult_NO_PENDING_REQUESTS,
167  ServerRequestResult_UNDEFINED_CHUNK_RECEIVE_ERROR,
168  ServerRequestResult_NO_PENDING_REQUESTS_AND_SERVER_DOES_NOT_OFFER,
169  ServerRequestResult_SUCCESS
170 };
171 
173 enum iox_MessagingPattern
174 {
175  MessagingPattern_PUB_SUB,
176  MessagingPattern_REQ_RES
177 };
178 
179 #endif