The standard way to handle hardware errors is to have the device support set the alarm severity to INVALID and the alarm state to READ ERROR. The device support defines what conditions are needed to do this - how many reads before it fails. If you want to configure this, you can extend the device support to decide pseudo channels to the driver by using the INF extension. Create ao device support for setting these parameters. The device support for CAN and extend the OUT field with an @TIMEOUT. Make the record passive - and whenever you write to the VAL - this replaces the timeout counter. You can do this per link or per device - whatever you decide.
-----Original Message-----
From: [email protected] on behalf of Martin Konrad
Sent: Wed 5/6/2009 5:57 AM
To: [email protected]
Subject: Alarm if no status update received for a given time
Hi all,
I'm using some devices via a simple CAN device support for SocketCAN without
support for acknowledged writes etc. The IOC instead periodically asks the
devices for an update and they reply with a CAN packet containing the device
status.
Now my question is very simple: What is the EPICS way of implementing a
timeout which raises an alarm if a device did not answer for a given time? Is
it possible to configure this alarm condition in the database?
Thanks a lot in advance.
Martin