Actin®  Version 5.2.0
Software for Robotics Simulation and Control
examplePlugin Class Reference

Plugin device driver example for creating code that will interface with Energid's viewer. It can be used for a variety of applications, from a simple data logger, to a hardware interface, to a customized GUI. More...

#include <examplePlugin.h>

Inheritance diagram for examplePlugin:
Ec::Plugin

Public Member Functions

 examplePlugin ()
 Constructor.
 
 ~examplePlugin ()
 Destructor.
 
EcBoolean init () EC_OVERRIDE
 
EcBoolean reset () EC_OVERRIDE
 
EcBoolean initState () EC_OVERRIDE
 Give ability to set simulation state, used to sync hardware.
 
void update (const EcReal time) EC_OVERRIDE
 
- Public Member Functions inherited from Ec::Plugin
virtual const EcStringpluginName () const
 Retrieve the name of this plugin.
 
virtual PluginTraits traits () const
 Retrieve the type and version number for this plugin.
 
virtual void setConfigurationString (const EcString &str)
 
virtual EcString getConfigurationString () const
 
virtual EcBoolean readConfigurationString (EcXmlReader &stream)
 
virtual EcBoolean writeConfigurationString (EcXmlWriter &stream) const
 
virtual EcBoolean shutdown ()
 
EcU32 updatePeriodInMs () const
 
EcBoolean initialized () const
 
void setExtrapolationTime (const EcReal time)
 
EcReal extrapolationTime () const
 
AsyncThreadgetThread ()
 Get a pointer to the Ec::AsyncThread class for real time manipulation.
 
virtual void setIOBuffer (IOBuffer *pBuffer)
 Set a pointer to the IO buffer.
 
virtual IOBuffergetIOBuffer ()
 Get pointer to the IO buffer.
 
virtual const IOBuffergetIOBuffer () const
 
template<EcU32 prm, typename ParamType >
EC_PLUGIN_DECL_SPEC EcBoolean setParam (const EcU32 manIndex, const EcU32 subIndex, const EcU32 subSubIndex, const ParamType &value)
 
template<EcU32 prm, typename ParamType >
EC_PLUGIN_DECL_SPEC EcBoolean setParam (const EcU32 manIndex, const EcU32 subIndex, const EcString &key, const ParamType &value)
 
template<EcU32 prm, typename ParamType >
EC_PLUGIN_DECL_SPEC EcBoolean setParam (const EcU32 manIndex, const EcU32 subIndex, const ParamType &value)
 
template<EcU32 prm, typename ParamType >
EC_PLUGIN_DECL_SPEC EcBoolean setParam (const EcU32U32PairVector &manipLinkIndexVector, const ParamType &value)
 
template<EcU32 prm, typename ParamType >
EC_PLUGIN_DECL_SPEC EcBoolean setParam (const EcU32 manIndex, const ParamType &value)
 
template<EcU32 prm, typename ParamType >
EC_PLUGIN_DECL_SPEC EcBoolean setParam (const EcString &key, const ParamType &value)
 
template<EcU32 prm, typename ParamType >
EC_PLUGIN_DECL_SPEC EcBoolean setParam (const ParamType &value)
 
template<EcU32 prm, typename ParamType >
EC_PLUGIN_DECL_SPEC EcBoolean getParam (const EcU32 manIndex, const EcU32 subIndex, const EcU32 subSubIndex, ParamType &value) const
 
template<EcU32 prm, typename ParamType >
EC_PLUGIN_DECL_SPEC EcBoolean getParam (const EcU32 manIndex, const EcU32 subIndex, const EcString &key, ParamType &value) const
 
template<EcU32 prm, typename ParamType >
EC_PLUGIN_DECL_SPEC EcBoolean getParam (const EcU32 manIndex, const EcU32 subIndex, ParamType &value) const
 
template<EcU32 prm, typename ParamType >
EC_PLUGIN_DECL_SPEC EcBoolean getParam (const EcU32U32PairVector &manipLinkIndexVector, ParamType &value) const
 
template<EcU32 prm, typename ParamType >
EC_PLUGIN_DECL_SPEC EcBoolean getParam (const EcU32 manIndex, ParamType &value) const
 
