| Summary: | IInstance.name needs link to common$.namedInstance | ||
|---|---|---|---|
| Product: | [Technology] RTSC | Reporter: | Ramsey Harris <ramsey> |
| Component: | Runtime | Assignee: | Sasha Slijepcevic <sascha> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | d-russo |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | target:3.21 | ||
|
Description
Ramsey Harris
A comment that links IInstance.name and common$.namedInstance was added in xdc-w25. 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(¶ms);
params.instance->name = "myInstance";
ModA_create(¶ms, NULL);
There should also be an example for naming an instance created at configuration time.
Shipped in XDCtools 3.21. Shipped in XDCtools 3.21 |