A class for customizing the publication options for a topic advertised. E.g.: Set the rate of messages per second published. More...
#include <AdvertiseOptions.hh>
Public Member Functions | |
| AdvertiseMessageOptions () | |
| Constructor.   | |
| AdvertiseMessageOptions (const AdvertiseMessageOptions &_other) | |
| Copy constructor.   | |
| virtual | ~AdvertiseMessageOptions () | 
| Destructor.   | |
| uint64_t | MsgsPerSec () const | 
| Get the maximum number of messages per second to be published.   | |
| bool | operator!= (const AdvertiseMessageOptions &_other) const | 
| Inequality operator. This function checks if the given options do not have identical values to this object.   | |
| AdvertiseMessageOptions & | operator= (const AdvertiseMessageOptions &_other) | 
| Assignment operator.   | |
| bool | operator== (const AdvertiseMessageOptions &_other) const | 
| Equality operator. This function checks if the given AdvertiseMessageOptions has identical content to this object.   | |
| void | SetMsgsPerSec (const uint64_t _newMsgsPerSec) | 
| Set the maximum number of messages per second to be published. Note that we calculate the minimum period of a message based on the msgs/sec rate. Any message sent since the last Publish() and the duration of the period will be discarded.   | |
| bool | Throttled () const | 
| Whether the publication has been throttled.   | |
  Public Member Functions inherited from AdvertiseOptions | |
| AdvertiseOptions () | |
| Constructor.   | |
| AdvertiseOptions (const AdvertiseOptions &_other) | |
| Copy constructor.   | |
| virtual | ~AdvertiseOptions () | 
| Destructor.   | |
| bool | operator!= (const AdvertiseOptions &_other) const | 
| Inequality operator. This function checks if the given options do not have identical values to this object.   | |
| AdvertiseOptions & | operator= (const AdvertiseOptions &_other) | 
| Assignment operator.   | |
| bool | operator== (const AdvertiseOptions &_other) const | 
| Equality operator. This function checks if the given AdvertiseOptions has identical content to this object.   | |
| const Scope_t & | Scope () const | 
| Get the scope used in this topic/service.   | |
| void | SetScope (const Scope_t &_scope) | 
| Set the scope of the topic or service.   | |
Detailed Description
A class for customizing the publication options for a topic advertised. E.g.: Set the rate of messages per second published.
Constructor & Destructor Documentation
◆ AdvertiseMessageOptions() [1/2]
Constructor.
◆ AdvertiseMessageOptions() [2/2]
| AdvertiseMessageOptions | ( | const AdvertiseMessageOptions & | _other | ) | 
Copy constructor.
- Parameters
 - 
  
[in] _other AdvertiseMessageOptions to copy.  
◆ ~AdvertiseMessageOptions()
      
  | 
  virtual | 
Destructor.
Member Function Documentation
◆ MsgsPerSec()
| uint64_t MsgsPerSec | ( | ) | const | 
Get the maximum number of messages per second to be published.
- Returns
 - The maximum number of messages per second.
 
◆ operator!=()
| bool operator!= | ( | const AdvertiseMessageOptions & | _other | ) | const | 
Inequality operator. This function checks if the given options do not have identical values to this object.
- Parameters
 - 
  
[in] _other The options to compare against.  
- Returns
 - True if this object does not match the provided object.
 
◆ operator=()
| AdvertiseMessageOptions & operator= | ( | const AdvertiseMessageOptions & | _other | ) | 
Assignment operator.
- Parameters
 - 
  
[in] _other The other AdvertiseMessageOptions.  
- Returns
 - A reference to this instance.
 
◆ operator==()
| bool operator== | ( | const AdvertiseMessageOptions & | _other | ) | const | 
Equality operator. This function checks if the given AdvertiseMessageOptions has identical content to this object.
- Parameters
 - 
  
[in] _other The options to compare against.  
- Returns
 - True if this object matches the provided object.
 
◆ SetMsgsPerSec()
| void SetMsgsPerSec | ( | const uint64_t | _newMsgsPerSec | ) | 
Set the maximum number of messages per second to be published. Note that we calculate the minimum period of a message based on the msgs/sec rate. Any message sent since the last Publish() and the duration of the period will be discarded.
- Parameters
 - 
  
[in] _newMsgsPerSec Maximum number of messages per second.  
◆ Throttled()
| bool Throttled | ( | ) | const | 
Whether the publication has been throttled.
- Returns
 - true when the publication is throttled or false otherwise.
 
- See also
 - SetMsgsPerSec
 - MsgsPerSec
 
The documentation for this class was generated from the following file:
 Public Member Functions inherited from