Skip to content
This repository has been archived by the owner on Jun 21, 2023. It is now read-only.

Commit

Permalink
Added system default QoS profile
Browse files Browse the repository at this point in the history
  • Loading branch information
esteve committed Aug 19, 2015
1 parent b922e8c commit d9538a3
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
16 changes: 16 additions & 0 deletions rmw_connext_cpp/src/functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,8 @@ rmw_create_publisher(
case RMW_QOS_POLICY_KEEP_ALL_HISTORY:
datawriter_qos.history.kind = DDS_KEEP_ALL_HISTORY_QOS;
break;
case RMW_QOS_POLICY_HISTORY_SYSTEM_DEFAULT:
break;
default:
RMW_SET_ERROR_MSG("Unknown QoS history policy");
goto fail;
Expand All @@ -646,11 +648,17 @@ rmw_create_publisher(
case RMW_QOS_POLICY_RELIABLE:
datawriter_qos.reliability.kind = DDS_RELIABLE_RELIABILITY_QOS;
break;
case RMW_QOS_POLICY_RELIABILITY_SYSTEM_DEFAULT:
break;
default:
RMW_SET_ERROR_MSG("Unknown QoS reliability policy");
goto fail;
}

if (qos_profile.depth != RMW_QOS_POLICY_DEPTH_SYSTEM_DEFAULT) {
datawriter_qos.history.depth = qos_profile.depth;
}

// ensure the history depth is at least the requested queue size
assert(datawriter_qos.history.depth >= 0);
if (
Expand Down Expand Up @@ -943,6 +951,8 @@ rmw_create_subscription(const rmw_node_t * node,
case RMW_QOS_POLICY_KEEP_ALL_HISTORY:
datareader_qos.history.kind = DDS_KEEP_ALL_HISTORY_QOS;
break;
case RMW_QOS_POLICY_HISTORY_SYSTEM_DEFAULT:
break;
default:
RMW_SET_ERROR_MSG("Unknown QoS history policy");
goto fail;
Expand All @@ -955,11 +965,17 @@ rmw_create_subscription(const rmw_node_t * node,
case RMW_QOS_POLICY_RELIABLE:
datareader_qos.reliability.kind = DDS_RELIABLE_RELIABILITY_QOS;
break;
case RMW_QOS_POLICY_RELIABILITY_SYSTEM_DEFAULT:
break;
default:
RMW_SET_ERROR_MSG("Unknown QoS reliability policy");
goto fail;
}

if (qos_profile.depth != RMW_QOS_POLICY_DEPTH_SYSTEM_DEFAULT) {
datareader_qos.history.depth = qos_profile.depth;
}

// ensure the history depth is at least the requested queue size
assert(datareader_qos.history.depth >= 0);
if (
Expand Down
16 changes: 16 additions & 0 deletions rmw_connext_dynamic_cpp/src/functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,8 @@ rmw_create_publisher(
case RMW_QOS_POLICY_KEEP_ALL_HISTORY:
datawriter_qos.history.kind = DDS_KEEP_ALL_HISTORY_QOS;
break;
case RMW_QOS_POLICY_HISTORY_SYSTEM_DEFAULT:
break;
default:
RMW_SET_ERROR_MSG("Unknown QoS history policy");
goto fail;
Expand All @@ -885,11 +887,17 @@ rmw_create_publisher(
case RMW_QOS_POLICY_RELIABLE:
datawriter_qos.reliability.kind = DDS_RELIABLE_RELIABILITY_QOS;
break;
case RMW_QOS_POLICY_RELIABILITY_SYSTEM_DEFAULT:
break;
default:
RMW_SET_ERROR_MSG("Unknown QoS reliability policy");
goto fail;
}

if (qos_profile.depth != RMW_QOS_POLICY_DEPTH_SYSTEM_DEFAULT) {
datawriter_qos.history.depth = qos_profile.depth;
}

// ensure the history depth is at least the requested queue size
assert(datawriter_qos.history.depth >= 0);
if (
Expand Down Expand Up @@ -1674,6 +1682,8 @@ rmw_create_subscription(
case RMW_QOS_POLICY_KEEP_ALL_HISTORY:
datareader_qos.history.kind = DDS_KEEP_ALL_HISTORY_QOS;
break;
case RMW_QOS_POLICY_HISTORY_SYSTEM_DEFAULT:
break;
default:
RMW_SET_ERROR_MSG("Unknown QoS history policy");
goto fail;
Expand All @@ -1686,11 +1696,17 @@ rmw_create_subscription(
case RMW_QOS_POLICY_RELIABLE:
datareader_qos.reliability.kind = DDS_RELIABLE_RELIABILITY_QOS;
break;
case RMW_QOS_POLICY_RELIABILITY_SYSTEM_DEFAULT:
break;
default:
RMW_SET_ERROR_MSG("Unknown QoS reliability policy");
goto fail;
}

if (qos_profile.depth != RMW_QOS_POLICY_DEPTH_SYSTEM_DEFAULT) {
datareader_qos.history.depth = qos_profile.depth;
}

// ensure the history depth is at least the requested queue size
assert(datareader_qos.history.depth >= 0);
if (
Expand Down

0 comments on commit d9538a3

Please sign in to comment.