public class LynxI2cDeviceSynchV2 extends LynxI2cDeviceSynch
LynxI2cDeviceSynch.BusSpeed
LynxController.PretendLynxModule
HardwareDeviceHealth.HealthStatus
HardwareDevice.Manufacturer
RobotArmingStateNotifier.ARMINGSTATE, RobotArmingStateNotifier.Callback
bus, i2cAddr, readTimeStampedPlaceholder, TAG
context, hardwareDeviceHealth, isEngaged, isHardwareInitialized, isHooked, registeredCallbacks
tag
Constructor and Description |
---|
LynxI2cDeviceSynchV2(Context context,
LynxModule module,
int bus) |
Modifier and Type | Method and Description |
---|---|
TimestampedData |
readTimeStamped(int ireg,
int creg)
Reads and returns a contiguous set of device I2C registers, together with a best-available
timestamp of when the actual I2C read occurred.
|
acquireI2cLockWhile, close, enableWriteCoalescing, getConnectionInfo, getDeviceName, getHistoryQueue, getHistoryQueueCapacity, getI2cAddr, getI2cAddress, getLogging, getLoggingTag, getTag, getUserConfiguredName, internalWaitForWriteCompletions, isArmed, isWriteCoalescingEnabled, pollForReadResult, read, read8, resetDeviceConfigurationForOpMode, sendI2cWriteTx, setBusSpeed, setHistoryQueueCapacity, setI2cAddr, setI2cAddress, setLogging, setLoggingTag, setUserConfiguredName, waitForWriteCompletions, write, write, write8, write8
adjustHookingToMatchEngagement, disengage, doHook, doUnhook, engage, finishConstruction, floatHardware, forgetLastKnown, getArmingState, getHealthStatus, getHealthStatusOverride, getManufacturer, getModule, getSerialNumber, getVersion, hook, initializeHardware, isEngaged, moduleNowArmedOrPretending, moduleNowDisarmed, onModuleStateChange, registerCallback, setHealthStatus, setHealthyIfArmed, unhook, unregisterCallback
handleException, handleSpecificException, handleSpecificException, handleSpecificException, handleSpecificException
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getHealthStatus, setHealthStatus
getManufacturer, getVersion
public LynxI2cDeviceSynchV2(Context context, LynxModule module, int bus)
public TimestampedData readTimeStamped(int ireg, int creg)
I2cDeviceSynchSimple
You can always just call this method without worrying at all about
read windows
,
that will work, but usually it is more efficient to take some thought and care as to what set
of registers the I2C device controller is being set up to read, as adjusting that window
of registers incurs significant extra time.
If the current read window can't be used to read the requested registers, then
a new read window will automatically be created as follows. If the current read window is non
null and wholly contains the registers to read but can't be read because it is a used-up
ReadMode#ONLY_ONCE
window,
a new read fresh window will be created with the same set of registers. Otherwise, a
window that exactly covers the requested set of registers will be created.
readTimeStamped
in interface I2cDeviceSynchSimple
readTimeStamped
in class LynxI2cDeviceSynch
ireg
- the register number of the first byte register to readcreg
- the number of bytes / registers to readI2cDeviceSynchSimple.read(int, int)
,
I2cDeviceSynchSimple.read8(int)
,
I2cDeviceSynch.ensureReadWindow(I2cDeviceSynch.ReadWindow, I2cDeviceSynch.ReadWindow)