#include <TemperatureSensor.h>
|
enum class | Type {
Undetermined
, Switch
, DistanceSensor
, DirectionalSensor
,
TemperatureSensor
, ControlledMotor
, UncontrolledMotor
, Servo
,
Roboid
, Humanoid
, ExternalSensor
} |
| Predefined thing types.
|
|
|
| TemperatureSensor () |
| The default constructor.
|
|
| TemperatureSensor (unsigned char networkId, unsigned char thingId) |
| Create a temperature sensor with the given ID.
|
|
virtual void | SetTemperature (float temperature) |
| Manually override the measured temperature.
|
|
void | GenerateBinary (char *bytes, unsigned char *ix) override |
| Function to create a binary message with the temperature.
|
|
virtual void | ProcessBinary (char *bytes) override |
| Function to extract the temperature received in the binary message.
|
|
Thing * | FindThing (const char *name) |
| Find a thing by name.
|
|
virtual void | SetParent (Thing *parent) |
| Sets the parent Thing.
|
|
void | SetParent (Thing *root, const char *name) |
|
Thing * | GetParent () |
| Gets the parent Thing.
|
|
virtual void | AddChild (Thing *child) |
| Add a child Thing to this Thing.
|
|
Thing * | RemoveChild (Thing *child) |
| Remove the given thing as a child of this thing.
|
|
Thing * | GetChild (unsigned char id, bool recursive=false) |
| Get a child by thing Id.
|
|
Thing * | GetChildByIndex (unsigned char ix) |
| Get a child by index.
|
|
void | SetPosition (Spherical16 position) |
| Set the position of the thing.
|
|
Spherical16 | GetPosition () |
| Get the position of the thing.
|
|
void | SetOrientation (SwingTwist16 orientation) |
| Set the orientation of the thing.
|
|
SwingTwist16 | GetOrientation () |
| Get the orientation of the thing.
|
|
virtual Spherical16 | GetLinearVelocity () |
| Get the linear velocity of the thing.
|
|
virtual Spherical16 | GetAngularVelocity () |
| Get the angular velocity of the thing.
|
|
void | Terminate () |
| Terminated things are no longer updated.
|
|
void | SetModel (const char *url) |
| Sets the location from where the 3D model of this Thing can be loaded from.
|
|
virtual void | Update (unsigned long currentTimeMs) |
| Updates the state of the thing.
|
|
|
float | temperature = 0 |
| The measured temperature.
|
|
RemoteParticipant * | participant |
|
unsigned char | networkId = 0 |
|
unsigned char | id = 0 |
| The ID of the thing.
|
|
unsigned char | type = 0 |
| The type of Thing.
|
|
unsigned char | childCount = 0 |
| The number of children.
|
|
const char * | name = nullptr |
| The name of the thing.
|
|
const char * | modelUrl = nullptr |
| An URL pointing to the location where a model of the thing can be found.
|
|
float | modelScale = 1 |
| The scale of the model (deprecated I think)
|
|
float | scale = 1 |
| The scale of the thing (deprecated I think)
|
|
bool | positionUpdated = false |
| boolean indicating if the position was updated
|
|
bool | orientationUpdated = false |
| boolean indicating if the orientation was updated
|
|
Spherical16 | linearVelocity |
|
Spherical16 | angularVelocity |
|
|
Thing * | parent = nullptr |
|
Thing ** | children = nullptr |
|
Spherical16 | position |
| The position in local space.
|
|
SwingTwist16 | orientation |
| The orientation in local space.
|
|
◆ TemperatureSensor()
Passer::RoboidControl::TemperatureSensor::TemperatureSensor |
( |
unsigned char |
networkId, |
|
|
unsigned char |
thingId |
|
) |
| |
Create a temperature sensor with the given ID.
- Parameters
-
networkId | The network ID of the sensor |
thingId | The ID of the thing |
◆ SetTemperature()
void Passer::RoboidControl::TemperatureSensor::SetTemperature |
( |
float |
temperature | ) |
|
|
virtual |
Manually override the measured temperature.
- Parameters
-
temperature | The new temperature |
◆ GenerateBinary()
void Passer::RoboidControl::TemperatureSensor::GenerateBinary |
( |
char * |
bytes, |
|
|
unsigned char * |
ix |
|
) |
| |
|
overridevirtual |
Function to create a binary message with the temperature.
- Parameters
-
buffer | The byte array for thw binary data |
ix | The starting position for writing the binary data |
Reimplemented from Passer::RoboidControl::Thing.
◆ ProcessBinary()
void Passer::RoboidControl::TemperatureSensor::ProcessBinary |
( |
char * |
bytes | ) |
|
|
overridevirtual |
◆ FindThing()
Thing * Thing::FindThing |
( |
const char * |
name | ) |
|
|
inherited |
Find a thing by name.
- Parameters
-
name | Rhe name of the thing |
- Returns
- The found thing or nullptr when nothing is found
◆ SetParent()
void Thing::SetParent |
( |
Thing * |
parent | ) |
|
|
virtualinherited |
Sets the parent Thing.
- Parameters
-
parent | The Thing which should become the parnet |
◆ GetParent()
Thing * Thing::GetParent |
( |
| ) |
|
|
inherited |
◆ AddChild()
void Thing::AddChild |
( |
Thing * |
child | ) |
|
|
virtualinherited |
Add a child Thing to this Thing.
- Parameters
-
child | The Thing which should become a child |
◆ RemoveChild()
Remove the given thing as a child of this thing.
- Parameters
-
- Returns
- The removed child or nullptr if the child could not be found
◆ GetChild()
Thing * Thing::GetChild |
( |
unsigned char |
id, |
|
|
bool |
recursive = false |
|
) |
| |
|
inherited |
Get a child by thing Id.
- Parameters
-
id | The thing ID to find |
recursive | Look recursively through all descendants |
- Returns
- The found thing of nullptr when nothing is found
◆ GetChildByIndex()
Thing * Thing::GetChildByIndex |
( |
unsigned char |
ix | ) |
|
|
inherited |
Get a child by index.
- Parameters
-
- Returns
- The found thing of nullptr when nothing is found
◆ SetPosition()
void Thing::SetPosition |
( |
Spherical16 |
position | ) |
|
|
inherited |
Set the position of the thing.
- Parameters
-
position | The new position in local space, in meters |
◆ GetPosition()
Spherical16 Thing::GetPosition |
( |
| ) |
|
|
inherited |
Get the position of the thing.
- Returns
- The position in local space, in meters
◆ SetOrientation()
void Thing::SetOrientation |
( |
SwingTwist16 |
orientation | ) |
|
|
inherited |
Set the orientation of the thing.
- Parameters
-
orientation | The new orientation in local space |
◆ GetOrientation()
SwingTwist16 Thing::GetOrientation |
( |
| ) |
|
|
inherited |
Get the orientation of the thing.
- Returns
- The orienation in local space
◆ GetLinearVelocity()
Spherical16 Thing::GetLinearVelocity |
( |
| ) |
|
|
virtualinherited |
Get the linear velocity of the thing.
- Returns
- The linear velocity in local space, in meters per second
◆ GetAngularVelocity()
Spherical16 Thing::GetAngularVelocity |
( |
| ) |
|
|
virtualinherited |
Get the angular velocity of the thing.
- Returns
- The angular velocity in local space
◆ SetModel()
void Thing::SetModel |
( |
const char * |
url | ) |
|
|
inherited |
Sets the location from where the 3D model of this Thing can be loaded from.
- Parameters
-
◆ Update()
virtual void Passer::RoboidControl::Thing::Update |
( |
unsigned long |
currentTimeMs | ) |
|
|
inlinevirtualinherited |
Updates the state of the thing.
- Parameters
-
currentTimeMs | The current clock time in milliseconds |
◆ position
Spherical16 Passer::RoboidControl::Thing::position |
|
protectedinherited |
The position in local space.
◆ orientation
SwingTwist16 Passer::RoboidControl::Thing::orientation |
|
protectedinherited |
The orientation in local space.