RTEMS: Object Class Information

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
Files | Data Structures | Macros | Functions
Object Class Information
API » Classic

## Files
file | object.h
file | rtemsbuildid.c
| Build Object Id.
file | rtemsbuildname.c
| Build Thirty-Two Bit Object Name.
file | rtemsobjectapimaximumclass.c
| Get Highest Valid Class Value.
file | rtemsobjectapiminimumclass.c
| Get Lowest Valid Class Value.
file | rtemsobjectgetapiclassname.c
| Get Class Name.
file | rtemsobjectgetapiname.c
| Get API Name.
file | rtemsobjectgetclassicname.c
| Obtain Name of Object.
file | rtemsobjectgetclassinfo.c
| Get Class Information.
file | rtemsobjectgetname.c
| Obtain Object Name as String.
file | rtemsobjectidapimaximum.c
| Get Highest Valid API Index.
file | rtemsobjectidapiminimum.c
| Get Lowest Valid API Index.
file | rtemsobjectidgetapi.c
| Get API Portion of Object Id.
file | rtemsobjectidgetclass.c
| Get Class Portion of Object Id.
file | rtemsobjectidgetindex.c
| Get Index Portion of Object Id.
file | rtemsobjectidgetnode.c
| Get Node Portion of Object Id.
file | rtemsobjectsetname.c
| Set Name of Object.

## Data Structures
struct | rtems_object_api_class_information

## Macros
#define | rtems_build_id(_api, _class, _node, _index) _Objects_Build_id( _api, _class, _node, _index )
| Build Object Id.
#define | rtems_build_name(_C1, _C2, _C3, _C4) _Objects_Build_name( _C1, _C2, _C3, _C4 )
| Build Thirty-Two Bit Object Name.
#define | rtems_object_id_get_api(_id) _Objects_Get_API( _id )
| Get API Portion of Object Id.
#define | rtems_object_id_get_class(_id) _Objects_Get_class( _id )
| Get Class Portion of Object Id.
#define | rtems_object_id_get_node(_id) _Objects_Get_node( _id )
| Get Node Portion of Object Id.
#define | rtems_object_id_get_index(_id) _Objects_Get_index( _id )
| Get Index Portion of Object Id.
#define | rtems_object_id_api_minimum() OBJECTS_INTERNAL_API
| Get Lowest Valid API Index.
#define | rtems_object_id_api_maximum() OBJECTS_APIS_LAST
| Get Highest Valid API Index.

## Functions
rtems_status_code | rtems_object_get_classic_name (rtems_id id, rtems_name *name)
| Obtain Name of Object.
char * | rtems_object_get_name (rtems_id id, size_t length, char *name)
| Obtain Object Name as String.
rtems_status_code | rtems_object_set_name (rtems_id id, const char *name)
| Set Name of Object.
int | rtems_object_api_minimum_class (int api)
| Get Lowest Valid Class Value.
int | rtems_object_api_maximum_class (int api)
| Get Highest Valid Class Value.
int | rtems_object_id_api_maximum_class (int api)
| Get Highest Valid Class Value.
const char * | rtems_object_get_api_name (int api)
| Get API Name.
const char * | rtems_object_get_api_class_name (int the_api, int the_class)
| Get Class Name.
rtems_status_code | rtems_object_get_class_information (int the_api, int the_class, rtems_object_api_class_information *info)
| Get Class Information.
RTEMS_INLINE_ROUTINE uint16_t | rtems_object_get_local_node (void)
| Get the local MPCI node number.

## Detailed Description

This encapsulates functionality related to the Classic API Object Class Services.

## Macro Definition Documentation

## ◆ rtems_build_id

#define rtems_build_id | ( |  | _api,
|  |  | _class,
|  |  | _node,
|  |  | _index
| ) |  | _Objects_Build_id( _api, _class, _node, _index )

Build Object Id.

This function returns an object id composed of the specified api, class, node, and index.

