![]() |
Roboid Control for C#
|
A temperature sensor.
Public Member Functions | |
TemperatureSensor (bool invokeEvent=true) | |
Create a temperature sensor without communication abilities. | |
TemperatureSensor (Participant owner, byte thingId=0, bool invokeEvent=true) | |
Create a temperature sensor for a participant. | |
TemperatureSensor (Thing parent, byte thingId=0, bool invokeEvent=true) | |
Create a new child temperature sensor. | |
override byte[] | GenerateBinary () |
Function used to generate binary data for this temperature sensor. | |
override void | ProcessBinary (byte[] bytes) |
Function to process the temperature from the binary data. | |
virtual void | CreateComponent () |
Function which can be used to create components in external engines. | |
void | AddChild (Thing child) |
Add a child Thing to this Thing. | |
bool | RemoveChild (Thing child) |
Remove the given thing as a child of this thing. | |
void | Update (bool recurse=false) |
Update de state of the thing. | |
virtual void | Update (ulong currentTimeMs, bool recurse=false) |
Update this thing. | |
delegate void | ChangeHandler () |
delegate void | SphericalHandler (Spherical v) |
delegate void | ThingHandler (Thing t) |
Static Public Member Functions | |
static ulong | GetTimeMs () |
Get the current time in milliseconds. | |
static void | InvokeNewThing (Thing thing) |
Trigger the creation for the given thing. | |
Public Attributes | |
float | temperature = 0 |
The measured temperature. | |
bool | terminate = false |
Participant | owner = null |
The participant owning this thing. | |
byte | id = 0 |
The ID of this thing. | |
byte | type = Type.Undetermined |
The type of this thing. | |
bool | nameChanged = false |
string | modelUrl = "" |
An URL pointing to the location where a model of the thing can be found. | |
Unity.Thing | component = null |
A reference to the representation of the thing in Unity. | |
bool | hierarchyChanged = true |
Indicator that the hierarchy of the thing has changed. | |
bool | positionUpdated = false |
Boolean indicating that the thing has an updated position. | |
bool | orientationUpdated = false |
Boolean indicating the thing has an updated orientation. | |
bool | linearVelocityUpdated = false |
Boolean indicating the thing has an updated linear velocity. | |
bool | angularVelocityUpdated = false |
Boolean indicating the thing has an updated angular velocity. | |
Protected Attributes | |
List< Thing > | children = new() |
The children of this thing. | |
Properties | |
virtual string | name [get, set] |
The name of the thing. | |
Thing | parent [get, set] |
The parent of this thing. | |
Spherical | position [get, set] |
The position of the thing in local space, in meters. | |
SwingTwist | orientation [get, set] |
The orientation of the thing in local space. | |
Spherical | linearVelocity [get, set] |
The linear velocity of the thing in local space in meters per second. | |
Spherical | angularVelocity [get, set] |
The angular velocity of the thing in local space in degrees per second. | |
RoboidControl.TemperatureSensor.TemperatureSensor | ( | bool | invokeEvent = true | ) |
Create a temperature sensor without communication abilities.
invokeEvent | Invoke a OnNewThing event when the thing has been created |
RoboidControl.TemperatureSensor.TemperatureSensor | ( | Participant | owner, |
byte | thingId = 0 , |
||
bool | invokeEvent = true |
||
) |
Create a temperature sensor for a participant.
owner | The participant for with the sensor is needed |
thingId | The ID of the thing |
invokeEvent | Invoke a OnNewThing event when the thing has been created |
RoboidControl.TemperatureSensor.TemperatureSensor | ( | Thing | parent, |
byte | thingId = 0 , |
||
bool | invokeEvent = true |
||
) |
Create a new child temperature sensor.
parent | The parent thing |
thingId | The ID of the thing, leave out or set to zero to generate an ID |
invokeEvent | Invoke a OnNewThing event when the thing has been created |
|
virtual |
Function used to generate binary data for this temperature sensor.
Reimplemented from RoboidControl.Thing.
|
virtual |
Function to process the temperature from the binary data.
bytes | The binary data to process |
Reimplemented from RoboidControl.Thing.
|
virtualinherited |
Function which can be used to create components in external engines.
Currently this is used to create GameObjects in Unity
Reimplemented in RoboidControl.DigitalSensor, RoboidControl.DistanceSensor, and RoboidControl.TouchSensor.
|
inherited |
Add a child Thing to this Thing.
child | The Thing which should become a child |
|
inherited |
Remove the given thing as a child of this thing.
child | The child to remove |
|
staticinherited |
Get the current time in milliseconds.
|
inherited |
Update de state of the thing.
recurse | When true, this will Update the descendants recursively |
|
virtualinherited |
Update this thing.
currentTime | he current clock time in milliseconds; if this is zero, the current time is retrieved automatically |
recurse | When true, this will Update the descendants recursively |
Reimplemented in RoboidControl.DifferentialDrive.
|
staticinherited |
Trigger the creation for the given thing.
thing | The created thing |
|
inherited |
The type of this thing.
This can be either a Thing.Type or a byte value for custom types.