VLink 2.0.0
A high-performance communication middleware
载入中...
搜索中...
未找到
vlink::ProxyServer类 参考

VLink proxy server daemon backed by a MessageLoop. 更多...

#include <proxy_server.h>

类 vlink::ProxyServer 继承关系图:
vlink::ProxyServer 的协作图:

struct  Config
 Construction-time configuration for ProxyServer. 更多...

Public 成员函数

 ProxyServer (const Config &config)
 Constructs a ProxyServer and initialises all subsystems.
 ~ProxyServer () override
 Destructor.

Protected 成员函数

size_t get_max_task_count () const override
 Returns the maximum queue depth.
uint32_t get_max_elapsed_time () const override
 Returns the maximum allowed task execution time in milliseconds.
void on_begin () override
 Called from the loop thread just before the first task is processed.
void on_end () override
 Called from the loop thread just after the last task has been processed.

额外继承的成员函数

 Queue implementation type. 更多...
 Idle strategy controlling CPU and latency trade-offs. 更多...
 Pre-defined task priority levels for kPriorityType loops. 更多...

详细描述

VLink proxy server daemon backed by a MessageLoop.

Manages all DDS/SHM channels, a DiscoveryViewer, heartbeat timers, and optional runnable plugins. Only one instance may exist per process. Use async_run() (inherited from MessageLoop) to start the event loop.

构造及析构函数说明

◆ ProxyServer()

vlink::ProxyServer::ProxyServer ( const Config & config)
explicit

Constructs a ProxyServer and initialises all subsystems.

Performs the following steps in order:

  1. Checks the process-global singleton guard; logs a fatal message and returns early if another instance already exists.
  2. Reads the VLINK_INTRA_BIND environment variable.
  3. If config.use_iox is true, calls init_shm_roudi() to start an embedded Iceoryx RouDi process.
  4. Calls init_server() to create all DDS/SHM channels, subscribe to Control messages, and start the 1-second time_timer and info_timer on the DiscoveryViewer's loop.
  5. Calls init_runnable() to load all plugins listed in config.runnable_list.
参数
configServer configuration. See Config for field details.
注解
The constructor does not start the MessageLoop; call async_run() (or run()) separately.
这是这个函数的调用关系图:

◆ ~ProxyServer()

vlink::ProxyServer::~ProxyServer ( )
override

Destructor.

Stops and waits for the MessageLoop, all runnable plugins, the DiscoveryViewer, and all DDS handles in a deterministic teardown sequence. Also marks the singleton guard so future constructions in the same process behave correctly.

成员函数说明

◆ get_max_elapsed_time()

uint32_t vlink::ProxyServer::get_max_elapsed_time ( ) const
overrideprotectedvirtual

Returns the maximum allowed task execution time in milliseconds.

When a task exceeds this duration, on_task_timeout() is called. Returns 0 to disable timeout checking.

返回
Maximum execution time in ms.

重载 vlink::MessageLoop .

◆ get_max_task_count()

size_t vlink::ProxyServer::get_max_task_count ( ) const
overrideprotectedvirtual

Returns the maximum queue depth.

返回
kMaxTaskSize (10000) by default.

重载 vlink::MessageLoop .

◆ on_begin()

void vlink::ProxyServer::on_begin ( )
overrideprotectedvirtual

Called from the loop thread just before the first task is processed.

Override in subclasses to perform per-thread initialisation.

重载 vlink::MessageLoop .

◆ on_end()

void vlink::ProxyServer::on_end ( )
overrideprotectedvirtual

Called from the loop thread just after the last task has been processed.

Override in subclasses to perform per-thread cleanup.

重载 vlink::MessageLoop .

函数调用图:

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