def tearDown(self):
        """
        @brief Test teardown
        """
        log.debug("PACClientIntTestCase tearDown")

        InstrumentDriverTestCase.tearDown(self)
示例#2
0
    def tearDown(self):
        """
        @brief Test teardown
        """
        log.debug("PACClientIntTestCase tearDown")

        InstrumentDriverTestCase.tearDown(self)
示例#3
0
__author__ = 'Tapana Gupta'
__license__ = 'Apache 2.0'

log = get_logger()

###
#   Driver parameters for the tests
###
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.wetlabs.fluorometer.flord_d.driver',
    driver_class="FlordInstrumentDriver",
    instrument_agent_resource_id='3DLE2A',
    instrument_agent_name='wetlabs_fluorometer_flord_d',
    instrument_agent_packet_config=DataParticleType(),
    driver_startup_config={
        DriverConfigKey.PARAMETERS: {
            Parameter.RUN_WIPER_INTERVAL: '00:10:00',
            Parameter.RUN_CLOCK_SYNC_INTERVAL: '00:10:00',
            Parameter.RUN_ACQUIRE_STATUS_INTERVAL: '00:10:00'
        }
    })

#################################### RULES ####################################
#                                                                             #
# Common capabilities in the base class                                       #
#                                                                             #
# Instrument specific in the derived class                                    #
#                                                                             #
# Generator spits out either stubs or comments describing test this here,     #
# test that there.                                                            #
示例#4
0
from mi.instrument.wetlabs.fluorometer.flord_d.test.sample_data import SAMPLE_MNU_RESPONSE
from mi.instrument.wetlabs.fluorometer.flord_d.test.sample_data import SAMPLE_SAMPLE_RESPONSE
from mi.instrument.wetlabs.fluorometer.flord_d.test.sample_data import SAMPLE_MET_RESPONSE

from mi.core.exceptions import InstrumentCommandException, SampleException

###
#   Driver parameters for the tests
###
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.wetlabs.fluorometer.flord_d.driver',
    driver_class="FlordInstrumentDriver",

    instrument_agent_resource_id='3DLE2A',
    instrument_agent_name='wetlabs_fluorometer_flord_d',
    instrument_agent_packet_config=DataParticleType(),

    driver_startup_config={
        DriverConfigKey.PARAMETERS: {Parameter.RUN_WIPER_INTERVAL: '00:10:00',
                                     Parameter.RUN_CLOCK_SYNC_INTERVAL: '00:10:00',
                                     Parameter.RUN_ACQUIRE_STATUS_INTERVAL: '00:10:00'}}
)

#################################### RULES ####################################
#                                                                             #
# Common capabilities in the base class                                       #
#                                                                             #
# Instrument specific in the derived class                                    #
#                                                                             #
# Generator spits out either stubs or comments describing test this here,     #
# test that there.                                                            #
示例#5
0
from mi.instrument.nortek.vector.ooicore.driver import Protocol, DataParticleType, NortekDataParticleType
from mi.instrument.nortek.vector.ooicore.driver import VectorVelocityHeaderDataParticle
from mi.instrument.nortek.vector.ooicore.driver import VectorVelocityHeaderDataParticleKey
from mi.instrument.nortek.vector.ooicore.driver import VectorVelocityDataParticle
from mi.instrument.nortek.vector.ooicore.driver import VectorVelocityDataParticleKey
from mi.instrument.nortek.vector.ooicore.driver import VectorSystemDataParticle
from mi.instrument.nortek.vector.ooicore.driver import VectorSystemDataParticleKey

###
#   Driver parameters for the tests
###
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.nortek.vector.ooicore.driver',
    driver_class="InstrumentDriver",
    instrument_agent_resource_id='nortek_vector_dw_ooicore',
    instrument_agent_name='nortek_vector_dw_ooicore_agent',
    instrument_agent_packet_config=DataParticleType(),
    driver_startup_config={DriverConfigKey.PARAMETERS: {}})


# velocity data particle & sample
def velocity_sample():
    sample_as_hex = "a51000db00008f10000049f041f72303303132120918d8f7"
    return sample_as_hex.decode('hex')


# these values checkout against the sample above
velocity_particle = [{
    DataParticleKey.VALUE_ID: VectorVelocityDataParticleKey.ANALOG_INPUT2,
    DataParticleKey.VALUE: 0
示例#6
0
from mi.instrument.subc_control.onecam.ooicore.driver import Prompt
from mi.instrument.subc_control.onecam.ooicore.driver import NEWLINE

###
#   Driver parameters for the tests
###
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.subc_control.onecam.ooicore.driver',
    driver_class="InstrumentDriver",
    instrument_agent_resource_id='4RKRRG',
    instrument_agent_name='subc_control_onecam_ooicore',
    instrument_agent_packet_config=DataParticleType(),
    driver_startup_config={
        DriverConfigKey.PARAMETERS: {
            Parameter.PICTURE_INTERVAL: 0,
            Parameter.RECORD_INTERVAL: 0,
            Parameter.SLEEP_INTERVAL: 0,
            Parameter.STOP_BIT: 1,
            Parameter.BYTE_SIZE: 8,
            Parameter.DATA_FLOW_CONTROL: 'None',
            Parameter.SERIAL_BAUD_RATE: 9600,
            Parameter.INPUT_BUFFER_SIZE: 1200,
            Parameter.OUTPUT_BUFFER_SIZE: 1200,
            Parameter.PARITY: 0,
        }
    })

#################################### RULES ####################################
#                                                                             #
# Common capabilities in the base class                                       #
#                                                                             #
# Instrument specific stuff in the derived class                              #
示例#7
0
# MI logger
from mi.core.log import get_logger

log = get_logger()

SYSTEM_EPOCH = datetime.date(*time.gmtime(0)[0:3])
NTP_EPOCH = datetime.date(1900, 1, 1)
NTP_DELTA = (SYSTEM_EPOCH - NTP_EPOCH).total_seconds()

# Initialize the test parameters
# Use the SBE37 here because this is a generic port_agent_client test not
# necessarily associated with any driver.
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.seabird.sbe37smb.ooicore.driver',
    driver_class="SBE37Driver",
    instrument_agent_resource_id='123xyz',
    instrument_agent_preload_id='IA2',
    instrument_agent_name='Agent007',
    driver_startup_config={})


@attr('UNIT', group='mi')
class PAClientUnitTestCase(InstrumentDriverUnitTestCase):
    def setUp(self):
        self.ipaddr = "localhost"
        self.cmd_port = 9001
        self.data_port = 9002
        self.device_port = 9003

    def resetTestVars(self):
        self.rawCallbackCalled = False
示例#8
0
from mi.core.exceptions import SampleException

from mi.core.instrument.instrument_driver import ResourceAgentState

# Globals
raw_stream_received = False
parsed_stream_received = False

###
#   Driver parameters for the tests
###
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.mclane.ras.d1000.driver',
    driver_class="InstrumentDriver",
    instrument_agent_resource_id='DQPJJX',
    instrument_agent_name='mclane_ras_d1000',
    instrument_agent_packet_config=DataParticleType(),
    driver_startup_config={DriverConfigKey.PARAMETERS: {Parameter.SAMPLE_INTERVAL: 6}},
)


#################################### RULES ####################################
#                                                                             #
# Common capabilities in the base class                                       #
#                                                                             #
# Instrument specific stuff in the derived class                              #
#                                                                             #
# Generator spits out either stubs or comments describing test this here,     #
# test that there.                                                            #
#                                                                             #
# Qualification tests are driven through the instrument_agent                 #
示例#9
0
from mi.idk.unit_test import InstrumentDriverQualificationTestCase, AgentCapabilityType

from mi.instrument.satlantic.par_ser_600m.driver import Command, DataParticleType, SatlanticPARInstrumentProtocol
from mi.instrument.satlantic.par_ser_600m.driver import PARProtocolState, PARProtocolEvent, PARCapability, Parameter
from mi.instrument.satlantic.par_ser_600m.driver import ScheduledJob, EOLN, Prompt, SatlanticPARConfigParticle
from mi.instrument.satlantic.par_ser_600m.driver import SatlanticPARDataParticle
from mi.instrument.satlantic.par_ser_600m.driver import SatlanticPARDataParticleKey, SatlanticPARConfigParticleKey
from mi.instrument.satlantic.par_ser_600m.driver import SatlanticPARInstrumentDriver, EngineeringParameter

InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.satlantic.par_ser_600m.driver',
    driver_class="SatlanticPARInstrumentDriver",
    instrument_agent_resource_id='satlantic_par_ser_600m_ooicore',
    instrument_agent_name='satlantic_par_ser_600m_agent',
    instrument_agent_packet_config=DataParticleType(),
    driver_startup_config={
        DriverConfigKey.PARAMETERS: {
            Parameter.MAXRATE: 1,
            Parameter.FIRMWARE: '1.0.0',
            Parameter.SERIAL: '4278190306',
            Parameter.INSTRUMENT: 'SATPAR'
        }
    })

# SATPAR4278190306,49.02,2157023616,171
VALID_SAMPLE = "SATPAR4278190306,49.02,2157023616,171\r\n"
INVALID_SAMPLE = "SATPAR4278190306,49.02,2157023616,172\r\n"

# Make tests verbose and provide stdout
# bin/nosetests -s -v ion/services/mi/drivers/test/test_satlantic_par.py
# All unit tests: add "-a UNIT" to end, integration add "-a INT"
# Test device is at 10.180.80.173, port 2101
示例#10
0
antelope_startup_config = {
        DriverConfigKey.PARAMETERS: {
            Parameter.REFDES: 'test',
            Parameter.SOURCE_REGEX: '.*',
            Parameter.FILE_LOCATION: './antelope_data',
        }
}

# ##
# Driver parameters for the tests
# ##
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.antelope.orb.ooicore.driver',
    driver_class="InstrumentDriver",
    instrument_agent_resource_id='NCC1701',
    instrument_agent_name='antelope_orb_ooicore',
    instrument_agent_packet_config=[],
    driver_startup_config=antelope_startup_config
)

GO_ACTIVE_TIMEOUT = 180

#################################### RULES ####################################
#                                                                             #
# Common capabilities in the base class                                       #
#                                                                             #
# Instrument specific stuff in the derived class                              #
#                                                                             #
# Generator spits out either stubs or comments describing test this here,     #
# test that there.                                                            #
#                                                                             #
from pyon.core.exception import InstParameterError


# MI imports.
from ion.agents.port.logger_process import EthernetDeviceLogger
from ion.agents.instrument.instrument_agent import InstrumentAgentState
# next line should match the above line mostly
from mi.instrument.satlantic.isusv3.ooicore.driver import ooicoreParameter

## Initialize the test parameters
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.satlantic.isusv3.ooicore.driver',
    driver_class="ooicoreInstrumentDriver",

    instrument_agent_resource_id = '123xyz',
    instrument_agent_name = 'Agent007',
    #instrument_agent_packet_config = PACKET_CONFIG,
    instrument_agent_stream_definition = ctd_stream_definition(stream_id=None)
)

#################################### RULES ####################################
#                                                                             #
# Common capabilities in the base class                                       #
#                                                                             #
# Instrument specific stuff in the derived class                              #
#                                                                             #
# Generator spits out either stubs or comments describing test this here,     #
# test that there.                                                            #
#                                                                             #
# Qualification tests are driven through the instrument_agent                 #
示例#12
0
raw_stream_received = False
parsed_stream_received = False

ACQUIRE_TIMEOUT = 45 * 60 + 50
CLEAR_TIMEOUT = 110

###
#   Driver parameters for the tests
###
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.mclane.ras.ras.driver',
    driver_class="InstrumentDriver",
    instrument_agent_resource_id='DQPJJX',
    instrument_agent_name='mclane_ras_rasfl',
    instrument_agent_packet_config=DataParticleType(),
    driver_startup_config={
        DriverConfigKey.PARAMETERS: {
            Parameter.CLEAR_VOLUME: 10,
            Parameter.FILL_VOLUME: 10,
            Parameter.FLUSH_VOLUME: 10,
        }
    },
)

#################################### RULES ####################################
#                                                                             #
# Common capabilities in the base class                                       #
#                                                                             #
# Instrument specific stuff in the derived class                              #
#                                                                             #
# Generator spits out either stubs or comments describing test this here,     #
# test that there.                                                            #
#!/usr/bin/env python

from nose.plugins.attrib import attr

from mi.instrument.satlantic.par_ser_600m.driver import PACKET_CONFIG
from mi.instrument.satlantic.par_ser_600m.test.test_driver import SatlanticParProtocolUnitTest
from mi.instrument.satlantic.par_ser_600m.test.test_driver import SatlanticParProtocolIntegrationTest
from mi.instrument.satlantic.par_ser_600m.test.test_driver import SatlanticParProtocolQualificationTest

from mi.idk.unit_test import InstrumentDriverTestCase

InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.satlantic.par_ser_600m.ooicore.driver',
    driver_class="InstrumentDriver",

    instrument_agent_resource_id = 'satlantic_par_ser_600m_ooicore',
    instrument_agent_name = 'satlantic_par_ser_600m_ooicore_agent',
    instrument_agent_packet_config = PACKET_CONFIG,
)

@attr('UNIT', group='mi')
class DriverUnitTest(SatlanticParProtocolUnitTest):
    pass

@attr('INT', group='mi')
class DriverIntegrationTest(SatlanticParProtocolIntegrationTest):
    pass

@attr('QUAL', group='mi')
class DriverQualificationTest(SatlanticParProtocolQualificationTest):
    pass
示例#14
0
# SAMPLE DATA FOR TESTING
from mi.instrument.satlantic.ocr507.spkir_b.test.sample_data import *

from interface.objects import AgentCommand
from ion.agents.instrument.direct_access.direct_access_server import DirectAccessTypes

from pyon.agent.agent import ResourceAgentState
from pyon.agent.agent import ResourceAgentEvent
from pyon.core.exception import Conflict
###
#   Driver parameters for the tests
###
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.satlantic.ocr507.spkir_b.driver',
    driver_class="InstrumentDriver",
    instrument_agent_resource_id='Q7REQ8',
    instrument_agent_name='satlantic_ocr507_spkir_b',
    instrument_agent_packet_config=DataParticleType(),
    driver_startup_config={})

#################################### RULES ####################################
#                                                                             #
# Common capabilities in the base class                                       #
#                                                                             #
# Instrument specific stuff in the derived class                              #
#                                                                             #
# Generator spits out either stubs or comments describing test this here,     #
# test that there.                                                            #
#                                                                             #
# Qualification tests are driven through the instrument_agent                 #
#                                                                             #
示例#15
0
from mi.instrument.satlantic.par_ser_600m.driver import Command, DataParticleType, SatlanticPARInstrumentProtocol
from mi.instrument.satlantic.par_ser_600m.driver import PARProtocolState, PARProtocolEvent, PARCapability, Parameter
from mi.instrument.satlantic.par_ser_600m.driver import ScheduledJob, EOLN, Prompt, SatlanticPARConfigParticle
from mi.instrument.satlantic.par_ser_600m.driver import SatlanticPARDataParticle
from mi.instrument.satlantic.par_ser_600m.driver import SatlanticPARDataParticleKey, SatlanticPARConfigParticleKey
from mi.instrument.satlantic.par_ser_600m.driver import SatlanticPARInstrumentDriver, EngineeringParameter


InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.satlantic.par_ser_600m.driver',
    driver_class="SatlanticPARInstrumentDriver",

    instrument_agent_resource_id='satlantic_par_ser_600m_ooicore',
    instrument_agent_name='satlantic_par_ser_600m_agent',
    instrument_agent_packet_config=DataParticleType(),
    driver_startup_config={
        DriverConfigKey.PARAMETERS: {
            Parameter.MAXRATE: 1,
            Parameter.FIRMWARE: '1.0.0',
            Parameter.SERIAL: '4278190306',
            Parameter.INSTRUMENT: 'SATPAR'}}
)


# SATPAR4278190306,49.02,2157023616,171
VALID_SAMPLE = "SATPAR4278190306,49.02,2157023616,171\r\n"
INVALID_SAMPLE = "SATPAR4278190306,49.02,2157023616,172\r\n"


# Make tests verbose and provide stdout
# bin/nosetests -s -v ion/services/mi/drivers/test/test_satlantic_par.py
示例#16
0
from mi.instrument.noaa.heat.ooicore.driver import Parameter
from mi.instrument.noaa.heat.ooicore.driver import Protocol
from mi.instrument.noaa.heat.ooicore.driver import Prompt
from mi.instrument.noaa.heat.ooicore.driver import NEWLINE

from pyon.agent.agent import ResourceAgentState
from pyon.agent.agent import ResourceAgentEvent
from pyon.core.exception import Conflict

###
#   Driver parameters for the tests
###
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.noaa.heat.ooicore.driver',
    driver_class="InstrumentDriver",
    instrument_agent_resource_id='1D644T',
    instrument_agent_name='noaa_heat_ooicore',
    instrument_agent_packet_config=DataParticleType(),
    driver_startup_config={})

GO_ACTIVE_TIMEOUT = 180

