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()
HardwareDevicegetManufacturer in interface HardwareDevicepublic java.lang.String getFirmwareVersionString()
getFirmwareVersionString in interface RobotCoreLynxModulepublic java.lang.String getNullableFirmwareVersionString()
getNullableFirmwareVersionString in interface RobotCoreLynxModulepublic java.lang.String getDeviceName()
HardwareDevicegetDeviceName in interface HardwareDevicepublic java.lang.String getConnectionInfo()
HardwareDevicegetConnectionInfo in interface HardwareDevicepublic int getVersion()
HardwareDevicegetVersion in interface HardwareDevicepublic void resetDeviceConfigurationForOpMode()
HardwareDeviceresetDeviceConfigurationForOpMode in interface HardwareDevicepublic void close()
HardwareDeviceclose in interface HardwareDevicepublic SerialNumber getSerialNumber()
getSerialNumber in interface RobotCoreLynxModulepublic <T> T acquireI2cLockWhile(Supplier<T> supplier) throws java.lang.InterruptedException, RobotCoreException, LynxNackException
acquireI2cLockWhile in interface LynxModuleIntfjava.lang.InterruptedExceptionRobotCoreExceptionLynxNackExceptionpublic void acquireNetworkTransmissionLock(LynxMessage message) throws java.lang.InterruptedException
acquireNetworkTransmissionLock in interface LynxModuleIntfjava.lang.InterruptedExceptionpublic void releaseNetworkTransmissionLock(LynxMessage message) throws java.lang.InterruptedException
releaseNetworkTransmissionLock in interface LynxModuleIntfjava.lang.InterruptedExceptionpublic void sendCommand(LynxMessage command) throws java.lang.InterruptedException, LynxUnsupportedCommandException
sendCommand in interface LynxModuleIntfjava.lang.InterruptedExceptionLynxUnsupportedCommandExceptionpublic void retransmit(LynxMessage message) throws java.lang.InterruptedException
retransmit in interface LynxModuleIntfjava.lang.InterruptedExceptionpublic void finishedWithMessage(LynxMessage message) throws java.lang.InterruptedException
finishedWithMessage in interface LynxModuleIntfjava.lang.InterruptedExceptionpublic void resetPingTimer(LynxMessage message)
resetPingTimer in interface LynxModuleIntfpublic int getModuleAddress()
getModuleAddress in interface RobotCoreLynxModulepublic void noteAttentionRequired()
noteAttentionRequired in interface LynxModuleIntfpublic int getInterfaceBaseCommandNumber(java.lang.String interfaceName)
getInterfaceBaseCommandNumber in interface LynxModuleIntfpublic boolean isParent()
isParent in interface RobotCoreLynxModulepublic void validateCommand(LynxMessage lynxMessage) throws LynxUnsupportedCommandException
validateCommand in interface LynxModuleIntfLynxUnsupportedCommandExceptionpublic boolean isCommandSupported(java.lang.Class<? extends LynxCommand> command)
isCommandSupported in interface LynxModuleIntfpublic boolean isEngaged()
Engagablepublic void engage()
Engagablepublic void disengage()
Engagablepublic void noteDatagramReceived()
noteDatagramReceived in interface LynxModuleIntfpublic void noteNotResponding()
noteNotResponding in interface LynxModuleIntfpublic boolean isNotResponding()
isNotResponding in interface LynxModuleIntf