Cicode Programming Reference > Cicode Function Categories > Equipment Database Functions > EquipGetProperty

EquipGetProperty

This function reads a property of an equipment database record from the EQUIP.RDB database file.

This function is a blocking function. It blocks the calling Cicode task until the operation is complete.

Syntax

STRING EquipGetProperty(STRING Name, STRING Field, INT Mode, STRING Cluster)

Name:

The name of the equipment from which to get information. The name of the equipment can be prefixed by the name of the cluster that is "ClusterName.Equipment".

Field:

The field to read. Supported fields are:

Name, Cluster, Type, Area, Location, IODevice, Page, Parent, Composite, Help, Comment, Alias, Content, Hidden, Custom1, Custom2, Custom3, Custom4, Custom5, Custom6, Custom7, Custom8. Defstate, Scheduled

Name - The name of the equipment (254 characters).

Cluster - The cluster to which the equipment belongs (16 characters).

Type - The equipment-specific type of device (254 characters).

Area - Area number (integer) (16 characters).

Location - Equipment specific field (254 characters).

IODevice - I/O Device name(s) (254 characters).

Page - Page name (254 characters).

Parent - The name of the parent equipment derived from the name of the equipment (maximum 254 characters).

Help - Help context (254 characters).

Comment - User comment (254 characters).

Custom1..8 - User definable fields (254 characters each).

Composite - The equipment specific composite name (maximum 254 characters).

Defstate - The default state.

Scheduled - Specifies if the equipment participates in a schedule.

Alias- Meaningful name of equipment (254 characters).

Content - Workspace content associated with equipment instance.

Hidden - Hide from equipment tree at runtime.

Runtime fields:

MODE - (the current mode of the equipment) 0 - automatic; 1- Manual Inherited; 2- Manual.

DRMODE - (the current DR mode level for the equipment). The value will be a positive integer to represent the current DR level or zero if inactive.

STATE - (the current state of the equipment. Although you can only set state for equipment in Override mode, it is still possible to get state for equipment in normal and inherited override mode.)

Mode:

0 (Block - values are retrieved from the report server, the value will also be stored in local memory cache)

1 (Cache – values are first retrieved from local memory cache, if the property is missing from the memory cache, a request will be sent to the report server and the result will then be cached. If the property is missing from the memory cache or if a previous request is in progress, an empty string will be returned.)

2 (Local - values are retrieved from the local RDB, an error will be returned when trying to get the scheduler engine field in local mode)

3 (CacheThenLocal – values are first retrieved from local memory cache, if the property is missing from the memory cache, a request will be sent to the report server and the result will then be cached. If the property is missing from the memory cache or if a previous request is in progress, the local RDB will be accessed to retrieve the property value.)

Note: Mode 1 and 3 will access the report server at least once, there will be a once off performance penalty on the report server, operating in this mode will always guarantee equipment properties being the latest. Mode 2 will be the fastest but cannot guarantee equipment been up-to-date [See Client Side Online Changes]. Mode 0 will be the slowest as each request is sent across the wire and the function will block until the report server responds.

Cluster - The name of the cluster (optional for a single cluster system)

Return Value

The value of the specified field as a string. An empty string may or may not be an indication that an error has been detected. The last error should be checked in this instance to determine if an error has actually occurred.

Related Functions

EquipBrowseClose, EquipBrowseFirst, EquipBrowseGetField, EquipBrowseNext, EquipBrowseNumRecords, EquipBrowseOpen, EquipBrowsePrev, EquipCheckUpdate, EquipSetProperty

See Also

Equipment Database Functions

Published June 2018