source: rtems/cpukit/include/rtems/rtems/object.h @ 6abdd89

Last change on this file since 6abdd89 was 6abdd89, checked in by Sebastian Huber <sebastian.huber@…>, on 06/14/21 at 07:57:51

Use a common phrase for pointer parameters

Mention the type of the pointer in the parameter description. Use the
more general term "object" instead of "variable".

Update #3993.

  • Property mode set to 100644
File size: 23.7 KB
RevLine 
[65969c1]1/* SPDX-License-Identifier: BSD-2-Clause */
2
[6c06288]3/**
[feea03b6]4 * @file
[21242c2]5 *
[65969c1]6 * @brief This header file provides the Object Services API.
[6c06288]7 */
[067a96a]8
[65969c1]9/*
[8a95e6f8]10 * Copyright (C) 2020, 2021 embedded brains GmbH (http://www.embedded-brains.de)
[65969c1]11 * Copyright (C) 1988, 2009 On-Line Applications Research Corporation (OAR)
12 *
13 * Redistribution and use in source and binary forms, with or without
14 * modification, are permitted provided that the following conditions
15 * are met:
16 * 1. Redistributions of source code must retain the above copyright
17 *    notice, this list of conditions and the following disclaimer.
18 * 2. Redistributions in binary form must reproduce the above copyright
19 *    notice, this list of conditions and the following disclaimer in the
20 *    documentation and/or other materials provided with the distribution.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
25 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
26 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 * POSSIBILITY OF SUCH DAMAGE.
33 */
34
35/*
36 * This file is part of the RTEMS quality process and was automatically
37 * generated.  If you find something that needs to be fixed or
38 * worded better please post a report or patch to an RTEMS mailing list
39 * or raise a bug report:
40 *
[a6689fb1]41 * https://www.rtems.org/bugs.html
[6c06288]42 *
[a6689fb1]43 * For information on updating and regenerating please refer to the How-To
44 * section in the Software Requirements Engineering chapter of the
45 * RTEMS Software Engineering manual.  The manual is provided as a part of
46 * a release.  For development sources please refer to the online
47 * documentation at:
[65969c1]48 *
[a6689fb1]49 * https://docs.rtems.org
[6c06288]50 */
51
[65969c1]52/* Generated from spec:/rtems/object/if/header */
53
[51a27fd]54#ifndef _RTEMS_RTEMS_OBJECT_H
55#define _RTEMS_RTEMS_OBJECT_H
[6c06288]56
[65969c1]57#include <stdbool.h>
58#include <stddef.h>
[91b8fb9e]59#include <stdint.h>
[6c06288]60#include <rtems/rtems/status.h>
61#include <rtems/rtems/types.h>
[65969c1]62#include <rtems/score/object.h>
[6c06288]63
[484a769]64#ifdef __cplusplus
65extern "C" {
66#endif
67
[65969c1]68/* Generated from spec:/rtems/object/if/group */
69
[067a96a]70/**
[65969c1]71 * @defgroup RTEMSAPIClassicObject Object Services
[c85ab23]72 *
[65969c1]73 * @ingroup RTEMSAPIClassic
[067a96a]74 *
[65969c1]75 * @brief RTEMS provides a collection of services to assist in the management
76 *   and usage of the objects created and utilized via other managers.  These
77 *   services assist in the manipulation of RTEMS objects independent of the
78 *   API used to create them.
[067a96a]79 */
[65969c1]80
81/* Generated from spec:/rtems/object/if/api-class-information */
[067a96a]82
[6c06288]83/**
[65969c1]84 * @ingroup RTEMSAPIClassicObject
85 *
86 * @brief This structure is used to return information to the application about
87 *   the objects configured for a specific API/Class combination.
[6c06288]88 */
89typedef struct {
[65969c1]90  /**
91   * @brief This member contains the minimum valid object identifier for this
92   *   class.
93   */
94  rtems_id minimum_id;
95
96  /**
97   * @brief This member contains the maximum valid object identifier for this
98   *   class.
99   */
100  rtems_id maximum_id;
101
102  /**
103   * @brief This member contains the maximum number of active objects configured
104   *   for this class.
105   */
106  uint32_t maximum;
107
108  /**
109   * @brief This member is true, if this class is configured for automatic object
110   *   extension, otherwise it is false.
111   */
112  bool auto_extend;
113
114  /**
115   * @brief This member contains the number of currently inactive objects of this
116   *   class.
117   */
118  uint32_t unallocated;
[6c06288]119} rtems_object_api_class_information;
120
[65969c1]121/* Generated from spec:/rtems/object/if/id-final */
122
[6c06288]123/**
[65969c1]124 * @ingroup RTEMSAPIClassicObject
[6c06288]125 *
[65969c1]126 * @brief This constant represents the highest object identifier value.
127 */
128#define RTEMS_OBJECT_ID_FINAL OBJECTS_ID_FINAL
129
130/* Generated from spec:/rtems/object/if/id-final-index */
131
132/**
133 * @ingroup RTEMSAPIClassicObject
[6c06288]134 *
[65969c1]135 * @brief This constant represents the highest value for the index component of
136 *   an object identifier.
[6c06288]137 */
[65969c1]138#define RTEMS_OBJECT_ID_FINAL_INDEX OBJECTS_ID_FINAL_INDEX
139
140/* Generated from spec:/rtems/object/if/id-initial */
[6c06288]141
142/**
[65969c1]143 * @ingroup RTEMSAPIClassicObject
144 *
145 * @brief Builds the object identifier with the lowest index from the API,
146 *   class, and MPCI node components.
[6c06288]147 *
[65969c1]148 * @param _api is the API of the object identifier to build.
[6c06288]149 *
[65969c1]150 * @param _class is the class of the object identifier to build.
[6c06288]151 *
[65969c1]152 * @param _node is the MPCI node of the object identifier to build.
[6c06288]153 *
[65969c1]154 * @return Returns the object identifier with the lowest index built from the
155 *   API, class, and MPCI node components.
[b35ac99]156 *
[8a95e6f8]157 * @par Constraints
158 * @parblock
159 * The following constraints apply to this directive:
160 *
161 * * The directive may be called from within any runtime context.
162 *
163 * * The directive will not cause the calling task to be preempted.
164 * @endparblock
[6c06288]165 */
[65969c1]166#define RTEMS_OBJECT_ID_INITIAL( _api, _class, _node ) \
167  OBJECTS_ID_INITIAL( _api, _class, _node )
168
169/* Generated from spec:/rtems/object/if/id-initial-index */
[6c06288]170
[4b72da4]171/**
[65969c1]172 * @ingroup RTEMSAPIClassicObject
[6c06288]173 *
[65969c1]174 * @brief This constant represents the lowest value for the index component of
175 *   an object identifier.
176 */
177#define RTEMS_OBJECT_ID_INITIAL_INDEX OBJECTS_ID_INITIAL_INDEX
178
179/* Generated from spec:/rtems/object/if/search-all-nodes */
180
181/**
182 * @ingroup RTEMSAPIClassicObject
[6c06288]183 *
[65969c1]184 * @brief This constant indicates that an object name to identifier search
185 *   should search through all MPCI nodes of the system.
[6c06288]186 */
[65969c1]187#define RTEMS_SEARCH_ALL_NODES OBJECTS_SEARCH_ALL_NODES
188
189/* Generated from spec:/rtems/object/if/search-local-node */
[6c06288]190
191/**
[65969c1]192 * @ingroup RTEMSAPIClassicObject
[6c06288]193 *
[65969c1]194 * @brief This constant indicates that an object name to identifier search
195 *   should search only the local MPCI node of the system.
196 */
197#define RTEMS_SEARCH_LOCAL_NODE OBJECTS_SEARCH_LOCAL_NODE
198
199/* Generated from spec:/rtems/object/if/search-other-nodes */
200
201/**
202 * @ingroup RTEMSAPIClassicObject
[6c06288]203 *
[65969c1]204 * @brief This constant indicates that an object name to identifier search
205 *   should search through all MPCI nodes of the system except the local node.
206 */
207#define RTEMS_SEARCH_OTHER_NODES OBJECTS_SEARCH_OTHER_NODES
208
209/* Generated from spec:/rtems/object/if/who-am-i */
210
211/**
212 * @ingroup RTEMSAPIClassicObject
[6c06288]213 *
[65969c1]214 * @brief This constant indicates that an object name to identifier search is
215 *   being asked for the identifier of the currently executing task.
[6c06288]216 */
[65969c1]217#define RTEMS_WHO_AM_I OBJECTS_WHO_AM_I
218
219/* Generated from spec:/rtems/object/if/build-id */
[6c06288]220
221/**
[65969c1]222 * @ingroup RTEMSAPIClassicObject
223 *
224 * @brief Builds the object identifier from the API, class, MPCI node, and
225 *   index components.
[6c06288]226 *
[8a95e6f8]227 * @param api is the API of the object identifier to build.
[4efe1955]228 *
[8a95e6f8]229 * @param the_class is the class of the object identifier to build.
[6c06288]230 *
[8a95e6f8]231 * @param node is the MPCI node of the object identifier to build.
[65969c1]232 *
[8a95e6f8]233 * @param index is the index of the object identifier to build.
[65969c1]234 *
235 * @return Returns the object identifier built from the API, class, MPCI node,
236 *   and index components.
[b35ac99]237 *
[8a95e6f8]238 * @par Constraints
239 * @parblock
240 * The following constraints apply to this directive:
241 *
242 * * The directive is implemented by a macro and may be called from within
243 *   C/C++ constant expressions.  In addition, a function implementation of the
244 *   directive exists for bindings to other programming languages.
245 *
246 * * The directive will not cause the calling task to be preempted.
247 * @endparblock
[6c06288]248 */
[8a95e6f8]249rtems_id rtems_build_id(
250  uint32_t api,
251  uint32_t the_class,
252  uint32_t node,
253  uint32_t index
254);
255
256/* Generated from spec:/rtems/object/if/build-id-macro */
[65969c1]257#define rtems_build_id( _api, _class, _node, _index ) \
258  _Objects_Build_id( _api, _class, _node, _index )
259
260/* Generated from spec:/rtems/object/if/build-name */
[6c06288]261
262/**
[65969c1]263 * @ingroup RTEMSAPIClassicObject
264 *
265 * @brief Builds the object name composed of the four characters.
266 *
[8a95e6f8]267 * @param c1 is the first character of the name.
[6c06288]268 *
[8a95e6f8]269 * @param c2 is the second character of the name.
[6c06288]270 *
[8a95e6f8]271 * @param c3 is the third character of the name.
[6c06288]272 *
[8a95e6f8]273 * @param c4 is the fourth character of the name.
[6c06288]274 *
[b35ac99]275 * This directive takes the four characters provided as arguments and composes
[8a95e6f8]276 * a 32-bit object name with ``c1`` in the most significant 8-bits and ``c4``
[b35ac99]277 * in the least significant 8-bits.
278 *
[65969c1]279 * @return Returns the object name composed of the four characters.
[b35ac99]280 *
[8a95e6f8]281 * @par Constraints
282 * @parblock
283 * The following constraints apply to this directive:
284 *
285 * * The directive is implemented by a macro and may be called from within
286 *   C/C++ constant expressions.  In addition, a function implementation of the
287 *   directive exists for bindings to other programming languages.
288 *
289 * * The directive will not cause the calling task to be preempted.
290 * @endparblock
[6c06288]291 */
[8a95e6f8]292rtems_name rtems_build_name( char c1, char c2, char c3, char c4 );
293
294/* Generated from spec:/rtems/object/if/build-name-macro */
[65969c1]295#define rtems_build_name( _c1, _c2, _c3, _c4 ) \
296  _Objects_Build_name( _c1, _c2, _c3, _c4 )
297
298/* Generated from spec:/rtems/object/if/get-classic-name */
[6c06288]299
300/**
[65969c1]301 * @ingroup RTEMSAPIClassicObject
302 *
303 * @brief Gets the object name associated with the object identifier.
[6c06288]304 *
[65969c1]305 * @param id is the object identifier to get the name.
[6c06288]306 *
[6abdd89]307 * @param[out] name is the pointer to an ::rtems_name object.  When the
[97825da]308 *   directive call is successful, the object name associated with the object
[6abdd89]309 *   identifier will be stored in this object.
[6c06288]310 *
[65969c1]311 * @retval ::RTEMS_SUCCESSFUL The requested operation was successful.
[6c06288]312 *
[65969c1]313 * @retval ::RTEMS_INVALID_ADDRESS The ``name`` parameter was NULL.
314 *
315 * @retval ::RTEMS_INVALID_ID There was no object information available for the
316 *   object identifier.
317 *
318 * @retval ::RTEMS_INVALID_ID The object name associated with the object
319 *   identifier was a string.
320 *
321 * @retval ::RTEMS_INVALID_ID There was no object associated with the object
322 *   identifier.
[b35ac99]323 *
[8a95e6f8]324 * @par Constraints
325 * @parblock
326 * The following constraints apply to this directive:
327 *
328 * * The directive may be called from within any runtime context.
329 *
330 * * The directive will not cause the calling task to be preempted.
331 * @endparblock
[6c06288]332 */
[65969c1]333rtems_status_code rtems_object_get_classic_name(
334  rtems_id    id,
335  rtems_name *name
336);
337
338/* Generated from spec:/rtems/object/if/get-name */
[6c06288]339
340/**
[65969c1]341 * @ingroup RTEMSAPIClassicObject
[6c06288]342 *
[65969c1]343 * @brief Gets the object name associated with the object identifier as a
344 *   string.
[6c06288]345 *
[b35ac99]346 * @param id is the object identifier to get the name.
347 *
348 * @param length is the buffer length in bytes.
349 *
350 * @param[out] name is the pointer to a buffer of the specified length.
351 *
[65969c1]352 * The object name is stored in the name buffer.  If the name buffer length is
353 * greater than zero, then the stored object name will be ``NUL`` terminated.
354 * The stored object name may be truncated to fit the length.  There is no
355 * indication if a truncation occurred.  Every attempt is made to return name
356 * as a printable string even if the object has the Classic API 32-bit integer
357 * style name.
[6c06288]358 *
[65969c1]359 * @retval NULL The ``length`` parameter was 0.
[6c06288]360 *
[65969c1]361 * @retval NULL The ``name`` parameter was NULL.
[6c06288]362 *
[65969c1]363 * @retval NULL There was no object information available for the object
364 *   identifier.
[6c06288]365 *
[65969c1]366 * @retval NULL There was no object associated with the object identifier.
[6c06288]367 *
[65969c1]368 * @return Returns the ``name`` parameter value, if there is an object name
369 *   associated with the object identifier.
[b35ac99]370 *
[8a95e6f8]371 * @par Constraints
372 * @parblock
373 * The following constraints apply to this directive:
374 *
375 * * The directive may be called from within any runtime context.
376 *
377 * * The directive will not cause the calling task to be preempted.
378 * @endparblock
[6c06288]379 */
[65969c1]380char *rtems_object_get_name( rtems_id id, size_t length, char *name );
381
382/* Generated from spec:/rtems/object/if/set-name */
[6c06288]383
384/**
[65969c1]385 * @ingroup RTEMSAPIClassicObject
[6c06288]386 *
[65969c1]387 * @brief Sets the object name of the object associated with the object
388 *   identifier.
[6c06288]389 *
[65969c1]390 * @param id is the object identifier of the object to set the name.
391 *
392 * @param name is the object name to set.
393 *
[b35ac99]394 * This directive will set the object name based upon the user string.
395 *
[65969c1]396 * @retval ::RTEMS_SUCCESSFUL The requested operation was successful.
397 *
398 * @retval ::RTEMS_INVALID_ADDRESS The ``name`` parameter was NULL.
399 *
400 * @retval ::RTEMS_INVALID_ID There was no object information available for the
401 *   object identifier.
402 *
403 * @retval ::RTEMS_INVALID_ID There was no object associated with the object
404 *   identifier.
405 *
406 * @retval ::RTEMS_NO_MEMORY There was no memory available to duplicate the
407 *   name.
[b35ac99]408 *
409 * @par Notes
410 * @parblock
411 * This directive can be used to set the name of objects which do not have a
412 * naming scheme per their API.
413 *
414 * If the object specified by ``id`` is of a class that has a string name, this
415 * directive will free the existing name to the RTEMS Workspace and allocate
416 * enough memory from the RTEMS Workspace to make a copy of the string located
417 * at ``name``.
418 *
419 * If the object specified by ``id`` is of a class that has a 32-bit integer
420 * style name, then the first four characters in ``name`` will be used to
421 * construct the name.
422 * @endparblock
[8a95e6f8]423 *
424 * @par Constraints
425 * @parblock
426 * The following constraints apply to this directive:
427 *
428 * * The directive may be called from within device driver initialization
429 *   context.
430 *
431 * * The directive may be called from within task context.
432 *
433 * * The directive may obtain and release the object allocator mutex.  This may
434 *   cause the calling task to be preempted.
435 * @endparblock
[6c06288]436 */
[65969c1]437rtems_status_code rtems_object_set_name( rtems_id id, const char *name );
438
439/* Generated from spec:/rtems/object/if/id-get-api */
[6c06288]440
441/**
[65969c1]442 * @ingroup RTEMSAPIClassicObject
443 *
444 * @brief Gets the API component of the object identifier.
445 *
[8a95e6f8]446 * @param id is the object identifier with the API component to get.
[b35ac99]447 *
448 * @return Returns the API component of the object identifier.
449 *
450 * @par Notes
[8a95e6f8]451 * This directive does not validate the object identifier provided in ``id``.
452 *
453 * @par Constraints
[b35ac99]454 * @parblock
[8a95e6f8]455 * The following constraints apply to this directive:
[65969c1]456 *
[8a95e6f8]457 * * The directive is implemented by a macro and may be called from within
458 *   C/C++ constant expressions.  In addition, a function implementation of the
459 *   directive exists for bindings to other programming languages.
[6c06288]460 *
[8a95e6f8]461 * * The directive will not cause the calling task to be preempted.
[b35ac99]462 * @endparblock
[6c06288]463 */
[8a95e6f8]464int rtems_object_id_get_api( rtems_id id );
465
466/* Generated from spec:/rtems/object/if/id-get-api-macro */
[65969c1]467#define rtems_object_id_get_api( _id ) _Objects_Get_API( _id )
468
469/* Generated from spec:/rtems/object/if/id-get-class */
[fdc57ca]470
471/**
[65969c1]472 * @ingroup RTEMSAPIClassicObject
473 *
474 * @brief Gets the class component of the object identifier.
475 *
[8a95e6f8]476 * @param id is the object identifier with the class component to get.
[b35ac99]477 *
478 * @return Returns the class component of the object identifier.
479 *
480 * @par Notes
[8a95e6f8]481 * This directive does not validate the object identifier provided in ``id``.
482 *
483 * @par Constraints
[b35ac99]484 * @parblock
[8a95e6f8]485 * The following constraints apply to this directive:
[65969c1]486 *
[8a95e6f8]487 * * The directive is implemented by a macro and may be called from within
488 *   C/C++ constant expressions.  In addition, a function implementation of the
489 *   directive exists for bindings to other programming languages.
[fdc57ca]490 *
[8a95e6f8]491 * * The directive will not cause the calling task to be preempted.
[b35ac99]492 * @endparblock
[fdc57ca]493 */
[8a95e6f8]494int rtems_object_id_get_class( rtems_id id );
495
496/* Generated from spec:/rtems/object/if/id-get-class-macro */
[65969c1]497#define rtems_object_id_get_class( _id ) _Objects_Get_class( _id )
498
499/* Generated from spec:/rtems/object/if/id-get-node */
[6c06288]500
501/**
[65969c1]502 * @ingroup RTEMSAPIClassicObject
503 *
504 * @brief Gets the MPCI node component of the object identifier.
505 *
[8a95e6f8]506 * @param id is the object identifier with the MPCI node component to get.
[b35ac99]507 *
508 * @return Returns the MPCI node component of the object identifier.
509 *
510 * @par Notes
[8a95e6f8]511 * This directive does not validate the object identifier provided in ``id``.
512 *
513 * @par Constraints
[b35ac99]514 * @parblock
[8a95e6f8]515 * The following constraints apply to this directive:
[65969c1]516 *
[8a95e6f8]517 * * The directive is implemented by a macro and may be called from within
518 *   C/C++ constant expressions.  In addition, a function implementation of the
519 *   directive exists for bindings to other programming languages.
[6c06288]520 *
[8a95e6f8]521 * * The directive will not cause the calling task to be preempted.
[b35ac99]522 * @endparblock
[6c06288]523 */
[8a95e6f8]524int rtems_object_id_get_node( rtems_id id );
525
526/* Generated from spec:/rtems/object/if/id-get-node-macro */
[65969c1]527#define rtems_object_id_get_node( _id ) _Objects_Get_node( _id )
528
529/* Generated from spec:/rtems/object/if/id-get-index */
[6c06288]530
531/**
[65969c1]532 * @ingroup RTEMSAPIClassicObject
533 *
534 * @brief Gets the index component of the object identifier.
535 *
[8a95e6f8]536 * @param id is the object identifier with the index component to get.
[b35ac99]537 *
538 * @return Returns the index component of the object identifier.
539 *
540 * @par Notes
[8a95e6f8]541 * This directive does not validate the object identifier provided in ``id``.
542 *
543 * @par Constraints
[b35ac99]544 * @parblock
[8a95e6f8]545 * The following constraints apply to this directive:
[65969c1]546 *
[8a95e6f8]547 * * The directive is implemented by a macro and may be called from within
548 *   C/C++ constant expressions.  In addition, a function implementation of the
549 *   directive exists for bindings to other programming languages.
[6c06288]550 *
[8a95e6f8]551 * * The directive will not cause the calling task to be preempted.
[b35ac99]552 * @endparblock
[6c06288]553 */
[8a95e6f8]554int rtems_object_id_get_index( rtems_id id );
555
556/* Generated from spec:/rtems/object/if/id-get-index-macro */
[65969c1]557#define rtems_object_id_get_index( _id ) _Objects_Get_index( _id )
558
559/* Generated from spec:/rtems/object/if/id-api-minimum */
[6c06288]560
561/**
[65969c1]562 * @ingroup RTEMSAPIClassicObject
[6c06288]563 *
[65969c1]564 * @brief Gets the lowest valid value for the API component of an object
565 *   identifier.
[6c06288]566 *
[b35ac99]567 * @return Returns the lowest valid value for the API component of an object
568 *   identifier.
569 *
[8a95e6f8]570 * @par Constraints
[b35ac99]571 * @parblock
[8a95e6f8]572 * The following constraints apply to this directive:
573 *
574 * * The directive is implemented by a macro and may be called from within
575 *   C/C++ constant expressions.  In addition, a function implementation of the
576 *   directive exists for bindings to other programming languages.
[6c06288]577 *
[8a95e6f8]578 * * The directive will not cause the calling task to be preempted.
[b35ac99]579 * @endparblock
[6c06288]580 */
[8a95e6f8]581int rtems_object_id_api_minimum( void );
582
583/* Generated from spec:/rtems/object/if/id-api-minimum-macro */
[65969c1]584#define rtems_object_id_api_minimum() OBJECTS_INTERNAL_API
585
586/* Generated from spec:/rtems/object/if/id-api-maximum */
[6c06288]587
[a00dff42]588/**
[65969c1]589 * @ingroup RTEMSAPIClassicObject
590 *
591 * @brief Gets the highest valid value for the API component of an object
592 *   identifier.
593 *
[b35ac99]594 * @return Returns the highest valid value for the API component of an object
595 *   identifier.
596 *
[8a95e6f8]597 * @par Constraints
[b35ac99]598 * @parblock
[8a95e6f8]599 * The following constraints apply to this directive:
[a00dff42]600 *
[8a95e6f8]601 * * The directive is implemented by a macro and may be called from within
602 *   C/C++ constant expressions.  In addition, a function implementation of the
603 *   directive exists for bindings to other programming languages.
604 *
605 * * The directive will not cause the calling task to be preempted.
[b35ac99]606 * @endparblock
[a00dff42]607 */
[8a95e6f8]608int rtems_object_id_api_maximum( void );
609
610/* Generated from spec:/rtems/object/if/id-api-maximum-macro */
[65969c1]611#define rtems_object_id_api_maximum() OBJECTS_APIS_LAST
[a00dff42]612
[65969c1]613/* Generated from spec:/rtems/object/if/api-minimum-class */
[1615b5ff]614
615/**
[65969c1]616 * @ingroup RTEMSAPIClassicObject
617 *
618 * @brief Gets the lowest valid class value of the object API.
619 *
620 * @param api is the object API to get the lowest valid class value.
621 *
622 * @retval -1 The object API was invalid.
623 *
624 * @return Returns the lowest valid class value of the object API.
[b35ac99]625 *
[8a95e6f8]626 * @par Constraints
627 * @parblock
628 * The following constraints apply to this directive:
629 *
630 * * The directive may be called from within any runtime context.
631 *
632 * * The directive will not cause the calling task to be preempted.
633 * @endparblock
[1615b5ff]634 */
[65969c1]635int rtems_object_api_minimum_class( int api );
[1615b5ff]636
[65969c1]637/* Generated from spec:/rtems/object/if/api-maximum-class */
[1615b5ff]638
639/**
[65969c1]640 * @ingroup RTEMSAPIClassicObject
641 *
642 * @brief Gets the highest valid class value of the object API.
643 *
644 * @param api is the object API to get the highest valid class value.
645 *
646 * @retval 0 The object API was invalid.
647 *
648 * @return Returns the highest valid class value of the object API.
[b35ac99]649 *
[8a95e6f8]650 * @par Constraints
651 * @parblock
652 * The following constraints apply to this directive:
653 *
654 * * The directive may be called from within any runtime context.
655 *
656 * * The directive will not cause the calling task to be preempted.
657 * @endparblock
[1615b5ff]658 */
[65969c1]659int rtems_object_api_maximum_class( int api );
660
661/* Generated from spec:/rtems/object/if/get-api-name */
[1615b5ff]662
663/**
[65969c1]664 * @ingroup RTEMSAPIClassicObject
665 *
666 * @brief Gets a descriptive name of the object API.
667 *
668 * @param api is the object API to get the name.
669 *
670 * @retval "BAD API" The API was invalid.
671 *
672 * @return Returns a descriptive name of the API, if the API was valid.
[b35ac99]673 *
674 * @par Notes
[8a95e6f8]675 * The string returned is from constant space.  Do not modify or free it.
676 *
677 * @par Constraints
[b35ac99]678 * @parblock
[8a95e6f8]679 * The following constraints apply to this directive:
[b35ac99]680 *
[8a95e6f8]681 * * The directive may be called from within any runtime context.
682 *
683 * * The directive will not cause the calling task to be preempted.
[b35ac99]684 * @endparblock
[1615b5ff]685 */
[65969c1]686const char *rtems_object_get_api_name( int api );
[1615b5ff]687
[65969c1]688/* Generated from spec:/rtems/object/if/get-api-class-name */
[1615b5ff]689
690/**
[65969c1]691 * @ingroup RTEMSAPIClassicObject
692 *
693 * @brief Gets a descriptive name of the object class of the object API.
694 *
695 * @param the_api is the object API of the object class.
696 *
697 * @param the_class is the object class of the object API to get the name.
698 *
699 * @retval "BAD API" The API was invalid.
700 *
701 * @retval "BAD CLASS" The class of the API was invalid.
702 *
703 * @return Returns a descriptive name of the class of the API, if the class of
704 *   the API and the API were valid.
[b35ac99]705 *
706 * @par Notes
[8a95e6f8]707 * The string returned is from constant space.  Do not modify or free it.
708 *
709 * @par Constraints
[b35ac99]710 * @parblock
[8a95e6f8]711 * The following constraints apply to this directive:
[b35ac99]712 *
[8a95e6f8]713 * * The directive may be called from within any runtime context.
714 *
715 * * The directive will not cause the calling task to be preempted.
[b35ac99]716 * @endparblock
[1615b5ff]717 */
[65969c1]718const char *rtems_object_get_api_class_name( int the_api, int the_class );
[1615b5ff]719
[65969c1]720/* Generated from spec:/rtems/object/if/get-class-information */
[1615b5ff]721
722/**
[65969c1]723 * @ingroup RTEMSAPIClassicObject
724 *
725 * @brief Gets the object class information of the object class of the object
726 *   API.
727 *
728 * @param the_api is the object API of the object class.
729 *
730 * @param the_class is the object class of the object API to get the class
731 *   information.
732 *
[6abdd89]733 * @param[out] info is the pointer to an rtems_object_api_class_information
734 *   object.  When the directive call is successful, the object class
735 *   information of the class of the API will be stored in this object.
[65969c1]736 *
737 * @retval ::RTEMS_SUCCESSFUL The requested operation was successful.
738 *
739 * @retval ::RTEMS_INVALID_ADDRESS The ``info`` parameter was NULL.
740 *
741 * @retval ::RTEMS_INVALID_NUMBER The class of the API or the API was invalid.
[b35ac99]742 *
[8a95e6f8]743 * @par Constraints
744 * @parblock
745 * The following constraints apply to this directive:
746 *
747 * * The directive may be called from within any runtime context.
748 *
749 * * The directive will not cause the calling task to be preempted.
750 * @endparblock
[1615b5ff]751 */
[65969c1]752rtems_status_code rtems_object_get_class_information(
753  int                                 the_api,
754  int                                 the_class,
755  rtems_object_api_class_information *info
756);
757
758/* Generated from spec:/rtems/object/if/get-local-node */
[1615b5ff]759
760/**
[65969c1]761 * @ingroup RTEMSAPIClassicObject
762 *
763 * @brief Gets the local MPCI node number.
764 *
765 * @return Returns the local MPCI node number.
[b35ac99]766 *
[8a95e6f8]767 * @par Constraints
768 * @parblock
769 * The following constraints apply to this directive:
770 *
771 * * The directive may be called from within any runtime context.
772 *
773 * * The directive will not cause the calling task to be preempted.
774 * @endparblock
[1615b5ff]775 */
[65969c1]776static inline uint16_t rtems_object_get_local_node( void )
777{
778  return _Objects_Local_node;
779}
[1615b5ff]780
[6c06288]781#ifdef __cplusplus
782}
783#endif
784
[65969c1]785#endif /* _RTEMS_RTEMS_OBJECT_H */
Note: See TracBrowser for help on using the repository browser.