User Tools

Site Tools


code:observatory_weather_blocking

This is an old revision of the document!


Introduction

Currently all weather checks are carried inside RTS2 dome component. The nice think is that there is single instrument to fail to prevent roof from closing. And this single component can be easily tested and is know to run well (operating on FRAM for ages..). But it has following drawbacks:

  1. it is hard to share weather informations on two RTS2 setups. And we have this encountered at bootes 1.
  2. it is hard to see which device block observatory
  3. it is hard (requires some coding) to attach new weather sensor to observatory

This drawbacks should be resolved by following code changes:

Multiple central server

Single device needs easily to connect to multiple instance of RTS2 running (e.g. cloud sensor need to connect to two RTS2 instances to provide informations to both).

Switching

Centrald will hold a list of devices which are required for system operation. This list will hold names of devices which must be present to switch system to standby or on. If some of the devices is missing, centrald will reject any requests to switch state and will generate warning email.

Before system switch to higher state, it will ask all devices for an update. Devices state can list that device block switching to standby or on. If such bit is set at least on one device, centrald will reject mode switching and will record that mode switching was rejected. If all devices agree, centrald switch state and distribute message about switched state to all connected clients.

If during request for state of the devices any connection send command to change state, the request will be canceled, and new request (if needed) will be issued.

Centrald ask for state switching confirmation only if state is higher then the actual state (e.g. it ask switching from off to standby and on, and from standby to on). It does not ask any confirmation if request is to lower or same state.

When centrald starts, it has two options:

  1. if uptime of the whole system, as deterined by sysinfo call, is bellow value specified in observatory / wait_after_reboot seconds, it will switch immediately to off if reboot_on is false and to on if reboot_on is true
  2. otherwise, system state will be set by reboot_on config entry (on if reboot_on is true, off it is false). System then enter grace period and will wait for others devices to connect. After this period expires, it will check list of connected devices. If any required device is missing, it will switch to off and write message to log file

This procedure is implemented in order to do not close dome roof on RTS2 restart.

code/observatory_weather_blocking.1220107570.txt.gz · Last modified: 2008/09/06 00:00 (external edit)