10 #ifndef mm_messages_PUBLISHER_HPP_ 11 #define mm_messages_PUBLISHER_HPP_ 40 template<
typename Multiplexer>
63 void publish(
const unsigned int&
id,
const T& msg) {
66 ss <<
"id '" <<
id <<
"' has not been registered";
69 if ( !MessageRegistry::isRegisteredWithType<T>(
id) ) {
71 ss <<
"id '" <<
id <<
"' is registered, but not with this type";
77 int result = Multiplexer::send(
name,
id, buffer);
mm_messages::MessageRegistry MessageRegistry
void publish(const unsigned int &id, const T &msg)
Shunt a message off to be published.
static void encode(const T &msg, ByteArray &buffer)
static bool isRegistered(const int &id)
Template parent class for specific publishers.
Publisher(const std::string &name)
std::vector< unsigned char > ByteArray
mm_messages::ByteArray ByteArray
Short description of this file.
const ErrorFlag & flag() const