Skip to content
Snippets Groups Projects
Commit a31b4e7f authored by Jan David Mol's avatar Jan David Mol
Browse files

Restore jupyter notebook to remove accidental additions

parent d7c73441
No related branches found
No related tags found
1 merge request!7Resolve #2021 "03 16 branched from master elk stack"
%% Cell type:code id:social-massachusetts tags: %% Cell type:code id:social-massachusetts tags:
``` python ``` python
def force_start(device): def force_start(device):
if device.state() == DevState.FAULT: if device.state() == DevState.FAULT:
device.Off() device.Off()
if device.state() == DevState.OFF: if device.state() == DevState.OFF:
device.initialise() device.initialise()
if device.state() == DevState.INIT: if device.state() == DevState.INIT:
device.Standby() device.Standby()
if device.state() == DevState.STANDBY: if device.state() == DevState.STANDBY:
device.On() device.On()
return device.state() return device.state()
``` ```
%% Cell type:code id:defined-apache tags: %% Cell type:code id:defined-apache tags:
``` python ``` python
sdp = DeviceProxy("SDP/LTS/1")
sdp.force_start()
for d in devices: for d in devices:
print("Device %s is now in state %s" % (d, force_start(d))) print("Device %s is now in state %s" % (d, force_start(d)))
``` ```
%% Cell type:code id:superior-wheel tags: %% Output
``` python Device PCC(lts/pcc/1) is now in state FAULT
devices Device SDP(lts/sdp/1) is now in state ON
```
%% Cell type:code id:fifteen-transportation tags: %% Cell type:code id:superior-wheel tags:
``` python ``` python
``` ```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment