Esempio n. 1
0
def connect_to_rig(reactor, port, baudrate=38400):
    """
    Connect to Elecraft radio over a serial port.
    
    port: Serial port device name.
    baudrate: Serial data rate; must match that set on the radio.
    """
    endpoint = SerialPortEndpoint(port, reactor, baudrate=baudrate)
    factory = FactoryWithArgs.forProtocol(_ElecraftClientProtocol, reactor)
    protocol = yield endpoint.connect(factory)
    proxy = protocol._proxy()

    defer.returnValue(
        Device(vfo_cell=proxy.iq_center_cell(), components={'rig': proxy}))
Esempio n. 2
0
def connect_to_rig(reactor, port, baudrate=38400):
    """
    Connect to Elecraft radio over a serial port.
    
    port: Serial port device name.
    baudrate: Serial data rate; must match that set on the radio.
    """
    endpoint = SerialPortEndpoint(port, reactor, baudrate=baudrate)
    factory = FactoryWithArgs.forProtocol(_ElecraftClientProtocol, reactor)
    protocol = yield endpoint.connect(factory)
    proxy = protocol._proxy()
    
    defer.returnValue(Device(
        vfo_cell=proxy.iq_center_cell(),
        components={'rig': proxy}))
Esempio n. 3
0
 def test_smoke(self):
     endpoint = SerialPortEndpoint('NOTAREALSERIALPORT',
                                   the_reactor,
                                   baudrate=115200)
     IStreamClientEndpoint(endpoint)