User Tools

Site Tools


Sidebar

[[FAQ]] [[Tutorials]] [[Topics]]

inspectable

The [[class>Inspectable]] interface enables inherited objects to expose certain variables/matrices for external inspection (read-only). This is used to provide data to the file logging, [[Guilogger]] and [[Matrixviz]], see [[PlotOptions]]. By default all controllers and wirings are inspectable. For each agent the system has a PlotOptionEngine that simply takes care of sending the data to the external tools. You can add Inspectables to an agent with ''addInspectable()''. By default the controller, wiring and the robot (if it is Inspectable) are automatically added. In order to expose a value or matrix/vector use: <code c> addInspectableMatrix("A", &A, false, "model matrix"); addInspectableValue("error", &e, "prediction error"); </code> Note, the names should not contain whitespaces. If the matrix is a columns/row vector it is automatically put different. Take a look at the [File Format] So if you want see in your logfiles/Guilogger... a variable from your ThisSim class you can do the following: Inherit ThisSim from Inspectable and add the Constuctor call with a name <code c> ThisSim() : Inspectable("My Simulation"); {...} </code> and call in your ''start()'' routine <code c> agent->addInspectable(this); </code>

inspectable.txt · Last modified: 2013/03/20 17:04 by georg