VEX IQ C++ API
Namespaces | Classes | Enumerations | Functions | Variables
vex Namespace Reference

Touch led device class. More...

Namespaces

 this_thread
 

Classes

class  brain
 Sound effects when playing sounds. More...
 
class  bumper
 Use this class when programming with the bumper device. More...
 
class  colorsensor
 Use this class when programming with the bumper device. More...
 
class  controller
 Use the controller class to get values from the remote controller as well as write to the controller's screen. More...
 
class  device
 Base class for all Vex IQ devices. More...
 
class  drivetrain
 
class  gyro
 Gyro sensor device class. More...
 
class  motor
 Use the motor class to control motor devices. More...
 
class  motor_group
 
class  safearray
 a safe array template More...
 
class  smartdrive
 
class  sonar
 Sonar sensor device class. More...
 
class  thread
 Use this class to create and control threads. More...
 
class  timer
 Use the timer class to create timers for your program. More...
 
class  touchled
 Use this class when programming with the touch LED device. More...
 
class  vision
 Use this class when programming the vision sensor. More...
 

Enumerations

enum  percentUnits { percentUnits::pct = 0 }
 The measurement units for percentage values. More...
 
enum  timeUnits { timeUnits::sec, timeUnits::msec }
 The measurement units for time values. More...
 
enum  currentUnits { currentUnits::amp }
 The measurement units for current values. More...
 
enum  voltageUnits { voltageUnits::volt, voltageUnits::mV }
 The measurement units for voltage values. More...
 
enum  powerUnits { powerUnits::watt }
 The measurement units for power values. More...
 
enum  torqueUnits { torqueUnits::Nm, torqueUnits::InLb }
 The measurement units for torque values. More...
 
enum  rotationUnits { rotationUnits::deg, rotationUnits::rev, rotationUnits::raw = 99 }
 The measurement units for rotation values. More...
 
enum  velocityUnits { velocityUnits::pct = (int)percentUnits::pct, velocityUnits::rpm, velocityUnits::dps, velocityUnits::raw = 99 }
 The measurement units for velocity values. More...
 
enum  distanceUnits { distanceUnits::mm, distanceUnits::in, distanceUnits::cm }
 The measurement units for distance values. More...
 
enum  directionType { directionType::fwd = 0, directionType::rev, directionType::undefined }
 The defined units for direction values. More...
 
enum  turnType { turnType::left, turnType::right }
 
enum  brakeType { brakeType::coast = 0, brakeType::brake = 1, brakeType::hold = 2, brakeType::undefined }
 The defined units for brake values. More...
 
enum  colorHue {
  colorHue::none = 0, colorHue::red, colorHue::red_orange, colorHue::orange,
  colorHue::yellow_orange, colorHue::yellow, colorHue::yellow_green, colorHue::green,
  colorHue::blue_green, colorHue::blue, colorHue::blue_violet, colorHue::violet,
  colorHue::red_violet, colorHue::white
}
 
enum  fadeType { fadeType::off, fadeType::slow, fadeType::fast }
 
enum  gyroCalibrationType { gyroCalibrationType::quick, gyroCalibrationType::slow, gyroCalibrationType::accurate }
 
enum  rateUnits { rateUnits::dps, rateUnits::rps }
 
enum  noteType {
  noteType::silence = 0, noteType::c = 1, noteType::d = 2, noteType::e = 3,
  noteType::f = 4, noteType::g = 5, noteType::a = 6, noteType::b = 7,
  noteType::dor = 1, noteType::re = 2, noteType::mi = 3, noteType::fa = 4,
  noteType::sol = 5, noteType::la = 6, noteType::ti = 7
}
 Musical note to play. More...
 
enum  soundType {
  soundType::siren2 = 0, soundType::wrongWay = 1, soundType::wrongWays = 2, soundType::gasFillup = 3,
  soundType::headlightsOn = 4, soundType::headlightsOff = 5, soundType::tollBooth = 6, soundType::carAlarm2 = 7,
  soundType::tada = 8, soundType::garageDoorClose = 9, soundType::ratchet = 10, soundType::airWrench = 11,
  soundType::siren4 = 12, soundType::ratchet4 = 13, soundType::carAlarm4 = 14, soundType::powerOff2 = 15
}
 

