OMK::TriggerExtension Class Reference
[Extensions]

A trigger which adds a boolean attribute which is set to true if the distance between the object and the target is less than the thresold. More...

#include <OMKTriggerExtension.h>

Inheritance diagram for OMK::TriggerExtension:

Inheritance graph
[legend]
Collaboration diagram for OMK::TriggerExtension:

Collaboration graph
[legend]
List of all members.

Protected Member Functions

virtual bool loadExtensionParameters (const ConfigurationParameterDescriptor *node)
 Configuration parameters loader of Extension.

Protected Attributes

AttributeT< bool_reached

Private Member Functions

 DECLARE_EXTENSION_FACTORY (TriggerExtension)

Detailed Description

A trigger which adds a boolean attribute which is set to true if the distance between the object and the target is less than the thresold.

Module description :
The boolean attribute is added to the object, it is named ExtensionIdReached. This extension sets this boolean attribute to true if the distance between the object position and the target position is less than the thresold.

The threshold attribute is named ExtensionIdThreshold.

See also TriggerAttributeExtension.

Configuration parameters :
The parameters are: Example with a tracker:
    object
    {
      Class Tracker
      Scheduling
      {
        Frequency 60
      }
      UserParams
      {
        TargetConnect [trajectory Position]
        Speed 0.1
      }
      Extensions
      {
        trigger
        {
          Class Trigger
          Thresold 3.0
        }
      }
    }
Because the Target attribute is available in the object, the trigger extension get the target position through it. Because the Position attribute is available, the trigger extension get the object position through it. The threshold is defined by triggerThresold.

Definition at line 286 of file OMKTriggerExtension.h.


Member Function Documentation

OMK::TriggerExtension::DECLARE_EXTENSION_FACTORY ( TriggerExtension   )  [private]

bool TriggerExtension::loadExtensionParameters ( const ConfigurationParameterDescriptor node  )  [protected, virtual]

Configuration parameters loader of Extension.

Parameters:
[in] node the root node of the configuration parameter, null if no node defined for the extension.
Returns:
should return true if all the parameters are well retrieved.
Overwrite this method to initialise the extension. This method allows the extension to get parameters of its own field.
Be careful, loadObjectParameters method is called before this method.
See How to configure an extension ? for details.

Reimplemented from OMK::TriggerBaseExtension.

Definition at line 161 of file OMKTriggerExtension.cpp.

References OMK::TriggerBaseExtension::_flagAccessor, _reached, OMK::TriggerBaseExtension::loadExtensionParameters(), and OMK::IAttributeBaseT< PrmType >::loadParameters().

00162 {
00163   _flagAccessor = &_reached ;
00164   _reached.loadParameters( node, "Reached" ) ;
00165 
00166   return TriggerBaseExtension::loadExtensionParameters( node );
00167 }


Member Data Documentation

AttributeT< bool > OMK::TriggerExtension::_reached [protected]

Definition at line 291 of file OMKTriggerExtension.h.

Referenced by loadExtensionParameters().


logo OpenMask

Documentation generated on Mon Jun 9 11:46:03 2008

Generated with doxygen by Dimitri van Heesch ,   1997-2007