Open
Description
Some topics for discussion:
- The dependsOnStage of an Operator shouldn't be "hard-coded" but should depend on the components it's wired up to.
- InputMeasure must be able to handle initialization when quantities depend on stages higher than Velocity. See Sherm's discussion in An output with a dependsOn stage above Velocity causes SimTK::TimeStepper::initialize to throw an exception #356.
- I'm using SimTK Testing.h which gives exception messages like "Submit a bug report to simbody." That's not the message we want from an OpenSim test.
- The requiredAt stage for the input should be Time, even if delaying a state variable (which only depends on Model). Otherwise, the quantity won't be delayed. So the requiredAt stage should be max(Time, connected output's dependsOn stage).
- Should Delay hold onto a MeasureIndex or a Measure handle?
- Should InputMeasure be a Measure::Result? or just a plain Measure?
- Are the names "input" and "output" for Delay's "input" and "output" okay? This component is so generic that it's not possible to come up with a really meaningful name. Maybe they should be numbered for an Operator? getInput("0")?
- Not able to make Delay a property of another component, since this copies the Delay and inputs and outputs aren't copied yet.
- Commented out tests will fail until we fix: (1) copying, de/serialization (2) flexible stages for Delay's input/output.
- Must fix Coordinate's outputs first (remove outputs for state variables).
- Put InputMeasure in its own header?
TODO
Once copying of inputs and outputs works:
- Test using a Delay as a property
- Test de/serialization (this test already exist in testOperators; simply uncomment).
- Test copying (this test already exist in testOperators; simply uncomment).
- Allow "flow-through" dependsOn stage / requiredAt stage.
- Test variety of stages for the outputs (this test already exist in testOperators; simply uncomment).