Callback helper Template.  
 More...
#include <transport/transport.hh>
Inherits CallbackHelper.
 | 
| bool  | latching | 
|   | True means that the callback helper will get the last published message on the topic.  More...
  | 
|   | 
| std::mutex  | latchingMutex | 
|   | Mutex to protect the latching variable.  More...
  | 
|   | 
template<class M>
class gazebo::transport::CallbackHelperT< M >
Callback helper Template. 
 
§ CallbackHelperT()
  
  
      
        
          | CallbackHelperT  | 
          ( | 
          const boost::function< void(const boost::shared_ptr< M const > &)> &  | 
          _cb,  | 
         
        
           | 
           | 
          bool  | 
          _latching = false  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Constructor. 
- Parameters
 - 
  
    | [in] | _cb | boost function to call on incoming messages  | 
    | [in] | _latching | Set to true to make the callback helper latching.  | 
  
   
 
 
§ GetId()
  
  
      
        
          | unsigned int GetId  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inherited   | 
  
 
Get the unique ID of this callback. 
- Returns
 - The unique ID of this callback. 
 
 
 
§ GetLatching()
  
  
      
        
          | bool GetLatching  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inherited   | 
  
 
Is the callback latching? 
- Returns
 - true if the callback is latching, false otherwise 
 
 
 
§ GetMsgType()
  
  
      
        
          | std::string GetMsgType  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlinevirtual   | 
  
 
Get the typename of the message that is handled. 
- Returns
 - String representation of the message type 
 
Reimplemented from CallbackHelper.
References gzthrow, and NULL.
 
 
§ HandleData()
  
  
      
        
          | virtual bool HandleData  | 
          ( | 
          const std::string &  | 
          _newdata,  | 
         
        
           | 
           | 
          boost::function< void(uint32_t)>  | 
          _cb,  | 
         
        
           | 
           | 
          uint32_t  | 
          _id  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlinevirtual   | 
  
 
Process new incoming data. 
- Parameters
 - 
  
    | [in] | _newdata | Incoming data to be processed  | 
  
   
- Returns
 - true if successfully processed; false otherwise 
 
- Parameters
 - 
  
    | [in] | _cb | If non-null, callback to be invoked which signals that transmission is complete.  | 
    | [in] | _id | ID associated with the message data.  | 
  
   
Implements CallbackHelper.
References CallbackHelper::SetLatching().
 
 
§ HandleMessage()
§ IsLocal()
  
  
      
        
          | virtual bool IsLocal  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlinevirtual   | 
  
 
Is the callback local? 
- Returns
 - true if the callback is local, false if the callback is tied to a remote connection 
 
Implements CallbackHelper.
 
 
§ SetLatching()
  
  
      
        
          | void SetLatching  | 
          ( | 
          bool  | 
          _latch | ) | 
           | 
         
       
   | 
  
inherited   | 
  
 
 
§ latching
True means that the callback helper will get the last published message on the topic. 
 
 
§ latchingMutex
  
  | 
      
   | 
  
mutableprotectedinherited   | 
  
 
Mutex to protect the latching variable. 
 
 
The documentation for this class was generated from the following file: