Continues migration with DDS, Common
This commit is contained in:
1 parent
9b15cee841
commit
fa48db111e
668 files changed
+111841
-2
No files matched your search
Executable
+58
@@ -0,0 +1,58 @@
|
||||
/**
|
||||
* {{ namespace_abbr_upper }} Data Topic Server Interface
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Ehrlicher, SLSE, 2016-04-07
|
||||
*/
|
||||
|
||||
{% autoescape off %}
|
||||
// filename: {{ namespace_abbr }}_dts_impl.h
|
||||
#pragma once
|
||||
|
||||
#include <QString>
|
||||
|
||||
#include <{{ include_prefix }}/{{ namespace_abbr }}_dts.h>
|
||||
#include <{{ include_prefix }}/{{ namespace_abbr }}_dts_types.h>
|
||||
#include <{{ include_prefix }}/logger.h>
|
||||
|
||||
#include <DDS/DDSConnector/dds_connector.h>
|
||||
|
||||
#if !defined(MAKE_SVC{{ namespace_abbr_upper }}SERVER_LIB)
|
||||
#error "You are not allowed to include this file in your code!"
|
||||
#endif
|
||||
|
||||
namespace {{ namespace }}
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
class DtsImpl final : public Dts
|
||||
{
|
||||
public:
|
||||
explicit DtsImpl(const std::shared_ptr<DDSConnector::DdsConnector> &ddsConnector);
|
||||
~DtsImpl();
|
||||
|
||||
bool enableAll(bool enable = true) override;
|
||||
|
||||
{% for dt in dataTopics.member %} {% if dt.dtsImpl %}
|
||||
//
|
||||
// Data Topic '{{ dt.name }}'
|
||||
//
|
||||
bool enable{{ dt.name }}(bool enable = true) override;
|
||||
bool is{{ dt.name }}Enabled() const override final { return m_dts{{ dt.name }} != nullptr; }
|
||||
bool publish(const {{ namespace }}::{{ dt.type }} &data) override;
|
||||
{% if dt.key.name %}
|
||||
bool remove{{ dt.name }}ByKey({{ dt.key.cppTypeCr }} {{ dt.key.nameFlc }}, bool errorMsgIfSampleDoesNotExists = true) override;
|
||||
{% endif %} {% endif %} {% endfor %}
|
||||
|
||||
protected:
|
||||
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
|
||||
{% for dt in dataTopics.member %} {% if dt.dtsImpl %}
|
||||
std::unique_ptr<DTS::{{ dt.name }}> m_dts{{ dt.name }};
|
||||
{% endif %} {% endfor %}
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
} // namespace Interface
|
||||
} // namespace {{ namespace }}
|
||||
{% endautoescape %}
|
||||
Reference in new issue
Block a user