VEX V5 C++ API
|
Use this class to get access to port functions and members. More...
Public Member Functions | |
port () | |
port (const int32_t id, triport *parent) | |
port (const int32_t id, const triportType type, triport *parent) | |
~port () | |
void | type (const triportType type) |
triportType | type () |
Gets the current port type. More... | |
void | value (int32_t value) |
Sets the port's value to the specified integer in the parameter. More... | |
int32_t | value () |
Gets the value of a port. More... | |
void | set (bool value) |
Sets the value of the port to a Boolean value. More... | |
void | operator() (const triportType type) |
void | operator= (const int32_t value) |
operator int () | |
operator bool () | |
void | resetRotation (void) |
Resets the rotation of the encoder to zero. More... | |
void | setRotation (double val, rotationUnits units) |
Sets the rotation of the encoder to a specific value. More... | |
double | rotation (rotationUnits units) |
Gets the rotation value of the encoder. More... | |
double | velocity (velocityUnits units) |
Gets the velocity of the encoder. More... | |
double | distance (distanceUnits units) |
Gets the value of the distance sensor. More... | |
Friends | |
class | __tridevice |
class | pot |
class | gyro |
Use this class to get access to port functions and members.
|
inline |
vex::triport::port::port | ( | const int32_t | id, |
triport * | parent | ||
) |
vex::triport::port::port | ( | const int32_t | id, |
const triportType | type, | ||
triport * | parent | ||
) |
|
inline |
void vex::triport::port::type | ( | const triportType | type | ) |
@brief Sets the port to a specific port type.
type | A type of port that you want to set it to. |
triportType vex::triport::port::type | ( | ) |
Gets the current port type.
void vex::triport::port::value | ( | int32_t | value | ) |
Sets the port's value to the specified integer in the parameter.
value | An integer number that will be set to the port's value. |
int32_t vex::triport::port::value | ( | ) |
Gets the value of a port.
void vex::triport::port::set | ( | bool | value | ) |
Sets the value of the port to a Boolean value.
value | A true or false Boolean value that the port will be set to. |
|
inline |
|
inline |
|
inline |
|
inline |
void vex::triport::port::resetRotation | ( | void | ) |
Resets the rotation of the encoder to zero.
void vex::triport::port::setRotation | ( | double | val, |
rotationUnits | units | ||
) |
Sets the rotation of the encoder to a specific value.
val | A double that represents the value to set the rotation to. |
units | The unit type that the previous value should be treated as. |
double vex::triport::port::rotation | ( | rotationUnits | units | ) |
Gets the rotation value of the encoder.
units | A unit type that defines what value of rotation that should be returned. |
double vex::triport::port::velocity | ( | velocityUnits | units | ) |
Gets the velocity of the encoder.
units | A unit type that defines what value of velocity that should be returned. |
double vex::triport::port::distance | ( | distanceUnits | units | ) |
Gets the value of the distance sensor.
units | A distance unit type that defines what value of distance that should be returned. |
|
friend |
|
friend |
|
friend |