#pragma once namespace Passer::Control { class CoreThing { public: // Participant *client; unsigned char networkId; /// @char The id of the thing unsigned char id; // CoreThing *parent; /// @brief The type of Thing unsigned char type; const char *name = nullptr; const char *modelUrl = nullptr; // protected Sensor sensor; /// @brief Basic Thing types enum class Type { Undetermined, // Sensor, Switch, DistanceSensor, DirectionalSensor, TemperatureSensor, // Motor, ControlledMotor, UncontrolledMotor, Servo, // Other Humanoid, ExternalSensor, }; private: static CoreThing *allThings[]; public: CoreThing(unsigned char networkId = 0, unsigned char thingType = (unsigned char)Type::Undetermined); static CoreThing *Get(unsigned char networkId, unsigned char thingId); static int Add(CoreThing *thing); protected: virtual void Init(); }; } // namespace Passer::Control using namespace Passer::Control;