DDS QoS - TRANSPORT_PRIORITY

https://download.csdn.net/download/eidolon_foot/12568768

15. TRANSPORT_PRIORITY
 
OpenDDS Developer's Guide(OpenDDS Version 3.14)
 
The TRANSPORT_PRIORITY policy applies to topic and data writer entities via the transport_priority member of their respective QoS policy structures. Below is the IDL related to the TransportPriority QoS policy:
TRANSPORT_PRIORITY策略通过其各自的QoS策略结构的transport_priority成员应用于主题和数据写入者实体。 以下是与TransportPriority QoS策略相关的IDL:
struct TransportPriorityQosPolicy {
long value;
};
The default value member of transport_priority is zero. This policy is considered a hint to the transport layer to indicate at what priority to send messages. Higher values indicate higher priority. OpenDDS maps the priority value directly onto thread and DiffServ codepoint values. A default priority of zero will not modify either threads or codepoints in messages.
transport_priority的默认值成员为零。 该策略被认为是对传输层的提示,用于指示以什么优先级发送消息。 较高的值表示较高的优先级。 OpenDDS将优先级值直接映射到线程和DiffServ代码点值。 默认优先级为零将不会修改消息中的线程或代码点。
OpenDDS will attempt to set the thread priority of the sending transport as well as any associated receiving transport. Transport priority values are mapped from zero (default) through the maximum thread priority linearly without scaling. If the lowest thread priority is different from zero, then it is mapped to the transport priority value of zero. Where priority values on a system are inverted (higher numeric values are lower priority), OpenDDS maps these to an increasing priority value starting at zero. Priority values lower than the minimum (lowest) thread priority on a system are mapped to that lowest priority. Priority values greater than the maximum (highest) thread priority on a system are mapped to that highest priority. On most systems, thread priorities can only be set when the process scheduler has been set to allow these operations. Setting the process scheduler is generally a privileged operation and will require system privileges to perform. On POSIX based systems, the system calls of sched_get_priority_min() and sched_get_priority_max() are used to determine the system range of thread priorities.
OpenDDS将尝试设置发送传输以及任何关联的接收传输的线程优先级。传输优先级值从零(默认值)到最大线程优先级线性映射而不进行缩放。如果最低线程优先级不同于零,那么它将映射到传输优先级值零。如果系统上的优先级值是相反的(较高的数字值表示较低的优先级),则OpenDDS会将其映射到从零开始的递增优先级值。低于系统上最小(最低)线程优先级的优先级值将映射到该最低优先级。大于系统上最大(最高)线程优先级的优先级值将映射到该最高优先级。在大多数系统上,只有在将进程调度程序设置为允许这些操作时才能设置线程优先级。设置进程调度程序通常是一项特权操作,并且需要系统特权才能执行。在基于POSIX的系统上,系统调用sched_get_priority_min()和sched_get_priority_max()用于确定线程优先级的系统范围。
OpenDDS will attempt to set the DiffServ codepoint on the socket used to send data for the data writer if it is supported by the transport implementation. If the network hardware honors the codepoint values, higher codepoint values will result in better (faster) transport for higher priority samples. The default value of zero will be mapped to the (default) codepoint of zero. Priority values from 1 through 63 are then mapped to the corresponding codepoint values, and higher priority values are mapped to the highest codepoint value (63).
如果传输实现支持,OpenDDS将尝试在套接字上设置DiffServ代码点,该代码点用于为数据写入器发送数据。 如果网络硬件接受代码点值,则更高的代码点值将导致更高优先级样本的更好(更快)传输。 默认值零将映射到零的(默认)代码点。 然后将从1到63的优先级值映射到相应的代码点值,并将更高的优先级值映射到最高代码点值(63)。
OpenDDS does not currently support modifications of the transport_priority policy values after creation of the data writer. This can be worked around by creating new data writers as different priority values are required.
创建数据写入器后,OpenDDS当前不支持对transport_priority策略值的修改。 可以通过创建新的数据写入器来解决此问题,因为需要不同的优先级值。
 
Data Distribution Service Version 1.4( formal/2015-04-10)
 
The purpose of this QoS is to allow the application to take advantage of transports capable of sending messages with different priorities.
此QoS的目的是允许应用程序利用能够发送具有不同优先级的消息的传输机制。
This policy is considered a hint. The policy depends on the ability of the underlying transports to set a priority on the messages they send. Any value within the range of a 32-bit signed integer may be chosen; higher values indicate higher priority.
该政策被认为是提示。 该策略取决于基础传输对它们发送的消息设置优先级的能力。 可以选择32位有符号整数范围内的任何值。 较高的值表示较高的优先级。
However, any further interpretation of this policy is specific to a particular transport and a particular implementation of the Service. For example, a particular transport is permitted to treat a range of priority values as equivalent to one another. It is expected that during transport configuration the application would provide a mapping between the values of the TRANSPORT_PRIORITY set on DataWriter and the values meaningful to each transport. This mapping would then be used by the infrastructure when propagating the data written by the DataWriter .
但是,对此政策的任何进一步解释都特定于服务的特定运输和特定实施。 例如,允许一种特定的传输将一系列优先级值视为等同。 预期在传输配置期间,应用程序将提供DataWriter上设置的TRANSPORT_PRIORITY的值与对每个传输有意义的值之间的映射。 然后,在传播由DataWriter写入的数据时,基础结构将使用此映射。

你可能感兴趣的:(DDS)