RoboidControl
|
A thing is a functional component on a robot. More...
#include <Thing.h>
Public Member Functions | |
Thing () | |
Default constructor for a Thing. | |
bool | IsMotor () |
Check if the Thing is a Motor. | |
bool | IsSensor () |
Check if the Thing is a Sensor. | |
void | SetParent (Thing *parent) |
Thing * | GetParent () |
void | AddChild (Thing *child) |
Thing * | GetChild (unsigned char childIx) |
Public Attributes | |
unsigned int | type |
The type of Thing. | |
Polar | position |
Static Public Attributes | |
static const unsigned int | SwitchType = SensorType | (unsigned int)Type::Switch |
The type of a switch sensor. | |
static const unsigned int | DistanceSensorType |
The type of a distance sensor. | |
static const unsigned int | ControlledMotorType |
The type of a controlled motor. | |
static const unsigned int | UncontrolledMotorType |
The type of an uncontrolled motor. | |
static const unsigned int | ServoType = (unsigned int)Type::Servo |
The type of an object received from the network. | |
static const unsigned int | ExternalType = (unsigned int)Type::ExternalSensor |
Protected Types | |
enum class | Type { Undetermined , Switch , DistanceSensor , ControlledMotor , UncontrolledMotor , Servo , ExternalSensor } |
Basic Thing types. More... | |
Protected Attributes | |
Thing * | parent = nullptr |
unsigned char | childCount = 0 |
Thing ** | children = nullptr |
Static Protected Attributes | |
static const unsigned int | MotorType = 0x8000 |
Bitmask for Motor type. | |
static const unsigned int | SensorType = 0x4000 |
Bitmap for Sensor type. | |
A thing is a functional component on a robot.
|
strongprotected |
Basic Thing types.
Enumerator | |
---|---|
Undetermined | |
Switch | |
DistanceSensor | |
ControlledMotor | |
UncontrolledMotor | |
Servo | |
ExternalSensor |
Thing::Thing | ( | ) |
Default constructor for a Thing.
bool Thing::IsMotor | ( | ) |
bool Thing::IsSensor | ( | ) |
void Thing::SetParent | ( | Thing * | parent | ) |
Thing * Thing::GetParent | ( | ) |
void Thing::AddChild | ( | Thing * | child | ) |
Thing * Thing::GetChild | ( | unsigned char | childIx | ) |
unsigned int Passer::RoboidControl::Thing::type |
The type of Thing.
|
static |
The type of a switch sensor.
|
static |
The type of a distance sensor.
|
static |
The type of a controlled motor.
|
static |
The type of an uncontrolled motor.
|
static |
The type of an object received from the network.
|
static |
Polar Passer::RoboidControl::Thing::position |
|
staticprotected |
Bitmask for Motor type.
|
staticprotected |
Bitmap for Sensor type.
|
protected |
|
protected |
|
protected |