ADTF  3.18.3
mapping_environment_intf.h
Go to the documentation of this file.
1 
14 #ifndef MAPPINGENVIRONMENT_HEADER
15 #define MAPPINGENVIRONMENT_HEADER
16 
17 #include <a_util/result.h>
18 
19 namespace ddl {
20 namespace mapping {
21 namespace rt {
24 public:
26  virtual ~ISignalListener();
27 
36  virtual a_util::result::Result onSampleReceived(const void* data, size_t size) = 0;
37 };
38 
41 public:
43  virtual ~IPeriodicListener();
44 
50  virtual void onTimer(timestamp_t now) = 0;
51 };
52 
57 public:
60 
71  virtual a_util::result::Result registerSource(const char* source_name,
72  const char* type_name,
73  ISignalListener* listener,
74  handle_t& handle) = 0;
75 
84 
95  const void* data,
96  size_t size,
97  timestamp_t time_stamp) = 0;
98 
110  virtual a_util::result::Result targetMapped(const char* target_name,
111  const char* target_type,
112  handle_t target,
113  size_t target_size) = 0;
114 
124  virtual a_util::result::Result targetUnmapped(const char* target_name, handle_t target) = 0;
125 
132  virtual a_util::result::Result resolveType(const char* type_name,
133  const char*& type_description) = 0;
134 
141  virtual timestamp_t getTime() const = 0;
142 
150  IPeriodicListener* listener) = 0;
151 
159  IPeriodicListener* listener) = 0;
160 };
161 
162 } // namespace rt
163 } // namespace mapping
164 } // namespace ddl
165 #endif // MAPPINGENVIRONMENT_HEADER
A common result class usable as return value throughout.
Mapping environment interface class This in combination with ISignalListener forms the functionality ...
virtual a_util::result::Result unregisterSource(handle_t handle)=0
Method to unregister a source signal.
virtual a_util::result::Result registerSource(const char *source_name, const char *type_name, ISignalListener *listener, handle_t &handle)=0
Method to register a source signal.
virtual a_util::result::Result sendTarget(handle_t target, const void *data, size_t size, timestamp_t time_stamp)=0
Method to send a target signal.
virtual a_util::result::Result targetMapped(const char *target_name, const char *target_type, handle_t target, size_t target_size)=0
targetMapped is invoked by the mapping engine upon the creation of a mapping.
virtual timestamp_t getTime() const =0
getTime is used by the mapping engine to get the current time.
virtual a_util::result::Result targetUnmapped(const char *target_name, handle_t target)=0
targetUnmapped is invoked by the mapping engine upon the destruction of a mapping.
virtual a_util::result::Result resolveType(const char *type_name, const char *&type_description)=0
Method to get the ddl description for a type.
virtual a_util::result::Result unregisterPeriodicTimer(timestamp_t period_us, IPeriodicListener *listener)=0
registerPeriodicTimer is used by the mapping engine to unregister periodic timers
virtual a_util::result::Result registerPeriodicTimer(timestamp_t period_us, IPeriodicListener *listener)=0
registerPeriodicTimer is used by the mapping engine to register periodic timers
virtual void onTimer(timestamp_t now)=0
onTimer is to be called by the mapping environment periodically.
Signal listener interface class.
virtual a_util::result::Result onSampleReceived(const void *data, size_t size)=0
onSampleReceived is to be called by the mapping environment upon receiving a sample on a registered s...
std::int64_t timestamp_t
Type of a timestamp value. If not otherwise stated, always in microseconds.
Common include for component a_util::result.