ADTF  3.18.2
javascriptfiltersdk/src/runner.h
Go to the documentation of this file.
1 
8 /*
9  * This file depends on Qt which is licensed under LGPLv3.
10  * See ADTF_DIR/3rdparty/qt5 and doc/license for detailed information.
11  */
12 #pragma once
13 #include <adtfbase/adtf_base.h>
14 #include <QObject>
15 #include "reader.h"
16 
17 namespace adtf
18 {
19 
20 namespace javascript
21 {
22 
23 namespace scripting
24 {
25 
29 class cScriptRunner: public QObject
30 {
31  Q_OBJECT
32 
33 #ifdef DOXYGEN
34  signals:
43  void trigger(qint64 timestamp);
44 #endif
45 
46  public:
48  virtual tResult ProcessTrigger(adtf::base::tNanoSeconds tmTimeStamp) = 0;
50 };
51 
53 class cAsyncScriptRunner: public cScriptRunner
54 {
55  Q_OBJECT
56 
57  public:
58  tResult ProcessTrigger(adtf::base::tNanoSeconds tmTimeStamp) override;
59 
60  signals:
61  void trigger(qint64 timestamp);
62  void triggerProcessed(qint64 timestamp);
63 };
64 
65 class cSyncScriptRunner: public cScriptRunner
66 {
67  Q_OBJECT
68  Q_PROPERTY(QObject* trigger READ getSyncTrigger)
69 
70  public:
71  cSyncScriptRunner(QJSEngine& oEngine);
72 
73  tResult ProcessTrigger(adtf::base::tNanoSeconds tmTimeStamp) override;
74 
75  private:
76  QObject* getSyncTrigger();
77 
78  cSyncSignalRecievers m_oSyncTriggerRecievers;
79  QJSEngine& m_oEngine;
80 };
82 
83 }
84 }
85 }
Copyright © Audi Electronics Venture GmbH.
Copyright © Audi Electronics Venture GmbH.
A Runner that is returned by cScriptFilter::createRunner.
void trigger(qint64 timestamp)
Connect to this signal to handle triggers.
WRITER_TYPE & trigger(WRITER_TYPE &oWriter)
Global function template to trigger a writers sample stream manually.
Namespace for entire ADTF SDK.