add setter for partition QoS for a single name
This adds dds_qset_partition1 as a convenience function to set the partition QoS to a single name. Signed-off-by: Erik Boasson <eb@ilities.com>
This commit is contained in:
		
							parent
							
								
									e6f35cdab8
								
							
						
					
					
						commit
						f12b36e112
					
				
					 2 changed files with 21 additions and 1 deletions
				
			
		| 
						 | 
					@ -391,7 +391,7 @@ dds_qset_time_based_filter (
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
 * @param[in,out] qos - Pointer to a dds_qos_t structure that will store the policy
 | 
					 * @param[in,out] qos - Pointer to a dds_qos_t structure that will store the policy
 | 
				
			||||||
 * @param[in] n - Number of partitions stored in ps
 | 
					 * @param[in] n - Number of partitions stored in ps
 | 
				
			||||||
 * @param[in[ ps - Pointer to string(s) storing partition name(s)
 | 
					 * @param[in] ps - Pointer to string(s) storing partition name(s)
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
DDS_EXPORT void
 | 
					DDS_EXPORT void
 | 
				
			||||||
dds_qset_partition (
 | 
					dds_qset_partition (
 | 
				
			||||||
| 
						 | 
					@ -399,6 +399,18 @@ dds_qset_partition (
 | 
				
			||||||
  uint32_t n,
 | 
					  uint32_t n,
 | 
				
			||||||
  const char ** __restrict ps);
 | 
					  const char ** __restrict ps);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/**
 | 
				
			||||||
 | 
					 * @brief Convenience function to set the partition policy of a qos structure to a
 | 
				
			||||||
 | 
					 * single name.  Name may be a null pointer.
 | 
				
			||||||
 | 
					 *
 | 
				
			||||||
 | 
					 * @param[in,out] qos - Pointer to a dds_qos_t structure that will store the policy
 | 
				
			||||||
 | 
					 * @param[in] name - Pointer to the name
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					DDS_EXPORT void
 | 
				
			||||||
 | 
					dds_qset_partition1 (
 | 
				
			||||||
 | 
					  dds_qos_t * __restrict qos,
 | 
				
			||||||
 | 
					  const char * __restrict name);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * @brief Set the reliability policy of a qos structure
 | 
					 * @brief Set the reliability policy of a qos structure
 | 
				
			||||||
 *
 | 
					 *
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -558,6 +558,14 @@ void dds_qset_partition
 | 
				
			||||||
    qos->present |= QP_PARTITION;
 | 
					    qos->present |= QP_PARTITION;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					void dds_qset_partition1 (dds_qos_t * __restrict qos, const char * __restrict name)
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
					  if (name == NULL)
 | 
				
			||||||
 | 
					    dds_qset_partition (qos, 0, NULL);
 | 
				
			||||||
 | 
					  else
 | 
				
			||||||
 | 
					    dds_qset_partition (qos, 1, (const char **) &name);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void dds_qset_reliability
 | 
					void dds_qset_reliability
 | 
				
			||||||
(
 | 
					(
 | 
				
			||||||
    dds_qos_t * __restrict qos,
 | 
					    dds_qos_t * __restrict qos,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue