Snippets
Direct ESPComponent<->ESP testing using ESPClientTest
NOTE: This is basically as in https://bitbucket.org/carueda/workspace/snippets/8KR6B,
except that here we use a main program, ESPClientTest
, for direct interaction with the ESP,
that is, with no use of the regular LRAUV execution framework.
Accounts and machines
- tethysadmin @ tethyscode
- carueda @ bufflehead
on bufflehead
Start ESP server on bufflehead (where there's a clone of the ESP code):
carueda@bufflehead:~$ cd esp2
carueda@bufflehead:~/esp2$ . ESPenv auv honu
carueda@bufflehead:~/esp2$ ESPmode=simrapid
carueda@bufflehead:~/esp2$ ESPcmdPort=7777 esp
@20:12:39.92PDT12-Aug-20 <simrapid> Simulated gateway v3.24 for core bus
Simulated secondary gateway v3.24 for cartridge bus
@20:12:40.04
Configuration for honu by brent@mbari.org 3/11/20
/home/carueda/esp2/type/auv/honu/configure.rb
@20:12:40.12 Polling Can every 2:00
Clients may connect on TCP port 7777
Note: compared to the other LRAUV framework based exercise, here we launch the ESP server immediately, which, as you can see, is now ready to accept connection from the program below.
on tethyscode
The following as tethysadmin@tethsycode, with a copy of a recent lrauv-application nightly build as shown below.
Run the ESPClientTest
program. You will immediately see interaction with the ESP:
tethysadmin@tethyscode: ~$ cd workspace/lrauv-application-carlos
tethysadmin@tethyscode: lrauv-application-carlos$ bin/ESPClientTest --log esp.log
Connecting to bufflehead:7777
Connected to bufflehead:7777
ESPClient created
Sampling state transitions:
0000.000 S_WAITING_INITIAL_PROMPT
0001.434 S_PREPARING_SHOW_LOG
0002.152 S_PREPARING_SHOW_STATUS
0005.021 S_LOADING_CARTRIDGE
0071.005 S_WAITING_FOR_PRIMING
0073.874 S_PRIMING
0075.308 S_WAITING_FOR_FILTERING
0108.293 S_FILTERING
0109.010 S_WAITING_FOR_PAUSED
0122.635 S_PAUSED
0123.352 S_PROCESSING
0127.655 S_WAITING_FOR_PROCESSED
0338.459 S_STOPPING
0372.878 OK: ESP sampling sequence completed normally
The prefix above is time elapsed in seconds since beginning of sampling. Take a look at the generated esp.log file, which should include all ESP reported lines for all virtual streams.
on bufflehead
This is the remaining of the output as triggered by the connection above:
@20:17:14.04 <LRAUV-ESPClientTest> Session Begun
<LRAUV-ESPClientTest> Session Begun
<LRAUV-ESPClientTest> Session Ended
Errno::EPIPE in LRAUV-ESPClientTest's_reader -- Broken pipe
@20:17:16.18 <LRAUV-ESPClientTest> -> showStatus
@20:17:19.05 -> Cmd.loadCartridge
Gate.power :main,:ON
Gate.power :analytic1,:ON
Gate.power :analytic2,:ON
Gate.power :analytic3,:ON
@20:17:19.06 Gate.power :core,:ON
Archive.configure :default
@20:17:19.07 Air.configure :default
Lysis1.configure :default
@20:17:19.08 Lysis2.configure :default
Plunge.configure :default
@20:17:19.09 SamplePump.configure :default
ExtraPump.configure :default
@20:17:19.10 Toroid.configure :default
Carousel.configure :default
@20:17:19.11 Pressure.configure :default
PinPort.configure :default
All elf controllers running firmware version 4.99
@20:17:19.12 Gate.power :motor,:ON
@20:17:19.13 <Archive_home> Archive.reconfigure :default
@20:17:19.14 <Air_home> Air.reconfigure :default
<Archive_home> Archive.home.jog 0
@20:17:19.15 <Air_home> Air.home.jog 0
<Lysis1_home> Lysis1.reconfigure :default
<Lysis2_home> Lysis2.reconfigure :default
@20:17:19.16 <Lysis1_home> Lysis1.home.jog 0
<Plunge_home> Plunge.reconfigure :default
<Lysis2_home> Lysis2.home.jog 0
@20:17:19.17 <PinPort_home> PinPort.reconfigure :default
<Plunge_home> Plunge.home.jog 0
<Toroid_home> Toroid.reconfigure :default
<PinPort_home> PinPort.home.jog 0
@20:17:19.18 <Toroid_home> Toroid.home.jog 0
@20:17:19.22 <Archive_home> Archive.setRawPosition! 50
Archive.reconfigure :homing
@20:17:19.23 Archive.seek :home
<Air_home> Air.setRawPosition! 50
@20:17:19.24 Air.reconfigure :homing
Air.seek :home
@20:17:19.25 <Plunge_home> Plunge.setRawPosition! 50
Plunge.reconfigure :homing
Plunge.seek :home
@20:17:19.26 <PinPort_home> PinPort.setRawPosition! 0
PinPort.reconfigure :homing
@20:17:19.27 PinPort.seek :home
<Lysis1_home> Lysis1.setRawPosition! 50
@20:17:19.28 Lysis1.reconfigure :homing
Lysis1.seek :home
@20:17:19.29 <Lysis2_home> Lysis2.setRawPosition! 50
Lysis2.reconfigure :homing
Lysis2.seek :home
@20:17:19.30 <Toroid_home> Toroid.setRawPosition! 0
@20:17:19.31 Toroid.reconfigure :homing
Toroid.seek :home
@20:17:19.34 <PinPort_home> PinPort.reconfigure :default
@20:17:19.38 <Toroid_home> Toroid.reconfigure :default
@20:17:19.50 <Archive_home> Archive.reconfigure :default
@20:17:19.52 <Air_home> Air.reconfigure :default
@20:17:19.53 <Plunge_home> Plunge.reconfigure :default
@20:17:19.56 <Lysis1_home> Lysis1.reconfigure :default
@20:17:19.57 <Lysis2_home> Lysis2.reconfigure :default
@20:17:19.83 <LRAUV-ESPClientTest> Toroid.seek :clear
@20:17:21.44 Carousel.reconfigure :default
Carousel.home.jog 0
@20:17:21.52 Carousel.setRawPosition! -53
Carousel.reconfigure :homing
Carousel.seek :home
@20:17:21.82 Carousel.reconfigure :default
@20:17:22.08 Carousel.seek 1
@20:17:22.15 Selecting Cartridge 53
@20:17:22.16 Carousel.seek 53
@20:17:32.99 Gate.power :heat,:OFF
Gate.power :cartridge,:OFF
Lysis1.seek :locked
@20:17:37.06 <Plunge> Plunge.seek :locked
<Air> Air.seek :locked
@20:17:41.13 <LRAUV-ESPClientTest> Gate.power :cartridge,:ON
Gate.power :cartridge,:OFF
Gate.power :cartridge,:OFF
@20:17:41.64 Mounted archive Cartridge
@20:18:25.03 -> Cmd.startFiltering
@20:18:25.04 <FILTERING> Duration of filtering limited to 2:05:00
@20:18:25.05 Priming sample loop w/5ml, bypass w/1.5ml
SamplePump.setPosition! 0ml
@20:18:25.06 Bypass.open
@20:18:25.76 Intake.open
@20:18:27.26 Sea 5.7m deep (23.1psia)
@20:18:27.27 Waiting up to 20 seconds for sea pressure to stabilize +/-0.50psi
@20:18:29.78 Vacuum tare is 10% of full scale
@20:18:29.79 Pressure.reconfigure :default
Pressure.hold
@20:18:29.87 SamplePump.reconfigure :prime
SamplePump.seek 1.5ml,38 seconds
@20:18:31.64 Pressure.coast
SamplePump.setPosition! 0ml
Exhaust.open
@20:18:33.84 <closeBypass> Bypass.close
@20:18:36.05 <FILTERING> Pressure.hold
@20:18:36.12 Sea 5.7m deep (23.1psia)
@20:18:36.13 SamplePump.reconfigure :prime
SamplePump.seek 5ml,56 seconds
@20:18:40.86 Pressure.coast
@20:18:40.87 Bypass.open
@20:18:42.36 Intake.close
@20:18:43.87 Toroid.reconfigure :hold
Toroid.seek :crack
@20:18:44.67 Toroid.reconfigure :default
Toroid.seek :clear
@20:18:46.17 Toroid.reconfigure :hold
Toroid.seek :cartridge
@20:18:47.98 Toroid.reconfigure :default
@20:18:47.99 Toroid.seek :clear
@20:18:49.86 Pressurizing cartridge to 26psi above 23.1psia
SamplePump.setPosition! 0ml
Intake.open
@20:18:51.35 Bypass.close
@20:18:52.85 Exhaust.close
@20:18:54.36 Pressure.hold
@20:18:54.43 SamplePump.reconfigure :charge
SamplePump.seek 0.2ml,32 seconds
@20:18:55.04 Pressure.coast
Sampling 10.0ml
SamplePump.setPosition! 0ml
@20:18:55.05 Exhaust.open
@20:18:56.54 Pressure.hold
@20:18:56.61 Sea 5.7m deep (23.1psia)
@20:18:56.62 SamplePump.reconfigure :sample
SamplePump.seek 10ml,1:21
@20:18:59.55 <sampling> Cartridge 53 sampling 2/10ml at 0.83ml/s with 0.0psi vacuum 5.7m deep (23.1psia)
@20:19:09.58 <FILTERING> Pressure.coast
<closeIntake> Intake.close
@20:19:09.59 <closeExhaust> Exhaust.close
<FILTERING> Toroid.reconfigure :hold
Toroid.seek :bypass
@20:19:11.21 Toroid.reconfigure :default
Toroid.seek :clear
@20:19:12.83 Sampled 10.0ml
@20:19:17.38 <LRAUV-ESPClientTest> -> Cmd.startProcessing
@20:19:17.40 <PROCESSING> Plunge.seek :reagent
@20:19:18.24 Sample loop closed. Ready to Deliver Reagents
Archive.seek :sealed
@20:19:22.51 Archive.seek :evac
@20:19:36.48 delay 1:00
@20:20:36.49 Archive.seek :clear
@20:20:54.26 RNAlater soak for 45 seconds
@20:21:39.27 Archive.seek :tVent
@20:21:41.85 delay 1 second
@20:21:42.85 Archive.seek :evac
@20:21:58.52 delay 10 seconds
@20:22:08.53 Archive.seek :tVent
@20:22:24.20 delay 1 second
@20:22:25.20 Archive.seek :evac
@20:22:40.87 delay 10 seconds
@20:22:50.88 Sample preserved and evacuated
@20:22:52.49 <LRAUV-ESPClientTest> -> Cmd.stop
Gate.power :heat,:OFF
Gate.power :cartridge,:OFF
@20:22:52.50 Carousel.seek 53
@20:22:52.57 Plunge.seek :locked
@20:22:53.41 PinPort.seek :clear
@20:22:53.48 <Archive> Archive.seek :clear
<Air> Air.seek :clear
@20:22:53.50 <Lysis1> Lysis1.seek :clear
@20:23:11.25 <LRAUV-ESPClientTest> Archive.coast
Air.coast
Lysis1.coast
Lysis2.coast
Plunge.coast
SamplePump.coast
@20:23:11.26 Toroid.coast
Carousel.coast
PinPort.coast
@20:23:11.28 Gate.power :heat,:OFF
Gate.power :cartridge,:OFF
@20:23:11.33 Gate.power :motor,:OFF
Gate.power :core,:OFF
Gate.power :analytic1,:OFF
Gate.power :analytic2,:OFF
@20:23:11.34 Gate.power :analytic3,:OFF
Gate.power :main,:OFF
Safely stopped and ready to power off
@20:23:26.91 Session Ended
ESPhonu:001:0->
Comments (0)
You can clone a snippet to your computer for local editing. Learn more.