GwEntityData()
The GwEntityData();
rule provides a simplified
way of looking up topology data in NCIM cache. This rule performs
topology lookups in the ncimCache.entityData table.
Syntax
The GwEntityData();
statement
uses the following syntax.
GwEntityData ( entity ID or entity name );
Arguments
The following table lists the properties of the arguments of this stitcher rule.Argument | Description | Accepts constants | Accepts variables | Accepts eval clauses |
---|---|---|---|---|
entity ID |
The integer entity ID is matched against the ENTITYID field in the ncimCache.entityData table. | Yes | Yes | Yes |
entity name |
The text entity name is matched against the ENTITYNAME field in the ncimCache.entityData table. | Yes | Yes | Yes |
For more information on the ncimCache tables, see ncimCache database .
Returns
The GwEntityData();
statement
returns a row from the ncimCache.entityData table if a result was
found.
Performing a lookup based on the value of in-scope data
The following example shows how theGwEntityData();
rule
is used to perform a topology lookup in NCIM cache based on the value
of in-scope data.In this example the nmosEntityId variable is loaded
with the value of a field from an in-scope event. The
GwEntityData()
rule
then uses the value of the nmosEntityId to perform a topology lookup
and load the results of the lookup into the entity record.int nmosEntityId = eval(int, '&NmosEntityId');
Record entity = GwEntityData( nmosEntityId );
Performing a lookup based on a supplied string
The following example shows how theGwEntityData();
rule
is used to perform a topology lookup in NCIM cache based on the value
of a supplied string.In this example the
GwEntityData()
rule
uses the value of a supplied string to perform a topology lookup and
load the results of the lookup into the entity record.entity = GwEntityData( "device_name[ 0 [ 1 ] ]" );