NTRT Simulator
Version: Master
|
#include <tgObserver.h>
Public Member Functions | |
virtual | ~tgObserver () |
virtual void | onStep (Subject &subject, double dt)=0 |
virtual void | onAttach (Subject &subject) |
virtual void | onSetup (Subject &subject) |
virtual void | onTeardown (Subject &subject) |
A mixin class which makes its derived class the Subject in the Obsever design pattern. These are typically controllers.
Definition at line 35 of file tgObserver.h.
|
inlinevirtual |
A class with virtual member functions must have a virtual destructor.
Definition at line 40 of file tgObserver.h.
|
inlinevirtual |
Notify the observers when an attach action has occurred. Will only occur once, typically before setup
[in,out] | subject | the subject being observed |
Reimplemented in tgCPGMGActuatorControl, tgCPGActuatorControl, and tgSCASineControl.
Definition at line 55 of file tgObserver.h.
|
inlinevirtual |
Notify the observers when a setup action has occurred.
[in,out] | subject | the subject being observed |
Reimplemented in SerializedSpineControl, JSONAchillesHierarchyControl, JSONAOHierarchyControl, JSONHierarchyFeedbackControl, JSONMGCPGGeneralControl, BaseSpineCPGControl, JSONQuadCPGControl, JSONCPGControl, JSONSegmentsFeedbackControl, JSONGoalControl, JSONQuadFeedbackControl, JSONMGFeedbackControl, SpineGoalControl, JSONStatsFeedbackControl, JSONMetricsFeedbackControl, JSONMGFeedbackControlFM0, JSONMGFeedbackControlFM1, JSONMixedLearningControl, JSONQuadFeedbackControl, JSONQuadFeedbackControl, SpineOnlineControl, JSONFeedbackControl, SpineFeedbackControl, SpineKinematicsTestController, VerticalSpineBendingController, TensegrityModelController, T6RestLengthController, T6RestLengthController, VerticalSpineRestLengthController, VerticalSpineRestLengthController, SuperBallPrefLengthController, VerticalSpinePassiveController, ScarrArmController, SuperBallPrefLengthController, RPLengthController, RPLengthController, RPLengthController, T6TensionController, OctahedralGoalControl, OctahedralTensionControl, JSONGoalTensionNNW, JSONGoalTension, Escape_T6Controller, EscapeController, Escape_T6Controller, OctaCLSine, LearningSpineSine, htSpineSine, colSpineSine, BigPuppyController, tgCPGMGCableControl, and tgCPGCableControl.
Definition at line 61 of file tgObserver.h.
|
pure virtual |
Notify the observers when a step action has occurred.
[in,out] | subject | the subject being observed |
[in] | the | number of seconds since the previous call; must be positive |
Implemented in SerializedSpineControl, SerializedSineWaves, JSONAchillesHierarchyControl, JSONAOHierarchyControl, JSONHierarchyFeedbackControl, JSONMGCPGGeneralControl, BaseSpineCPGControl, JSONQuadCPGControl, JSONCPGControl, JSONSegmentsFeedbackControl, JSONGoalControl, JSONQuadFeedbackControl, JSONMGFeedbackControl, SpineGoalControl, JSONStatsFeedbackControl, JSONMetricsFeedbackControl, JSONMGFeedbackControlFM0, JSONMGFeedbackControlFM1, JSONMixedLearningControl, JSONQuadFeedbackControl, JSONQuadFeedbackControl, SpineOnlineControl, JSONFeedbackControl, SpineFeedbackControl, NestedStructureSineWaves, SpineKinematicsTestController, VerticalSpineBendingController, TensegrityModelController, T6RestLengthController, T6RestLengthController, VerticalSpineRestLengthController, VerticalSpineRestLengthController, RPLengthController, RPLengthController, RPLengthController, VerticalSpinePassiveController, T6TensionController, SuperBallPrefLengthController, ScarrArmController, SuperBallPrefLengthController, OctahedralGoalControl, OctahedralTensionControl, JSONGoalTensionNNW, JSONGoalTension, tgCPGMGActuatorControl, Escape_T6Controller, EscapeController, tgCPGActuatorControl, Escape_T6Controller, tgCPGJSONLogger, OctaCLSine, LearningSpineSine, tgCPGLogger, htSpineSine, colSpineSine, BigPuppyController, tgSCASineControl, tgSineStringControl, tgCPGMGCableControl, tgCPGCableControl, ContactTestController, tgCPGStringControl_mod, and BuildTestController.
|
inlinevirtual |
Notify the observers when a teardown action has occurred.
[in,out] | subject | the subject being observed |
Reimplemented in JSONAchillesHierarchyControl, JSONAOHierarchyControl, JSONHierarchyFeedbackControl, JSONMGCPGGeneralControl, BaseSpineCPGControl, JSONQuadCPGControl, JSONCPGControl, JSONSegmentsFeedbackControl, JSONGoalControl, JSONQuadFeedbackControl, JSONMGFeedbackControl, SpineGoalControl, JSONStatsFeedbackControl, JSONMetricsFeedbackControl, JSONMGFeedbackControlFM0, JSONMGFeedbackControlFM1, JSONMixedLearningControl, JSONQuadFeedbackControl, JSONQuadFeedbackControl, SpineOnlineControl, JSONFeedbackControl, SpineFeedbackControl, SuperBallPrefLengthController, OctahedralGoalControl, OctahedralTensionControl, JSONGoalTensionNNW, JSONGoalTension, Escape_T6Controller, EscapeController, Escape_T6Controller, OctaCLSine, LearningSpineSine, htSpineSine, colSpineSine, and BigPuppyController.
Definition at line 67 of file tgObserver.h.