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/dataset/simple_dataset_agent.py   marine-integrations(Download)
    def _handler_inactive_go_active(self, *args, **kwargs):
        self.start_sampling()
        return (ResourceAgentState.IDLE, None)
 
    def cmd_dvr(self, cmd, *args, **kwargs):
        elif cmd == 'execute_stop_autosample':
            self.stop_sampling()
            return (ResourceAgentState.IDLE, None)
        elif cmd == 'execute_resource':
            log.warn("cmd_dvr.execute_resource %r %r",args,kwargs)

src/m/a/marine-integrations-HEAD/mi/instrument/rbr/xr_420_thermistor_24/ooicore/driver.py   marine-integrations(Download)
            else:
                next_state = ProtocolStates.COMMAND
                result = ResourceAgentState.IDLE
        else:
            raise InstrumentProtocolException('Failed to discover instrument state. prompt mismatch.')

src/m/a/marine-integrations-HEAD/mi/instrument/seabird/sbe26plus/driver.py   marine-integrations(Download)
        elif logging == False:
            next_state = ProtocolState.COMMAND
            result = ResourceAgentState.IDLE
        else:
            raise InstrumentStateException('Discover state failed.')

src/m/a/marine-integrations-HEAD/mi/instrument/nobska/mavs4/ooicore/driver.py   marine-integrations(Download)
            # got root menu prompt, so device is in command mode           
            next_state = ProtocolStates.COMMAND
            result = ResourceAgentState.IDLE
 
        return (next_state, result)

src/m/a/marine-integrations-HEAD/mi/instrument/seabird/sbe37smb/ooicore/test/test_driver.py   marine-integrations(Download)
 
        state = self.instrument_agent_client.get_agent_state()
        self.assertEqual(state, ResourceAgentState.IDLE)
 
        # Get exposed capabilities in current state.
 
        state = self.instrument_agent_client.get_agent_state()
        self.assertEqual(state, ResourceAgentState.IDLE)
 
        cmd = AgentCommand(command=ResourceAgentEvent.RUN)
        state = self.instrument_agent_client.get_agent_state()
 
        self.assertEqual(state, ResourceAgentState.IDLE)
 
        cmd = AgentCommand(command=ResourceAgentEvent.RUN)
        retval = self.instrument_agent_client.execute_agent(cmd)
        state = self.instrument_agent_client.get_agent_state()
        self.assertEqual(state, ResourceAgentState.IDLE)
 
        cmd = AgentCommand(command=ResourceAgentEvent.RUN)
        retval = self.instrument_agent_client.execute_agent(cmd)
        state = self.instrument_agent_client.get_agent_state()
        self.assertEqual(state, ResourceAgentState.IDLE)
 
 

src/m/a/marine-integrations-HEAD/mi/idk/unit_test.py   marine-integrations(Download)
        if state == ResourceAgentState.STREAMING:
            self.assert_stop_autosample()
        elif state == ResourceAgentState.IDLE:
            cmd = AgentCommand(command=ResourceAgentEvent.RUN)
            retval = self.instrument_agent_client.execute_agent(cmd)
 
        # Looks like some drivers go directly to streaming after a run.  Is this correct behavior.
        self.assert_switch_state(ResourceAgentEvent.GO_ACTIVE, [ResourceAgentState.IDLE, ResourceAgentState.STREAMING])
 
        if(self.instrument_agent_client.get_agent_state() == ResourceAgentState.IDLE):
        retval = self.instrument_agent_client.execute_agent(cmd, timeout=GO_ACTIVE_TIMEOUT)
        state = self.instrument_agent_client.get_agent_state()
        self.assertEqual(state, ResourceAgentState.IDLE)
 
        cmd = AgentCommand(command=ResourceAgentEvent.RUN)
        retval = self.instrument_agent_client.execute_agent(cmd, timeout=GO_ACTIVE_TIMEOUT)
        state = self.instrument_agent_client.get_agent_state()
        self.assertEqual(state, ResourceAgentState.IDLE)
 
        cmd = AgentCommand(command=ResourceAgentEvent.RUN)

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 GO_ACTIVE; DSA state = %s", state)
        self.assertEqual(state, ResourceAgentState.IDLE)
 
        log.debug("DataSet agent run")
 
        log.debug("DataSet agent go active")
        capabilities[AgentCapabilityType.AGENT_COMMAND] = self._common_agent_commands(ResourceAgentState.IDLE)
        self.assert_agent_command(ResourceAgentEvent.GO_ACTIVE)
        self.assert_state_change(ResourceAgentState.IDLE)
                ResourceAgentEvent.RESET,
            ],
            ResourceAgentState.IDLE: [
                ResourceAgentEvent.GO_INACTIVE,
                ResourceAgentEvent.RESET,