Functions

void wait (float time, timeUnits units=timeUnits::sec)
 Wait for a specific amount of time. Identical to sleep() More...
 
void sleep (float duration, timeUnits units=timeUnits::sec)
 Wait for a specific amount of time. Identical to wait() More...
 
void sleepMs (uint32_t duration)
 Wait for a specific amount of time (in milliseconds) More...
 
float clock ()
 System time, in seconds. More...
 
uint32_t clockMs ()
 System time, in milliseconds. More...
 

Variables

const rotationUnits degrees
 
const rotationUnits turns
 
const percentUnits percent
 
const timeUnits seconds
 
const distanceUnits inches
 
const distanceUnits mm
 
const directionType forward
 
const directionType reverse
 
const turnType left
 
const turnType right
 
const int32_t PORT1
 
const int32_t PORT2
 
const int32_t PORT3
 
const int32_t PORT4
 
const int32_t PORT5
 
const int32_t PORT6
 
const int32_t PORT7
 
const int32_t PORT8
 
const int32_t PORT9
 
const int32_t PORT10
 
const int32_t PORT11
 
const int32_t PORT12
 
const percentUnits pct
 
const timeUnits sec
 
const timeUnits msec
 
const currentUnits amp
 
const powerUnits watt
 
const torqueUnits Nm
 
const torqueUnits InLb
 
const rotationUnits deg
 
const rotationUnits rev
 
const velocityUnits rpm
 
const directionType fwd
 
const brakeType coast
 
const brakeType brake
 
const brakeType hold
 

Detailed Description

Touch led device class.

Vision sensor device class.

Enumeration Type Documentation

◆ percentUnits

enum vex::percentUnits
strong

The measurement units for percentage values.

Enumerator
pct 

A percentage unit that represents a value from 0% to 100%.

◆ timeUnits

enum vex::timeUnits
strong

The measurement units for time values.

Enumerator
sec 

A time unit that is measured in seconds.

msec 

A time unit that is measured in milliseconds.

◆ currentUnits

enum vex::currentUnits
strong

The measurement units for current values.

Enumerator
amp 

A current unit that is measured in amps.

◆ voltageUnits

enum vex::voltageUnits
strong

The measurement units for voltage values.

Enumerator
volt 

A voltage unit that is measured in volts.

mV 

The measurement units for power values millivolts.

◆ powerUnits

enum vex::powerUnits
strong

The measurement units for power values.

Enumerator
watt 

A power unit that is measured in watts.

◆ torqueUnits

enum vex::torqueUnits
strong

The measurement units for torque values.

Enumerator
Nm 

A torque unit that is measured in Newton Meters.

InLb 

A torque unit that is measured in Inch Pounds.

◆ rotationUnits

enum vex::rotationUnits
strong

The measurement units for rotation values.

Enumerator
deg 

A rotation unit that is measured in degrees.

rev 

A rotation unit that is measured in revolutions.

raw 

A rotation unit that is measured in raw data form.

◆ velocityUnits

enum vex::velocityUnits
strong

The measurement units for velocity values.

Enumerator
pct 

A velocity unit that is measured in percentage.

rpm 

A velocity unit that is measured in rotations per minute.

dps 

A velocity unit that is measured in degrees per second.

raw 

A velocity unit that is measured in raw data form.

◆ distanceUnits

enum vex::distanceUnits
strong

The measurement units for distance values.

Enumerator
mm 

A distance unit that is measured in millimeters.

in 

A distance unit that is measured in inches.

cm 

A distance unit that is measured in centimeters.

◆ directionType

enum vex::directionType
strong

The defined units for direction values.

Enumerator
fwd 

A direction unit that is defined as forward.

rev 

A direction unit that is defined as backward.

