Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 317527 - IInstance.name needs link to common$.namedInstance
Summary: IInstance.name needs link to common$.namedInstance
Status: CLOSED FIXED
Alias: None
Product: RTSC
Classification: Technology
Component: Runtime (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Sasha Slijepcevic CLA
QA Contact:
URL:
Whiteboard: target:3.21
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-21 18:23 EDT by Ramsey Harris CLA
Modified: 2011-06-20 14:05 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ramsey Harris CLA 2010-06-21 18:23:03 EDT
The description for IInstance.name is missing a link to Types.common$.namedInstance. It explains how to assign a name to an instance, but it does not show how to set namedInstance = true. The default is false, so you don't get instance names in ROV. There is no way for a new user to make this connection.
Comment 1 Sasha Slijepcevic CLA 2011-02-09 20:02:43 EST
A comment that links IInstance.name and common$.namedInstance was added in xdc-w25.
Comment 2 Ramsey Harris CLA 2011-02-17 16:13:26 EST
The new description and link are helpful, but still a bit mysterious for a new user. It would be more helpful to take the perspective of what the user is trying to do, and then show them how to do it, instead of explaining what the implementation does when configured to not display names.

Specifically, the example code reflects the runtime API and leaves out the detail that the module's namedInstance config param must be defined at configuration time. This is really tough for a new user to figure out.

To view instance names of a given module, configure the module as follows in your configuration script:

var ModA = xdc.useModule('package.name.ModA');
ModA.common$.namedInstance = true;

At runtime, assign your instance a name:

#include <package/name/ModA.h>

ModA_Params params;
ModA_Params_init(&params);
params.instance->name = "myInstance";
ModA_create(&params, NULL);


There should also be an example for naming an instance created at configuration time.
Comment 3 Dave Russo CLA 2011-06-20 14:03:05 EDT
Shipped in XDCtools 3.21.
Comment 4 Dave Russo CLA 2011-06-20 14:05:08 EDT
Shipped in XDCtools 3.21