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

Use this class when programming with a digital-out device. More...

Inherits vex::__tridevice.

Inherited by vex::led, and vex::pneumatics.

Public Member Functions

 digital_out (triport::port &port)
 Creates a new digital out object on the port specified in the parameter. More...
 
 ~digital_out ()
 
int32_t value ()
 Gets the value of the digital-out device. More...
 
void set (bool value)
 Sets the digital-out device to a Boolean value. More...
 
 operator int ()
 
 operator bool ()
 
void operator= (const int32_t value)
 Sets the output value of the digital-out device. More...
 

Detailed Description

Use this class when programming with a digital-out device.

Constructor & Destructor Documentation

◆ digital_out()

vex::digital_out::digital_out ( triport::port port)

Creates a new digital out object on the port specified in the parameter.

Parameters
portA reference to a three wire port.

◆ ~digital_out()

vex::digital_out::~digital_out ( )

Member Function Documentation

◆ value()

int32_t vex::digital_out::value ( )

Gets the value of the digital-out device.

Returns
Returns an integer that represents the value of the digital-out device.

◆ set()

void vex::digital_out::set ( bool  value)

Sets the digital-out device to a Boolean value.

Parameters
valueA true or false Boolean value.

◆ operator int()

vex::digital_out::operator int ( )

◆ operator bool()

vex::digital_out::operator bool ( )

◆ operator=()

void vex::digital_out::operator= ( const int32_t  value)

Sets the output value of the digital-out device.

Parameters
valueThe value to set the digital-out device. Typically 1 or 0.