|
VLink 2.0.0
A high-performance communication middleware
|
Type-safe event-model subscriber for VLink topics. More...
#include <functional>#include <memory>#include <string>#include "./impl/subscriber_impl.h"#include "./node.h"#include "./internal/subscriber-inl.h"Go to the source code of this file.
Classes | |
| class | vlink::Subscriber< MsgT, SecT > |
| Type-safe subscriber for the VLink event communication model. More... | |
| class | vlink::SecuritySubscriber< MsgT > |
Convenience alias for Subscriber with message security enabled. More... | |
Namespaces | |
| namespace | vlink |
Type-safe event-model subscriber for VLink topics.
Subscriber<MsgT, SecT> is the read side of the VLink event model. It registers a callback that is invoked with each deserialized MsgT message delivered from any matching Publisher on the same URL.
| Category | Type | Serializer |
|---|---|---|
| Raw bytes | Bytes | kBytesType |
| Protobuf | MyProto (MessageLite) | kProtoType |
| Protobuf ptr | MyProto* (Arena-managed) | kProtoPtrType |
| FlatBuffers | MyTableT (NativeTable) | kFlatTableType |
| FlatBuffers | MyTable* (Table ptr) | kFlatPtrType |
| CDR (DDS only) | MyCdrType | kCdrType |
| Standard layout | POD struct / trivial type | kStandardType |
| String | std::string | kStringType |
| Custom | T (has operator>>/<<) | kCustomType |
MsgT is a shared pointer type whose element_type derives from IntraDataType (generated via VLINK_INTRA_DATA_DECLARE) and the URL uses intra://, the shared pointer is forwarded zero-copy (no serialization): listen() more than once is a fatal error. The subscriber must be initialised before listen() is called.| MsgT | Message type. Must satisfy Serializer::is_supported(). |
| SecT | Security mode; defaults to SecurityType::kWithoutSecurity. |