Parameters

  [in] | _api | indicates the api to use for the Id
  [in] | _class | indicates the class to use for the Id
  [in] | _node | indicates the node to use for the Id
  [in] | _index | indicates the index to use for the Id

Return values

  This | method returns an object Id built from the specified values.

Note
  A body is also provided.

## ◆ rtems_build_name

#define rtems_build_name | ( |  | _C1,
|  |  | _C2,
|  |  | _C3,
|  |  | _C4
| ) |  | _Objects_Build_name( _C1, _C2, _C3, _C4 )

Build Thirty-Two Bit Object Name.

RTEMS Object Helper – Build an Object Id

This function returns an object name composed of the four characters C1, C2, C3, and C4.

Parameters

  [in] | _C1 | is the first character of the name
  [in] | _C2 | is the second character of the name
  [in] | _C3 | is the third character of the name
  [in] | _C4 | is the fourth character of the name

Note
  This must be implemented as a macro for use in Configuration Tables. A body is also provided.

## ◆ rtems_object_id_api_maximum

int rtems_object_id_api_maximum | ( |  | void | ) | OBJECTS_APIS_LAST

Get Highest Valid API Index.

This method returns the highest valid value for the API portion of an RTEMS object Id.

Return values

  This | method returns the greatest valid value for the API portion of an RTEMS object Id.

Note
  A body is also provided.

## ◆ rtems_object_id_api_minimum

int rtems_object_id_api_minimum | ( |  | void | ) | OBJECTS_INTERNAL_API

Get Lowest Valid API Index.

This method returns the lowest valid value for the API portion of an RTEMS object Id.

Return values

  This | method returns the least valid value for the API portion of an RTEMS object Id.

Note
  A body is also provided.

## ◆ rtems_object_id_get_api

#define rtems_object_id_get_api | ( |  | _id | ) | _Objects_Get_API( _id )

Get API Portion of Object Id.

RTEMS Object Helper – Extract API From Id

This function returns the API portion of the Id.

Parameters

  [in] | _id | is the Id of the object to obtain the API from

Return values

  This | method returns the API portion of the provided _id.

Note
  This method does NOT validate the _id provided.
  A body is also provided.

## ◆ rtems_object_id_get_class

#define rtems_object_id_get_class | ( |  | _id | ) | _Objects_Get_class( _id )

Get Class Portion of Object Id.

This function returns the class portion of the _id ID.

Parameters

  [in] | _id | is the Id of the object to obtain the class from

Return values

  This | method returns the class portion of the provided _id.

Note
  This method does NOT validate the _id provided.
  A body is also provided.

## ◆ rtems_object_id_get_index

#define rtems_object_id_get_index | ( |  | _id | ) | _Objects_Get_index( _id )

Get Index Portion of Object Id.

This function returns the index portion of the ID.

Parameters

  [in] | _id | is the Id of the object to obtain the index from

Return values

  This | method returns the index portion of the provided _id.

Note
  This method does NOT validate the _id provided.
  A body is also provided.

## ◆ rtems_object_id_get_node

#define rtems_object_id_get_node | ( |  | _id | ) | _Objects_Get_node( _id )

Get Node Portion of Object Id.

This function returns the node portion of the ID.

Parameters

  [in] | _id | is the Id of the object to obtain the node from

Return values

  This | method returns the node portion of the provided _id.

Note
  This method does NOT validate the _id provided.
  A body is also provided.

## Function Documentation

## ◆ rtems_object_api_maximum_class()

int rtems_object_api_maximum_class | ( | int | api | ) |

Get Highest Valid Class Value.

This method returns the highest valid value Class for the specified api. Each API supports a different number of object classes.

Parameters

  [in] | api | is the API to obtain the maximum class of

Return values

  This | method returns the greatet valid value for class number for the specified api.

## ◆ rtems_object_api_minimum_class()

int rtems_object_api_minimum_class | ( | int | api | ) |

