115
115
/* elem_copy_f */ _z_ ##item_name##_rc_copy, \
116
116
/* elem_drop_f */ z_ ##item_name##_drop)
117
117
118
+ #define _Z_CHANNEL_DEFINE_DUMMY (item_name , kind_name ) \
119
+ typedef struct { \
120
+ } z_owned_##kind_name##_handler_##item_name##_t; \
121
+ typedef struct { \
122
+ } z_loaned_##kind_name##_handler_##item_name##_t; \
123
+ void *z_##kind_name##_handler_##item_name##_loan(); \
124
+ void *z_##kind_name##_handler_##item_name##_move(); \
125
+ void *z_##kind_name##_handler_##item_name##_drop(); \
126
+ void *z_##kind_name##_handler_##item_name##_recv(); \
127
+ void *z_##kind_name##_handler_##item_name##_try_recv();
128
+
118
129
// This macro defines:
119
130
// z_ring_channel_sample_new()
120
131
// z_owned_ring_handler_sample_t/z_loaned_ring_handler_sample_t
@@ -125,6 +136,7 @@ _Z_CHANNEL_DEFINE(sample, ring)
125
136
// z_owned_fifo_handler_sample_t/z_loaned_fifo_handler_sample_t
126
137
_Z_CHANNEL_DEFINE (sample , fifo )
127
138
139
+ #if Z_FEATURE_QUERYABLE == 1
128
140
// This macro defines:
129
141
// z_ring_channel_query_new()
130
142
// z_owned_ring_handler_query_t/z_loaned_ring_handler_query_t
@@ -134,7 +146,12 @@ _Z_CHANNEL_DEFINE(query, ring)
134
146
// z_fifo_channel_query_new()
135
147
// z_owned_fifo_handler_query_t/z_loaned_fifo_handler_query_t
136
148
_Z_CHANNEL_DEFINE (query , fifo )
149
+ #else // Z_FEATURE_QUERYABLE
150
+ _Z_CHANNEL_DEFINE_DUMMY (query , ring )
151
+ _Z_CHANNEL_DEFINE_DUMMY (query , fifo )
152
+ #endif // Z_FEATURE_QUERYABLE
137
153
154
+ #if Z_FEATURE_QUERY == 1
138
155
// This macro defines:
139
156
// z_ring_channel_reply_new()
140
157
// z_owned_ring_handler_reply_t/z_loaned_ring_handler_reply_t
@@ -144,5 +161,9 @@ _Z_CHANNEL_DEFINE(reply, ring)
144
161
// z_fifo_channel_reply_new()
145
162
// z_owned_fifo_handler_reply_t/z_loaned_fifo_handler_reply_t
146
163
_Z_CHANNEL_DEFINE (reply , fifo )
164
+ #else // Z_FEATURE_QUERY
165
+ _Z_CHANNEL_DEFINE_DUMMY (reply , ring )
166
+ _Z_CHANNEL_DEFINE_DUMMY (reply , fifo )
167
+ #endif // Z_FEATURE_QUERY
147
168
148
169
#endif // INCLUDE_ZENOH_PICO_API_HANDLERS_H
0 commit comments