You are here: Part 2: Core Concepts > DDS Entities > Conditions and WaitSets > GuardConditions

GuardConditions

GuardConditions are created by your application. GuardConditions provide a way for your application to manually awaken a WaitSet. Like all Conditions, it has a single boolean trigger_value. Your application can manually trigger the GuardCondition by calling set_trigger_value().

Connext DDS does not trigger or clear this type of condition—it is completely controlled by your application.

A GuardCondition has no factory. It is created as an object directly by the natural means in each language binding (e.g., using “new” in C++ or Java). For example:

// Create a Guard Condition
Condition* my_guard_condition = new GuardCondition();
// Delete a Guard Condition
delete my_guard_condition;

When first created, the trigger_value is FALSE.

A GuardCondition has only two operations, get_trigger_value() and set_trigger_value().

When your application calls set_trigger_value(DDS_BOOLEAN_TRUE), Connext DDS will awaken any WaitSet to which the GuardCondition is attached.

© 2016 RTI