 |
VEXcode Doxygen
|
Go to the documentation of this file.
14 #ifndef VEX_DEVICE_CLASS_H
15 #define VEX_DEVICE_CLASS_H
45 void init( int32_t index );
46 virtual bool installed();
47 virtual int32_t value();
66 safearray(){ length = len; outofbounds = 0;
70 T &operator[](
int i );
71 int getLength() {
return length; };
77 if( i < 0 || i > (length-1) ) {
78 return( outofbounds );
102 virtual void calibrate( int32_t value ) = 0;
103 virtual bool isCalibrating(
void) = 0;
104 virtual void setHeading(
double value,
rotationUnits units ) = 0;
106 virtual void setRotation(
double value,
rotationUnits units ) = 0;
124 device &operator[](
int i ) {
157 #endif // VEX_DEVICE_CLASS_H
int32_t numberOf(V5_DeviceType type)
Gets the number of specified devices that are plugged into the V5.
V5_DeviceType type(int32_t index)
Get the V5 device type plugged into a specific port.
Use the rotation class to control absolute encoder devices.
Definition: vex_rotation.h:26
Use the device class to get information about a vex device plugged into the V5.
Definition: vex_device.h:30
device class
Definition: vex_brain.h:26
Definition: vex_device.h:94
Use the device class to get information about all of the vex devices plugged into the V5.
Definition: vex_device.h:116
Definition: vex_device.h:57
rotationUnits
The measurement units for rotation values.
Definition: vex_units.h:74
int32_t number()
Gets the number of VEX devices that are plugged in.
A rotation unit that is measured in degrees.
V5_DeviceType
V5 Device type definitions
Definition: v5_apitypes.h:99
Header for V5 Internal API.