PrevUpHomeNext

Struct timepiece_settings

fd::timepiece_settings — Settings for a schedule_timepiece.

Synopsis

// In header: <fd/schedule_timepiece.h>


struct timepiece_settings {

  // Facilitate 'downtime' schedules - only valid for fixed duration schedules. 
  enum fixed_duration_as { fixed_duration = = false, 
                           inverse_fixed_duration = = true };
  // construct/copy/destruct
  timepiece_settings();
  timepiece_settings(boost::posix_time::time_duration);
  timepiece_settings(fixed_duration_as);
  timepiece_settings(boost::posix_time::time_duration, fixed_duration_as);

  // public data members
  boost::posix_time::time_duration onsetDelay;  // How much time an onset should be delayed; this is an additional static offset added to each onset. 
  fixed_duration_as inverseFixedDuration;  // Facilitate 'downtime' schedules - only valid for fixed duration schedules. 
};

Description

timepiece_settings public construct/copy/destruct

  1. timepiece_settings();
  2. timepiece_settings(boost::posix_time::time_duration onsetDelay);
  3. timepiece_settings(fixed_duration_as inverseFixedDuration);
  4. timepiece_settings(boost::posix_time::time_duration onsetDelay, 
                       fixed_duration_as inverseFixedDuration);

timepiece_settings public public data members

  1. boost::posix_time::time_duration onsetDelay;

  2. fixed_duration_as inverseFixedDuration;

    It greatly simplifies iterating over periods (for the application); Effectively, an interval schedule swaps the onset/completion onsets of a fixed 'downtime' duration schedule, such turning the schedule into a fixed 'uptime' duration schedule.


PrevUpHomeNext