#################################### RULES ####################################
#                                                                             #
# Common capabilities in the base class                                       #
#                                                                             #
# Instrument specific stuff in the derived class                              #
#                                                                             #
# Generator spits out either stubs or comments describing test this here,     #
# test that there.                                                            #
#                                                                             #
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.uw.hpies.ooicore.driver',
    driver_class="InstrumentDriver",

    instrument_agent_resource_id='VXVOO1',
    instrument_agent_name='uw_hpies_ooicore',
    instrument_agent_packet_config=DataParticleType(),

    driver_startup_config={DriverConfigKey.PARAMETERS: {
        Parameter.DEBUG_LEVEL: 0,
        Parameter.WSRUN_PINCH: 120,
        Parameter.NFC_CALIBRATE: 60,
        Parameter.CAL_HOLD: 19.97,
        Parameter.NHC_COMPASS: 122,
        Parameter.COMPASS_SAMPLES: 1,
        Parameter.COMPASS_DELAY: 10,
        Parameter.MOTOR_SAMPLES: 10,
        Parameter.EF_SAMPLES: 10,
        Parameter.CAL_SAMPLES: 10,
        Parameter.CONSOLE_TIMEOUT: 300,
        Parameter.WSRUN_DELAY: 0,
        Parameter.MOTOR_DIR_NHOLD: 0,
        Parameter.MOTOR_DIR_INIT: 'f',
        Parameter.POWER_COMPASS_W_MOTOR: False,
        Parameter.KEEP_AWAKE_W_MOTOR: True,
        Parameter.MOTOR_TIMEOUTS_1A: 200,
        Parameter.MOTOR_TIMEOUTS_1B: 200,
        Parameter.MOTOR_TIMEOUTS_2A: 200,
        Parameter.MOTOR_TIMEOUTS_2B: 200,
        Parameter.RSN_CONFIG: True,
        Parameter.INVERT_LED_DRIVERS: False,
        Parameter.M1A_LED: 1,
        Parameter.M2A_LED: 3,
    }
    }
)
示例#18
0
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.kml.cam.camds.driver',
    driver_class="InstrumentDriver",
    instrument_agent_resource_id='HTWZMW',
    instrument_agent_preload_id='IA7',
    instrument_agent_name='kml cam',
    instrument_agent_packet_config=DataParticleType(),
    driver_startup_config={
        DriverStartupConfigKey.PARAMETERS: {
            Parameter.ACQUIRE_STATUS_INTERVAL[ParameterIndex.KEY]:
            Parameter.ACQUIRE_STATUS_INTERVAL[ParameterIndex.DEFAULT_DATA],
            Parameter.AUTO_CAPTURE_DURATION[ParameterIndex.KEY]:
            Parameter.AUTO_CAPTURE_DURATION[ParameterIndex.DEFAULT_DATA],
            Parameter.CAMERA_GAIN[ParameterIndex.KEY]:
            Parameter.CAMERA_GAIN[ParameterIndex.DEFAULT_DATA],
            Parameter.CAMERA_MODE[ParameterIndex.KEY]:
            Parameter.CAMERA_MODE[ParameterIndex.DEFAULT_DATA],
            Parameter.COMPRESSION_RATIO[ParameterIndex.KEY]:
            Parameter.COMPRESSION_RATIO[ParameterIndex.DEFAULT_DATA],
            Parameter.FOCUS_POSITION[ParameterIndex.KEY]:
            Parameter.FOCUS_POSITION[ParameterIndex.DEFAULT_DATA],
            Parameter.FOCUS_SPEED[ParameterIndex.KEY]:
            Parameter.FOCUS_SPEED[ParameterIndex.DEFAULT_DATA],
            Parameter.FRAME_RATE[ParameterIndex.KEY]:
            Parameter.FRAME_RATE[ParameterIndex.DEFAULT_DATA],
            Parameter.IMAGE_RESOLUTION[ParameterIndex.KEY]:
            Parameter.IMAGE_RESOLUTION[ParameterIndex.DEFAULT_DATA],
            Parameter.IRIS_POSITION[ParameterIndex.KEY]:
            Parameter.IRIS_POSITION[ParameterIndex.DEFAULT_DATA],
            Parameter.LAMP_BRIGHTNESS[ParameterIndex.KEY]:
            Parameter.LAMP_BRIGHTNESS[ParameterIndex.DEFAULT_DATA],
            Parameter.NETWORK_DRIVE_LOCATION[ParameterIndex.KEY]:
            Parameter.NETWORK_DRIVE_LOCATION[ParameterIndex.DEFAULT_DATA],
            Parameter.NTP_SETTING[ParameterIndex.KEY]:
            Parameter.NTP_SETTING[ParameterIndex.DEFAULT_DATA],
            Parameter.PAN_POSITION[ParameterIndex.KEY]:
            Parameter.PAN_POSITION[ParameterIndex.DEFAULT_DATA],
            Parameter.PAN_SPEED[ParameterIndex.KEY]:
            Parameter.PAN_SPEED[ParameterIndex.DEFAULT_DATA],
            Parameter.PRESET_NUMBER[ParameterIndex.KEY]:
            Parameter.PRESET_NUMBER[ParameterIndex.DEFAULT_DATA],
            Parameter.SAMPLE_INTERVAL[ParameterIndex.KEY]:
            Parameter.SAMPLE_INTERVAL[ParameterIndex.DEFAULT_DATA],
            Parameter.SHUTTER_SPEED[ParameterIndex.KEY]:
            Parameter.SHUTTER_SPEED[ParameterIndex.DEFAULT_DATA],
            Parameter.SOFT_END_STOPS[ParameterIndex.KEY]:
            Parameter.SOFT_END_STOPS[ParameterIndex.DEFAULT_DATA],
            Parameter.TILT_POSITION[ParameterIndex.KEY]:
            Parameter.TILT_POSITION[ParameterIndex.DEFAULT_DATA],
            Parameter.TILT_SPEED[ParameterIndex.KEY]:
            Parameter.TILT_SPEED[ParameterIndex.DEFAULT_DATA],
            Parameter.VIDEO_FORWARDING[ParameterIndex.KEY]:
            Parameter.VIDEO_FORWARDING[ParameterIndex.DEFAULT_DATA],
            Parameter.VIDEO_FORWARDING_TIMEOUT[ParameterIndex.KEY]:
            Parameter.VIDEO_FORWARDING_TIMEOUT[ParameterIndex.DEFAULT_DATA],
            Parameter.WHEN_DISK_IS_FULL[ParameterIndex.KEY]:
            Parameter.WHEN_DISK_IS_FULL[ParameterIndex.DEFAULT_DATA],
            Parameter.ZOOM_POSITION[ParameterIndex.KEY]:
            Parameter.ZOOM_POSITION[ParameterIndex.DEFAULT_DATA],
            Parameter.ZOOM_SPEED[ParameterIndex.KEY]:
            Parameter.ZOOM_SPEED[ParameterIndex.DEFAULT_DATA]
        },
        DriverStartupConfigKey.SCHEDULER: {
            ScheduledJob.VIDEO_FORWARDING: {},
            ScheduledJob.SAMPLE: {},
            ScheduledJob.STATUS: {},
            ScheduledJob.STOP_CAPTURE: {}
        }
    })
示例#19
0
from mi.instrument.nortek.vector.ooicore.driver import Protocol, DataParticleType, NortekDataParticleType
from mi.instrument.nortek.vector.ooicore.driver import VectorVelocityHeaderDataParticle
from mi.instrument.nortek.vector.ooicore.driver import VectorVelocityHeaderDataParticleKey
from mi.instrument.nortek.vector.ooicore.driver import VectorVelocityDataParticle
from mi.instrument.nortek.vector.ooicore.driver import VectorVelocityDataParticleKey
from mi.instrument.nortek.vector.ooicore.driver import VectorSystemDataParticle
from mi.instrument.nortek.vector.ooicore.driver import VectorSystemDataParticleKey

###
#   Driver parameters for the tests
###
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.nortek.vector.ooicore.driver',
    driver_class="InstrumentDriver",

    instrument_agent_resource_id='nortek_vector_dw_ooicore',
    instrument_agent_name='nortek_vector_dw_ooicore_agent',
    instrument_agent_packet_config=DataParticleType(),
    driver_startup_config={
        DriverConfigKey.PARAMETERS: {}}
)


# velocity data particle & sample 
def velocity_sample():
    sample_as_hex = "a51000db00008f10000049f041f72303303132120918d8f7"
    return sample_as_hex.decode('hex')

# these values checkout against the sample above
velocity_particle = [{DataParticleKey.VALUE_ID: VectorVelocityDataParticleKey.ANALOG_INPUT2, DataParticleKey.VALUE: 0},
                     {DataParticleKey.VALUE_ID: VectorVelocityDataParticleKey.COUNT, DataParticleKey.VALUE: 219},
                     {DataParticleKey.VALUE_ID: VectorVelocityDataParticleKey.PRESSURE, DataParticleKey.VALUE: 4239},
from mi.instrument.nortek.aquadopp.ooicore.driver import ProtocolState
from mi.instrument.nortek.aquadopp.ooicore.driver import Parameter

from interface.objects import AgentCommand
from ion.agents.instrument.instrument_agent import InstrumentAgentState
from ion.agents.instrument.direct_access.direct_access_server import DirectAccessTypes

###
#   Driver parameters for the tests
###
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.nortek.aquadopp.ooicore.driver',
    driver_class="InstrumentDriver",

    instrument_agent_resource_id = 'OQYBVZ',
    instrument_agent_name = 'nortek_aquadopp_ooicore',
    instrument_agent_packet_config = {},
    instrument_agent_stream_definition = {}
)

#################################### RULES ####################################
#                                                                             #
# Common capabilities in the base class                                       #
#                                                                             #
# Instrument specific stuff in the derived class                              #
#                                                                             #
# Generator spits out either stubs or comments describing test this here,     #
# test that there.                                                            #
#                                                                             #
# Qualification tests are driven through the instrument_agent                 #
示例#21
0
        Parameter.UPDATE_INTERVAL: 5,
        Parameter.MAX_DRIVE_CURRENT: 140,
        Parameter.MAX_TEMP_BEARING: 65,
        Parameter.MAX_TEMP_MOTOR: 90,
        Parameter.MIN_SPEED: 80000,
        Parameter.TARGET_SPEED: 90000
    }
}

###
#   Driver parameters for the tests
###
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.harvard.massp.turbo.driver',
    driver_class="InstrumentDriver",
    instrument_agent_resource_id='OYYIN3',
    instrument_agent_name='harvard_massp_turbo',
    instrument_agent_packet_config=DataParticleType(),
    driver_startup_config=turbo_startup_config)

#################################### RULES ####################################
#                                                                             #
# Common capabilities in the base class                                       #
#                                                                             #
# Instrument specific stuff in the derived class                              #
#                                                                             #
# Generator spits out either stubs or comments describing test this here,     #
# test that there.                                                            #
#                                                                             #
# Qualification tests are driven through the instrument_agent                 #
#                                                                             #
示例#22
0
#   Driver parameters for the tests
###
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.nortek.vector.ooicore.driver',
    driver_class="InstrumentDriver",
    instrument_agent_resource_id='nortek_vector_dw_ooicore',
    instrument_agent_name='nortek_vector_dw_ooicore_agent',
    instrument_agent_packet_config=DataParticleType(),
    driver_startup_config={
        DriverConfigKey.PARAMETERS: {
            Parameter.DEPLOYMENT_NAME:
            'test',
            Parameter.WRAP_MODE:
            0,
            Parameter.ANALOG_INPUT_ADDR:
            0,
            Parameter.SW_VERSION:
            13702,
            Parameter.VELOCITY_ADJ_TABLE:
            'Aj0ePTk9Uz1uPYg9oj27PdQ97T0GPh4+Nj5OPmU+fT6TPqo+wD7WPuw+Aj8'
            'XPyw/QT9VP2k/fT+RP6Q/uD/KP90/8D8CQBRAJkA3QElAWkBrQHxAjECcQK'
            'xAvEDMQNtA6kD5QAhBF0ElQTNBQkFPQV1BakF4QYVBkkGeQatBt0HDQc9B20'
            'HnQfJB/UEIQhNCHkIoQjNCPUJHQlFCW0JkQm5Cd0KAQolCkUKaQqJCqkKyQrpC',
            Parameter.COMMENTS:
            'this is a test',
            Parameter.QUAL_CONSTANTS:
            'Cv/N/4sA5QDuAAsAhP89/w=='
        }
    })

示例#23
0
    Protocol

from mi.instrument.seabird.sbe16plus_v2.driver import NEWLINE

log = get_logger()

###
#   Driver parameters for the tests
###
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.seabird.sbe16plus_v2.dosta.driver',
    driver_class="InstrumentDriver",

    instrument_agent_resource_id='JI22B5',
    instrument_agent_name='seabird_sbe16plus_v2_dosta',
    instrument_agent_packet_config=DataParticleType(),

    driver_startup_config={DriverConfigKey.PARAMETERS: {
        Parameter.VOLT1: True,
        Parameter.OPTODE: True,
    }}
)


###############################################################################
#                                    RULES                                    #
#                                                                             #
# Common capabilities in the base class                                       #
#                                                                             #
# Instrument specific stuff in the derived class                              #
#                                                                             #
示例#24
0
from mi.core.instrument.instrument_driver import ResourceAgentState

# Globals
raw_stream_received = False
parsed_stream_received = False

###
#   Driver parameters for the tests
###
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.mclane.ras.d1000.driver',
    driver_class="InstrumentDriver",
    instrument_agent_resource_id='DQPJJX',
    instrument_agent_name='mclane_ras_d1000',
    instrument_agent_packet_config=DataParticleType(),
    driver_startup_config={
        DriverConfigKey.PARAMETERS: {
            Parameter.SAMPLE_INTERVAL: 6
        }
    },
)

#################################### RULES ####################################
#                                                                             #
# Common capabilities in the base class                                       #
#                                                                             #
# Instrument specific stuff in the derived class                              #
#                                                                             #
# Generator spits out either stubs or comments describing test this here,     #
# test that there.                                                            #
#                                                                             #
示例#25
0
from mi.instrument.seabird.sbe26plus.driver import ScheduledJob
from mi.instrument.seabird.sbe26plus.driver import Parameter
from mi.idk.unit_test import InstrumentDriverTestCase
from mi.idk.unit_test import DriverStartupConfigKey
from mi.core.driver_scheduler import DriverSchedulerConfigKey

InstrumentDriverTestCase.initialize(
    instrument_agent_resource_id = '123xyz',
    instrument_agent_name = 'Agent007',
    instrument_agent_packet_config = DataParticleType(),

    driver_module='mi.instrument.seabird.sbe26plus.ooicore.driver',
    driver_class="InstrumentDriver",
    driver_startup_config = {
        DriverStartupConfigKey.PARAMETERS: {
            Parameter.TXWAVESTATS: False,
            Parameter.TXREALTIME: True,
            Parameter.TXWAVEBURST: False,
        },
        DriverStartupConfigKey.SCHEDULER: {
            ScheduledJob.ACQUIRE_STATUS: {},
            ScheduledJob.CALIBRATION_COEFFICIENTS: {},
            ScheduledJob.CLOCK_SYNC: {}
        }
    }
)

###############################################################################
#                                UNIT TESTS                                   #
#         Unit tests test the method calls and parameters using Mock.         #
###############################################################################
@attr('UNIT', group='mi')
示例#26
0
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.uw.hpies.ooicore.driver',
    driver_class="InstrumentDriver",

    instrument_agent_resource_id='VXVOO1',
    instrument_agent_name='uw_hpies_ooicore',
    instrument_agent_packet_config=DataParticleType(),

    driver_startup_config={DriverConfigKey.PARAMETERS: {
        Parameter.DEBUG_LEVEL: 0,
        Parameter.WSRUN_PINCH: 120,
        Parameter.NFC_CALIBRATE: 60,
        Parameter.CAL_HOLD: 19.97,
        Parameter.NHC_COMPASS: 122,
        Parameter.COMPASS_SAMPLES: 1,
        Parameter.COMPASS_DELAY: 10,
        Parameter.MOTOR_SAMPLES: 10,
        Parameter.EF_SAMPLES: 10,
        Parameter.CAL_SAMPLES: 10,
        Parameter.CONSOLE_TIMEOUT: 300,
        Parameter.WSRUN_DELAY: 0,
        Parameter.MOTOR_DIR_NHOLD: 0,
        Parameter.MOTOR_DIR_INIT: 'f',
        Parameter.POWER_COMPASS_W_MOTOR: False,
        Parameter.KEEP_AWAKE_W_MOTOR: True,
        Parameter.MOTOR_TIMEOUTS_1A: 200,
        Parameter.MOTOR_TIMEOUTS_1B: 200,
        Parameter.MOTOR_TIMEOUTS_2A: 200,
        Parameter.MOTOR_TIMEOUTS_2B: 200,
        Parameter.RSN_CONFIG: True,
        Parameter.INVERT_LED_DRIVERS: False,
        Parameter.M1A_LED: 1,
        Parameter.M2A_LED: 3,
    }
    }
)
示例#27
0
from mi.instrument.seabird.sbe54tps.driver import ScheduledJob
from mi.instrument.seabird.sbe54tps.driver import Parameter
from mi.idk.unit_test import InstrumentDriverTestCase
from mi.idk.unit_test import DriverStartupConfigKey

InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.seabird.sbe54tps.ooicore.driver',
    driver_class="InstrumentDriver",
    instrument_agent_resource_id='123xyz',
    instrument_agent_preload_id='IA7',
    instrument_agent_name='Agent007',
    instrument_agent_packet_config=DataParticleType(),
    driver_startup_config={
        DriverStartupConfigKey.PARAMETERS: {
            Parameter.SAMPLE_PERIOD: 15,
            Parameter.BATTERY_TYPE: 1,
            Parameter.ENABLE_ALERTS: 1,
        },
        DriverStartupConfigKey.SCHEDULER: {
            ScheduledJob.ACQUIRE_STATUS: {},
            ScheduledJob.STATUS_DATA: {},
            ScheduledJob.HARDWARE_DATA: {},
            ScheduledJob.EVENT_COUNTER_DATA: {},
            ScheduledJob.CONFIGURATION_DATA: {},
            ScheduledJob.CLOCK_SYNC: {}
        }
    })


###############################################################################
#                                UNIT TESTS                                   #
#         Unit tests test the method calls and parameters using Mock.         #
from mi.instrument.noaa.nano.ooicore.driver import NANO_DUMP_SETTINGS

from mi.core.exceptions import SampleException
from mi.core.exceptions import InstrumentStateException
from pyon.agent.agent import ResourceAgentState
from pyon.agent.agent import ResourceAgentEvent
from pyon.core.exception import Conflict

###
#   Driver parameters for the tests
###
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.noaa.nano.ooicore.driver',
    driver_class="InstrumentDriver",

    instrument_agent_resource_id = '1D644T',
    instrument_agent_name = 'noaa_nano_ooicore',
    instrument_agent_packet_config = DataParticleType(),

    driver_startup_config = {}
)

GO_ACTIVE_TIMEOUT=180

