RoboidControl for Arduino
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Protected Types | Static Protected Attributes | List of all members
Passer::RoboidControl::Switch Class Reference

A Digital switch input. More...

#include <Switch.h>

Inheritance diagram for Passer::RoboidControl::Switch:
Passer::RoboidControl::Sensor Passer::RoboidControl::Thing

Public Member Functions

 Switch ()
 Setup an digital switch.
 
 Switch (byte pinInput)
 Setup the ultrasonic sensor.
 
bool IsOn ()
 
bool IsOff ()
 
bool IsMotor ()
 Check if the Thing is a Motor.
 
bool IsSensor ()
 Check if the Thing is a Sensor.
 

Public Attributes

byte pinInput
 The pin number of the digital input signal.
 
unsigned int type
 The type of Thing.
 

Static Public Attributes

static const unsigned int SwitchType = SensorType | (unsigned int)Type::Switch
 
static const unsigned int DistanceSensorType
 
static const unsigned int ControlledMotorType
 
static const unsigned int UncontrolledMotorType
 

Protected Types

enum class  Type {
  Undetermined , Switch , DistanceSensor , ControlledMotor ,
  UncontrolledMotor
}
 Basic Thing types. More...
 

Static Protected Attributes

static const unsigned int MotorType = 0x8000
 Bitmask for Motor type.
 
static const unsigned int SensorType = 0x4000
 Bitmap for Sensor type.
 

Detailed Description

A Digital switch input.

Member Enumeration Documentation

◆ Type

enum class Passer::RoboidControl::Thing::Type
strongprotectedinherited

Basic Thing types.

Enumerator
Undetermined 
Switch 
DistanceSensor 
ControlledMotor 
UncontrolledMotor 

Constructor & Destructor Documentation

◆ Switch() [1/2]

Passer::RoboidControl::Switch::Switch ( )

Setup an digital switch.

◆ Switch() [2/2]

Switch::Switch ( byte  pinInput)

Setup the ultrasonic sensor.

Parameters
pinInputThe pin number of the digital input signal

Member Function Documentation

◆ IsOn()

bool Switch::IsOn ( )

◆ IsOff()

bool Switch::IsOff ( )

◆ IsMotor()

bool Thing::IsMotor ( )
inherited

Check if the Thing is a Motor.

Returns
True when the Thing is a Motor and False otherwise

◆ IsSensor()

bool Thing::IsSensor ( )
inherited

Check if the Thing is a Sensor.

Returns
True when the Thing is a Sensor and False otherwise

Member Data Documentation

◆ pinInput

byte Passer::RoboidControl::Switch::pinInput

The pin number of the digital input signal.

◆ type

unsigned int Passer::RoboidControl::Thing::type
inherited

The type of Thing.

◆ SwitchType

const unsigned int Thing::SwitchType = SensorType | (unsigned int)Type::Switch
staticinherited

◆ DistanceSensorType

const unsigned int Thing::DistanceSensorType
staticinherited
Initial value:
=
static const unsigned int SensorType
Bitmap for Sensor type.
Definition Thing.h:31

◆ ControlledMotorType

const unsigned int Thing::ControlledMotorType
staticinherited
Initial value:
=
static const unsigned int MotorType
Bitmask for Motor type.
Definition Thing.h:29

◆ UncontrolledMotorType

const unsigned int Thing::UncontrolledMotorType
staticinherited

◆ MotorType

const unsigned int Passer::RoboidControl::Thing::MotorType = 0x8000
staticprotectedinherited

Bitmask for Motor type.

◆ SensorType

const unsigned int Passer::RoboidControl::Thing::SensorType = 0x4000
staticprotectedinherited

Bitmap for Sensor type.


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