RTEMS also provides services to associate the API and Class portions of an Object Id with strings. This allows the application developer to provide more information about an object in diagnostic messages.
In the following C language example, an Id is decomposed into its constituent parts and "pretty-printed."
void prettyPrintObjectId(rtems_id id) { int tmpAPI, tmpClass; tmpAPI = rtems_object_id_get_api(id), tmpClass = rtems_object_id_get_class(id), printf( "API=%s Class=%s Node=%d Index=%d\n", rtems_object_get_api_name(tmpAPI), rtems_object_get_api_class_name(tmpAPI, tmpClass), rtems_object_id_get_node(id), rtems_object_id_get_index(id) ); }
Copyright © 1988-2008 OAR Corporation