RTEMS
object.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-2-Clause */
2 
11 /*
12  * Copyright (C) 2020 embedded brains GmbH (http://www.embedded-brains.de)
13  * Copyright (C) 1988, 2008 On-Line Applications Research Corporation (OAR)
14  *
15  * Redistribution and use in source and binary forms, with or without
16  * modification, are permitted provided that the following conditions
17  * are met:
18  * 1. Redistributions of source code must retain the above copyright
19  * notice, this list of conditions and the following disclaimer.
20  * 2. Redistributions in binary form must reproduce the above copyright
21  * notice, this list of conditions and the following disclaimer in the
22  * documentation and/or other materials provided with the distribution.
23  *
24  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
27  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
28  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34  * POSSIBILITY OF SUCH DAMAGE.
35  */
36 
37 /*
38  * Do not manually edit this file. It is part of the RTEMS quality process
39  * and was automatically generated.
40  *
41  * If you find something that needs to be fixed or worded better please
42  * post a report to an RTEMS mailing list or raise a bug report:
43  *
44  * https://docs.rtems.org/branches/master/user/support/bugs.html
45  *
46  * For information on updating and regenerating please refer to:
47  *
48  * https://docs.rtems.org/branches/master/eng/req/howto.html
49  */
50 
51 /* Generated from spec:/rtems/object/if/header */
52 
53 #ifndef _RTEMS_RTEMS_OBJECT_H
54 #define _RTEMS_RTEMS_OBJECT_H
55 
56 #include <stdbool.h>
57 #include <stddef.h>
58 #include <stdint.h>
59 #include <rtems/rtems/status.h>
60 #include <rtems/rtems/types.h>
61 #include <rtems/score/object.h>
62 
63 #ifdef __cplusplus
64 extern "C" {
65 #endif
66 
67 /* Generated from spec:/rtems/object/if/group */
68 
80 /* Generated from spec:/rtems/object/if/api-class-information */
81 
87 typedef struct {
94 
101 
107  uint32_t maximum;
108 
115 
121  uint32_t unallocated;
123 
124 /* Generated from spec:/rtems/object/if/api-maximum-class */
125 
133 int rtems_object_api_maximum_class( int api );
134 
135 /* Generated from spec:/rtems/object/if/api-minimum-class */
136 
144 int rtems_object_api_minimum_class( int api );
145 
146 /* Generated from spec:/rtems/object/if/build-id */
147 
161 #define rtems_build_id( _api, _class, _node, _index ) \
162  _Objects_Build_id( _api, _class, _node, _index )
163 
164 /* Generated from spec:/rtems/object/if/build-name */
165 
179 #define rtems_build_name( _C1, _C2, _C3, _C4 ) \
180  _Objects_Build_name( _C1, _C2, _C3, _C4 )
181 
182 /* Generated from spec:/rtems/object/if/get-api-class-name */
183 
193 const char *rtems_object_get_api_class_name( int the_api, int the_class );
194 
195 /* Generated from spec:/rtems/object/if/get-api-name */
196 
204 const char *rtems_object_get_api_name( int api );
205 
206 /* Generated from spec:/rtems/object/if/get-class-information */
207 
220  int the_api,
221  int the_class,
223 );
224 
225 /* Generated from spec:/rtems/object/if/get-classic-name */
226 
237  rtems_id id,
238  rtems_name *name
239 );
240 
241 /* Generated from spec:/rtems/object/if/get-local-node */
242 
248 static inline uint16_t rtems_object_get_local_node( void )
249 {
250  return _Objects_Local_node;
251 }
252 
253 /* Generated from spec:/rtems/object/if/get-name */
254 
266 char *rtems_object_get_name( rtems_id id, size_t length, char *name );
267 
268 /* Generated from spec:/rtems/object/if/id-api-maximum */
269 
275 #define rtems_object_id_api_maximum() OBJECTS_APIS_LAST
276 
277 /* Generated from spec:/rtems/object/if/id-api-maximum-class */
278 
286 int rtems_object_id_api_maximum_class( int api );
287 
288 /* Generated from spec:/rtems/object/if/id-api-minimum */
289 
295 #define rtems_object_id_api_minimum() OBJECTS_INTERNAL_API
296 
297 /* Generated from spec:/rtems/object/if/id-final */
298 
304 #define RTEMS_OBJECT_ID_FINAL OBJECTS_ID_FINAL
305 
306 /* Generated from spec:/rtems/object/if/id-final-index */
307 
313 #define RTEMS_OBJECT_ID_FINAL_INDEX OBJECTS_ID_FINAL_INDEX
314 
315 /* Generated from spec:/rtems/object/if/id-get-api */
316 
324 #define rtems_object_id_get_api( _id ) _Objects_Get_API( _id )
325 
326 /* Generated from spec:/rtems/object/if/id-get-class */
327 
335 #define rtems_object_id_get_class( _id ) _Objects_Get_class( _id )
336 
337 /* Generated from spec:/rtems/object/if/id-get-index */
338 
346 #define rtems_object_id_get_index( _id ) _Objects_Get_index( _id )
347 
348 /* Generated from spec:/rtems/object/if/id-get-node */
349 
357 #define rtems_object_id_get_node( _id ) _Objects_Get_node( _id )
358 
359 /* Generated from spec:/rtems/object/if/id-initial */
360 
372 #define RTEMS_OBJECT_ID_INITIAL( _api, _class, _node ) \
373  OBJECTS_ID_INITIAL( _api, _class, _node )
374 
375 /* Generated from spec:/rtems/object/if/id-initial-index */
376 
382 #define RTEMS_OBJECT_ID_INITIAL_INDEX OBJECTS_ID_INITIAL_INDEX
383 
384 /* Generated from spec:/rtems/object/if/search-all-nodes */
385 
391 #define RTEMS_SEARCH_ALL_NODES OBJECTS_SEARCH_ALL_NODES
392 
393 /* Generated from spec:/rtems/object/if/search-local-node */
394 
400 #define RTEMS_SEARCH_LOCAL_NODE OBJECTS_SEARCH_LOCAL_NODE
401 
402 /* Generated from spec:/rtems/object/if/search-other-nodes */
403 
409 #define RTEMS_SEARCH_OTHER_NODES OBJECTS_SEARCH_OTHER_NODES
410 
411 /* Generated from spec:/rtems/object/if/set-name */
412 
422 rtems_status_code rtems_object_set_name( rtems_id id, const char *name );
423 
424 /* Generated from spec:/rtems/object/if/who-am-i */
425 
431 #define RTEMS_WHO_AM_I OBJECTS_WHO_AM_I
432 
433 #ifdef __cplusplus
434 }
435 #endif
436 
437 #endif /* _RTEMS_RTEMS_OBJECT_H */
This header file defines types provided by the Classic API.
uint32_t rtems_name
This type is used to represent a Classic API object name.
Definition: types.h:227
Constants and Structures Associated with the Object Handler.
static uint16_t rtems_object_get_local_node(void)
%
Definition: object.h:248
rtems_id minimum_id
This member is.
Definition: object.h:93
bool auto_extend
This member is.
Definition: object.h:114
This header file defines the status codes and support functions of the Classic API.
rtems_id maximum_id
This member is.
Definition: object.h:100
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:82
uint32_t unallocated
This member is.
Definition: object.h:121
int rtems_object_api_minimum_class(int api)
%
uint32_t maximum
This member is.
Definition: object.h:107
char * rtems_object_get_name(rtems_id id, size_t length, char *name)
%
#define _Objects_Local_node
The local MPCI node number.
Definition: object.h:347
Objects_Id rtems_id
Values of this type identify an RTEMS object.
Definition: types.h:99
rtems_status_code rtems_object_get_class_information(int the_api, int the_class, rtems_object_api_class_information *info)
%
int rtems_object_id_api_maximum_class(int api)
%
const char * rtems_object_get_api_name(int api)
%
int rtems_object_api_maximum_class(int api)
%
rtems_status_code rtems_object_set_name(rtems_id id, const char *name)
%
rtems_status_code rtems_object_get_classic_name(rtems_id id, rtems_name *name)
%
const char * rtems_object_get_api_class_name(int the_api, int the_class)
%