EV3RT CXX API Reference [English]
An RTOS-based development platform for LEGO Mindstorms EV3.
BrickButton Class Reference

Class BrickButton. API for working with brick buttons. More...

#include <ev3cxx_brick_button.h>

Inheritance diagram for BrickButton:
Button

Public Member Functions

 BrickButton (BrickButtons button)
 Constructor of class BrickButton. More...
 
int isPressed ()
 Get state of brick button. More...
 
- Public Member Functions inherited from Button
void waitForPress ()
 Blocks until button is pressed.
 
void waitForRelease ()
 Blocks until button is release.
 
void waitForClick ()
 Blocks until button is clicked (press and release)
 

Private Attributes

const BrickButtons m_button
 

Detailed Description

Class BrickButton. API for working with brick buttons.

Definition at line 33 of file ev3cxx_brick_button.h.

Constructor & Destructor Documentation

◆ BrickButton()

BrickButton ( BrickButtons  button)
inline

Constructor of class BrickButton.

Parameters
buttonButton identificator.

Definition at line 41 of file ev3cxx_brick_button.h.

42  : m_button(button)
43  {}

Member Function Documentation

◆ isPressed()

int isPressed ( )
inlinevirtual

Get state of brick button.

Returns
If is pressed return , else .

Implements Button.

Definition at line 50 of file ev3cxx_brick_button.h.

50  {
51  return ev3_button_is_pressed(static_cast<button_t>(m_button));
52  }