Class CbDetectCalendarEvent

Inheritance Relationships

Base Type

  • public smacc2::SmaccAsyncClientBehavior

Class Documentation

class CbDetectCalendarEvent : public smacc2::SmaccAsyncClientBehavior

Async behavior that waits for a calendar event’s start time to arrive.

This behavior configures a watch pattern on the CpCalendarEventListener and waits for an event matching the pattern to start. When the event start time arrives (minus minutes_before), it posts EvCbSuccess.

Usage in state:

static void staticConfigure() {
  // Wait for "Standup" events, trigger 5 minutes before start
  configure<OrCalendar, CbDetectCalendarEvent>(".*Standup.*", true, 5);
}

Public Functions

CbDetectCalendarEvent(const std::string &pattern, bool use_regex = false, int minutes_before = 0)

Construct with pattern configuration.

Parameters:
  • pattern – Pattern to match event titles

  • use_regex – If true, use regex matching; if false, substring match

  • minutes_before – Trigger N minutes before event starts (0 = at start)

virtual ~CbDetectCalendarEvent() = default
void onEntry() override
void onExit() override
inline std::optional<CalendarEvent> getDetectedEvent() const

Get the detected event (if any)