aboutsummaryrefslogtreecommitdiffstats
path: root/signal-composer-binding/source.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'signal-composer-binding/source.cpp')
-rw-r--r--signal-composer-binding/source.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/signal-composer-binding/source.cpp b/signal-composer-binding/source.cpp
index 5989dac..d1b2120 100644
--- a/signal-composer-binding/source.cpp
+++ b/signal-composer-binding/source.cpp
@@ -21,8 +21,11 @@
SourceAPI::SourceAPI()
{}
-SourceAPI::SourceAPI(const std::string& api, const std::string& info, CtlActionT* init, CtlActionT* getSignals):
- api_(api), info_(info), init_(init), getSignals_(getSignals)
+SourceAPI::SourceAPI(const std::string& api, const std::string& info, CtlActionT* init, CtlActionT* getSignals, CtlActionT* onReceived, int retention):api_(api),
+ info_(info),
+ init_(init),
+ getSignals_(getSignals),
+ signalsDefault_({onReceived, retention})
{}
int SourceAPI::init()
@@ -40,6 +43,11 @@ std::string SourceAPI::api() const
return api_;
}
+const struct signalsDefault& SourceAPI::signalsDefault() const
+{
+ return signalsDefault_;
+}
+
void SourceAPI::addSignal(const std::string& id, const std::string& event, std::vector<std::string>& depends, int retention, const std::string& unit, double frequency, CtlActionT* onReceived, json_object* getSignalsArgs)
{
std::shared_ptr<Signal> sig = std::make_shared<Signal>(id, event, depends, unit, retention, frequency, onReceived, getSignalsArgs);