Get Lowest Valid Class Value.

This method returns the lowest valid value Class for the specified api. Each API supports a different number of object classes.

Parameters

  [in] | api | is the API to obtain the minimum class of

Return values

  This | method returns the least valid value for class number for the specified api. RTEMS Object Helper – Get Least Valid Class for an API

## ◆ rtems_object_get_api_class_name()

const char * rtems_object_get_api_class_name | ( | int | the_api,
|  | int | the_class
| ) |  |

Get Class Name.

This method returns a string containing the name of the class from the specified api.

Parameters

  [in] | the_api | is the API for the class
  [in] | the_class | is the class to obtain the name of

Return values

  If | successful, this method returns the name of the specified class. Otherwise, it returns the string "BAD CLASS"

## ◆ rtems_object_get_api_name()

const char * rtems_object_get_api_name | ( | int | api | ) |

Get API Name.

This method returns a string containing the name of the specified api.

Parameters

  [in] | api | is the API to obtain the name of

Return values

  If | successful, this method returns the name of the specified api. Otherwise, it returns the string "BAD API"

## ◆ rtems_object_get_class_information()

rtems_status_code rtems_object_get_class_information | ( | int | the_api,
|  | int | the_class,
|  | rtems_object_api_class_information * | info
| ) |  |

Get Class Information.

This method returns a string containing the name of the the_class from the specified api.

Parameters

  [in] | the_api | is the API for the class
  [in] | the_class | is the class to obtain information about
  [in] | info | points to the information structure to fill in

Return values

  If | successful, this method returns the name of RTEMS_SUCCESSFUL with *info filled in. Otherwise, a status is returned to indicate the error.

## ◆ rtems_object_get_classic_name()

rtems_status_code rtems_object_get_classic_name | ( | rtems_id | id,
|  | rtems_name * | name
| ) |  |

Obtain Name of Object.

This directive returns the name associated with the specified object ID.

Parameters

  [in] | id | is the Id of the object to obtain the name of.
  [out] | name | will be set to the name of the object

Note
  The object must be have a name of the 32-bit form.

Return values

a *name will contain user defined object name

Return values

a RTEMS_SUCCESSFUL - if successful

Return values

  error | code - if unsuccessful

## ◆ rtems_object_get_local_node()

RTEMS_INLINE_ROUTINE uint16_t rtems_object_get_local_node | ( | void |  | ) |

Get the local MPCI node number.

Returns
  The local MPCI node number.

## ◆ rtems_object_get_name()

char * rtems_object_get_name | ( | rtems_id | id,
|  | size_t | length,
|  | char * | name
| ) |  |

Obtain Object Name as String.

This directive returns the name associated with the specified object ID.

Parameters

  [in] | id | is the Id of the object to obtain the name of
  [in] | length | is the length of the output name buffer
  [out] | name | will be set to the name of the object

Return values

a *name will contain user defined object name

Return values

a name - if successful

Return values

a NULL - if unsuccessful

## ◆ rtems_object_id_api_maximum_class()

int rtems_object_id_api_maximum_class | ( | int | api | ) |

Get Highest Valid Class Value.

This method returns the lowest valid value Class for the specified api. Each API supports a different number of object classes.

Parameters

  [in] | api | is the API to obtain the maximum class of

Return values

  This | method returns the least valid value for class number for the specified api.

## ◆ rtems_object_set_name()

rtems_status_code rtems_object_set_name | ( | rtems_id | id,
|  | const char * | name
| ) |  |

Set Name of Object.

This method allows the caller to set the name of an object. This can be used to set the name of objects which do not have a naming scheme per their API.

RTEMS Object Helper – Set Name of Object as String

Parameters

  [in] | id | is the Id of the object to obtain the name of
  [out] | name | will be set to the name of the object

Return values

a *name will contain user defined object name

Return values

a RTEMS_SUCCESSFUL - if successful

Return values

  error | code - if unsuccessful