Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)

src/m/a/marine-integrations-HEAD/mi/instrument/nobska/mavs4/ooicore/driver.py   marine-integrations(Download)
 
        next_state = ProtocolStates.COMMAND
        next_agent_state = ResourceAgentState.COMMAND
 
        return (next_state, (next_agent_state, result))
            self._stop_logging(*args, **kwargs)
            next_state = ProtocolStates.COMMAND
            next_agent_state = ResourceAgentState.COMMAND
 
            # Sync the clock
 
        next_state = ProtocolStates.COMMAND
        next_agent_state = ResourceAgentState.COMMAND
 
        return (next_state, (next_agent_state, result))

src/m/a/marine-integrations-HEAD/mi/instrument/rbr/xr_420_thermistor_24/ooicore/driver.py   marine-integrations(Download)
 
        next_state = ProtocolStates.COMMAND
        next_agent_state = ResourceAgentState.COMMAND
 
        return (next_state, (next_agent_state, result))
 
        next_state = ProtocolStates.COMMAND
        next_agent_state = ResourceAgentState.COMMAND
 
        return (next_state, (next_agent_state, result))

src/m/a/marine-integrations-HEAD/mi/instrument/seabird/sbe26plus/driver.py   marine-integrations(Download)
 
        next_state = ProtocolState.COMMAND
        next_agent_state = ResourceAgentState.COMMAND
 
        return (next_state, (next_agent_state, result))
 
        next_state = ProtocolState.COMMAND
        next_agent_state = ResourceAgentState.COMMAND
 
        return (next_state, (next_agent_state, result))

src/m/a/marine-integrations-HEAD/mi/idk/unit_test.py   marine-integrations(Download)
                ResourceAgentEvent.INITIALIZE
            ],
            ResourceAgentState.COMMAND: [
                ResourceAgentEvent.CLEAR,
                ResourceAgentEvent.RESET,
        retval = self.instrument_agent_client.execute_resource(cmd, timeout=timeout)
 
        self.assert_agent_state(ResourceAgentState.COMMAND)
 
    def assert_start_autosample(self, timeout=GO_ACTIVE_TIMEOUT):
        state = self.instrument_agent_client.get_agent_state()
        log.info("Sent RUN; IA state = %s", state)
        self.assertEqual(state, ResourceAgentState.COMMAND)
 
        res_state = self.instrument_agent_client.get_resource_state()
        # instrument state.
        self.assert_reset()
        self.assert_discover(ResourceAgentState.COMMAND)
 
        # Now put the instrument in streaming and reset the driver again.
                                                            timeout=EXECUTE_TIMEOUT)
        state = self.instrument_agent_client.get_agent_state()
        self.assertEqual(state, ResourceAgentState.COMMAND)
 
        retval = self.instrument_agent_client.ping_resource()