#################################### RULES ####################################
#                                                                             #
# Common capabilities in the base class                                       #
#                                                                             #
# Instrument specific stuff in the derived class                              #
#                                                                             #
# Generator spits out either stubs or comments describing test this here,     #
# test that there.                                                            #
示例#29
0
from mi.instrument.subc_control.onecam.ooicore.driver import ProtocolEvent
from mi.instrument.subc_control.onecam.ooicore.driver import Capability
from mi.instrument.subc_control.onecam.ooicore.driver import Parameter
from mi.instrument.subc_control.onecam.ooicore.driver import CAMHDProtocol
from mi.instrument.subc_control.onecam.ooicore.driver import Prompt
from mi.instrument.subc_control.onecam.ooicore.driver import NEWLINE

###
#   Driver parameters for the tests
###
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.subc_control.onecam.ooicore.driver',
    driver_class="InstrumentDriver",
    instrument_agent_resource_id = '4RKRRG',
    instrument_agent_name = 'subc_control_onecam_ooicore',
    instrument_agent_packet_config = DataParticleType(),

    driver_startup_config = {
        DriverConfigKey.PARAMETERS: {}
    }
)

#################################### RULES ####################################
#                                                                             #
# Common capabilities in the base class                                       #
#                                                                             #
# Instrument specific stuff in the derived class                              #
#                                                                             #
# Generator spits out either stubs or comments describing test this here,     #
# test that there.                                                            #
#                                                                             #
from mi.instrument.nortek.particles import AquadoppDataParticleType
from mi.instrument.nortek.test.test_driver import DriverTestMixinSub
from nose.plugins.attrib import attr


__author__ = 'Peter Cable'
__license__ = 'Apache 2.0'


###
#   Driver parameters for the tests
###
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.nortek.aquadopp.playback.driver',
    driver_class="InstrumentDriver",
    instrument_agent_resource_id='nortek_aquadopp_dw_playback',
    instrument_agent_name='nortek_aquadopp_dw_playback_agent',
    instrument_agent_packet_config=AquadoppDataParticleType(),
    driver_startup_config={}
)

VELOCITY_SAMPLE = '4 30 2015 23 59 59 0 32 0.135 0.286 -0.729 132 ' + \
                  '135 137 11.6 1484.6 171.8 1.3 0.1 193.357 8.58 0 0 0.316 25.3\r\n'

BAD_SAMPLE = VELOCITY_SAMPLE[5:]


velocity_particle = [{'value_id': 'date_time_string', 'value': '30/04/2015 23:59:59'},
                     {'value_id': 'error_code', 'value': 0},
                     {'value_id': 'analog1', 'value': 0},
                     {'value_id': 'battery_voltage_dV', 'value': 116},
                     {'value_id': 'sound_speed_dms', 'value': 14846},
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.teledyne.workhorse_monitor_75_khz.rsn.driver',
    driver_class="InstrumentDriver",
    instrument_agent_resource_id = 'HTWZMW',
    instrument_agent_preload_id = 'IA7',
    instrument_agent_name = 'teledyne_workhorse_monitor_75_khz_rsn',
    instrument_agent_packet_config = DataParticleType(),

    driver_startup_config = {
        DriverStartupConfigKey.PARAMETERS: {
            Parameter.SERIAL_FLOW_CONTROL: '11110',
            Parameter.BANNER: False,
            Parameter.INSTRUMENT_ID: 0,
            Parameter.SLEEP_ENABLE: 0,
            Parameter.SAVE_NVRAM_TO_RECORDER: True,
            Parameter.POLLED_MODE: False,
            Parameter.XMIT_POWER: 255,
            Parameter.SPEED_OF_SOUND: 1485,
            Parameter.PITCH: 0,
            Parameter.ROLL: 0,
            Parameter.SALINITY: 35,
            Parameter.COORDINATE_TRANSFORMATION: '00111',
            Parameter.TIME_PER_ENSEMBLE: '00:00:00.00',
            Parameter.TIME_PER_PING: '00:01.00',
            Parameter.FALSE_TARGET_THRESHOLD: '050,001',
            Parameter.BANDWIDTH_CONTROL: 0,
            Parameter.CORRELATION_THRESHOLD: 64,
            Parameter.SERIAL_OUT_FW_SWITCHES: '111100000',
            Parameter.ERROR_VELOCITY_THRESHOLD: 2000,
            Parameter.BLANK_AFTER_TRANSMIT: 704,
            Parameter.CLIP_DATA_PAST_BOTTOM: 0,
            Parameter.RECEIVER_GAIN_SELECT: 1,
            Parameter.WATER_REFERENCE_LAYER: '001,005',
            Parameter.WATER_PROFILING_MODE: 1,
            Parameter.NUMBER_OF_DEPTH_CELLS: 100,
            Parameter.PINGS_PER_ENSEMBLE: 1,
            Parameter.DEPTH_CELL_SIZE: 800,
            Parameter.TRANSMIT_LENGTH: 0,
            Parameter.PING_WEIGHT: 0,
            Parameter.AMBIGUITY_VELOCITY: 175,
        },
        DriverStartupConfigKey.SCHEDULER: {
            ScheduledJob.GET_CALIBRATION: {},
            ScheduledJob.GET_CONFIGURATION: {},
            ScheduledJob.CLOCK_SYNC: {}
        }
    }
)
示例#32
0
from mi.instrument.ooici.mi.test_driver.driver import InstrumentCommand
from mi.instrument.ooici.mi.test_driver.driver import ProtocolState
from mi.instrument.ooici.mi.test_driver.driver import ProtocolEvent
from mi.instrument.ooici.mi.test_driver.driver import Capability
from mi.instrument.ooici.mi.test_driver.driver import ParameterName
from mi.instrument.ooici.mi.test_driver.driver import Protocol
from mi.instrument.ooici.mi.test_driver.driver import Prompt
from mi.instrument.ooici.mi.test_driver.driver import NEWLINE

###
#   Driver parameters for the tests
###
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.ooici.mi.test_driver.driver',
    driver_class="InstrumentDriver",
    instrument_agent_resource_id='TB6W7G',
    instrument_agent_name='ooici_mi_test_driver',
    instrument_agent_packet_config=DataParticleType(),
    driver_startup_config={})

#################################### RULES ####################################
#                                                                             #
# Common capabilities in the base class                                       #
#                                                                             #
# Instrument specific stuff in the derived class                              #
#                                                                             #
# Generator spits out either stubs or comments describing test this here,     #
# test that there.                                                            #
#                                                                             #
# Qualification tests are driven through the instrument_agent                 #
#                                                                             #
示例#33
0
from struct import pack

# Globals
raw_stream_received = False
parsed_stream_received = False

###
#   Driver parameters for the tests
###
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.star_asimet.bulkmet.metbk_a.driver',
    driver_class="InstrumentDriver",
    instrument_agent_resource_id='DQPJJX',
    instrument_agent_name='star_aismet_ooicore',
    instrument_agent_packet_config=DataParticleType(),
    driver_startup_config={
        DriverStartupConfigKey.PARAMETERS: {
            Parameter.SAMPLE_INTERVAL: 20,
        },
    })

#################################### RULES ####################################
#                                                                             #
# Common capabilities in the base class                                       #
#                                                                             #
# Instrument specific stuff in the derived class                              #
#                                                                             #
# Generator spits out either stubs or comments describing test this here,     #
# test that there.                                                            #
#                                                                             #
示例#34
0
from mi.core.instrument.instrument_driver import ResourceAgentState
from mi.idk.exceptions import IDKException

# Globals
raw_stream_received = False
parsed_stream_received = False

###
#   Driver parameters for the tests
###
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.star_asimet.bulkmet.metbk_a.driver',
    driver_class="InstrumentDriver",
    instrument_agent_resource_id = 'DQPJJX',
    instrument_agent_name = 'star_aismet_ooicore',
    instrument_agent_packet_config = DataParticleType(),
    driver_startup_config = {
        DriverStartupConfigKey.PARAMETERS: {
            Parameter.SAMPLE_INTERVAL: 20,
        },
    }
)


 #################################### RULES ####################################
#                                                                             #
# Common capabilities in the base class                                       #
#                                                                             #
# Instrument specific stuff in the derived class                              #
#                                                                             #
# Generator spits out either stubs or comments describing test this here,     #
# test that there.                                                            #
示例#35
0
        'name': 'MGENC',
        'suffix': 'MGENC'
    }, ),
    'version':
    2
}

SHORT_SAMPLE = pickle.dumps(SHORT_SAMPLE_DICT)

###
#   Driver parameters for the tests
###
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.hightech.hti90u_pa.ooicore.driver',
    driver_class="InstrumentDriver",
    instrument_agent_resource_id='FGQV9I',
    instrument_agent_name='hightech_hti90u_pa_ooicore',
    instrument_agent_packet_config=DataParticleType(),
    driver_startup_config={})

#################################### RULES ####################################
#                                                                             #
# Common capabilities in the base class                                       #
#                                                                             #
# Instrument specific stuff in the derived class                              #
#                                                                             #
# Generator spits out either stubs or comments describing test this here,     #
# test that there.                                                            #
#                                                                             #
# Qualification tests are driven through the instrument_agent                 #
#                                                                             #
示例#36
0
from mi.instrument.subc_control.onecam.ooicore.driver import ProtocolEvent
from mi.instrument.subc_control.onecam.ooicore.driver import Capability
from mi.instrument.subc_control.onecam.ooicore.driver import Parameter
from mi.instrument.subc_control.onecam.ooicore.driver import CAMHDProtocol
from mi.instrument.subc_control.onecam.ooicore.driver import Prompt
from mi.instrument.subc_control.onecam.ooicore.driver import NEWLINE

