API Reflection
- Updated2023-07-17
- 2 minute(s) read
API Reflection
Use property nodes to programmatically retrieve information about SLSC resources.
This allows applications to programmatically discover the capabilities of an SLSC device. Information about devices, physical channels, and NVMEM areas are exposed through the SLSC Session Property Node. Setting the Active Device, Active NVMEM Areas, or Active Physical Channel property controls the resource for which the property node will return information. If the active resource is not configured, the corresponding $DefaultDevices, $DefaultNVMEMAreas, or $DefaultPhysChans alias will be used. This will result in an error if more than one resource was supplied to the Initialize Session call.
The following snippet retrieves the names of device-defined properties from a module, using the property. In this example, setting the ActiveDevice property is not strictly necessary, since only one resource was supplied to the Initialize Session VI.

Retrieving information about a property or a command requires additional steps. References must be opened for a property or a command name to expose additional information. Note that each of these references must be closed when no longer needed.The following example opens a reference for a physical channel property, queries the property's description and data type, then closes the property reference.

Refer to the installed programming examples for several demonstrations of API reflection.