iceoryx_doc  1.0.1
enums.h
1 // Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved.
2 // Copyright (c) 2020 - 2021 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_ChunkReceiveResult
46 {
47  ChunkReceiveResult_TOO_MANY_CHUNKS_HELD_IN_PARALLEL,
48  ChunkReceiveResult_NO_CHUNK_AVAILABLE,
49  ChunkReceiveResult_UNDEFINED_ERROR,
50  ChunkReceiveResult_SUCCESS,
51 };
52 
54 enum iox_QueueFullPolicy
55 {
56  QueueFullPolicy_BLOCK_PUBLISHER,
57  QueueFullPolicy_DISCARD_OLDEST_DATA,
58 };
59 
61 enum iox_SubscriberTooSlowPolicy
62 {
63  SubscriberTooSlowPolicy_WAIT_FOR_SUBSCRIBER,
64  SubscriberTooSlowPolicy_DISCARD_OLDEST_DATA,
65 };
66 
68 enum iox_AllocationResult
69 {
70  AllocationResult_RUNNING_OUT_OF_CHUNKS,
71  AllocationResult_TOO_MANY_CHUNKS_ALLOCATED_IN_PARALLEL,
72  AllocationResult_INVALID_CHUNK,
73  AllocationResult_INVALID_PARAMETER_FOR_USER_PAYLOAD_OR_USER_HEADER,
74  AllocationResult_UNDEFINED_ERROR,
75  AllocationResult_INVALID_PARAMETER_FOR_CHUNK,
76  AllocationResult_SUCCESS,
77 };
78 
79 enum iox_WaitSetResult
80 {
81  WaitSetResult_WAIT_SET_FULL,
82  WaitSetResult_ALREADY_ATTACHED,
83  WaitSetResult_UNDEFINED_ERROR,
84  WaitSetResult_SUCCESS
85 };
86 
87 enum iox_ListenerResult
88 {
89  ListenerResult_LISTENER_FULL,
90  ListenerResult_EVENT_ALREADY_ATTACHED,
91  ListenerResult_EMPTY_INVALIDATION_CALLBACK,
92  ListenerResult_UNDEFINED_ERROR,
93  ListenerResult_SUCCESS
94 };
95 
96 #endif