The DATATAKR driver design is
unusual. This mode of operation supports the modem functions
of the driver. However, if data is read from the driver
regularly (e.g. using an alarm tag) a unit will be seen to go
offline if communications are broken. On unit initialisation, the
driver makes an initial request for data. If Citect is
requesting data from the unit, the driver should inform Citect
within a few seconds that the unit is offline if there is a
communication failure. Also, when a driver unit poll is made,
the unit will go offline if there is a communication failure,
provided Citect is making requests to the driver. Cicode can
determine if a unit is offline using a combination of the
IODeviceInfo and the TagRead Cicode functions. The rule is
that a unit is not "truly" online until the IODeviceInfo status
indicates the unit is online and a test read of a tag using the
TagRead function returns without an error. Tagread returns an
empty string if there is an error when reading numeric
values. If it is needed to find out the error code, use the
ErrGetHw() function. |