Coverage for ion/agents/instrumentagents/instrument_connection : 62.50%
Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
|
#!/usr/bin/env python
@file ion/agents/instrumentagents/instrument_connection.py @author Dave Everett @brief Instrument Connection Object """
""" The InstrumentConnection class; inherits from Protocol. Override connectionMade, connectionLost, and dataReceived and call parent methods for detailed handling. """ self.parent = parent
log.debug("connectionMade, calling gotConnected().") self.parent.gotConnected(self)
log.debug("connectionLost, calling gotDisconnected()") self.parent.gotDisconnected(self)
""" Filter the data; the instrument will send the prompt, which we don't care about, I'm assuming. We might need a sort of state machine or something; for instance, the agent sends a getStatus command, we need to know that we're expecting a status message. """ #log.debug("dataReceived! Length: %s, data-[%s]" %(len(data), data)) self.parent.gotData(data)
|