QP  0.7-SNAPSHOT
Control software for the ??SRT telescope
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
Public Member Functions | Protected Member Functions | List of all members
ScheduleFollowing Class Referenceabstract

The base of a couple of classes where the activity consists of following a schedle of rotations. More...

#include <activities.h>

Inheritance diagram for ScheduleFollowing:
Activity DriveAzAlt TrackAzimuth TrackSidereal

Public Member Functions

virtual ms_t start (ms_t)
 The activity will be started by the main loop calling the start function. More...
 
virtual void cancel (void)
 Cancel the activity. More...
 
virtual ms_t poke (ms_t t)
 From time to time, the main loop will 'poke' this activity, by calling this function. More...
 
virtual void at_endstop (ms_t t, int az_click_count, int alt_click_count)
 The method called when the system detects a timeout, at the limit of an axis's travel. More...
 
- Public Member Functions inherited from Activity
virtual void az_click (ms_t t, double azimuth)
 The method called when the system detects an azimuthal click. More...
 
virtual void alt_click (ms_t t, double altitude)
 The method called when the system detects an altitude click. More...
 
bool is_complete (void) const
 Return true if the activity is complete. More...
 
bool is_valid (void) const
 Return true if the activity is valid. More...
 
ActivityTypes type (void)
 Return the type of Activity.
 

Protected Member Functions

 ScheduleFollowing (TelescopeController *, State *, ActivityTypes)
 Create an instance of the activity.
 
- Protected Member Functions inherited from Activity
void mark_as_complete (void)
 Set to true by a derived class when its work is done. More...
 
void mark_as_invalid (void)
 Mark the activity as invalid. More...
 
 Activity (TelescopeController *, State *, ActivityTypes)
 Construct an activity base-class.
 

Additional Inherited Members

- Public Types inherited from Activity
enum  ActivityTypes {
  BaseActivity, CalibrationActivity, ScheduleFollowingActivity, DriveAzAltActivity,
  TrackSiderealActivity, TrackAzimuthActivity
}
 The activity types here correspond to the this class and its subclasses. More...
 
- Static Public Member Functions inherited from Activity
static void * operator new (size_t size)
 Allocate space for an Activity. More...
 
static void operator delete (void *p)
 Deallocate an Activity.
 
static int max_activities (void)
 Return the maximum number of activities it's possible to have allocated at one time. More...
 
static int n_activities (void)
 Return the number of currently allocated activities. More...
 
static void delete_all_allocations (void)
 Delete all activity allocations. More...
 
- Protected Attributes inherited from Activity
State *const state
 The state which we are to manipulate.
 
TelescopeController *const controller
 The controller object provides methods for physically moving the telescope.
 
byte activity_status
 The internal status of the object: complete / invalid. More...
 

Detailed Description

The base of a couple of classes where the activity consists of following a schedle of rotations.

Member Function Documentation

void ScheduleFollowing::at_endstop ( ms_t  t,
int  az_click_count,
int  alt_click_count 
)
virtual

The method called when the system detects a timeout, at the limit of an axis's travel.

Parameters
tthe current time
az_click_countthe azimuthal click-count at this position
alt_click_countthe altitudinal click-count at this position

Implements Activity.

void ScheduleFollowing::cancel ( void  )
virtual

Cancel the activity.

Idempotent.

Reimplemented from Activity.

ms_t ScheduleFollowing::poke ( ms_t  t)
virtual

From time to time, the main loop will 'poke' this activity, by calling this function.

This allows the activity to undertake some periodic activity.

Parameters
tthe current time
Returns
the time at which the main loop should next poke this activity

Reimplemented from Activity.

ms_t ScheduleFollowing::start ( ms_t  now)
virtual

The activity will be started by the main loop calling the start function.

Returns
the time at which the activity should next be poked (return TIME_NEVER to avoid being poked again).
See also
poke(ms_t)

Reimplemented from Activity.

Reimplemented in TrackAzimuth, TrackSidereal, and DriveAzAlt.


The documentation for this class was generated from the following files: