Page 11 of 20 | |
|
|
4.6.Map Descriptor Example 2 – Bit Storage
This example defines storage location for Relay Point events. The example would work for all other point types. In the example, both primary and secondary storage Data Arrays have been specified. The driver stores index values in the primary array. Each new event for a particular relay will overwrite the value stored previously. In the Bit Array, the driver sets the bit corresponding to the event, leaving other bits unchanged – thus the secondary storage can be used to determine if more than one event is active at a time.
| // Client Side Map Descriptors |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||
| Map_Descriptors |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
| Map_Descriptor_Name, |
| Data_Array_Name, |
|
| Data_Array_Offset, |
| DA_Bit_Name, |
| Function, |
| Node_Name, |
| Event |
| Point |
| Relay/Loop/Zone |
| Address, |
| Length, |
| Clear_on_Reset |
|
|
|
|
|
|
|
|
| Type, |
| Type, |
| Number, |
|
|
|
| |||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |||
| RelayData, | DA_RELAY, | 0, |
| DB_Relay, | Passive_Client, | Any, |
| Relay, |
| 1, | 4, |
| Yes | |||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Data_Array_Name is where the primary DA is specified. Index values are stored here
DA_Bit_Name is where secondary storage is defined. Events are stored by setting appropriate bits.
Remember that 2 elements per Relay, Module, Sensor, Loop are used.
Map Descriptors for storing Relay, Loop, Zone and Panel do not need the address specified.
FieldServer Technologies 1991 Tarob Court Milpitas, California 95035 USA Web: www.fieldserver.com Tel: (408) 262 2299 Fax: (408) 262 2269 Toll Free: (888) 509 1970 email: support@fieldserver.com