public class TestMmr extends Object implements Mmr.Listener
| Modifier and Type | Class and Description |
|---|---|
static class |
TestMmr.ConnType |
static class |
TestMmr.OnOff |
| Constructor and Description |
|---|
TestMmr() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes connection to a device.
|
void |
open(TestMmr.ConnType type,
String ident)
Opens connection to a device.
|
void |
processData(double[] data)
Processes logged data
|
void |
setClosed(Exception e)
Handles error-induced device closure
|
void |
setPowered(boolean on)
Handles power on/off transitions
|
void |
write(int count)
Sets the data skip count.
|
void |
write(TestMmr.OnOff onoff)
Turns the listener on or off.
|
protected Mmr mmr
@Command(name="open",
description="Open connection to device")
public void open(@Argument(name="type",description="Connection type: serial or ftdi")
TestMmr.ConnType type,
@Argument(name="ident",description="Device identifier")
String ident)
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="close",
description="Close connection to device")
public void close()
throws org.lsst.ccs.drivers.commons.DriverException
org.lsst.ccs.drivers.commons.DriverException@Command(name="listen",
description="Turns listener on or off")
public void write(@Argument(name="onoff",description="state: on or off")
TestMmr.OnOff onoff)
@Command(name="skip",
description="Sets data message skip count")
public void write(@Argument(name="count",description="Items to skip")
int count)
public void processData(double[] data)
processData in interface Mmr.Listenerdata - An 8-element double array containing the data.public void setPowered(boolean on)
setPowered in interface Mmr.Listeneron - Whether the power is onpublic void setClosed(Exception e)
setClosed in interface Mmr.ListenerCopyright © 2014 LSST. All Rights Reserved.