ADTF
cScriptRecorderClient

Interface client for adtf::streaming::ant::IRecorder. More...

Inheritance diagram for cScriptRecorderClient:
[legend]

Public Member Functions

Q_INVOKABLE void start (const QString &strFileName="")
 Starts a new recording. More...
 
Q_INVOKABLE void split (const QString &strFileName="")
 Stops an ongoing recording and starts a new one. More...
 
Q_INVOKABLE void stop (const QString &strFileName="")
 Stops an ongoing recording. More...
 
Q_INVOKABLE void addMarker (double fTimeStamp, const QString &strName="", const QString &strAdditional="")
 Adds a marker to the corrently ongoing recording. More...
 
Q_INVOKABLE void dropHistory ()
 Drops all data currently kept in the history buffer. More...
 

Properties

bool connected
 

Detailed Description

Interface client for adtf::streaming::ant::IRecorder.

Example Usage

var recorder = filter.createInterfaceClient("recorder_control", "recorder")
var input = filter.createInputPin("input")
input.sample.connect(function(sample)
{
if (sample.data.value > 10)
{
recorder.start()
}
})
filter.connected.connect(function()
{
if (!recorder.connected)
{
throw "This script requires a connected recorder"
}
})

Definition at line 38 of file interface_clients.h.

Member Function Documentation

◆ addMarker()

Q_INVOKABLE void addMarker ( double  fTimeStamp,
const QString &  strName = "",
const QString &  strAdditional = "" 
)
inline

Adds a marker to the corrently ongoing recording.

Parameters
[in]tmTimeStampThe timestamp of the marker. If -1 then the recorder will take the current stream time from the reference clock.
[in]strNameThe name of the marker.
[in]strAdditionalOptional additional string data.
Returns
Standard result.

Definition at line 79 of file interface_clients.h.

◆ dropHistory()

Q_INVOKABLE void dropHistory ( )
inline

Drops all data currently kept in the history buffer.

Returns
Standard result.

Definition at line 89 of file interface_clients.h.

◆ split()

Q_INVOKABLE void split ( const QString &  strFileName = "")
inline

Stops an ongoing recording and starts a new one.

Parameters
[in]strFileNameThe name of the newly recorded file. Can be empty, to use a default.
Returns
Standard result.

Definition at line 63 of file interface_clients.h.

◆ start()

Q_INVOKABLE void start ( const QString &  strFileName = "")
inline

Starts a new recording.

Parameters
[in]strFileNameThe name of the recorded file. Can be empty, to use a default.
Returns
Standard result.

Definition at line 55 of file interface_clients.h.

◆ stop()

Q_INVOKABLE void stop ( const QString &  strFileName = "")
inline

Stops an ongoing recording.

Parameters
[in]strFileNameA new name for the recorded file. The recorded file will be moved to this. Can be empty.
Returns
Standard result.

Definition at line 71 of file interface_clients.h.