Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
SensorState Struct ReferenceA global instance of this structure is registered via DataSource::setSensorState() during launch, so that DataSources know where to put their results. More...
Inheritance diagram for SensorState:
Detailed DescriptionA global instance of this structure is registered via DataSource::setSensorState() during launch, so that DataSources know where to put their results. Subclasses of DataSource don't access this structure directly, they should call the static DataSource functions to write its fields. Image based data sources like cameras will send raw buffers of data via DataSource::setImage, ignoring this structure. Definition at line 221 of file DataSource.h.
Constructor & Destructor Documentation
constructor Definition at line 12 of file DataSource.cc.
don't call Member Function Documentation
returns true if any of providedOutputs is greater than zero Definition at line 226 of file DataSource.h.
returns true if any of providedOutputs is zero Definition at line 228 of file DataSource.h. Referenced by MotionExecThread::applyPostureFeedback().
don't call
Implements Resource. Definition at line 25 of file DataSource.cc.
Implements Resource. Definition at line 266 of file DataSource.h. Member Data Documentationmaps to WorldState::buttons, assign via DataSource::setButtonValue Definition at line 240 of file DataSource.h. Referenced by DataSource::getButtonValue(), SensorState(), and DataSource::setButtonValue(). this flag should be set when any of the fields are updated, cleared when releaseResource is called (when timestamp is set instead) Definition at line 253 of file DataSource.h. Referenced by releaseResource(), Simulator::sendSensor(), DataSource::setButtonValue(), DataSource::setOutputValue(), DataSource::setPIDDutyValue(), and DataSource::setSensorValue().
Serial number for the update, incremented each time Simulator sends an update notification. This is not incremented for each DataSource modification because there might be multiple data sources, or a data source might make multiple partial updates within each Simulator frame. Definition at line 250 of file DataSource.h. Referenced by DataSource::getSensorFrameNumber(), Main::gotSensors(), and Simulator::sendSensor().
lock to prevent concurrent access to the structure, but should use the SensorState with MarkScope to set the dirty flag on unlock Definition at line 272 of file DataSource.h. Referenced by releaseResource(), and useResource(). This may be set to point to the Motion.OverrideSensors configuration setting, causing sensor updates for outputs to be ignored (forcing open loop). This is useful if loading sensor data from log, where we want to compute new output positions in simulation, but using the "pure" sensors for input Definition at line 257 of file DataSource.h. Referenced by DataSource::setOutputValue(), and SharedGlobals::SharedGlobals(). maps to WorldState::outputs, assign via DataSource::setOutputValue Definition at line 239 of file DataSource.h. Referenced by MotionExecThread::applyPostureFeedback(), Motion::doStart(), Main::doStart(), DataSource::getOutputValue(), SensorState(), DataSource::setOutputValue(), and Simulator::Simulator(). maps to WorldState::pidduties, assign via DataSource::setPIDDutyValue Definition at line 243 of file DataSource.h. Referenced by DataSource::getPIDDutyValue(), SensorState(), and DataSource::setPIDDutyValue(). maps to WorldState::pids, only assigned via MotionExecThread Definition at line 242 of file DataSource.h. Referenced by MotionExecThread::poll(), and SensorState().
Counts the number of sensor data sources which are providing readings for each output. This isn't a configuration setting per se, but needed so motion process can tell if it should provide feedback for each output. If an output doesn't have any sensor feedback (or override is true), then motion should provide feedback. If more than one sensor is providing the same output, that could be a problem, but not dealt with here. The simulator's initialization routines will pass this to DataSource::setOutputTracker(). Definition at line 237 of file DataSource.h. Referenced by MotionExecThread::applyPostureFeedback(), Simulator::cmdStatus(), hasUnprovidedOutput(), DataSource::ignoringOutput(), DataSource::providingOutput(), and SensorState().
a function to be called whenever releaseResource() is called and dirty flag is set; called at the end once the resource is immediately available Definition at line 263 of file DataSource.h. Referenced by releaseResource(), Simulator::setMotionEnteringRealtime(), Simulator::setMotionLeavingRealtime(), and Simulator::~Simulator(). maps to WorldState::sensors, assign via DataSource::setSensorValue Definition at line 241 of file DataSource.h. Referenced by DataSource::getSensorValue(), SensorState(), and DataSource::setSensorValue().
simulator time of last update to one of the value arrays Definition at line 245 of file DataSource.h. Referenced by releaseResource(), and Simulator::sendSensor(). The documentation for this struct was generated from the following files: |
Tekkotsu Hardware Abstraction Layer 5.1CVS |
Generated Mon May 9 05:01:41 2016 by Doxygen 1.6.3 |