VEX V5 C++ API
Public Member Functions | List of all members
vex::analog_in Class Reference

Use this class when programming with an analog-in device. More...

Inherits vex::__tridevice.

Public Member Functions

 analog_in (triport::port &port)
 Creates a new analog-in object on the port specified in the parameter. More...
 
 ~analog_in ()
 
int32_t value (analogUnits units)
 Gets the value of the analog-in device. More...
 
int32_t value (percentUnits units)
 Gets the value of the analog-in device. More...
 

Detailed Description

Use this class when programming with an analog-in device.

Constructor & Destructor Documentation

◆ analog_in()

vex::analog_in::analog_in ( triport::port port)

Creates a new analog-in object on the port specified in the parameter.

Parameters
portA reference to a three wire port.

◆ ~analog_in()

vex::analog_in::~analog_in ( )

Member Function Documentation

◆ value() [1/2]

int32_t vex::analog_in::value ( analogUnits  units)

Gets the value of the analog-in device.

Returns
Returns an integer that represents the unit value specified by the parameter of the analog-in device.
Parameters
unitsThe measurement unit for the analog-in device.

◆ value() [2/2]

int32_t vex::analog_in::value ( percentUnits  units)
inline

Gets the value of the analog-in device.

Returns
Returns an integer that represents the unit value specified by the parameter of the analog-in device.
Parameters
unitsThe measurement unit for the analog-in device.