15 #ifndef DDL_MAPPING_RT_SOURCE_HEADER
16 #define DDL_MAPPING_RT_SOURCE_HEADER
19 #include <ddl/codec/codec_factory.h>
30 struct AssignmentStruct {
33 uintptr_t element_ptr_offset;
35 AssignmentStruct() : buffer_size(0), type32(0), element_ptr_offset(static_cast<uintptr_t>(-1))
39 bool operator==(
const AssignmentStruct& other)
const
41 return (element_ptr_offset == other.element_ptr_offset);
62 #if defined(__GNUC__) && (__GNUC__ == 5) && defined(__QNX__)
63 #pragma GCC diagnostic ignored \
69 typedef std::vector<std::pair<AssignmentStruct, TargetElementList>> Assignments;
70 typedef std::vector<std::pair<TriggerBase*, AssignmentStruct>> Triggers;
71 typedef std::vector<uint8_t> MemoryBuffer;
72 typedef std::set<const Target*> TargetRefList;
75 #if defined(__GNUC__) && (__GNUC__ == 5) && defined(__QNX__)
76 #pragma GCC diagnostic warning \
111 const std::string& type_description);
121 const std::string& source_element,
163 std::string _type_name;
164 std::string _type_description;
165 Assignments _assignments;
166 TargetRefList _targets;
167 std::unique_ptr<ddl::codec::CodecFactory> _codec_factory;
A common result class usable as return value throughout.
MapConfiguration is the central class of the mapping::dd namespace.
MapSource represents a mapping source from the configuration file.
Mapping environment interface class This in combination with ISignalListener forms the functionality ...
Signal listener interface class.
const std::string & getTypeName() const
Getter for the source type.
a_util::result::Result create(const mapping::MapSource &map_source, const std::string &type_description)
Creation method to fill the object with data.
a_util::result::Result addTrigger(const MapConfiguration &map_config, TriggerBase *trigger)
Method to add a new trigger to the intern trigger list.
a_util::result::Result removeAssignmentsFor(const Target *target)
Method to remove all elements of a target from the intern assignment list.
const Assignments & getAssigmentList() const
Getter for the assignment list.
a_util::result::Result addAssignment(const ddl::mapping::MapConfiguration &map_config, const std::string &source_element, TargetElement *target_element)
Method to add a new pair of source element and target element to the intern assignment list.
Source & operator=(const Source &)=delete
no copy assignment operator
Source(IMappingEnvironment &env)
CTOR.
a_util::result::Result onSampleReceived(const void *data, size_t size)
Method to handle a sample when it is received.
Source(const Source &)=delete
no copy CTOR
TargetElement represents a single signal element in the target.
Target represents a mapped target signal in the runtime api.
base class representing a trigger
void * handle_t
Type of a handle value.
WRITER_TYPE & trigger(WRITER_TYPE &oWriter)
Global function template to trigger a writers sample stream manually.
std::vector< TargetElement * > TargetElementList
the targets element list
std::map< std::string, Source * > SourceMap
Public composite types used in the mapping::rt namespace.
bool operator==(const MapAssignment &a, const MapAssignment &b)
compares the Assignments
std::map< std::string, uint8_t > TypeMap
String -> Datatype Enum Map.
definition of the ddl namespace
Common include for component a_util::result.