template<EcU32 prm, typename ParamType >
EC_PLUGIN_DECL_SPEC EcBoolean getParam (const EcString &key, ParamType &value) const
 
template<EcU32 prm, typename ParamType >
EC_PLUGIN_DECL_SPEC EcBoolean getParam (ParamType &value) const
 
template<EcU32 prm, typename ParamType >
EC_PLUGIN_DECL_SPEC const ParamType param () const
 
template<EcU32 prm, typename ParamType >
EC_PLUGIN_DECL_SPEC const ParamType * paramPtr () const
 
template<EcU32 prm, typename ParamType >
EC_PLUGIN_DECL_SPEC boost::shared_ptr< const ParamType > paramScopedPtr () const
 

Protected Attributes

std::ofstream m_out
 Handle to our output file.
 
- Protected Attributes inherited from Ec::Plugin
EcString m_Name
 Name of the plugin.
 
PluginTraits m_PluginTraits
 Describes the capabilities of this plugin.
 
EcU32 m_UpdatePeriodInMs
 Dictates how often this plugin gets updates.
 
EcStringVector m_RequiredPlugins
 List of plugins that this plugin depends on.
 
EcBoolean m_Initialized
 Whether the plugin initialized properly.
 
IOBufferm_pBuffer
 Internal data caching mechanism.
 
EcU32 m_StatedSystemCopyIndex
 Index of the copy of the stated system used.
 
EcReal m_ExtrapolationTime
 The delta time used for joint position extrapolation.
 
AsyncThreadm_pAsyncThread
 Asynchronous base thread.
 

Additional Inherited Members

- Public Types inherited from Ec::Plugin
enum  PluginTraitsEnum {
  TraitDefault = 0x00,
  TraitHardware = 0x01,
  TraitGUI = 0x02,
  TraitRemoteHardware = 0x04,
  TraitPermanent = 0x10,
  TraitWinPermanent = 0x20,
  TraitNoThread = 0x40,
  TraitGUIThread = 0x80,
  TraitCopySystem = 0x100,
  TraitMask = 0x1ff
}
 
typedef EcU32 PluginTraits
 
- Static Public Member Functions inherited from Ec::Plugin
static EC_PLUGIN_DECL_SPEC PlugingetPlugin (const EcString &pluginName)
 
static EC_PLUGIN_DECL_SPEC PluginfindPlugin (const EcString &pluginName)
 
- Static Public Attributes inherited from Ec::Plugin
static const EcU8 currentVersion = EC_VERSION_MAJOR
 
- Protected Member Functions inherited from Ec::Plugin
EC_PLUGIN_DECL_SPEC Plugin ()
 Constructor. Disallow public construction. Use PluginManager::loadPlugin() instead.
 
virtual EC_PLUGIN_DECL_SPEC ~Plugin ()
 
virtual void threadingStarted (EcIODataBroker *dataBroker)
 
virtual void threadsStopping (EcIODataBroker *dataBroker)
 
virtual EC_PLUGIN_DECL_SPEC EcString pluginID ()
 

Detailed Description

Plugin device driver example for creating code that will interface with Energid's viewer. It can be used for a variety of applications, from a simple data logger, to a hardware interface, to a customized GUI.

This plugin is mostly an output plugin, but it does set an initial state on startup to initialize the joint angles.

Examples:
examplePlugin.cpp.

Definition at line 24 of file examplePlugin.h.

Member Function Documentation

EcBoolean examplePlugin::init ( )
virtual

Initialize plugin. Called before first use.

Returns
EcBoolean Success or failure of reset command.

Reimplemented from Ec::Plugin.

Examples:
examplePlugin.cpp.
EcBoolean examplePlugin::reset ( )
virtual

Reset plugin. Called in viewer when a new file is loaded.

Returns
EcBoolean Success or failure of reset command.

Reimplemented from Ec::Plugin.

Examples:
examplePlugin.cpp.
void examplePlugin::update ( const EcReal  time)
virtual

This method will get called at the specified update interval.

Parameters
timeCurrent simulation time

Implements Ec::Plugin.

Examples:
examplePlugin.cpp.

The documentation for this class was generated from the following file:
Created by Energid Technologies www.energid.com
Copyright © 2016 Energid. All trademarks mentioned in this document are property of their respective owners.