undefined 

◆ turnType

enum vex::turnType
strong
Enumerator
left 
right 

◆ brakeType

enum vex::brakeType
strong

The defined units for brake values.

Enumerator
coast 

A brake unit that is defined as coast.

brake 

A brake unit that is defined as brake.

hold 

A brake unit that is defined as hold.

undefined 

◆ colorHue

enum vex::colorHue
strong
Enumerator
none 
red 
red_orange 
orange 
yellow_orange 
yellow 
yellow_green 
green 
blue_green 
blue 
blue_violet 
violet 
red_violet 
white 

◆ fadeType

enum vex::fadeType
strong
Enumerator
off 
slow 
fast 

◆ gyroCalibrationType

Enumerator
quick 
slow 
accurate 

◆ rateUnits

enum vex::rateUnits
strong
Enumerator
dps 
rps 

◆ noteType

enum vex::noteType
strong

Musical note to play.

Enumerator
silence 

Stop playing/play a silence.

dor 
re 
mi 
fa 
sol 
la 
ti 

◆ soundType

enum vex::soundType
strong
Enumerator
siren2 
wrongWay 
wrongWays 
gasFillup 
headlightsOn 
headlightsOff 
tollBooth 
carAlarm2 
tada 
garageDoorClose 
ratchet 
airWrench 
siren4 
ratchet4 
carAlarm4 
powerOff2 

Function Documentation

◆ wait()

void vex::wait ( float  time,
timeUnits  units = timeUnits::sec 
)

Wait for a specific amount of time. Identical to sleep()

Parameters
timeThe length of time to wait
unitsThe units of time (default seconds)

◆ sleep()

void vex::sleep ( float  duration,
timeUnits  units = timeUnits::sec 
)

Wait for a specific amount of time. Identical to wait()

Parameters
durationThe length of time to wait
unitsThe units of time (default seconds)

◆ sleepMs()

void vex::sleepMs ( uint32_t  duration)

Wait for a specific amount of time (in milliseconds)

Parameters
durationThe length of time to wait (in milliseconds)

◆ clock()

float vex::clock ( )

System time, in seconds.

◆ clockMs()

uint32_t vex::clockMs ( )

System time, in milliseconds.

Variable Documentation

◆ degrees

const rotationUnits vex::degrees

◆ turns

const rotationUnits vex::turns

◆ percent

const percentUnits vex::percent

◆ seconds

const timeUnits vex::seconds

◆ inches

const distanceUnits vex::inches

◆ mm

const distanceUnits vex::mm

◆ forward

const directionType vex::forward

◆ reverse

const directionType vex::reverse

◆ left

const turnType vex::left

◆ right

const turnType vex::right

◆ PORT1

const int32_t vex::PORT1

◆ PORT2

const int32_t vex::PORT2

◆ PORT3

const int32_t vex::PORT3

◆ PORT4

const int32_t vex::PORT4

◆ PORT5

const int32_t vex::PORT5

◆ PORT6

const int32_t vex::PORT6

◆ PORT7

const int32_t vex::PORT7

◆ PORT8

const int32_t vex::PORT8

◆ PORT9

const int32_t vex::PORT9

◆ PORT10

const int32_t vex::PORT10

◆ PORT11

const int32_t vex::PORT11

◆ PORT12

const int32_t vex::PORT12

◆ pct

const percentUnits vex::pct

◆ sec

const timeUnits vex::sec

◆ msec

const timeUnits vex::msec

◆ amp

const currentUnits vex::amp

◆ watt

const powerUnits vex::watt

◆ Nm

const torqueUnits vex::Nm

◆ InLb

const torqueUnits vex::InLb

◆ deg

const rotationUnits vex::deg

◆ rev

const rotationUnits vex::rev

◆ rpm

const velocityUnits vex::rpm

◆ fwd

const directionType vex::fwd

◆ coast

const brakeType vex::coast

◆ brake

const brakeType vex::brake

◆ hold

const brakeType vex::hold