VLink  2.0.0
A high-performance communication middleware
vlink::SecurityPublisher< MsgT > 模板类 参考

Convenience alias of Publisher with per-message security enabled. 更多...

#include <publisher.h>

类 vlink::SecurityPublisher< MsgT > 继承关系图:
vlink::SecurityPublisher< MsgT > 的协作图:

Public 类型

using UniquePtr = std::unique_ptr< SecurityPublisher< MsgT > >
 Owning unique-pointer alias. 更多...
 
using SharedPtr = std::shared_ptr< SecurityPublisher< MsgT > >
 Owning shared-pointer alias. 更多...
 

Public 成员函数

template<typename ConfT , typename SecurityConfigT = Security::Config, typename = std::enable_if_t<std::is_base_of_v<Conf, ConfT>>>
 SecurityPublisher (const ConfT &conf, SecurityConfigT &&sec_cfg={}, InitType type=InitType::kWithInit)
 Constructs a SecurityPublisher from a typed configuration object. 更多...
 
template<typename SecurityConfigT = Security::Config>
 SecurityPublisher (const std::string &url_str, SecurityConfigT &&sec_cfg={}, InitType type=InitType::kWithInit)
 Constructs a SecurityPublisher from a URL string. 更多...
 

静态 Public 成员函数

template<typename SecurityConfigT = Security::Config>
static UniquePtr create_unique (const std::string &url_str, SecurityConfigT &&sec_cfg={}, InitType type=InitType::kWithInit)
 Heap-allocates a SecurityPublisher and wraps it in a std::unique_ptr. 更多...
 
template<typename SecurityConfigT = Security::Config>
static SharedPtr create_shared (const std::string &url_str, SecurityConfigT &&sec_cfg={}, InitType type=InitType::kWithInit)
 Heap-allocates a SecurityPublisher and wraps it in a std::shared_ptr. 更多...
 

额外继承的成员函数

详细描述

template<typename MsgT>
class vlink::SecurityPublisher< MsgT >

Convenience alias of Publisher with per-message security enabled.

Equivalent to Publisher<MsgT, SecurityType::kWithSecurity>. Every outgoing payload is encrypted with the configured Security::Config before transmission; an empty config falls back to the built-in default symmetric slot.

注解
Security is not supported on intra:// or on dds:// CDR payloads – using a SecurityPublisher in those configurations is a constructor-time fatal.
模板参数
MsgTC++ message type to publish.

成员类型定义说明

◆ SharedPtr

template<typename MsgT >
using vlink::SecurityPublisher< MsgT >::SharedPtr = std::shared_ptr<SecurityPublisher<MsgT> >

Owning shared-pointer alias.

◆ UniquePtr

template<typename MsgT >
using vlink::SecurityPublisher< MsgT >::UniquePtr = std::unique_ptr<SecurityPublisher<MsgT> >

Owning unique-pointer alias.

构造及析构函数说明

◆ SecurityPublisher() [1/2]

template<typename MsgT >
template<typename ConfT , typename SecurityConfigT , typename >
vlink::SecurityPublisher< MsgT >::SecurityPublisher ( const ConfT &  conf,
SecurityConfigT &&  sec_cfg = {},
InitType  type = InitType::kWithInit 
)
inlineexplicit

Constructs a SecurityPublisher from a typed configuration object.

Constructs the base Publisher in kWithoutInit mode, installs sec_cfg via enable_security(), then runs init() unless deferred. If enable_security() fails to populate a usable security object the subsequent init() will fail.

模板参数
ConfTConfiguration type derived from Conf.
SecurityConfigTForwardable Security::Config compatible type.
参数
confPopulated configuration aggregate.
sec_cfgSecurity configuration; empty uses the default symmetric slot.
typeWhether to call init() inline; default is InitType::kWithInit.

◆ SecurityPublisher() [2/2]

template<typename MsgT >
template<typename SecurityConfigT >
vlink::SecurityPublisher< MsgT >::SecurityPublisher ( const std::string &  url_str,
SecurityConfigT &&  sec_cfg = {},
InitType  type = InitType::kWithInit 
)
inlineexplicit

Constructs a SecurityPublisher from a URL string.

模板参数
SecurityConfigTForwardable Security::Config compatible type.
参数
url_strTopic URL string.
sec_cfgSecurity configuration; empty uses the default symmetric slot.
typeWhether to call init() inline; default is InitType::kWithInit.

成员函数说明

◆ create_shared()

template<typename MsgT >
template<typename SecurityConfigT >
SecurityPublisher< MsgT >::SharedPtr vlink::SecurityPublisher< MsgT >::create_shared ( const std::string &  url_str,
SecurityConfigT &&  sec_cfg = {},
InitType  type = InitType::kWithInit 
)
inlinestatic

Heap-allocates a SecurityPublisher and wraps it in a std::shared_ptr.

模板参数
SecurityConfigTForwardable Security::Config compatible type.
参数
url_strTopic URL string.
sec_cfgSecurity configuration; empty uses the default symmetric slot.
typeWhether to call init() inline; default is InitType::kWithInit.
返回
Owning SharedPtr to the new secure publisher.

◆ create_unique()

template<typename MsgT >
template<typename SecurityConfigT >
SecurityPublisher< MsgT >::UniquePtr vlink::SecurityPublisher< MsgT >::create_unique ( const std::string &  url_str,
SecurityConfigT &&  sec_cfg = {},
InitType  type = InitType::kWithInit 
)
inlinestatic

Heap-allocates a SecurityPublisher and wraps it in a std::unique_ptr.

模板参数
SecurityConfigTForwardable Security::Config compatible type.
参数
url_strTopic URL string.
sec_cfgSecurity configuration; empty uses the default symmetric slot.
typeWhether to call init() inline; default is InitType::kWithInit.
返回
Owning UniquePtr to the new secure publisher.

该类的文档由以下文件生成: