18 #ifndef IGN_TRANSPORT_ADVERTISEOPTIONS_HH_
19 #define IGN_TRANSPORT_ADVERTISEOPTIONS_HH_
31 class AdvertiseOptionsPrivate;
32 class AdvertiseMessageOptionsPrivate;
33 class AdvertiseServiceOptionsPrivate;
86 public:
friend std::ostream &
operator<<(std::ostream &_out,
89 _out <<
"Advertise options:\n"
92 _out <<
"Process" << std::endl;
94 _out <<
"Host" << std::endl;
96 _out <<
"All" << std::endl;
104 public:
const Scope_t &Scope()
const;
110 public:
void SetScope(
const Scope_t &_scope);
117 public:
size_t Pack(
char *_buffer)
const;
122 public:
size_t Unpack(
const char *_buffer);
126 public:
size_t MsgLength()
const;
130 private: std::unique_ptr<AdvertiseOptionsPrivate> dataPtr;
173 _out << static_cast<AdvertiseOptions>(_other);
176 _out <<
"\tThrottled? Yes" << std::endl;
177 _out <<
"\tRate: " << _other.
MsgsPerSec() <<
" msgs/sec" << std::endl;
180 _out <<
"\tThrottled? No" << std::endl;
189 public:
bool Throttled()
const;
193 public: uint64_t MsgsPerSec()
const;
200 public:
void SetMsgsPerSec(
const uint64_t _newMsgsPerSec);
207 public:
size_t Pack(
char *_buffer)
const;
211 public:
size_t Unpack(
const char *_buffer);
215 public:
size_t MsgLength()
const;
219 private: std::unique_ptr<AdvertiseMessageOptionsPrivate> dataPtr;
261 _out << static_cast<AdvertiseOptions>(_other);
270 public:
size_t Pack(
char *_buffer)
const;
274 public:
size_t Unpack(
const char *_buffer);
278 public:
size_t MsgLength()
const;
282 private: std::unique_ptr<AdvertiseServiceOptionsPrivate> dataPtr;
Topic/service available to any subscriber (default scope).
A class for customizing the publication options for a topic advertised.
Definition: AdvertiseOptions.hh:136
bool Throttled() const
Whether the publication has been throttled.
friend std::ostream & operator<<(std::ostream &_out, const AdvertiseServiceOptions &_other)
Stream insertion operator.
Definition: AdvertiseOptions.hh:258
friend std::ostream & operator<<(std::ostream &_out, const AdvertiseOptions &_other)
Stream insertion operator.
Definition: AdvertiseOptions.hh:86
Topic/service only available to subscribers in the same process as the publisher. ...
ignition/transport/AdvertiseOptions.hh
Definition: AdvertiseOptions.hh:54
friend std::ostream & operator<<(std::ostream &_out, const AdvertiseMessageOptions &_other)
Stream insertion operator.
Definition: AdvertiseOptions.hh:170
uint64_t MsgsPerSec() const
Get the maximum number of messages per second to be published.
A class for customizing the publication options for a service advertised.
Definition: AdvertiseOptions.hh:224
#define IGNITION_TRANSPORT_VISIBLE
Use to represent "symbol visible" if supported.
Definition: Helpers.hh:57
const Scope_t & Scope() const
Get the scope used in this topic/service.
Scope_t
Definition: AdvertiseOptions.hh:37
Topic/service only available to subscribers in the same machine as the publisher. ...