Add PropertyPolicy to QoS API for Security settings (#278)
* Add PropertyPolicy to QoS API for Security settings This commit adds the public API for PropertyQosPolicy including tests. This policy can be used to set the parameters for the DDS security implementation, as an alternative for using the xml configuration. Tests are also inlcuded for setting security properties and conflict resolving when both security configuration and qos properties are present. Finally, the pubsub tool is updated so that is handles this qos correctly. Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com> * Init binary_value.props to fix failing qos merge and moved init code in qset_prop functions Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com> * Add additional test and some validation improvements based on review comments Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com> * Refactoring of qos property Refactored the qos property handling based on review comments. Setting and unsettings functions are simplified and now use helper functions for lookup, property initialisation is simplified. Added an additional check for required security properties when creating participant using security settings from qos, and added a test-case for this code. Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com> * Check for qos flag before getting property index from qos Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com> * Participant creation should fail on inconsistent security qos properties, and some minor code improvements in property qos api functions Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com> * Update log message in test security_config_qos Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com> * Fixed unused label compiler error in q_entity.c when security is disabled Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com> * Refactored qprop functions with macros to avoid code duplicate code Signed-off-by: Dennis Potman <dennis.potman@adlinktech.com>
This commit is contained in:
parent
5399e5103c
commit
7f59a46ff8
11 changed files with 927 additions and 47 deletions
|
@ -42,12 +42,13 @@
|
|||
#define DDS_READERLIFESPAN_QOS_POLICY_NAME "ReaderLifespan"
|
||||
#define DDS_SHARE_QOS_POLICY_NAME "Share"
|
||||
#define DDS_SCHEDULING_QOS_POLICY_NAME "Scheduling"
|
||||
#define DDS_PROPERTY_QOS_POLICY_NAME "Property"
|
||||
|
||||
#define DDS_SUBSCRIPTIONKEY_QOS_POLICY_ID 23
|
||||
#define DDS_VIEWKEY_QOS_POLICY_ID 24
|
||||
#define DDS_READERLIFESPAN_QOS_POLICY_ID 25
|
||||
#define DDS_SHARE_QOS_POLICY_ID 26
|
||||
#define DDS_SCHEDULING_QOS_POLICY_ID 27
|
||||
#define DDS_SUBSCRIPTIONKEY_QOS_POLICY_ID 24
|
||||
#define DDS_VIEWKEY_QOS_POLICY_ID 25
|
||||
#define DDS_READERLIFESPAN_QOS_POLICY_ID 26
|
||||
#define DDS_SHARE_QOS_POLICY_ID 27
|
||||
#define DDS_SCHEDULING_QOS_POLICY_ID 28
|
||||
|
||||
extern dds_entity_t dp;
|
||||
extern const dds_topic_descriptor_t *ts_KeyedSeq;
|
||||
|
|
|
@ -1051,6 +1051,7 @@ static const char *policystr(uint32_t id) {
|
|||
case DDS_READERLIFESPAN_QOS_POLICY_ID: return DDS_READERLIFESPAN_QOS_POLICY_NAME;
|
||||
case DDS_SHARE_QOS_POLICY_ID: return DDS_SHARE_QOS_POLICY_NAME;
|
||||
case DDS_SCHEDULING_QOS_POLICY_ID: return DDS_SCHEDULING_QOS_POLICY_NAME;
|
||||
case DDS_PROPERTY_QOS_POLICY_ID: return DDS_PROPERTY_QOS_POLICY_NAME;
|
||||
default: return "?";
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue