VEXcode Doxygen
Public Member Functions | List of all members
vex::digital_out Class Reference

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

#include <vex_triport.h>

Inheritance diagram for vex::digital_out:
vex::__tridevice vex::led vex::pneumatics

Public Member Functions

 digital_out (triport::port &port)
 Creates a new digital-out object on the port specified in the parameter. More...
 
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.

@prog_lang{block|cpp|pro}

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.

@prog_lang{cpp|pro} @drawer_cat{constructor} @block_sig{vex::digital_out Digital_out = vex::digital_out(Brain.ThreeWirePort.A);}

Parameters
portA reference to a three wire port.

Member Function Documentation

◆ operator=()

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

Sets the output value of the digital-out device.

@prog_lang{none} @drawer_cat{none} @block_sig{DigitalOut.operator(1);}

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

◆ set()

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

Sets the digital-out device to a Boolean value.

@prog_lang{block|cpp|pro} @drawer_cat{action} @block_sig{DigitalOut.set(true);}

Parameters
valueA true or false Boolean value.

◆ value()

int32_t vex::digital_out::value ( )

Gets the value of the digital-out device.

@prog_lang{block|cpp|pro} @drawer_cat{sensing} @block_sig{DigitalOut.value()}

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

The documentation for this class was generated from the following file: