Package com.cdarobotics.cdalib.devices
Class Device
java.lang.Object
com.cdarobotics.cdalib.devices.Device
- Direct Known Subclasses:
AnalogInputDevice,ColorSensorDevice,CRServoDevice,DigitalInputDevice,DistanceSensorDevice,IMUDevice,MotorDevice,NullDevice,RevColorSensorV3Device,ServoDevice,TouchSensorDevice
A hardware wrapper that is refreshed once per loop via
update(). Actuator devices cache
their commanded state and flush it to hardware in update() (write caching); sensor
devices read hardware in update() and cache the value for the rest of the loop.
Devices are typically owned by a DeviceSubsystem,
which calls update() automatically every loop.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidupdate()Flush pending writes to, or refresh cached reads from, the underlying hardware.
-
Constructor Details
-
Device
public Device()
-
-
Method Details
-
update
public abstract void update()Flush pending writes to, or refresh cached reads from, the underlying hardware.
-