src/m/a/marine-integrations-HEAD/mi/idk/dataset/unit_test.py   marine-integrations(Download)
        state = self.dataset_agent_client.get_agent_state()
        log.info("Sent RUN; DSA state = %s", state)
        self.assertEqual(state, ResourceAgentState.COMMAND)
 
        if final_state == ResourceAgentState.STREAMING:
        state = self.dataset_agent_client.get_agent_state()
        log.info("Sent START SAMPLING; DSA state = %s", state)
        self.assertEqual(state, ResourceAgentState.COMMAND)
 
    def assert_start_sampling(self):
        '''
        state = self.dataset_agent_client.get_agent_state()
        self.assertEqual(state, ResourceAgentState.COMMAND)
 
        log.debug("DataSet agent start sampling")
                           DriverParameter.PUBLISHER_POLLING_INTERVAL,
                           DriverParameter.RECORDS_PER_SECOND]
        self.assert_initialize(final_state=ResourceAgentState.COMMAND)
 
        log.debug("Call get capabilities")
 
        log.debug("DataSet agent run")
        capabilities[AgentCapabilityType.AGENT_COMMAND] = self._common_agent_commands(ResourceAgentState.COMMAND)
        capabilities[AgentCapabilityType.RESOURCE_COMMAND] = [DriverEvent.START_AUTOSAMPLE]
        capabilities[AgentCapabilityType.RESOURCE_PARAMETER] = self._common_resource_parameters()

src/m/a/marine-integrations-HEAD/mi/instrument/wetlabs/ac_s/ooicore/test/test_driver.py   marine-integrations(Download)
 
        state = self.instrument_agent_client.get_agent_state()
        self.assertEqual(state, ResourceAgentState.COMMAND)
 
    def test_discover(self):
 
        capabilities = {
            AgentCapabilityType.AGENT_COMMAND: self._common_agent_commands(ResourceAgentState.COMMAND),
            AgentCapabilityType.AGENT_PARAMETER: self._common_agent_parameters(),
            AgentCapabilityType.RESOURCE_COMMAND: [

src/m/a/marine-integrations-HEAD/mi/instrument/star_asimet/bulkmet/metbk_a/test/test_driver.py   marine-integrations(Download)
 
        capabilities = {
            AgentCapabilityType.AGENT_COMMAND: self._common_agent_commands(ResourceAgentState.COMMAND),
            AgentCapabilityType.AGENT_PARAMETER: self._common_agent_parameters(),
            AgentCapabilityType.RESOURCE_COMMAND: [

src/m/a/marine-integrations-HEAD/mi/instrument/seabird/sbe54tps/test/test_driver.py   marine-integrations(Download)
 
        # verify the setting got restored.
        self.assert_state_change(ResourceAgentState.COMMAND, ProtocolState.COMMAND, 10)
        self.assert_get_parameter(Parameter.SAMPLE_PERIOD, 10)
 
        ###
        # Test session timeout without activity
        ###
        self.assert_direct_access_start_telnet(inactivity_timeout=120, session_timeout=30)
        self.assert_state_change(ResourceAgentState.COMMAND, ProtocolState.COMMAND, 60)
            gevent.sleep(15)
 
        self.assert_state_change(ResourceAgentState.COMMAND, ProtocolState.COMMAND, 45)
 
        ###
        # Test direct access disconnect
        ###
        self.assert_direct_access_start_telnet()
        self.tcp_client.disconnect()
        self.assert_state_change(ResourceAgentState.COMMAND, ProtocolState.COMMAND, 30)
        self.assertTrue(self.tcp_client)
 
        self.assert_state_change(ResourceAgentState.COMMAND, ProtocolState.COMMAND, 90)
 
    def test_direct_access_telnet_disconnect(self):

src/m/a/marine-integrations-HEAD/mi/instrument/seabird/sbe37smb/ooicore/test/test_driver.py   marine-integrations(Download)
 
        # verify the setting got restored.
        self.assert_state_change(ResourceAgentState.COMMAND, SBE37ProtocolState.COMMAND, 10)
        self.assert_get_parameter(SBE37Parameter.INTERVAL, 10)
 
        ###
        # Test direct access inactivity timeout
        ###
        self.assert_direct_access_start_telnet(inactivity_timeout=30, session_timeout=90)
        self.assert_state_change(ResourceAgentState.COMMAND, SBE37ProtocolState.COMMAND, 60)
        ###
        self.assert_direct_access_start_telnet(inactivity_timeout=120, session_timeout=30)
        self.assert_state_change(ResourceAgentState.COMMAND, SBE37ProtocolState.COMMAND, 60)
 
        ###
            gevent.sleep(15)
 
        self.assert_state_change(ResourceAgentState.COMMAND, SBE37ProtocolState.COMMAND, 45)
 
        ###
        # Test direct access disconnect
        ###
        self.assert_direct_access_start_telnet()
        self.tcp_client.disconnect()
        self.assert_state_change(ResourceAgentState.COMMAND, SBE37ProtocolState.COMMAND, 30)

src/m/a/marine-integrations-HEAD/mi/instrument/seabird/sbe26plus/test/test_driver.py   marine-integrations(Download)
 
        log.debug("Wait for state to automatically transition")
        self.assert_state_change(ResourceAgentState.COMMAND, ProtocolState.COMMAND, 700)
 
    def test_testing_interrupt(self):
 
        # We should be back in command mode from DA.
        self.assert_state_change(ResourceAgentState.COMMAND, ProtocolState.COMMAND, 60)
        self.assert_capabilities(capabilities)
 
        ####
        self.assert_resource_command(ProtocolEvent.START_AUTOSAMPLE, agent_state=ResourceAgentState.STREAMING, delay=1)
        self.assert_resource_command(ProtocolEvent.STOP_AUTOSAMPLE, agent_state=ResourceAgentState.COMMAND, delay=1)
        self.assert_resource_command(ProtocolEvent.ACQUIRE_SAMPLE, regex=r' +([\-\d.]+) +([\-\d.]+) +([\-\d.]+)')
        self.assert_resource_command(ProtocolEvent.ACQUIRE_STATUS, regex=r'SBE 26plus')

  1 | 2  Next