Goby3  3.1.5a
2024.05.23
goby::middleware::IntervehicleSerializationSubscription< Data, scheme_id > Class Template Reference

Represents a subscription to a serialized data type (intervehicle layer). More...

#include <goby/middleware/transport/serialization_handlers.h>

Inheritance diagram for goby::middleware::IntervehicleSerializationSubscription< Data, scheme_id >:
goby::middleware::SerializationHandlerBase< intervehicle::protobuf::Header > goby::middleware::SerializationHandlerPostSelector< intervehicle::protobuf::Header >

Public Types

typedef std::function< void(std::shared_ptr< const Data > data)> HandlerType
 
- Public Types inherited from goby::middleware::SerializationHandlerBase< intervehicle::protobuf::Header >
enum  SubscriptionAction
 

Public Member Functions

 IntervehicleSerializationSubscription (HandlerType handler, const Group &group=Group(Group::broadcast_group), const Subscriber< Data > &subscriber=Subscriber< Data >())
 
std::string::const_iterator post (std::string::const_iterator b, std::string::const_iterator e, const intervehicle::protobuf::Header &header) const override
 
std::vector< char >::const_iterator post (std::vector< char >::const_iterator b, std::vector< char >::const_iterator e, const intervehicle::protobuf::Header &header) const override
 
const charpost (const char *b, const char *e, const intervehicle::protobuf::Header &header) const override
 
SerializationHandlerBase< intervehicle::protobuf::Header >::SubscriptionAction action () const override
 
const std::string & type_name () const override
 
const Groupsubscribed_group () const override
 
int scheme () const override
 
- Public Member Functions inherited from goby::middleware::SerializationHandlerBase< intervehicle::protobuf::Header >
 SerializationHandlerBase ()=default
 
virtual ~SerializationHandlerBase ()=default
 
virtual const std::string & type_name () const=0
 
virtual const Groupsubscribed_group () const=0
 
virtual int scheme () const=0
 
virtual SubscriptionAction action () const=0
 
std::thread::id thread_id () const
 
virtual std::string subscriber_id () const
 

Detailed Description

template<typename Data, int scheme_id>
class goby::middleware::IntervehicleSerializationSubscription< Data, scheme_id >

Represents a subscription to a serialized data type (intervehicle layer).

Template Parameters
DataSubscribed data type
scheme_idMarshalling scheme id (typically MarshallingScheme::MarshallingSchemeEnum).

Definition at line 204 of file serialization_handlers.h.

Member Typedef Documentation

◆ HandlerType

template<typename Data , int scheme_id>
typedef std::function<void(std::shared_ptr<const Data> data)> goby::middleware::IntervehicleSerializationSubscription< Data, scheme_id >::HandlerType

Definition at line 208 of file serialization_handlers.h.

Constructor & Destructor Documentation

◆ IntervehicleSerializationSubscription()

template<typename Data , int scheme_id>
goby::middleware::IntervehicleSerializationSubscription< Data, scheme_id >::IntervehicleSerializationSubscription ( HandlerType  handler,
const Group group = Group(Group::broadcast_group),
const Subscriber< Data > &  subscriber = Subscriber<Data>() 
)
inline

Definition at line 210 of file serialization_handlers.h.

Member Function Documentation

◆ action()

template<typename Data , int scheme_id>
SerializationHandlerBase<intervehicle::protobuf::Header>::SubscriptionAction goby::middleware::IntervehicleSerializationSubscription< Data, scheme_id >::action ( ) const
inlineoverride

Definition at line 243 of file serialization_handlers.h.

◆ post() [1/3]

template<typename Data , int scheme_id>
const char* goby::middleware::IntervehicleSerializationSubscription< Data, scheme_id >::post ( const char b,
const char e,
const intervehicle::protobuf::Header header 
) const
inlineoverride

Definition at line 236 of file serialization_handlers.h.

◆ post() [2/3]

template<typename Data , int scheme_id>
std::string::const_iterator goby::middleware::IntervehicleSerializationSubscription< Data, scheme_id >::post ( std::string::const_iterator  b,
std::string::const_iterator  e,
const intervehicle::protobuf::Header header 
) const
inlineoverride

Definition at line 221 of file serialization_handlers.h.

◆ post() [3/3]

template<typename Data , int scheme_id>
std::vector<char>::const_iterator goby::middleware::IntervehicleSerializationSubscription< Data, scheme_id >::post ( std::vector< char >::const_iterator  b,
std::vector< char >::const_iterator  e,
const intervehicle::protobuf::Header header 
) const
inlineoverride

Definition at line 229 of file serialization_handlers.h.

◆ scheme()

template<typename Data , int scheme_id>
int goby::middleware::IntervehicleSerializationSubscription< Data, scheme_id >::scheme ( ) const
inlineoverride

Definition at line 252 of file serialization_handlers.h.

◆ subscribed_group()

template<typename Data , int scheme_id>
const Group& goby::middleware::IntervehicleSerializationSubscription< Data, scheme_id >::subscribed_group ( ) const
inlineoverride

Definition at line 251 of file serialization_handlers.h.

◆ type_name()

template<typename Data , int scheme_id>
const std::string& goby::middleware::IntervehicleSerializationSubscription< Data, scheme_id >::type_name ( ) const
inlineoverride

Definition at line 250 of file serialization_handlers.h.


The documentation for this class was generated from the following file: