Public Member Functions | Private Member Functions | Private Attributes
ScriptHost Class Reference

#include <ScriptHost.h>

List of all members.

Public Member Functions

AddScriptResponse addScript (string sourceCode)
void deleteScript (string scriptName)
vector< DiagnosticStatusPtrgetDiagnosticStatusesAndClear ()
set< PythonScriptPtrgetScripts ()
 ScriptHost ()
void start ()
void stop ()
virtual ~ScriptHost ()

Private Member Functions

void addDiagnosticStatus (PythonScriptPtr script)
PythonScriptPtr getScript (string scriptName)
bool hasAllTopicValues (PythonScriptPtr script)
bool isExecutionTime (PythonScriptPtr script)
bool prepareScript (PythonScript &script)
void run ()
bool scriptExists (string scriptName)

Private Attributes

vector< DiagnosticStatusPtr_diagnosticStatuses
ScriptExecuter _executer
double _executionInterval
set< PythonScriptPtr_scripts
boost::recursive_mutex _scriptsMutex
boost::recursive_mutex _statusesMutex
boost::shared_ptr< boost::thread > _workThread

Detailed Description

Definition at line 34 of file ScriptHost.h.


Constructor & Destructor Documentation

Definition at line 10 of file ScriptHost.cpp.

ScriptHost::~ScriptHost ( ) [virtual]

Definition at line 16 of file ScriptHost.cpp.


Member Function Documentation

Definition at line 162 of file ScriptHost.cpp.

AddScriptResponse ScriptHost::addScript ( string  sourceCode)

Create predicate script from the source code

Convert to python script, simulate execution to extract used topic names

Add used topics to listener

Definition at line 22 of file ScriptHost.cpp.

void ScriptHost::deleteScript ( string  scriptName)

Definition at line 150 of file ScriptHost.cpp.

Definition at line 182 of file ScriptHost.cpp.

PythonScriptPtr ScriptHost::getScript ( string  scriptName) [private]

Definition at line 197 of file ScriptHost.cpp.

Definition at line 191 of file ScriptHost.cpp.

bool ScriptHost::hasAllTopicValues ( PythonScriptPtr  script) [private]

Definition at line 209 of file ScriptHost.cpp.

bool ScriptHost::isExecutionTime ( PythonScriptPtr  script) [private]

Definition at line 141 of file ScriptHost.cpp.

bool ScriptHost::prepareScript ( PythonScript script) [private]

Extracts used topics, validations, internal function etc...

Definition at line 79 of file ScriptHost.cpp.

void ScriptHost::run ( ) [private]

Definition at line 96 of file ScriptHost.cpp.

bool ScriptHost::scriptExists ( string  scriptName) [private]

Definition at line 219 of file ScriptHost.cpp.

Definition at line 125 of file ScriptHost.cpp.

void ScriptHost::stop ( )

Definition at line 134 of file ScriptHost.cpp.


Member Data Documentation

Definition at line 60 of file ScriptHost.h.

Definition at line 56 of file ScriptHost.h.

Scripts execution check interval in seconds

Definition at line 53 of file ScriptHost.h.

Definition at line 55 of file ScriptHost.h.

boost::recursive_mutex ScriptHost::_scriptsMutex [private]

Definition at line 58 of file ScriptHost.h.

boost::recursive_mutex ScriptHost::_statusesMutex [private]

Definition at line 59 of file ScriptHost.h.

boost::shared_ptr<boost::thread> ScriptHost::_workThread [private]

Definition at line 54 of file ScriptHost.h.


The documentation for this class was generated from the following files:


scriptable_monitor
Author(s):
autogenerated on Wed Aug 26 2015 16:21:30