Skip to content
kburgon edited this page Mar 2, 2016 · 15 revisions
class IThruster {
public:
  virtual void initialize() = 0;
  virtual void thrust(int powerLevel) = 0;
}
class IThrustController {
public:
  virtual void goDirection(float forward, float strafe, float dive) = 0;
  virtual void faceDirection(float yaw) = 0;
}
class IThrusterFactory {
public:
    virtual std::shared_ptr<IThruster> createLeftForwardThruster() = 0;
    virtual std::shared_ptr<IThruster> createRightForwardThruster() = 0;
    virtual std::shared_ptr<IThruster> createLeftStrafeThruster() = 0;
    virtual std::shared_ptr<IThruster> createRightStrafeThruster() = 0;
    virtual std::shared_ptr<IThruster> createForwardDiveThruster() = 0;
    virtual std::shared_ptr<IThruster> createRearDiveThruster() = 0;
};
class IGyroscope {
public:
    virtual tupple<float,float,float> getAngularAcceleration() = 0;
}
class IAccelerometer {
public:
    virtual tuple<float,float,float> getRawAcceleration() = 0;
    virtual float getTemperature() = 0;
};
class ICompass {
public:
    virtual tuple<float,float,float> getHeading() = 0;
};
class IPressureSensor {
public:
    virtual int getPressure(void) = 0;
};
class ITempuratureSensor {
public:
    virtual float getTemperature(void) = 0;
};
class ImuSensor {
public:
    virtual tuple<float,float,float> getAcceleration() = 0;
    virtual tuple<float,float,float> getNormalVector() = 0;
    virtual tuple<float,float,float> getOrientation() = 0;
    virtual float getTemperature() = 0;
    virtual float getPressure() = 0;
}
class IImuFactory {
public:
    virtual std::shared_ptr<IPressureSensor> createPressureSensor() = 0;
    virtual std::shared_ptr<ICompass> createCompass() = 0;
    virtual std::shared_ptr<IAccelerometer> createAccelerometer() = 0;
    virtual std::shared_ptr<IGyroscope> createGyroscope() = 0;
    virtual std::shared_ptr<ICompass> createCompass() = 0;
    virtual std::shared_ptr<IPressureSensor> createPressureSensor() = 0;
    virtual std::shared_ptr<ITemperatureSensor> createTemperatureSensor() = 0;
};
class IPowerModule {
public:
  virtual void turnOnEscs() = 0;
  virtual void turnOffEscs() = 0;
}
class IPowerController {
public:
  virtual void turnOnEscs() = 0;
  virtual void turnOffEscs() = 0;
}
class ILogger {
public:
    virtual void info(const char message[]) = 0;
    virtual void warning(const char message[]) = 0;
    virtual void error(const char message[]) = 0;
}
class IHeadlights {
public:
    virtual void toggleLights();
}
Clone this wiki locally