###
#   Driver parameters for the tests
###
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.subc_control.onecam.ooicore.driver',
    driver_class="InstrumentDriver",
    instrument_agent_resource_id = '4RKRRG',
    instrument_agent_name = 'subc_control_onecam_ooicore',
    instrument_agent_packet_config = DataParticleType(),

    driver_startup_config = {
        DriverConfigKey.PARAMETERS: {}
    }
)

#################################### RULES ####################################
#                                                                             #
# Common capabilities in the base class                                       #
#                                                                             #
# Instrument specific stuff in the derived class                              #
#                                                                             #
# Generator spits out either stubs or comments describing test this here,     #
# test that there.                                                            #
#                                                                             #
示例#37
0
from mi.instrument.wetlabs.ac_s.ooicore.driver import Protocol
from mi.instrument.wetlabs.ac_s.ooicore.driver import Prompt
from mi.instrument.wetlabs.ac_s.ooicore.driver import NEWLINE
from mi.instrument.wetlabs.ac_s.ooicore.driver import OptaaSampleDataParticleKey
from mi.instrument.wetlabs.ac_s.ooicore.driver import OptaaSampleDataParticle
from mi.instrument.wetlabs.ac_s.ooicore.driver import OptaaStatusDataParticleKey

from mi.core.exceptions import SampleException

from pyon.agent.agent import ResourceAgentState


InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.wetlabs.ac_s.ooicore.driver',
    driver_class="InstrumentDriver",
    instrument_agent_resource_id='DQPJJX',
    instrument_agent_name='wetlabs_ac_s_ooicore',
    instrument_agent_packet_config=DataParticleType(),
    driver_startup_config={}
)


def short_sample():
    short_sample_values = "FF 00 FF 00  02 A8 05 01  53 00 00 82  01 CE FF FF \
                           02 B0 6E 47  A8 4F 01 D5  02 \
                           BD 00 00 28  4D 01 51 05  6F 04 F9 04  C9 03 96 06 \
                           60 05 DB 05  BF 04 87 07  61 06 D0 06  CF 05 8B 08 \
                           78 07 DC 07  F8 06 A0 09  A9 09 00 09  41 07 CA 0B \
                           01 0A 48 0A  B3 09 15 0C  7C 0B B3 0C  57 0A 85 0E \
                           1B 0D 43 0E  20 0C 1C 0F  DC 0E F1 10  16 0D D8 11 \
                           B4 10 BB 12  2C 0F B4 13  9C 12 97 14  5A 11 AC 15 \
                           9A 14 8E 16  A5 13 C3 17  AA 16 94 19  09 15 F4 19 \
示例#38
0
from nose.plugins.attrib import attr
from mi.instrument.seabird.sbe26plus.test.test_driver import SeaBird26PlusUnitTest
from mi.instrument.seabird.sbe26plus.test.test_driver import SeaBird26PlusIntegrationTest
from mi.instrument.seabird.sbe26plus.test.test_driver import SeaBird26PlusQualificationTest
from mi.instrument.seabird.sbe26plus.driver import DataParticleType
from mi.instrument.seabird.sbe26plus.driver import ScheduledEvents
from mi.idk.unit_test import InstrumentDriverTestCase
from mi.idk.unit_test import DriverStartupConfigKey
from mi.core.driver_scheduler import DriverSchedulerConfigKey

InstrumentDriverTestCase.initialize(
    instrument_agent_resource_id="123xyz",
    instrument_agent_name="Agent007",
    instrument_agent_packet_config=DataParticleType(),
    driver_module="mi.instrument.seabird.sbe26plus.ooicore.driver",
    driver_class="InstrumentDriver",
    driver_startup_config={
        DriverStartupConfigKey.PARAMETERS: {},
        DriverStartupConfigKey.SCHEDULER: {ScheduledEvents.ACQUIRE_STATUS: {DriverSchedulerConfigKey.TRIGGER: {}}},
    },
)

###############################################################################
#                                UNIT TESTS                                   #
#         Unit tests test the method calls and parameters using Mock.         #
###############################################################################
@attr("UNIT", group="mi")
class UnitFromIDK(SeaBird26PlusUnitTest):
    pass

示例#39
0
from mi.instrument.um.thsph.ooicore.driver import NEWLINE


from mi.core.instrument.instrument_driver import ResourceAgentState

###
#   Driver parameters for the tests
###
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.um.thsph.ooicore.driver',
    driver_class="InstrumentDriver",

    instrument_agent_resource_id='WHSSRV',
    instrument_agent_name='um_thsph_ooicore',
    instrument_agent_packet_config=DataParticleType(),

    driver_startup_config={
        DriverStartupConfigKey.PARAMETERS: {
            Parameter.INTERVAL: 6,
            Parameter.INSTRUMENT_SERIES: 'A',
        }
    }
)

GO_ACTIVE_TIMEOUT = 180
TEST_POLLED_INTERVAL = 12
TEST_INSTRUMENT_SERIES = 'A'
TEST_INVALID_POLLED_INTERVAL = 601
#################################### RULES ####################################
#                                                                             #
# Common capabilities in the base class                                       #
from mi.instrument.satlantic.par_ser_600m.ooicore.driver import Command
from mi.instrument.satlantic.par_ser_600m.ooicore.driver import SatlanticChecksumDecorator
from mi.instrument.satlantic.par_ser_600m.ooicore.driver import sample_regex

mi_logger = logging.getLogger('mi_logger')

# Make tests verbose and provide stdout
# bin/nosetests -s -v ion/services/mi/drivers/test/test_satlantic_par.py
# All unit tests: add "-a UNIT" to end, integration add "-a INT"
# Test device is at 10.180.80.173, port 2001

InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.satlantic.par_ser_600m.ooicore.driver',
    driver_class="SatlanticPARInstrumentDriver",

    instrument_agent_resource_id = 'satlantic_par_ser_600m_ooicore',
    instrument_agent_name = 'satlantic_par_ser_600m_ooicore_agent',
    #instrument_agent_packet_config = PACKET_CONFIG,
    #instrument_agent_stream_definition = ctd_stream_definition(stream_id=None)
)

@unittest.skip("Need better mocking of FSM or smaller testing chunks")
@attr('UNIT', group='mi')
class SatlanticParProtocolUnitTest(InstrumentDriverUnitTestCase):
    """
    @todo test timeout exceptions while transitioning states and handling commands
    """
        
    def setUp(self):
        def response_side_effect(*args, **kwargs):
            if args[0] == Command.SAMPLE:
from mi.core.log import get_logger

log = get_logger()

SYSTEM_EPOCH = datetime.date(*time.gmtime(0)[0:3])
NTP_EPOCH = datetime.date(1900, 1, 1)
NTP_DELTA = (SYSTEM_EPOCH - NTP_EPOCH).total_seconds()

# Initialize the test parameters
# Use the SBE37 here because this is a generic port_agent_client test not
# necessarily associated with any driver.
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.seabird.sbe37smb.ooicore.driver',
    driver_class="SBE37Driver",

    instrument_agent_resource_id='123xyz',
    instrument_agent_preload_id='IA2',
    instrument_agent_name='Agent007',
    driver_startup_config={}
)


@attr('UNIT', group='mi')
class PAClientUnitTestCase(InstrumentDriverUnitTestCase):
    def setUp(self):
        self.ipaddr = "localhost"
        self.cmd_port = 9001
        self.data_port = 9002
        self.device_port = 9003

    def resetTestVars(self):
示例#42
0
from mi.instrument.nortek.test.test_driver import NortekUnitTest, NortekIntTest, NortekQualTest, user_config2
from mi.instrument.nortek.driver import ProtocolState, ProtocolEvent, TIMEOUT, Parameter, NortekEngIdDataParticleKey, \
    NortekInstrumentProtocol, NEWLINE, EngineeringParameter

###
#   Driver parameters for the tests
###
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.nortek.aquadopp.ooicore.driver',
    driver_class="InstrumentDriver",

    instrument_agent_resource_id='nortek_aquadopp_dw_ooicore',
    instrument_agent_name='nortek_aquadopp_dw_ooicore_agent',
    instrument_agent_packet_config=NortekDataParticleType(),
    driver_startup_config={
        DriverConfigKey.PARAMETERS: {
            Parameter.DEPLOYMENT_NAME: 'test',
            Parameter.COMMENTS: 'this is a test',
            #update the following two parameters to allow for faster collecting of samples during testing
            Parameter.AVG_INTERVAL: 1,
            Parameter.MEASUREMENT_INTERVAL: 1}}
)


def eng_id_sample():
    sample_as_hex = "415144"
    return sample_as_hex.decode('hex')

