VEX V5 C++ API
Classes | Public Member Functions | Public Attributes | Friends | List of all members
vex::triport Class Reference

Use this class to get and set information about devices on 3-wire ports. More...

Inherits vex::device.

Classes

class  port
 Use this class to get access to port functions and members. More...
 

Public Member Functions

 triport (int32_t index)
 
 ~triport ()
 
template<typename... Args>
 triport (int32_t index, Args... args)
 
bool installed ()
 Gets the status of what is installed on the port. More...
 
- Public Member Functions inherited from vex::device
 device ()
 
 device (int32_t index)
 
 ~device ()
 
V5_DeviceType type ()
 
void init (int32_t index)
 
virtual int32_t value ()
 

Public Attributes

port Port [8]
 
portA = Port[0]
 A Three Wire Port that is labeled as A on the Brain. More...
 
portB = Port[1]
 A Three Wire Port that is labeled as B on the Brain. More...
 
portC = Port[2]
 A Three Wire Port that is labeled as C on the Brain. More...
 
portD = Port[3]
 A Three Wire Port that is labeled as D on the Brain. More...
 
portE = Port[4]
 A Three Wire Port that is labeled as E on the Brain. More...
 
portF = Port[5]
 A Three Wire Port that is labeled as F on the Brain. More...
 
portG = Port[6]
 A Three Wire Port that is labeled as G on the Brain. More...
 
portH = Port[7]
 A Three Wire Port that is labeled as H on the Brain. More...
 

Friends

class pot
 
class gyro
 

Additional Inherited Members

- Protected Attributes inherited from vex::device
int32_t _index
 

Detailed Description

Use this class to get and set information about devices on 3-wire ports.

Constructor & Destructor Documentation

◆ triport() [1/2]

vex::triport::triport ( int32_t  index)

◆ ~triport()

vex::triport::~triport ( )

◆ triport() [2/2]

template<typename... Args>
vex::triport::triport ( int32_t  index,
Args...  args 
)
inline

Member Function Documentation

◆ installed()

bool vex::triport::installed ( )
virtual

Gets the status of what is installed on the port.

Returns
Returns true if a 3-Wire Port device is installed in the port, otherwise false.

Reimplemented from vex::device.

Friends And Related Function Documentation

◆ pot

friend class pot
friend

◆ gyro

friend class gyro
friend

Member Data Documentation

◆ Port

port vex::triport::Port[8]
Initial value:
= { {0, this},
{1, this},
{2, this},
{3, this},
{4, this},
{5, this},
{6, this},
{7, this}
}

◆ A

port& vex::triport::A = Port[0]

A Three Wire Port that is labeled as A on the Brain.

◆ B

port& vex::triport::B = Port[1]

A Three Wire Port that is labeled as B on the Brain.

◆ C

port& vex::triport::C = Port[2]

A Three Wire Port that is labeled as C on the Brain.

◆ D

port& vex::triport::D = Port[3]

A Three Wire Port that is labeled as D on the Brain.

◆ E

port& vex::triport::E = Port[4]

A Three Wire Port that is labeled as E on the Brain.

◆ F

port& vex::triport::F = Port[5]

A Three Wire Port that is labeled as F on the Brain.

◆ G

port& vex::triport::G = Port[6]

A Three Wire Port that is labeled as G on the Brain.

◆ H

port& vex::triport::H = Port[7]

A Three Wire Port that is labeled as H on the Brain.