# Extensions ## Invokers Most platform specific extensions are realized via special invokers. These are components that you can load via: When invoked, you can send them events via: To get an idea which parameters can be passed for invoke and send, the source as linked below is the ultimate reference. Note: Every expr attribute is subject to evaluation by the datamodel. If you want to pass a literal string with the ecmascript datamodel, you will have to 'quote' it. ### FFMPEG * [FFMPEGInvoker.cpp](https://github.com/tklab-tud/uscxml/blob/master/src/uscxml/plugins/invoker/ffmpeg/FFMPEGInvoker.cpp) ### Directory Monitor * [DirMonInvoker.cpp](https://github.com/tklab-tud/uscxml/blob/master/src/uscxml/plugins/invoker/filesystem/dirmon/DirMonInvoker.cpp) Monitors a directory for modifications.
Invoke
type dirmon
DirectoryMonitor
http://uscxml.tk.informatik.tu-darmstadt.de/#dirmon
paramexprdefaultcomment
dir A valid system directory none Anything that evaluates to a valid directory with the given datamodel
recurse "true" or "false" false Whether or not to monitor subdirectories as well.
suffix
suffixes
filename suffixes all A single or space-seperated list of suffixes of files that will get reported

Send
Will not accept anything yet.

Emitted Events
Example
'invokeid' => "dirmon.vrml"
'origintype' => "dirmon"
'origin' => "#_dirmon.vrml"
'name' => "file.existing"
'data' ...
    'file' ...
        'atime' => "1361746741"
        'ctime' => "1350452789"
        'dir' => "/Users/sradomski/data"
        'extension' => "wrl"
        'mtime' => "1328012634"
        'name' => "HARD_MP_VAL_035.wrl"
        'path' => "/Users/sradomski/data/HARD_MP_VAL_035.wrl"
        'relPath' => "/HARD_MP_VAL_035.wrl"
        'size' => "1509110"
FieldDetails
name One of file.[existing|added|deleted|modified]
data.file.dir The directory as passed per dir param to invoke.
data.file.path The full path to the file we found.
data.file.relPath The relative path starting from data.file.dir to the file we found.
data.file.size File size in bytes.
### 3D Scenegraph * [OSGInvoker.cpp](https://github.com/tklab-tud/uscxml/blob/master/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGInvoker.cpp) Accepts a simplified scenegraph XML notation as content and opens a set of windows with scenes. This invoker registers as an event listener on the XML in the content and will allow changes to the scenegraph per ecmascript. * [OSGConverter.cpp](https://github.com/tklab-tud/uscxml/blob/master/src/uscxml/plugins/invoker/graphics/openscenegraph/OSGConverter.cpp) Transfer model files into other representations and make screenshots of models. ### Heartbeat * [HeartbeatInvoker.cpp](https://github.com/tklab-tud/uscxml/blob/master/src/uscxml/plugins/invoker/heartbeat/HeartbeatInvoker.cpp) Continuously sends events.
Invoke
type heartbeat
http://uscxml.tk.informatik.tu-darmstadt.de/#heartbeat
paramexprdefaultcomment
interval e.g. '3s' or '1200ms' none A time designation as defined in CSS2
eventname The name of the event to send in the given interval Defaults to heartbeat.<interval>

Send
Will not accept anything yet.

Emitted Events
Example
'invokeid' => "heartbeat"
'origintype' => "heartbeat"
'origin' => "#_heartbeat"
'name' => "heartbeat.100ms"
'data' => "undefined"
FieldDetails
name One of file.[existing|added|deleted|modified]
data.file.dir The directory as passed per dir param to invoke.
data.file.path The full path to the file we found.
data.file.relPath The relative path starting from data.file.dir to the file we found.
data.file.size File size in bytes.
### HTTP Servlet * [HTTPServletInvoker.cpp](https://github.com/tklab-tud/uscxml/blob/master/src/uscxml/plugins/invoker/http/HTTPServletInvoker.cpp) ### SCXML * [HTTPServletInvoker.cpp](https://github.com/tklab-tud/uscxml/blob/master/src/uscxml/plugins/invoker/scxml/USCXMLInvoker.cpp) ### uMundo Publish / Subscribe * [UmundoInvoker.cpp](https://github.com/tklab-tud/uscxml/blob/master/src/uscxml/plugins/invoker/umundo/UmundoInvoker.cpp) ## Elements ### Fetch * [FetchElement.cpp](https://github.com/tklab-tud/uscxml/blob/master/src/uscxml/plugins/element/fetch/FetchElement.cpp) ### Postpone * [PostponeElement.cpp](https://github.com/tklab-tud/uscxml/blob/master/src/uscxml/plugins/element/postpone/PostponeElement.cpp) ### Response * [ResponseElement.cpp](https://github.com/tklab-tud/uscxml/blob/master/src/uscxml/plugins/element/response/ResponseElement.cpp) ## IO Processors ### BasicHTTP * [EventIOProcessor.cpp](https://github.com/tklab-tud/uscxml/blob/master/src/uscxml/plugins/ioprocessor/basichttp/libevent/EventIOProcessor.cpp)