eng_id_particle = [{DataParticleKey.VALUE_ID: NortekEngIdDataParticleKey.ID, DataParticleKey.VALUE: "AQD 8493      "}]
__license__ = 'Apache 2.0'
import unittest
from mock import patch
from nose.plugins.attrib import attr
from mi.instrument.seabird.sbe26plus.test.test_driver import SBE26PlusUnitFromIDK
from mi.instrument.seabird.sbe26plus.test.test_driver import SBE26PlusIntFromIDK
from mi.instrument.seabird.sbe26plus.test.test_driver import SBE26PlusQualFromIDK
from mi.idk.unit_test import InstrumentDriverTestCase
from mi.instrument.seabird.sbe26plus.ooicore.driver import PACKET_CONFIG
from prototype.sci_data.stream_defs import ctd_stream_definition

InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.seabird.sbe26plus.ooicore.driver',
    driver_class="InstrumentDriver",

    instrument_agent_resource_id = '123xyz',
    instrument_agent_name = 'seabird_sbe26plus_ooicore',
    instrument_agent_packet_config = PACKET_CONFIG,
    instrument_agent_stream_definition = ctd_stream_definition(stream_id=None)
)

###############################################################################
#                                UNIT TESTS                                   #
#         Unit tests test the method calls and parameters using Mock.         #
###############################################################################
@attr('UNIT', group='mi')
class UnitFromIDK(SBE26PlusUnitFromIDK):
    """

    """
示例#44
0
from mi.instrument.sunburst.sami2_ph.ooicore.driver import PhsenConfigDataParticleKey
from mi.instrument.sunburst.sami2_ph.ooicore.driver import PhsenSamiSampleDataParticleKey
from mi.instrument.sunburst.sami2_ph.ooicore.driver import ProtocolState
from mi.instrument.sunburst.sami2_ph.ooicore.driver import ProtocolEvent
from mi.instrument.sunburst.sami2_ph.ooicore.driver import Protocol
from mi.instrument.sunburst.test.test_driver import SamiMixin
from mi.instrument.sunburst.test.test_driver import SamiUnitTest

###
#   Driver parameters for the tests
###
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.sunburst.sami2_ph.ooicore.driver',
    driver_class="InstrumentDriver",

    instrument_agent_resource_id='ZY4I90',
    instrument_agent_name='sunburst_sami2_ph_ooicore',
    instrument_agent_packet_config=DataParticleType(),

    driver_startup_config={}
)

#################################### RULES ####################################
#                                                                             #
# Common capabilities in the base class                                       #
#                                                                             #
# Instrument specific stuff in the derived class                              #
#                                                                             #
# Generator spits out either stubs or comments describing test this here,     #
# test that there.                                                            #
#                                                                             #
# Qualification tests are driven through the instrument_agent                 #
示例#45
0
from mi.core.exceptions import SampleException

from mi.instrument.nortek.aquadopp.playback.driver import NortekDataParticleType
from mi.instrument.nortek.aquadopp.playback.driver import AquadoppDwVelocityDataParticleKey

from mi.instrument.nortek.test.test_driver import DriverTestMixinSub
from mi.instrument.nortek.aquadopp.playback.driver import Protocol, AquadoppDwVelocityAsciiDataParticle

###
#   Driver parameters for the tests
###
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.nortek.aquadopp.playback.driver',
    driver_class="InstrumentDriver",
    instrument_agent_resource_id='nortek_aquadopp_dw_playback',
    instrument_agent_name='nortek_aquadopp_dw_playback_agent',
    instrument_agent_packet_config=NortekDataParticleType(),
    driver_startup_config={})

VELOCITY_SAMPLE = '4 30 2015 23 59 59 0 32 0.135 0.286 -0.729 132 ' + \
                  '135 137 11.6 1484.6 171.8 1.3 0.1 193.357 8.58 0 0 0.316 25.3\r\n'

BAD_SAMPLE = VELOCITY_SAMPLE[5:]

velocity_particle = [{
    'value_id': 'date_time_string',
    'value': '30/04/2015 23:59:59'
}, {
    'value_id': 'error_code',
    'value': 0
示例#46
0
#   Driver parameters for the tests
###
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.nortek.aquadopp.ooicore.driver',
    driver_class="InstrumentDriver",
    instrument_agent_resource_id='nortek_aquadopp_dw_ooicore',
    instrument_agent_name='nortek_aquadopp_dw_ooicore_agent',
    instrument_agent_packet_config=NortekDataParticleType(),
    driver_startup_config={
        DriverConfigKey.PARAMETERS: {
            Parameter.DEPLOYMENT_NAME:
            'test',
            Parameter.VELOCITY_ADJ_TABLE:
            'Aj0ePTk9Uz1uPYg9oj27PdQ97T0GPh4+Nj5OPmU+fT6TPqo+wD7WPuw+Aj8'
            'XPyw/QT9VP2k/fT+RP6Q/uD/KP90/8D8CQBRAJkA3QElAWkBrQHxAjECcQK'
            'xAvEDMQNtA6kD5QAhBF0ElQTNBQkFPQV1BakF4QYVBkkGeQatBt0HDQc9B20'
            'HnQfJB/UEIQhNCHkIoQjNCPUJHQlFCW0JkQm5Cd0KAQolCkUKaQqJCqkKyQrpC',
            Parameter.COMMENTS:
            'this is a test',
            Parameter.ANALOG_OUTPUT_SCALE:
            6711,
            Parameter.QUAL_CONSTANTS:
            'Cv/N/4sA5QDuAAsAhP89/w==',
            #update the following two parameters to allow for faster collecting of samples during testing
            Parameter.AVG_INTERVAL:
            1,
            Parameter.MEASUREMENT_INTERVAL:
            1
        }
    })

示例#47
0
__author__ = 'Godfrey Duke'
__license__ = 'Apache 2.0'

log = get_logger()

# Initialize the test parameters
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.satlantic.ocr_507_icsw.ooicore.driver',
    driver_class="SatlanticOCR507InstrumentDriver",

    instrument_agent_resource_id='123xyz',
    instrument_agent_preload_id='IA2',
    instrument_agent_name='Agent007',
    instrument_agent_packet_config=DataParticleType(),
    driver_startup_config={
        DriverStartupConfigKey.PARAMETERS: {
            Parameter.MAX_RATE: '0',
            Parameter.INIT_SM: True,
            Parameter.INIT_AT: True,
            Parameter.NET_MODE: False
        }
    }
)


VALID_SAMPLE_INVALID_CHECKSUM = 'SATDI702331310692.31\xff{\x80\x01\xae\x80\x80\x1a\xfc\x80\x80&\x98\x00\x80\x05"\xc0\x80#z@\x809\xc9@\x80\x03\xff\xc0\x01\x1a\x00\xaf\x00\xa1\x14\xc3\r\n'
VALID_SAMPLE_VALID_CHECKSUM = 'SATDI702330316551.83\xff{\x80\x00\x12\x00\x80\t\xed\xc0\x80\x01\xd6\xc0\x80\x01\xea\x80\x80\x0f\x84\x00\x80\x12\xc8\x00\x80\x00\x90\x00\x01\x1b\x00\xaf\x00\xa2\xc4\x9c\r\n'


# Make tests verbose and provide stdout
示例#48
0
from mi.instrument.uw.bars.ooicore.driver import Capability
from mi.instrument.uw.bars.ooicore.driver import SubMenu
from mi.instrument.uw.bars.ooicore.driver import Prompt
from mi.instrument.uw.bars.ooicore.driver import BarsDataParticleKey
from mi.instrument.uw.bars.ooicore.driver import DataParticleType


###
#   Driver parameters for the tests
###
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.uw.bars.ooicore.driver',
    driver_class="InstrumentDriver",
    instrument_agent_resource_id='QN341A',
    instrument_agent_name='uw_bars_ooicore',
    instrument_agent_packet_config=DataParticleType(),
    driver_startup_config={
        DriverConfigKey.PARAMETERS: {Parameter.CYCLE_TIME: 20,
                                     Parameter.METADATA_POWERUP: 0,
                                     Parameter.METADATA_RESTART: 0}}
)

#################################### RULES ####################################
#                                                                             #
# Common capabilities in the base class                                       #
#                                                                             #
# Instrument specific stuff in the derived class                              #
#                                                                             #
# Generator spits out either stubs or comments describing test this here,     #
# test that there.                                                            #
#                                                                             #
from mi.instrument.seabird.sbe16plus_v2.test.test_driver import SBEUnitTestCase
from mi.instrument.seabird.sbe16plus_v2.test.test_driver import SBEIntTestCase
from mi.instrument.seabird.sbe16plus_v2.test.test_driver import SBEQualTestCase
from mi.instrument.seabird.sbe16plus_v2.test.test_driver import SBEPubTestCase
from mi.instrument.seabird.sbe16plus_v2.test.test_driver import SeaBird16plusMixin

from mi.instrument.seabird.sbe16plus_v2.driver import DataParticleType

from mi.idk.unit_test import InstrumentDriverTestCase

InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.seabird.sbe16plus_v2.ooicore.driver',
    driver_class="InstrumentDriver",

    instrument_agent_preload_id = 'IA5',
    instrument_agent_resource_id = '123xyz',
    instrument_agent_name = 'Agent007',
    instrument_agent_packet_config = DataParticleType()
)

###############################################################################
#                   Driver Version Specific Structures                        #
###############################################################################
###
# Test Inputs
###

