public class LynxUsbDeviceDelegate extends java.lang.Object implements LynxUsbDevice
Modifier and Type | Field and Description |
---|---|
protected LynxUsbDeviceImpl |
delegate |
protected boolean |
isOpen |
protected boolean |
releaseOnClose |
static java.lang.String |
TAG |
Constructor and Description |
---|
LynxUsbDeviceDelegate(LynxUsbDeviceImpl lynxUsbDevice) |
Modifier and Type | Method and Description |
---|---|
void |
acquireNetworkTransmissionLock(LynxMessage message) |
LynxModule |
addConfiguredModule(LynxModule module) |
void |
arm() |
void |
armOrPretend() |
protected void |
assertOpen() |
void |
changeModuleAddress(LynxModule module,
int newAddress,
java.lang.Runnable runnable) |
void |
clearGlobalWarning() |
void |
close() |
void |
disarm() |
LynxModuleMetaList |
discoverModules(boolean checkForImus) |
void |
disengage() |
void |
engage() |
void |
failSafe() |
ARMINGSTATE |
getArmingState() |
LynxModule |
getConfiguredModule(int moduleAddress) |
java.lang.String |
getConnectionInfo() |
LynxUsbDeviceImpl |
getDelegationTarget() |
java.lang.String |
getDeviceName() |
java.lang.String |
getGlobalWarning() |
Manufacturer |
getManufacturer() |
RobotUsbModule |
getOwner() |
RobotUsbDevice |
getRobotUsbDevice() |
SerialNumber |
getSerialNumber() |
ShutdownReason |
getShutdownReason() |
int |
getVersion() |
boolean |
isEngaged() |
boolean |
isSystemSynthetic() |
void |
lockNetworkLockAcquisitions() |
void |
noteMissingModule(LynxModule module,
java.lang.String moduleName) |
void |
performSystemOperationOnConnectedModule(int moduleAddress,
boolean isParent,
<any> moduleConsumer) |
void |
pretend() |
void |
registerCallback(Callback callback,
boolean doInitialCallback) |
void |
releaseNetworkTransmissionLock(LynxMessage message) |
void |
removeConfiguredModule(LynxModule module)
Should ONLY be called by LynxModule.close()
|
void |
resetDeviceConfigurationForOpMode() |
void |
setGlobalWarning(java.lang.String warning) |
void |
setOwner(RobotUsbModule owner) |
void |
setSystemSynthetic(boolean systemSynthetic) |
void |
setThrowOnNetworkLockAcquisition(boolean shouldThrow) |
boolean |
setupControlHubEmbeddedModule() |
boolean |
shouldTriggerWarningSound() |
void |
suppressGlobalWarning(boolean suppress) |
void |
transmit(LynxMessage message) |
void |
unregisterCallback(Callback callback) |
RobotCoreCommandList.LynxFirmwareUpdateResp |
updateFirmware(RobotCoreCommandList.FWImage image,
java.lang.String requestId,
<any> progressConsumer) |
public static java.lang.String TAG
protected LynxUsbDeviceImpl delegate
protected boolean releaseOnClose
protected boolean isOpen
public LynxUsbDeviceDelegate(LynxUsbDeviceImpl lynxUsbDevice)
public LynxUsbDeviceImpl getDelegationTarget()
getDelegationTarget
in interface LynxUsbDevice
public void close()
protected void assertOpen()
public void disengage()
public void engage()
public boolean isEngaged()
public RobotUsbDevice getRobotUsbDevice()
getRobotUsbDevice
in interface LynxUsbDevice
public boolean isSystemSynthetic()
isSystemSynthetic
in interface LynxUsbDevice
public void setSystemSynthetic(boolean systemSynthetic)
setSystemSynthetic
in interface LynxUsbDevice
public void failSafe()
failSafe
in interface LynxUsbDevice
public void lockNetworkLockAcquisitions()
public void setThrowOnNetworkLockAcquisition(boolean shouldThrow)
public void changeModuleAddress(LynxModule module, int newAddress, java.lang.Runnable runnable)
changeModuleAddress
in interface LynxUsbDevice
public void noteMissingModule(LynxModule module, java.lang.String moduleName)
noteMissingModule
in interface LynxUsbDevice
public void performSystemOperationOnConnectedModule(int moduleAddress, boolean isParent, <any> moduleConsumer) throws RobotCoreException, java.lang.InterruptedException
performSystemOperationOnConnectedModule
in interface LynxUsbDevice
RobotCoreException
java.lang.InterruptedException
public LynxModule addConfiguredModule(LynxModule module) throws RobotCoreException, java.lang.InterruptedException
addConfiguredModule
in interface LynxUsbDevice
RobotCoreException
java.lang.InterruptedException
public LynxModule getConfiguredModule(int moduleAddress)
getConfiguredModule
in interface LynxUsbDevice
public void removeConfiguredModule(LynxModule module)
LynxUsbDevice
removeConfiguredModule
in interface LynxUsbDevice
public LynxModuleMetaList discoverModules(boolean checkForImus) throws RobotCoreException, java.lang.InterruptedException
discoverModules
in interface LynxUsbDevice
RobotCoreException
java.lang.InterruptedException
public void acquireNetworkTransmissionLock(LynxMessage message) throws java.lang.InterruptedException
acquireNetworkTransmissionLock
in interface LynxUsbDevice
java.lang.InterruptedException
public void releaseNetworkTransmissionLock(LynxMessage message) throws java.lang.InterruptedException
releaseNetworkTransmissionLock
in interface LynxUsbDevice
java.lang.InterruptedException
public void transmit(LynxMessage message) throws java.lang.InterruptedException
transmit
in interface LynxUsbDevice
java.lang.InterruptedException
public boolean setupControlHubEmbeddedModule() throws RobotCoreException, java.lang.InterruptedException
setupControlHubEmbeddedModule
in interface LynxUsbDevice
RobotCoreException
java.lang.InterruptedException
public RobotCoreCommandList.LynxFirmwareUpdateResp updateFirmware(RobotCoreCommandList.FWImage image, java.lang.String requestId, <any> progressConsumer)
updateFirmware
in interface LynxUsbDevice
public java.lang.String getDeviceName()
public java.lang.String getConnectionInfo()
public int getVersion()
public Manufacturer getManufacturer()
public void resetDeviceConfigurationForOpMode()
public ShutdownReason getShutdownReason()
public void setOwner(RobotUsbModule owner)
public RobotUsbModule getOwner()
public SerialNumber getSerialNumber()
public ARMINGSTATE getArmingState()
public void registerCallback(Callback callback, boolean doInitialCallback)
public void unregisterCallback(Callback callback)
public void arm() throws RobotCoreException, java.lang.InterruptedException
RobotCoreException
java.lang.InterruptedException
public void pretend() throws RobotCoreException, java.lang.InterruptedException
RobotCoreException
java.lang.InterruptedException
public void armOrPretend() throws RobotCoreException, java.lang.InterruptedException
RobotCoreException
java.lang.InterruptedException
public void disarm() throws RobotCoreException, java.lang.InterruptedException
RobotCoreException
java.lang.InterruptedException
public java.lang.String getGlobalWarning()
public boolean shouldTriggerWarningSound()
public void suppressGlobalWarning(boolean suppress)
public void setGlobalWarning(java.lang.String warning)
public void clearGlobalWarning()