I have two publishers which can publish the data with same domain id's but different topics. Now can i have a single subscriber with same domain id(publishers) having single topic with multiple types and access the data sending by the publishers.
Example:
publisher 1: publisher 2: subscriber 1:
struct temp { struct press{ struct both {
float temperature; double pressure; float temperature;
}; }; double pressure;
};
You can. This is a possible way to model that:
The annotation @mutable allows the most flexible type evolution, which includes removing or adding members in any position. The @autoid annotation generates identifiers for each member automatically based on their name. The @optional annotation changes the binding of that member into the programming language so you can know if the member was received or not (for example, in C it makes temperature and pressure pointers, so if they're NULL you know they were not received).
Note that both publishers and the subscriber will need to use the same topic name.