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

Use this class when programming with the limit switch. More...

Inherits vex::__tridevice.

Public Member Functions

 limit (triport::port &port)
 Creates a new limit object on the port specified in the parameter. More...
 
 ~limit ()
 
int32_t value ()
 Gets the value of the limit switch. More...
 
int32_t pressing ()
 Gets the state of the limit device. More...
 
 operator int ()
 
 operator bool ()
 

Detailed Description

Use this class when programming with the limit switch.

Constructor & Destructor Documentation

◆ limit()

vex::limit::limit ( triport::port port)

Creates a new limit object on the port specified in the parameter.

Parameters
portA reference to a three wire port.

◆ ~limit()

vex::limit::~limit ( )

Member Function Documentation

◆ value()

int32_t vex::limit::value ( )

Gets the value of the limit switch.

Returns
Returns an integer that represents the value of the limit device.

◆ pressing()

int32_t vex::limit::pressing ( )
inline

Gets the state of the limit device.

Returns
Returns the state of the limit device.

◆ operator int()

vex::limit::operator int ( )

◆ operator bool()

vex::limit::operator bool ( )