Gocator Development Kit
 All Classes Files Functions Variables Typedefs Friends Modules Pages
Life Cycle

The GDK framework constructs an instance of the associated tool class for each tool defined in the sensor job file or for each tool added using the Gocator UI or SDK.

The constuction invokes a tool's VInit method such that VInit is called just once in a tool's lifetime.

A tool instance exists until the tool is deleted/removed from the sensor, at which time the tool's VRelease method is called.

During a tool's lifetime between invoking VInit and VRelease, other virtual functions are called each of which can be overridden if required. The available tool virtual functions are:

  • VInit: called during early construction of the tool instance
  • VName: called during registration of the tool to retrieve the tool's unique type name
  • VIsVisible: called by the framework to determine if the tool is to be visible to users
  • VDescribe: called to define the components of the tool
  • VNewToolConfigInstanced: called when tool is created
  • VNewMeasurementConfigInstanced: called when a new measurement is create
  • VNewFeatureConfigInstanced: called when a new feature is created
  • VNewToolDataOutputConfigInstanced: called when a new data output is created
  • VUpdateConfigInstanced: called when the tool's configuration attributes have been changed
  • VCalcDataOutputRegionInstanced: called when a data output region needs to be updated by the tool
  • VStart: called when scanning for data starts
  • VProcess: called when data from a scan is received and can be processed by the tool
  • VStop: called when scanning stops
  • VRelease: called when the instance of the tool is released

Note that a GDK tool is in one of two states at any time:

  • Setup state
  • Running state

While the sensor is stopped, the tools are in the setup state. In this state, the framework may call into the tool class for activities such as tool description, configuration initialization and configuration attribute updating. These activities are exposed by the tool class as class methods.

When the sensor begins to run, the framework will call the tool's VStart method. The VProcess method will be called whenever the sensor has generated a scan. A tool can then access the available data and for instance, send out measurement values in this method.

When the sensor is stopped, the tool's VStop method is called for each tool instance.