###############################################################################
#                                UNIT TESTS                                   #
#         Unit tests test the method calls and parameters using Mock.         #
示例#50
0
# Other actual data captures of Sami Status Data.
# :000EDCAE0000000000000000000000F70000F7
# :000EDCB30000000000000000000000F70000F7
# :000EDCB80000000000000000000000F70000F7
# :000EDCBD0000000000000000000000F70000F7
# :000EDCC20000000000000000000000F70000F7
# :000EDCC70000000000000000000000F70000F7
# :000EDCCC0000000000000000000000F70000F7
# :000EDCD10000000000000000000000F70000F7
# :000EDCD60000000000000000000000F70000F7

InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.sami.pco2w.cgsn.driver',
    driver_class="InstrumentDriver",

    instrument_agent_resource_id = 'E3SIRI',
    instrument_agent_name = 'sami_pco2w_cgsn',
    instrument_agent_packet_config = DataParticleType(),

    driver_startup_config = {}
)

#################################### RULES ####################################
#                                                                             #
# Common capabilities in the base class                                       #
#                                                                             #
# Instrument specific stuff in the derived class                              #
#                                                                             #
# Generator spits out either stubs or comments describing test this here,     #
# test that there.                                                            #
#                                                                             #
# Qualification tests are driven through the instrument_agent                 #
示例#51
0
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.kml.cam.camds.driver',
    driver_class="InstrumentDriver",
    instrument_agent_resource_id='HTWZMW',
    instrument_agent_preload_id='IA7',
    instrument_agent_name='kml cam',
    instrument_agent_packet_config=DataParticleType(),

    driver_startup_config={
        DriverStartupConfigKey.PARAMETERS: {
            Parameter.ACQUIRE_STATUS_INTERVAL[ParameterIndex.KEY]: Parameter.ACQUIRE_STATUS_INTERVAL[ParameterIndex.DEFAULT_DATA],
            Parameter.AUTO_CAPTURE_DURATION[ParameterIndex.KEY]: Parameter.AUTO_CAPTURE_DURATION[ParameterIndex.DEFAULT_DATA],
            Parameter.CAMERA_GAIN[ParameterIndex.KEY]: Parameter.CAMERA_GAIN[ParameterIndex.DEFAULT_DATA],
            Parameter.CAMERA_MODE[ParameterIndex.KEY]: Parameter.CAMERA_MODE[ParameterIndex.DEFAULT_DATA],
            Parameter.COMPRESSION_RATIO[ParameterIndex.KEY]: Parameter.COMPRESSION_RATIO[ParameterIndex.DEFAULT_DATA],
            Parameter.FOCUS_POSITION[ParameterIndex.KEY]: Parameter.FOCUS_POSITION[ParameterIndex.DEFAULT_DATA],
            Parameter.FOCUS_SPEED[ParameterIndex.KEY]: Parameter.FOCUS_SPEED[ParameterIndex.DEFAULT_DATA],
            Parameter.FRAME_RATE[ParameterIndex.KEY]: Parameter.FRAME_RATE[ParameterIndex.DEFAULT_DATA],
            Parameter.IMAGE_RESOLUTION[ParameterIndex.KEY]: Parameter.IMAGE_RESOLUTION[ParameterIndex.DEFAULT_DATA],
            Parameter.IRIS_POSITION[ParameterIndex.KEY]: Parameter.IRIS_POSITION[ParameterIndex.DEFAULT_DATA],

            Parameter.LAMP_BRIGHTNESS[ParameterIndex.KEY]: Parameter.LAMP_BRIGHTNESS[ParameterIndex.DEFAULT_DATA],
            Parameter.NETWORK_DRIVE_LOCATION[ParameterIndex.KEY]: Parameter.NETWORK_DRIVE_LOCATION[ParameterIndex.DEFAULT_DATA],
            Parameter.NTP_SETTING[ParameterIndex.KEY]: Parameter.NTP_SETTING[ParameterIndex.DEFAULT_DATA],
            Parameter.PAN_POSITION[ParameterIndex.KEY]: Parameter.PAN_POSITION[ParameterIndex.DEFAULT_DATA],
            Parameter.PAN_SPEED[ParameterIndex.KEY]: Parameter.PAN_SPEED[ParameterIndex.DEFAULT_DATA],
            Parameter.PRESET_NUMBER[ParameterIndex.KEY]: Parameter.PRESET_NUMBER[ParameterIndex.DEFAULT_DATA],
            Parameter.SAMPLE_INTERVAL[ParameterIndex.KEY]: Parameter.SAMPLE_INTERVAL[ParameterIndex.DEFAULT_DATA],
            Parameter.SHUTTER_SPEED[ParameterIndex.KEY]: Parameter.SHUTTER_SPEED[ParameterIndex.DEFAULT_DATA],
            Parameter.SOFT_END_STOPS[ParameterIndex.KEY]: Parameter.SOFT_END_STOPS[ParameterIndex.DEFAULT_DATA],
            Parameter.TILT_POSITION[ParameterIndex.KEY]: Parameter.TILT_POSITION[ParameterIndex.DEFAULT_DATA],
            Parameter.TILT_SPEED[ParameterIndex.KEY]: Parameter.TILT_SPEED[ParameterIndex.DEFAULT_DATA],

            Parameter.VIDEO_FORWARDING[ParameterIndex.KEY]: Parameter.VIDEO_FORWARDING[ParameterIndex.DEFAULT_DATA],
            Parameter.VIDEO_FORWARDING_TIMEOUT[ParameterIndex.KEY]: Parameter.VIDEO_FORWARDING_TIMEOUT[ParameterIndex.DEFAULT_DATA],
            Parameter.WHEN_DISK_IS_FULL[ParameterIndex.KEY]: Parameter.WHEN_DISK_IS_FULL[ParameterIndex.DEFAULT_DATA],
            Parameter.ZOOM_POSITION[ParameterIndex.KEY]: Parameter.ZOOM_POSITION[ParameterIndex.DEFAULT_DATA],
            Parameter.ZOOM_SPEED[ParameterIndex.KEY]: Parameter.ZOOM_SPEED[ParameterIndex.DEFAULT_DATA]
        },
        DriverStartupConfigKey.SCHEDULER: {
            ScheduledJob.VIDEO_FORWARDING: {},
            ScheduledJob.SAMPLE: {},
            ScheduledJob.STATUS: {},
            ScheduledJob.STOP_CAPTURE: {}
        }
    }
)
示例#52
0
mcu_startup_config = {
    DriverConfigKey.PARAMETERS: {
        Parameter.TELEGRAM_INTERVAL: 10000,
        Parameter.ONE_MINUTE: 1000,
        Parameter.SAMPLE_TIME: 10
    }
}

###
#   Driver parameters for the tests
###
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.harvard.massp.mcu.driver',
    driver_class="InstrumentDriver",
    instrument_agent_resource_id='IN2N03',
    instrument_agent_name='harvard_massp_mcu',
    instrument_agent_packet_config=DataParticleType(),
    driver_startup_config=mcu_startup_config)

#################################### RULES ####################################
#                                                                             #
# Common capabilities in the base class                                       #
#                                                                             #
# Instrument specific stuff in the derived class                              #
#                                                                             #
# Generator spits out either stubs or comments describing test this here,     #
# test that there.                                                            #
#                                                                             #
# Qualification tests are driven through the instrument_agent                 #
#                                                                             #
示例#53
0
from mi.instrument.uw.bars.ooicore.driver import Capability
from mi.instrument.uw.bars.ooicore.driver import SubMenu
from mi.instrument.uw.bars.ooicore.driver import Prompt
from mi.instrument.uw.bars.ooicore.driver import BarsDataParticleKey
from mi.instrument.uw.bars.ooicore.driver import DataParticleType

###
#   Driver parameters for the tests
###
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.uw.bars.ooicore.driver',
    driver_class="InstrumentDriver",
    instrument_agent_resource_id='QN341A',
    instrument_agent_name='uw_bars_ooicore',
    instrument_agent_packet_config=DataParticleType(),
    driver_startup_config={
        DriverConfigKey.PARAMETERS: {
            Parameter.CYCLE_TIME: 20,
            Parameter.METADATA_POWERUP: 0,
            Parameter.METADATA_RESTART: 0
        }
    })

#################################### RULES ####################################
#                                                                             #
# Common capabilities in the base class                                       #
#                                                                             #
# Instrument specific stuff in the derived class                              #
#                                                                             #
# Generator spits out either stubs or comments describing test this here,     #
# test that there.                                                            #
示例#54
0
        Parameter.MI: 1,
        Parameter.MF: 100,
        Parameter.FL: 1.0,
        Parameter.HV: 0,
    }
}


###
#   Driver parameters for the tests
###
InstrumentDriverTestCase.initialize(
    driver_module='mi.instrument.harvard.massp.rga.driver',
    driver_class="InstrumentDriver",

    instrument_agent_resource_id='YAQ3KY',
    instrument_agent_name='harvard_massp_rga',
    instrument_agent_packet_config=DataParticleType(),

    driver_startup_config=rga_startup_config
)

#################################### RULES ####################################
#                                                                             #
# Common capabilities in the base class                                       #
#                                                                             #
# Instrument specific stuff in the derived class                              #
#                                                                             #
# Generator spits out either stubs or comments describing test this here,     #
# test that there.                                                            #
#                                                                             #
# Qualification tests are driven through the instrument_agent                 #