RTEMS 6.1-rc1
object.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
11/*
12 * Copyright (C) 2020, 2021 embedded brains GmbH & Co. KG
13 * Copyright (C) 1988, 2009 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 * This file is part of the RTEMS quality process and was automatically
39 * generated. If you find something that needs to be fixed or
40 * worded better please post a report or patch to an RTEMS mailing list
41 * or raise a bug report:
42 *
43 * https://www.rtems.org/bugs.html
44 *
45 * For information on updating and regenerating please refer to the How-To
46 * section in the Software Requirements Engineering chapter of the
47 * RTEMS Software Engineering manual. The manual is provided as a part of
48 * a release. For development sources please refer to the online
49 * documentation at:
50 *
51 * https://docs.rtems.org
52 */
53
54/* Generated from spec:/rtems/object/if/header */
55
56#ifndef _RTEMS_RTEMS_OBJECT_H
57#define _RTEMS_RTEMS_OBJECT_H
58
59#include <stdbool.h>
60#include <stddef.h>
61#include <stdint.h>
62#include <rtems/rtems/status.h>
63#include <rtems/rtems/types.h>
64#include <rtems/score/object.h>
65
66#ifdef __cplusplus
67extern "C" {
68#endif
69
70/* Generated from spec:/rtems/object/if/group */
71
83/* Generated from spec:/rtems/object/if/api-class-information */
84
91typedef struct {
97
103
108 uint32_t maximum;
109
115
120 uint32_t unallocated;
122
123/* Generated from spec:/rtems/object/if/id-final */
124
130#define RTEMS_OBJECT_ID_FINAL OBJECTS_ID_FINAL
131
132/* Generated from spec:/rtems/object/if/id-final-index */
133
140#define RTEMS_OBJECT_ID_FINAL_INDEX OBJECTS_ID_FINAL_INDEX
141
142/* Generated from spec:/rtems/object/if/id-initial */
143
168#define RTEMS_OBJECT_ID_INITIAL( _api, _class, _node ) \
169 OBJECTS_ID_INITIAL( _api, _class, _node )
170
171/* Generated from spec:/rtems/object/if/id-initial-index */
172
179#define RTEMS_OBJECT_ID_INITIAL_INDEX OBJECTS_ID_INITIAL_INDEX
180
181/* Generated from spec:/rtems/object/if/search-all-nodes */
182
189#define RTEMS_SEARCH_ALL_NODES OBJECTS_SEARCH_ALL_NODES
190
191/* Generated from spec:/rtems/object/if/search-local-node */
192
199#define RTEMS_SEARCH_LOCAL_NODE OBJECTS_SEARCH_LOCAL_NODE
200
201/* Generated from spec:/rtems/object/if/search-other-nodes */
202
209#define RTEMS_SEARCH_OTHER_NODES OBJECTS_SEARCH_OTHER_NODES
210
211/* Generated from spec:/rtems/object/if/who-am-i */
212
219#define RTEMS_WHO_AM_I OBJECTS_WHO_AM_I
220
221/* Generated from spec:/rtems/object/if/build-id */
222
252 uint32_t api,
253 uint32_t the_class,
254 uint32_t node,
255 uint32_t index
256);
257
258/* Generated from spec:/rtems/object/if/build-id-macro */
259#define rtems_build_id( _api, _class, _node, _index ) \
260 _Objects_Build_id( _api, _class, _node, _index )
261
262/* Generated from spec:/rtems/object/if/build-name */
263
294rtems_name rtems_build_name( char c1, char c2, char c3, char c4 );
295
296/* Generated from spec:/rtems/object/if/build-name-macro */
297#define rtems_build_name( _c1, _c2, _c3, _c4 ) \
298 _Objects_Build_name( _c1, _c2, _c3, _c4 )
299
300/* Generated from spec:/rtems/object/if/get-classic-name */
301
336 rtems_id id,
337 rtems_name *name
338);
339
340/* Generated from spec:/rtems/object/if/get-name */
341
382char *rtems_object_get_name( rtems_id id, size_t length, char *name );
383
384/* Generated from spec:/rtems/object/if/set-name */
385
439rtems_status_code rtems_object_set_name( rtems_id id, const char *name );
440
441/* Generated from spec:/rtems/object/if/id-get-api */
442
467
468/* Generated from spec:/rtems/object/if/id-get-api-macro */
469#define rtems_object_id_get_api( _id ) _Objects_Get_API( _id )
470
471/* Generated from spec:/rtems/object/if/id-get-class */
472
497
498/* Generated from spec:/rtems/object/if/id-get-class-macro */
499#define rtems_object_id_get_class( _id ) _Objects_Get_class( _id )
500
501/* Generated from spec:/rtems/object/if/id-get-node */
502
527
528/* Generated from spec:/rtems/object/if/id-get-node-macro */
529#define rtems_object_id_get_node( _id ) _Objects_Get_node( _id )
530
531/* Generated from spec:/rtems/object/if/id-get-index */
532
557
558/* Generated from spec:/rtems/object/if/id-get-index-macro */
559#define rtems_object_id_get_index( _id ) _Objects_Get_index( _id )
560
561/* Generated from spec:/rtems/object/if/id-api-minimum */
562
584
585/* Generated from spec:/rtems/object/if/id-api-minimum-macro */
586#define rtems_object_id_api_minimum() OBJECTS_INTERNAL_API
587
588/* Generated from spec:/rtems/object/if/id-api-maximum */
589
611
612/* Generated from spec:/rtems/object/if/id-api-maximum-macro */
613#define rtems_object_id_api_maximum() OBJECTS_APIS_LAST
614
615/* Generated from spec:/rtems/object/if/api-minimum-class */
616
637int rtems_object_api_minimum_class( int api );
638
639/* Generated from spec:/rtems/object/if/api-maximum-class */
640
661int rtems_object_api_maximum_class( int api );
662
663/* Generated from spec:/rtems/object/if/get-api-name */
664
688const char *rtems_object_get_api_name( int api );
689
690/* Generated from spec:/rtems/object/if/get-api-class-name */
691
720const char *rtems_object_get_api_class_name( int the_api, int the_class );
721
722/* Generated from spec:/rtems/object/if/get-class-information */
723
755 int the_api,
756 int the_class,
758);
759
760/* Generated from spec:/rtems/object/if/get-local-node */
761
778static inline uint16_t rtems_object_get_local_node( void )
779{
780 return _Objects_Local_node;
781}
782
783#ifdef __cplusplus
784}
785#endif
786
787#endif /* _RTEMS_RTEMS_OBJECT_H */
This header file provides types used by the Classic API.
const char * rtems_object_get_api_class_name(int the_api, int the_class)
Gets a descriptive name of the object class of the object API.
Definition: rtemsobjectgetapiclassname.c:78
int rtems_object_api_minimum_class(int api)
Gets the lowest valid class value of the object API.
Definition: rtemsobjectapiminimumclass.c:45
#define rtems_object_id_api_minimum()
Gets the lowest valid value for the API component of an object identifier.
Definition: object.h:586
int rtems_object_api_maximum_class(int api)
Gets the highest valid class value of the object API.
Definition: rtemsobjectapimaximumclass.c:45
int rtems_object_id_get_index(rtems_id id)
Gets the index component of the object identifier.
Definition: rtemsobjectidgetindex.c:51
int rtems_object_id_get_node(rtems_id id)
Gets the MPCI node component of the object identifier.
Definition: rtemsobjectidgetnode.c:51
const char * rtems_object_get_api_name(int api)
Gets a descriptive name of the object API.
Definition: rtemsobjectgetapiname.c:53
#define rtems_object_id_api_maximum()
Gets the highest valid value for the API component of an object identifier.
Definition: object.h:613
int rtems_object_id_get_class(rtems_id id)
Gets the class component of the object identifier.
Definition: rtemsobjectidgetclass.c:51
char * rtems_object_get_name(rtems_id id, size_t length, char *name)
Gets the object name associated with the object identifier as a string.
Definition: rtemsobjectgetname.c:45
rtems_name rtems_build_name(char c1, char c2, char c3, char c4)
Builds the object name composed of the four characters.
Definition: rtemsbuildname.c:51
int rtems_object_id_get_api(rtems_id id)
Gets the API component of the object identifier.
Definition: rtemsobjectidgetapi.c:51
rtems_status_code rtems_object_set_name(rtems_id id, const char *name)
Sets the object name of the object associated with the object identifier.
Definition: rtemsobjectsetname.c:52
rtems_status_code rtems_object_get_class_information(int the_api, int the_class, rtems_object_api_class_information *info)
Gets the object class information of the object class of the object API.
Definition: rtemsobjectgetclassinfo.c:45
rtems_status_code rtems_object_get_classic_name(rtems_id id, rtems_name *name)
Gets the object name associated with the object identifier.
Definition: rtemsobjectgetclassicname.c:46
rtems_id rtems_build_id(uint32_t api, uint32_t the_class, uint32_t node, uint32_t index)
Builds the object identifier from the API, class, MPCI node, and index components.
Definition: rtemsbuildid.c:56
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Definition: status.h:85
uint32_t rtems_name
This type represents Classic API object names.
Definition: types.h:226
Objects_Id rtems_id
This type represents RTEMS object identifiers.
Definition: types.h:94
#define _Objects_Local_node
The local MPCI node number.
Definition: object.h:368
This header file provides the status codes of Classic API directives and support functions.
This header file provides interfaces of the Object Handler which are used by the implementation and t...
This structure is used to return information to the application about the objects configured for a sp...
Definition: object.h:91
rtems_id maximum_id
This member contains the maximum valid object identifier for this class.
Definition: object.h:102
uint32_t unallocated
This member contains the number of currently inactive objects of this class.
Definition: object.h:120
uint32_t maximum
This member contains the maximum number of active objects configured for this class.
Definition: object.h:108
rtems_id minimum_id
This member contains the minimum valid object identifier for this class.
Definition: object.h:96
bool auto_extend
This member is true, if this class is configured for automatic object extension, otherwise it is fals...
Definition: object.h:114