Code Monkey home page Code Monkey logo

driver_control's Introduction

Test Procedures for OOI Drivers

DriverControl provides an interface for testing of OOI instrument protocol drivers.

Setup

You will need a working marine integrations environment prior to launching any drivers. See https://github.com/ooici/marine-integrations

Configuration File

Prior to testing you must setup a configuration file containing the following yaml values:

scenario The scenario is the name of the driver as specified in the preload sheet. This

The configuration file can be provided as an argument to Driver Control using the argument '--config-file=<config_file_path>'.

port_agent_config The following parameters must be specified for the port agent:

  • addr Port agent address. Should be set to rsn-port-agent-test.oceanobservatories.org.
  • port Port agent port. This is driver dependent. This is specified on the RSN agent supervisor webpage.
  • cmd_port Port agent command port. Similar to the agent port. Should be 1000 less than the agent port.

startup_config The following parameters must be specified for the startup configuration:

  • parameters A full set of startup parameters can be provided for the driver to load on startup.

The following driver configuration file sets up testing for the TRHPH instrument driver:

    driver_config:
      scenario: THSPH_A
    port_agent_config:
      addr: rsn-port-agent-test.oceanobservatories.org
      port: 13008
      cmd_port: 12008
    startup_config:
      parameters:

Driver Test

Do this once

    workon ooi
    pip install openpyxl docopt

Do this in every new shell where you wish to run driver_control

    workon ooi
    export TEST_BASE=/path/to/marine/integrations

Launch Driver Control

    ./gradlew run

Driver Config allows step by step execution of instrument driver commands. The protocol driver must be executed in the following sequence:

  1. Load test configuration. Test configuration can be loaded two ways:
  • Specify the test configuration file on the command line (--config=).
    ./gradlew run -PappArgs="['--config=src/main/resources/thsph.yaml']"
  • Use the menu option File->Load Config.
  1. Launch the driver. The instrument driver must be running prior to testing, although it is not necessary to start it from within Driver Control if it is already running.

  2. Connect to the driver. Select the menu option Test->Connect to Driver. The driver log file will indicate a successful connection. The bottom left status box will indicate the current driver state.

  • Driver Control will attempt to exercise the driver through DISCOVER and into a known state. If this fails you can step through the individual steps through the "Driver" menu.
  1. Configure the driver. If the driver state is DRIVER_STATE_UNCONFIGURED, send the instrument driver the configure command using menu option Driver->Configure. This can be verified in the driver log file.

  2. Connect to instrument. If the driver state is DRIVER_STATE_DISCONNECTED, send the connect command to the instrument driver using the menu option Driver->Connect to Instrument. This can be verified in the driver log file.

  3. Discover state. If the driver state is DRIVER_STATE_UNKNOWN the driver needs to enter discovery to determine its state. Enter discovery by selecting the menu option Driver->Discover. Depending on the instrument it may take some time to establish first communications with the instrument through the driver. The bottom right status text will display sending command discover_state... until the discovery is complete. At the completion of the discovery phase, the driver state should be DRIVER_STATE_COMMAND or DRIVER_STATE_AUTOSAMPLE depending on the instrument.

  4. Testing. There are three main components to driver testing:

  • State Change. Verify successful connection to the driver and exercise the various capabilities in each state. This is accomplished on the Command tab.

  • Parameter Management. Verify parameters can be initialized, read, and set.

    1. Parameter initialization. Parameter startup values are specified in the test configuration file. Those values must match the values displayed in the Parameters tab after a clean startup of the driver.

    2. Parameter read. Verify all instrument parameters are listed in the Parameters tab. The columns can be sorted to assist in matching parameters.

    3. Parameter set. Verify modifiable instrument parameters can be set and read-only parameters cannot be set. To set a parameter value, first select the parameter row, then click in the New Value cell. After setting all parameters, press the Send button.

    • You must press Enter in the cell for the parameter value to be saved.
  • Stream validation. Verify the streams are published as expected and produce the correct values. This occurs automatically as data particles are received.

  • Algorithm validation. Verify data published by the streams can be used to provide data to algorithms. This occurs automatically as data particles are received.

driver_control's People

Contributors

danmergens avatar deannayu avatar godfreyduke avatar petercable avatar rmanoni avatar

Watchers

 avatar  avatar

driver_control's Issues

Stale parameters

Parameters from a previous run are left in the parameters window.

Procedure:

  • Load driver and get parameters
  • Load another driver and get parameters

Observed Results:

  • Previous driver parameters are shown
  • New driver parameters are shown

Status not updated on driver shutdown

After shutting down a driver the last status remains (there is no indication that the driver was shutdown.

Action:

  • Driver->Shutdown

Observed Results:

  • status bar shows last results
  • log window continues to show ping

Expected Results:

  • all status should revert to initial settings (blank)
  • driver control should no longer ping driver

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.