public class LynxController.PretendLynxModule extends java.lang.Object implements LynxModuleIntf
HardwareDevice.Manufacturer
Constructor and Description |
---|
PretendLynxModule() |
Modifier and Type | Method and Description |
---|---|
<T> T |
acquireI2cLockWhile(Supplier<T> supplier) |
void |
acquireNetworkTransmissionLock(LynxMessage message) |
void |
close()
Closes this device
|
void |
disengage()
Disengage the object from underlying services it uses to render its function.
|
void |
engage()
(Re)enage the object with its underlying services.
|
void |
finishedWithMessage(LynxMessage message) |
java.lang.String |
getConnectionInfo()
Get connection information about this device in a human readable format
|
java.lang.String |
getDeviceName()
Returns a string suitable for display to the user as to the type of device.
|
java.lang.String |
getFirmwareVersionString() |
int |
getInterfaceBaseCommandNumber(java.lang.String interfaceName) |
HardwareDevice.Manufacturer |
getManufacturer()
Returns an indication of the manufacturer of this device.
|
int |
getModuleAddress() |
java.lang.String |
getNullableFirmwareVersionString() |
SerialNumber |
getSerialNumber() |
int |
getVersion()
Version
|
boolean |
isCommandSupported(java.lang.Class<? extends LynxCommand> command) |
boolean |
isEngaged()
Returns whether the object is currently in the engaged state.
|
boolean |
isNotResponding() |
boolean |
isParent() |
void |
noteAttentionRequired() |
void |
noteDatagramReceived() |
void |
noteNotResponding() |
void |
releaseNetworkTransmissionLock(LynxMessage message) |
void |
resetDeviceConfigurationForOpMode()
Resets the device's configuration to that which is expected at the beginning of an OpMode.
|
void |
resetPingTimer(LynxMessage message) |
void |
retransmit(LynxMessage message) |
void |
sendCommand(LynxMessage command) |
void |
validateCommand(LynxMessage lynxMessage) |
public HardwareDevice.Manufacturer getManufacturer()
HardwareDevice
getManufacturer
in interface HardwareDevice
public java.lang.String getFirmwareVersionString()
getFirmwareVersionString
in interface RobotCoreLynxModule
public java.lang.String getNullableFirmwareVersionString()
getNullableFirmwareVersionString
in interface RobotCoreLynxModule
public java.lang.String getDeviceName()
HardwareDevice
getDeviceName
in interface HardwareDevice
public java.lang.String getConnectionInfo()
HardwareDevice
getConnectionInfo
in interface HardwareDevice
public int getVersion()
HardwareDevice
getVersion
in interface HardwareDevice
public void resetDeviceConfigurationForOpMode()
HardwareDevice
resetDeviceConfigurationForOpMode
in interface HardwareDevice
public void close()
HardwareDevice
close
in interface HardwareDevice
public SerialNumber getSerialNumber()
getSerialNumber
in interface RobotCoreLynxModule
public <T> T acquireI2cLockWhile(Supplier<T> supplier) throws java.lang.InterruptedException, RobotCoreException, LynxNackException
acquireI2cLockWhile
in interface LynxModuleIntf
java.lang.InterruptedException
RobotCoreException
LynxNackException
public void acquireNetworkTransmissionLock(LynxMessage message) throws java.lang.InterruptedException
acquireNetworkTransmissionLock
in interface LynxModuleIntf
java.lang.InterruptedException
public void releaseNetworkTransmissionLock(LynxMessage message) throws java.lang.InterruptedException
releaseNetworkTransmissionLock
in interface LynxModuleIntf
java.lang.InterruptedException
public void sendCommand(LynxMessage command) throws java.lang.InterruptedException, LynxUnsupportedCommandException
sendCommand
in interface LynxModuleIntf
java.lang.InterruptedException
LynxUnsupportedCommandException
public void retransmit(LynxMessage message) throws java.lang.InterruptedException
retransmit
in interface LynxModuleIntf
java.lang.InterruptedException
public void finishedWithMessage(LynxMessage message) throws java.lang.InterruptedException
finishedWithMessage
in interface LynxModuleIntf
java.lang.InterruptedException
public void resetPingTimer(LynxMessage message)
resetPingTimer
in interface LynxModuleIntf
public int getModuleAddress()
getModuleAddress
in interface RobotCoreLynxModule
public void noteAttentionRequired()
noteAttentionRequired
in interface LynxModuleIntf
public int getInterfaceBaseCommandNumber(java.lang.String interfaceName)
getInterfaceBaseCommandNumber
in interface LynxModuleIntf
public boolean isParent()
isParent
in interface RobotCoreLynxModule
public void validateCommand(LynxMessage lynxMessage) throws LynxUnsupportedCommandException
validateCommand
in interface LynxModuleIntf
LynxUnsupportedCommandException
public boolean isCommandSupported(java.lang.Class<? extends LynxCommand> command)
isCommandSupported
in interface LynxModuleIntf
public boolean isEngaged()
Engagable
public void engage()
Engagable
public void disengage()
Engagable
public void noteDatagramReceived()
noteDatagramReceived
in interface LynxModuleIntf
public void noteNotResponding()
noteNotResponding
in interface LynxModuleIntf
public boolean isNotResponding()
isNotResponding
in interface LynxModuleIntf