metaonly module xdc.rov.StateReader

These APIs are all designed so that they will not re-read data that has already been read in

The StateReader has three similar APIs for reading instance state: fetchInstState fetchHandleState getInstDesc [ more ... ]
Configuration settings sourced in xdc/rov/StateReader.xdc
var StateReader = xdc.useModule('xdc.rov.StateReader');
per-instance config parameters
    var params = new StateReader.Params// Instance config-params object;
per-instance creation
    var inst = StateReader.create// Create an instance-object(ISymbolTable.Instance symTable, StructureDecoder.Instance strDec, params);
per-instance functions
 
DETAILS
The StateReader has three similar APIs for reading instance state: fetchInstState fetchHandleState getInstDesc
fetchInstState takes an instance address and its index into the array of static instances (or -1 if dynamic). This is called by fetchAllInstStates, knows the index because it's iterating over the list.
fetchHandleState just takes an instance address. It looks through the list of instances to determine the index, then calls down to fetchInstState. This API is called by Program.scanHandle.
getInstDesc takes a decoded instance state structure and the index. Both fetch functions ultimately call down to this API. It is also called directly by Program.scanObject for scanning embedded objects.
Instance Config Parameters

Configuration settings
var params = new StateReader.Params;
// Instance config-params object
Static Instance Creation

Configuration settings
var params = new StateReader.Params;
// Allocate instance config-params
params.config =   ...
// Assign individual configs
 
var inst = StateReader.create(ISymbolTable.Instance symTable, StructureDecoder.Instance strDec, params);
// Create an instance-object
 
StateReader.fetchAllInstStates()  // instance

This function makes sure that all of the instance state structures for this module have been scanned in. It does not call any view$init functions

Configuration settings
inst.fetchAllInstStates(Program.ROVModuleDesc* mod) returns Void
 
 
StateReader.fetchHandleState()  // instance

The fetchInstState API needs to know whether the given instance is static or dynamic. If we just have a handle to an instance, we first need to determine whether it is static or dynamic

Configuration settings
inst.fetchHandleState(Program.ROVModuleDesc* mod, Long instAddr) returns Program.ROVInstanceDesc*
 
 
StateReader.fetchInstState()  // instance

This function scans in a single instance's state, and associates various metadata (used by the view$init functions) with the instance object. Returns the inst object for Program.scanHandle

Configuration settings
inst.fetchInstState(Program.ROVModuleDesc* mod, Long instAddr, Int staticIndex) returns Program.ROVInstanceDesc*
 
 
StateReader.fetchModuleState()  // instance

Scans the given module's module state structure. If the structure has already been scanned, this function returns immediately

Configuration settings
inst.fetchModuleState(Program.ROVModuleDesc* mod) returns Void
 
 
StateReader.getInstDesc()  // instance

Takes a decoded state structure and creates an Program.ROVInstanceDesc for it. Also retrieves the label for the instance

Configuration settings
inst.getInstDesc(Program.ROVModuleDesc* mod, Any obj, Int staticIndex) returns Program.ROVInstanceDesc*
 
generated on Fri, 22 Feb 2019 01:33:20 GMT