VLink  2.0.0
A high-performance communication middleware
status_detail.h 文件参考

Concrete Status event structs carrying DDS-style counters, handles, and reason codes. 更多...

#include <cstdint>
#include <string>
#include "./status.h"
status_detail.h 的引用(Include)关系图:

浏览源代码.

struct  vlink::Status::PublicationMatched
 Writer-side event raised when a matching subscriber appears or disappears. 更多...
 
struct  vlink::Status::OfferedDeadlineMissed
 Writer-side event raised when the writer fails to publish within its offered deadline. 更多...
 
struct  vlink::Status::OfferedIncompatibleQos
 Writer-side event raised when a subscriber is rejected for incompatible QoS. 更多...
 
struct  vlink::Status::LivelinessLost
 Writer-side event raised when the liveliness lease lapses without assertion. 更多...
 
struct  vlink::Status::SubscriptionMatched
 Reader-side event raised when a matching publisher appears or disappears. 更多...
 
struct  vlink::Status::RequestedDeadlineMissed
 Reader-side event raised when the reader does not receive data within its requested deadline. 更多...
 
struct  vlink::Status::LivelinessChanged
 Reader-side event raised when the liveliness of a matched publisher changes. 更多...
 
struct  vlink::Status::SampleRejected
 Reader-side event raised when an inbound sample is dropped due to a resource limit. 更多...
 
struct  vlink::Status::RequestedIncompatibleQos
 Reader-side event raised when a publisher is rejected for incompatible QoS. 更多...
 
struct  vlink::Status::SampleLost
 Reader-side event raised when a sample is lost between writer and reader. 更多...
 

命名空间

 
 

详细描述

Concrete Status event structs carrying DDS-style counters, handles, and reason codes.

Each struct here implements one entry in Status::Type and exposes the precise fields the matching DDS event provides. Counter fields cover lifetime totals and per-notification deltas so user code can decide whether to react. Handles point at the most recently affected peer or instance and follow the opaque InstanceHandle protocol described in status.h.

Detail fields by event
Event Counter fields Handle / reason field
PublicationMatched total / current count + deltas last_subscription_handle
OfferedDeadlineMissed total_count, total_count_change last_instance_handle
OfferedIncompatibleQos total_count, total_count_change last_policy_id
LivelinessLost total_count, total_count_change -
SubscriptionMatched total / current count + deltas last_publication_handle
RequestedDeadlineMissed total_count, total_count_change last_instance_handle
LivelinessChanged alive / not-alive count + deltas last_publication_handle
SampleRejected total_count, total_count_change last_reason + handle
RequestedIncompatibleQos total_count, total_count_change last_policy_id
SampleLost total_count, total_count_change -
Example
sub->register_status_callback([](vlink::Status::BasePtr status) {
if (status->get_type() == vlink::Status::kSampleRejected) {
auto detail = status->as<vlink::Status::SampleRejected>();
if (detail->last_reason == vlink::Status::SampleRejected::kRejectedBySamplesLimit) {
VLOG_W("rejected: queue full, total=", detail->total_count);
}
}
});