Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wiregrid Tilt Sensor Agent #656

Closed
wants to merge 145 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
145 commits
Select commit Hold shift + click to select a range
fb88788
make a branch for the development of the wire grid tiltsensor agent
hnakata-JP Mar 11, 2024
3276494
make an interactive wrapper of the tiltsensor agent
hnakata-JP Mar 14, 2024
799152f
first commit of developping the wgtiltsensor-agent
d-hoshino2626 Apr 11, 2024
0ad0682
first commit of developping the wgtiltsensor-agent
d-hoshino2626 Apr 11, 2024
53b3416
Remove develop and master branch references
BrianJKoopman Feb 10, 2023
d323ed4
Remove stray links to 'master' branch
BrianJKoopman Feb 13, 2023
dce6a8b
Move port numbers for binding in common tests
BrianJKoopman Feb 15, 2023
4ef3b33
suprsync: fix unformatted log message
mhasself Feb 16, 2023
283f909
Catch error when binding to port and try again
BrianJKoopman Feb 15, 2023
aad57dc
Pysmurf Monitor Integration Test (#343)
erfz Feb 20, 2023
91a1d67
Add missing __init__.py for two agents
mhasself Feb 22, 2023
ed45e2a
Add LS372 Custom PID Start Process + Other Tasks (#397)
sanahabhimani Mar 1, 2023
a955ff0
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Mar 6, 2023
1c8c540
Smurf Timing Card Agent (#422)
jlashner Mar 16, 2023
109b3d6
File emulator quantization (#425)
jlashner Mar 16, 2023
24d9788
Fix docs build warnings
BrianJKoopman Mar 16, 2023
5be0dcb
Fixes sampling issues with file emulator
jlashner Mar 24, 2023
6138a63
Aug '22 ACU Agent LAT Updates (#403)
laurensaunders Apr 19, 2023
a14624e
IFM Electronic SBN246 Flowmeter Agent (#433)
sanahabhimani May 1, 2023
1e292c3
Disable ibootbar agent set outlet test (#435)
BrianJKoopman May 1, 2023
4c00df5
Update state of control functionality in cryomech agent description
BrianJKoopman May 9, 2023
a9cdbc6
Update readthedocs config
BrianJKoopman May 9, 2023
2a669a1
Skip workflows for readthedocs config file changes
BrianJKoopman May 9, 2023
77abf34
Use pysnmp-lextudio and pyasn1==0.4.8 (#439)
davidvng May 9, 2023
202d5e7
Split HWP Rotation Agent (#421)
ykyohei May 11, 2023
c1a6e1e
Add oper tags to smurf-file-emulator (#448)
jlashner May 25, 2023
3a063bc
fix connection issue
davidvng May 22, 2023
c200b66
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 22, 2023
60d195e
removed except block
davidvng May 26, 2023
033d1b0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 26, 2023
bda6cc7
Update docker base image to ocs v0.10.2 (#449)
BrianJKoopman Jun 2, 2023
3886607
Find labjack calibration location within package (#451)
BrianJKoopman Jun 5, 2023
b9c41ce
adds pysmurf-controller tag params (#424)
jlashner Jun 5, 2023
39293eb
Updates to ibootbar Agent (#446)
davidvng Jun 6, 2023
3ae7a7e
ACU Exercisor mode (#447)
mhasself Jun 8, 2023
c8f5423
Add user tag param to the smurf file emulator ops (#459)
jlashner Jun 17, 2023
34fd7a3
Add protection mode monitoring to pmx agent (#463)
d1ssk Jun 20, 2023
fc228f2
Generator Agent (#436)
davidvng Jun 22, 2023
a6bb382
Add Suprsync timecode dir finalization (#454)
jlashner Jun 26, 2023
20f61de
Fix 372 upload cal curve timeout issue (#390)
sanahabhimani Jun 28, 2023
15946ce
Changes to allow for reading more than one continuous block of resgis…
DaveBoettger Jul 14, 2023
5d6b9d2
Separate generator fields into different blocks (#476)
jlashner Jul 18, 2023
d7b2275
Replace pytest-docker-compose with pytest-docker plugin (#484)
BrianJKoopman Jul 26, 2023
8e721f8
ACU Omnibus, July 2023 (#480)
mhasself Jul 27, 2023
e734aa0
Revert to using pysnmp (#485)
BrianJKoopman Jul 31, 2023
ae6f105
Add Autorange Task to 372 Agent (#489)
sanahabhimani Aug 1, 2023
3c5d375
Separate blocks for each input/output in UPS Agent (#457)
davidvng Aug 3, 2023
4752229
Change ls372 input_configfile to work with default params (#490)
jlashner Aug 3, 2023
d798e07
Fix docstring errors to custom pid process (#497)
sanahabhimani Aug 7, 2023
328f206
Update set_boresight method signature override (#499)
BrianJKoopman Aug 7, 2023
b4ba17d
Suprsync archive stats (#467)
jlashner Aug 8, 2023
cad61d7
LS372 Agent: Add ability in config file to set channel resistance ran…
sanahabhimani Aug 9, 2023
9c60f4f
Create HWP Supervisor Agent (#427)
jlashner Aug 9, 2023
8c3baf8
Fix ibootbar agent acq crashing during reconnection (#496)
davidvng Aug 9, 2023
6d472c6
Sets PID freq to 0 when PMX is turned off (#502)
jlashner Aug 11, 2023
57d9ebd
Fix link to docker hub socs image (#503)
BrianJKoopman Aug 11, 2023
65756f1
Add archive_name filter to update timecode func (#508)
jlashner Aug 17, 2023
c8cdf24
Remove CMD from wg-actuator dockerfile
BrianJKoopman Aug 17, 2023
82485af
swap LSL/LSR/ST1 <--> LSL/LSR/ST2 to bugfix at the site
sadachi5 Aug 22, 2023
18b6f67
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 23, 2023
1459e18
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Aug 28, 2023
d44b33d
bump sodetlib
jlashner Aug 30, 2023
0d5c9c7
Create Water Vapor Radiometer Agent (#429)
sanahabhimani Sep 1, 2023
24c29ab
Bump actions/checkout from 3 to 4 (#520)
dependabot[bot] Sep 5, 2023
33c8999
Fix suprsync uncopied_files stat (#521)
kmharrington Sep 5, 2023
9a1e52d
Small change to make vantage agent more robust to hardware dropouts (…
jlashner Sep 12, 2023
b8f80d3
Bump docker/login-action from 2 to 3 (#525)
dependabot[bot] Sep 15, 2023
c69b460
[pre-commit.ci] pre-commit autoupdate (#519)
pre-commit-ci[bot] Sep 15, 2023
c902bed
Update ACU agent to work with LAT (#526)
mhasself Sep 19, 2023
a60fe8c
Set acq session status to running appropriately (#528)
BrianJKoopman Sep 21, 2023
be07c04
ACU: adjustments for moving LAT corotator (#532)
mhasself Sep 26, 2023
d339d8b
Set flowmeter agent acq session status appropriately (#533)
sanahabhimani Sep 27, 2023
1b5cb30
Create hwp gripper agent (#487)
jlashner Sep 29, 2023
e6dccd7
Bump styfle/cancel-workflow-action from 0.11.0 to 0.12.0 (#537)
dependabot[bot] Oct 5, 2023
9490bf1
[pre-commit.ci] pre-commit autoupdate (#540)
pre-commit-ci[bot] Oct 10, 2023
74d6a43
Address (most of) Issue #531 (#539)
RemingtonGerras Oct 11, 2023
ac9c32a
set acq session status to running (#549)
sanahabhimani Oct 16, 2023
7c43b4c
Allow floats for custom PID task arguments (#548)
BrianJKoopman Oct 16, 2023
ade2252
Improve ACU scanning fault tolerance and logging (#547)
mhasself Oct 16, 2023
d1f5e4b
ACU: add argument --ignore-axis
mhasself Oct 20, 2023
4dcda8a
ACU: rename restart_idle to idle_reset and make it work
mhasself Oct 19, 2023
90afe71
ACU: better use of argparse for ignore-axes
mhasself Nov 3, 2023
be77e36
ACU Sun Avoidance (#559)
mhasself Nov 7, 2023
a7ff2c8
Adds general task to set TES biases (#545)
jlashner Nov 7, 2023
21686c6
Bump sodetlib base image tag (#561)
jlashner Nov 7, 2023
f9783b2
Suprsync update tcdirs (#564)
jlashner Nov 7, 2023
c3c818d
Add missing in pysmurf-controller docstrings (#553)
BrianJKoopman Nov 8, 2023
5cb106f
Add example session.data structure for labjack acq process (#557)
BrianJKoopman Nov 8, 2023
69d9060
PWV HTTP Requests Error (#563)
sanahabhimani Nov 8, 2023
17d07fa
Fix typo in pysmurf zero biases function (#566)
jlashner Nov 9, 2023
bce2be1
Add connection error exception handling (#569)
sanahabhimani Nov 14, 2023
853f9fe
Add docker updates to dependabot and set reviewers
BrianJKoopman Nov 14, 2023
2813933
Skip workflows for dependabot config changes
BrianJKoopman Nov 14, 2023
4daa097
Bump simonsobs/ocs from 0.10.2 to v0.10.3
dependabot[bot] Nov 14, 2023
aa5c2db
Improve HWP agent robustness (#541)
bbixler500 Nov 22, 2023
7e3b4bd
Add except for caget failure (#576)
jlashner Nov 27, 2023
6e4f9d7
Add `speedrate` parameter for `insert()` / `eject()` functions in `wi…
sadachi5 Nov 27, 2023
85a9e37
Add timeout exception error and timeout value (#578)
sanahabhimani Nov 28, 2023
40394fe
Changed variable name to fix minor bug (#581)
bbixler500 Nov 28, 2023
5c0146f
Fix bug in speed_rate limitation in wiregrid_actuator/drivers/Actuato…
sadachi5 Nov 29, 2023
096e1e7
ACU: add set_speed_mode task (#582)
mhasself Dec 1, 2023
1908119
ACU: Add feeds for Sun info and UDP stream quality (#570)
mhasself Dec 4, 2023
1c8a35f
Changed monitor and spin_control processes to update the session.stat…
bbixler500 Dec 4, 2023
2d3b023
Change timeout to 60s (#587)
sanahabhimani Dec 4, 2023
1bd114c
Filter for ignored files in Suprsync query (#583)
jlashner Dec 6, 2023
7d7eea7
Bump actions/setup-python from 4 to 5 (#590)
dependabot[bot] Dec 7, 2023
3fb29d4
ACU: permit scans on LAT even when Sun Avoidance is not to be enabled…
mhasself Dec 8, 2023
5ca60ca
Create ACTiCameraAgent (#591)
davidvng Dec 11, 2023
62c681b
[pre-commit.ci] pre-commit autoupdate (#596)
pre-commit-ci[bot] Dec 11, 2023
221f5c7
Move requests package from separate group into `install_requires` (#595)
BrianJKoopman Dec 11, 2023
8eedcd7
Restart UPS Agent every 60 minutes (#592)
davidvng Dec 11, 2023
2588a8e
Add hwp_pcu agent for the hwp phase compensation unit operations (#588)
17-sugiyama Dec 18, 2023
342eadb
hwp_pid: make timeout longer, sample rate lower (#594)
ykyohei Dec 18, 2023
2a27c66
[pre-commit.ci] pre-commit autoupdate (#597)
pre-commit-ci[bot] Dec 18, 2023
1f9bd04
Adds HWPPCUAgent to plugin file (#598)
jlashner Dec 19, 2023
612db17
TimeoutLockless PCU agent (#600)
jlashner Dec 23, 2023
8d9015c
ACU motion fixes and "named-positions" feature (#603)
mhasself Jan 2, 2024
10e7f56
Bump simonsobs/ocs from v0.10.3 to v0.10.4 (#609)
dependabot[bot] Jan 8, 2024
d0cd447
[pre-commit.ci] pre-commit autoupdate (#610)
pre-commit-ci[bot] Jan 8, 2024
96b1a16
TimeoutLock less HWP PMX agent (#604)
ykyohei Jan 8, 2024
3026f36
Remove incompatible network_mode from example config (#613)
BrianJKoopman Jan 11, 2024
38f1df6
Update sphinx requirements version (#618)
msilvafe Jan 15, 2024
60e13da
hwp-pcu: more robust get_status (#608)
ykyohei Jan 16, 2024
43551f1
Add documentation of udev rules for hwp-pcu (#622)
ykyohei Jan 25, 2024
8047d3b
Bump styfle/cancel-workflow-action from 0.12.0 to 0.12.1 (#624)
dependabot[bot] Jan 26, 2024
af8c031
Fix some time-out / delay bugs in ACU agent (#623)
mhasself Jan 26, 2024
679d06d
ACTi Camera Agent add resolutions as parameter (#626)
davidvng Jan 31, 2024
ef98aae
Fix 'encoder_data' field when storing session.data (#621)
BrianJKoopman Feb 5, 2024
c15ca8f
HWP Emulation and PID agent lockless restructure (#606)
jlashner Feb 6, 2024
9ee6ea0
Update on the treatment of logfile and log directory for the wiregrid…
sadachi5 Feb 13, 2024
fdce0ce
Supervisor actions (#628)
jlashner Feb 20, 2024
6b7ab79
Move callbacks to reactor in PCU agent (#632)
jlashner Feb 23, 2024
90ed3cd
Adding Hi6200 Agent for reading LN2 on SATp (#555)
mjrand Feb 26, 2024
128c1f8
Supervisor agent updates (#634)
jlashner Feb 27, 2024
0e5488a
Remove check range of gripper distance (#635)
ykyohei Feb 28, 2024
b3dcc2b
Add outlet names to SynAccess agent (#627)
davidvng Feb 29, 2024
b811836
Add windchill calculation to Vantage agent (#550)
RemingtonGerras Feb 29, 2024
42b8e3f
Revert UVI scaling fix in Vantage agent (#636)
BrianJKoopman Mar 1, 2024
848649c
make a branch for the development of the wire grid tiltsensor agent
hnakata-JP Mar 11, 2024
367489e
make an interactive wrapper of the tiltsensor agent
hnakata-JP Mar 14, 2024
72a9563
first commit of developping the wgtiltsensor-agent
d-hoshino2626 Apr 11, 2024
fe6b30e
first commit of developping the wgtiltsensor-agent
d-hoshino2626 Apr 11, 2024
374912a
Merge branch 'develop_wiregrid_tiltsensor' of github-hnakata:simonsob…
d-hoshino2626 Apr 12, 2024
8c1a637
modified wiregrid_tiltsensor's drivers
d-hoshino2626 Apr 12, 2024
9db078b
added some docmentations for WiregridTiltsensorAgent
d-hoshino2626 Apr 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions docs/agents/wiregrid_tiltsensor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
.. highlight:: rst

.. _wiregrid_kikusui:

=======================
Wiregrid Kikusui Agent
=======================

The Wiregrid Tiltsensor Agent records the wire-grid tilt sensor outputs
related to the tilt angle of the wire-grid plane along the gravitaional direction.
There is two types of tilt sensors, DWL and sherborne.
The tilt sensor data is sent via serial-to-ethernet converter.
The converter is linked to the tilt sensor
via RS-422(DWL) or RS-485(sherborne), D-sub 9-pin cable.
The agent communicates with the converter via Ethernet.

.. argparse::
:filename: ../socs/agents/wiregrid_tiltsensor/agent.py
:func: make_parser
:prog: python3 agent.py

Configuration File Examples
---------------------------

Below are configuration examples for the ocs config file and for running the
Agent in a docker container.

OCS Site Config
````````````````

An example site-config-file block::

{'agent-class': 'WiregridTiltsensorAgent',
'instance-id': 'wg-tiltsensor',
'arguments': [['--tiltsensor-ip', '192.168.11.27'],
['--tiltsensor-port', '32'],
['--tiltsensor_type', 'DWL']]},

- tiltsensor-ip is an IP address of the serial-to-ethernet converter.
- tiltsensor-port is an asigned port for the tilt sensor.
(The converter has four D-sub ports to control
multiple devices connected via serial communication.
Communicating device is determined by the ethernet port number of the converter.)
- tiltsensor_type represents the type of tilt sensor to communicate with.
We have the two types of tilt sensor, DWL and sherborne.
Available values of this argument are only 'DWL' or 'sherborne',
and depend on SATp.

Docker Compose
``````````````

An example docker-compose configuration::

ocs-wgtiltsensor-agent:
image: simonsobs/socs:latest
hostname: ocs-docker
network_mode: "host"
command:
- INSTANCE_ID=wg-tiltsensor
volumes:
- ${OCS_CONFIG_DIR}:/config:ro

- Since the agent within the container needs to communicate with hardware on the
host network you must use ``network_mode: "host"`` in your compose file.


Description
-----------

Functions
`````````

The agent has only one function, ``reset()``.
This function can be available only for sherborne tilt sensor.

**Reset Function**
- reset():
Reset the sherborne tilt sensor.


Agent API
---------

.. autoclass:: socs.agents.wiregrid_tiltsensor.agent.WiregridTiltsensorAgent
:members:
1 change: 1 addition & 0 deletions socs/agents/ocs_plugin_so.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,6 @@
('WiregridActuatorAgent', 'wiregrid_actuator/agent.py'),
('WiregridEncoderAgent', 'wiregrid_encoder/agent.py'),
('WiregridKikusuiAgent', 'wiregrid_kikusui/agent.py'),
('WiregridTiltsensorAgent', 'wiregrid_tiltsensor/agent.py'),
]:
ocs.site_config.register_agent_class(n, os.path.join(root, f))
Empty file.
230 changes: 230 additions & 0 deletions socs/agents/wiregrid_tiltsensor/agent.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,230 @@
import time

from ocs import ocs_agent, site_config
from ocs.ocs_twisted import TimeoutLock

# DWL drivers
from socs.agents.wiregrid_tiltsensor.drivers.dwl import DWL
# sherborne drivers
from socs.agents.wiregrid_tiltsensor.drivers.sherborne import Sherborne


def connect(tiltsensor_ip, tiltsensor_port, type_tiltsensor):
if type_tiltsensor == 'DWL':
tiltsensor = DWL(tcp_ip=tiltsensor_ip, tcp_port=tiltsensor_port, timeout=0.5, isSingle=False, verbose=0)
elif type_tiltsensor == 'sherborne':
tiltsensor = Sherborne(tcp_ip=tiltsensor_ip, tcp_port=tiltsensor_port, reset_boot=False, timeout=0.5, verbose=0)
else:
raise ('Invalid tiltsensor type')
return tiltsensor


class WiregridTiltsensorAgent:
""" Agent to record the wiregrid tilt sensor data.
The tilt sensor data is sent via serial-to-ethernet converter.

Args:
tiltsensor_ip (str): IP address of the serial-to-ethernet converter
tiltsensor_port (int or str): Asigned port for the tilt sensor
The converter has four D-sub ports to control
multiple devices is determined
by the ethernet port number of converter.
type_tiltsensor (str): Type of tilt sensor
There are twp types of tilt sensor,
and this argument is used for specifying
to communicate with whichtilt sensor.
This argument should be 'DWL' or 'sherborne'.
"""

def __init__(self, agent, tiltsensor_ip, tiltsensor_port, type_tiltsensor=None):
self.agent: ocs_agent.OCSAgent = agent
self.log = agent.log
self.lock = TimeoutLock()

self.take_data = False

self.tiltsensor_ip = tiltsensor_ip
self.tiltsensor_port = tiltsensor_port
self.type_tiltsensor = type_tiltsensor
self.tiltsensor = connect(self.tiltsensor_ip, self.tiltsensor_port, self.type_tiltsensor)

agg_params = {'frame_length': 60}
self.agent.register_feed('wgtiltsensor',
record=True,
agg_params=agg_params,
buffer_time=1.)

def acq(self, session, params=None):
"""acq()

**Process** - Run data acquisition.

Notes:
The most recent data collected is stored in session.data in the
structure::

>>> response.session['data']
{'tiltsensor_data': {
'angleX': the angle in X-axis of tilt sensor,
'angleY': the angle in Y-axis of tilt sensor,
'temperatureX': the temperature in X-axis of tilt sensor
this is available for only sherborne,
'temperatureY': the temperature in Y-axis of tilt sensor
this is available for only sherborne
},
'timestamp': timestamp when it updates tilt sensor data
}
"""

with self.lock.acquire_timeout(timeout=0, job='acq') as acquired:
if not acquired:
self.log.warn(
'Could not start acq because {} is already running'
.format(self.lock.job))
return False, 'Could not acquire lock.'

session.set_status('running')

# Initialize a take_data flag
self.take_data = True
last_release = time.time()

tiltsensor_data = {'timestamp': 0,
'block_name': 'wgtiltsensor',
'data': {
'angleX': -999,
'angleY': -999,
'temperatureX': -999,
'temperatureY': -999
}
}

self.log.info("Starting the count!")

# Loop
while self.take_data:
# About every second, release and acquire the lock
if time.time() - last_release > 1.:
last_release = time.time()
if not self.lock.release_and_acquire(timeout=10):
print(f"Could not re-acquire lock now held by {self.lock.job}.")
return False

# data taking
current_time = time.time()
read_status, msg, angles = self.tiltsensor.get_angle()
if self.type_tiltsensor == 'sherborne':
msg, temperatures = self.tiltsensor.get_temp()
else:
pass

tiltsensor_data['timestamp'] = current_time
tiltsensor_data['data']['angleX'] = angles[0]
tiltsensor_data['data']['angleY'] = angles[1]
if self.type_tiltsensor == 'sherborne':
tiltsensor_data['data']['temperatureX'] = temperatures[0]
tiltsensor_data['data']['temperatureY'] = temperatures[1]
else:
pass

"""
with open('time.log', 'a') as f:
f.write(str(last_release) + '\n')
pass
"""
# self.log.info(f"sens_data:{sens_data}")
self.agent.publish_to_feed('wgtiltsensor', tiltsensor_data)

# store the session data
session.data = {
'tiltsensor_data': {
'angleX': tiltsensor_data['data']['angleX'],
'angleY': tiltsensor_data['data']['angleY'],
'temperatureX': tiltsensor_data['data']['temperatureX'],
'temperatureY': tiltsensor_data['data']['temperatureY']
},
'timestamp': current_time
}

time.sleep(0.5) # DAQ interval
# End of loop
# End of lock acquiring

self.agent.feeds['wgtiltsensor'].flush_buffer()

return True, 'Acquisition exited cleanly.'

def stop_acq(self, session, params=None):
if self.take_data:
self.take_data = False
return True, 'requested to stop takeing data.'
else:
return False, 'acq is not currently running.'

def reset(self, session, params=None):
"""reset()

**Task** - Reset the tiltsensor if the type of tiltsensor is sherborne.

"""
with self.lock.acquire_timeout(timeout=3.0, job='reset') as acquired:
if not acquired:
self.log.warn("Lock could not be acquired because it "
+ f"is held by {self.lock.job}")
return False

if self.type_tiltsensor != 'sherborne':
raise ("This type of tiltsensor cannot reset.")
else:
# Log the text provided to the Agent logs
self.log.info("running reset")
# Execute reset()
self.tiltsensor.reset()
# Store the timestamp when reset is performed in session.data
session.data = {'reset': True,
'timestamp': time.time()}

# True if task succeeds, False if not
return True, 'Reset the tiltsensor'


def make_parser(parser_in=None):
if parser_in is None:
import argparse
parser_in = argparse.ArgumentParser()

pgroup = parser_in.add_argument_group('Agent Options')
pgroup.add_argument('--tiltsensor_ip')
pgroup.add_argument('--tiltsensor_port')
pgroup.add_argument('--type_tiltsensor',
dest='type_tiltsensor',
type=str, default=None,
help='The type of tilt sensor '
'running wiregrid tilt sensor DAQ')
return parser_in


def main(args=None):
parser_in = make_parser()
args = site_config.parse_args(agent_class='WiregridTiltsensorAgent',
parser=parser_in,
args=args)

agent, runner = ocs_agent.init_site_agent(args)

tiltsensor_agent = WiregridTiltsensorAgent(agent,
tiltsensor_ip=args.type_tiltsensor,
tiltsensor_port=args.type_tiltsensor,
type_tiltsensor=args.type_tiltsensor)

agent.register_process('acq',
tiltsensor_agent.acq,
tiltsensor_agent.stop_acq,
startup=True)
agent.register_task('reset', tiltsensor_agent.reset)

runner.run(agent, auto_reconnect=True)


if __name__ == '__main__':
main()
Empty file.
Loading