Strategy

From setiquest wiki

Jump to: navigation, search

Strategy

The lists of strategy and activity types with their startup functions are set up as part of the Scheduler initialization by the seeker. There is a class for each type of strategy. All the strategy Classes inherit from ActivityStrategy. There is additional level of inheritance for the BfActStrategy and CalActStrategy. The Doxygen inheritance diagram shows this nicely. For now, the document will focus on the ObsActStrategy which is used for targeted SETI observing. The Scheduler initializes and starts the Strategy. A Strategy executes as an ACE Task, i.e. as a separate thread with message queues, etc. Communication to the Strategy goes through a message handler that puts message blocks in a queue to be processed in order by the Strategy Internal.

When the strategy starts, it calls "startInternalHook()" Each of the Strategies classes implements their own version of this routine with the appropriate initializations. Next the strategy calls attemptToStartNextActivity(). This routine checks for pending stop and wrapup requests, in which case no new activity is started. If the start next activity request is following an activity failure, the strategy checks if the maximum number of retries have already been made. The strategy calls the startNextActivity() routine which will call the overloaded getNextActivity() for the appropriate strategy class. For the ObsActStrategy, if there is no pending followup activity, the getNonFollowUpActivity() routine picks the targets, assigns frequencies and channel numbers to the DXs, and computes the Channelizer Center Frequency. The Channelizer is tuned and restarted at this point. (When time permits, the channelizer start command will be modified so that it is done by the Activity after the telescope and beamformer are on source.) Then the Strategy gets the next Activity Id from the database and calls the Scheduler's getNextActivityFromFactory() routine. This routine matches the activity type from the parameter set to the entry in the Activity Factory Map and executes the start up routine for that activity type. The start up routine will set bit masks for the observing and RFI mitigation at ATA options that are appropriate for this activity type. The Activity is "started" and the Strategy waits for status information from the running activities.

If a followup activity has been requested, the getFollowupActivity() routine assigns the frequency and channel numbers from the database entries for the parent activity. The channelizer center frequency is computed and the channelizers are started. Then the Strategy gets the next Activity Id from the database and calls the scheduler's getNextActivityFromFactory() routine which initializes the activity as above.

When the Strategy receives a Data Collection Complete, it tries to start another activity [continueWithAnyMoreActivities()] assuming that the pipelining option is enabled and a wrapup or stop is not pending. [okToStartNewActivity(), isStopRequested()] The strategy calls attemptToStartNextActivity() and processing proceeds as described above.

When the Strategy receives an Activity Complete, it removes the activity from its queues and calls continueWithAnyMoreActivities() as above. If however, the activity failed, there is an attempt to retry it.

Files:

~/SonATA/sse-pkg/sse/ActivityStrategy.cpp
~/SonATA/sse-pkg/sse/ActivityStrategy.h
~/SonATA/sse-pkg/sse/ActStratWrappers.cpp
~/SonATA/sse-pkg/sse/ActStratWrappers.h
~/SonATA/sse-pkg/sse/AutoselectAntsActStrategy.cpp
~/SonATA/sse-pkg/sse/AutoselectAntsActStrategy.h
~/SonATA/sse-pkg/sse/BfActStrategy.cpp
~/SonATA/sse-pkg/sse/BfActStrategy.h
~/SonATA/sse-pkg/sse/BfAutoattenActStrategy.cpp
~/SonATA/sse-pkg/sse/BfAutoattenActStrategy.h
~/SonATA/sse-pkg/sse/BfInitActStrategy.cpp
~/SonATA/sse-pkg/sse/BfInitActStrategy.h
~/SonATA/sse-pkg/sse/BfResetActStrategy.cpp
~/SonATA/sse-pkg/sse/BfResetActStrategy.h
~/SonATA/sse-pkg/sse/CalActStrategy.cpp
~/SonATA/sse-pkg/sse/CalActStrategy.h
~/SonATA/sse-pkg/sse/CalDelayActStrategy.cpp
~/SonATA/sse-pkg/sse/CalDelayActStrategy.h
~/SonATA/sse-pkg/sse/CalFreqActStrategy.cpp
~/SonATA/sse-pkg/sse/CalFreqActStrategy.h
~/SonATA/sse-pkg/sse/CalPhaseActStrategy.cpp
~/SonATA/sse-pkg/sse/CalPhaseActStrategy.h
~/SonATA/sse-pkg/sse/FreeAntsActStrategy.cpp
~/SonATA/sse-pkg/sse/FreeAntsActStrategy.h
~/SonATA/sse-pkg/sse/ObsActStrategy.cpp
~/SonATA/sse-pkg/sse/ObsActStrategy.h
~/SonATA/sse-pkg/sse/PrepAntsActStrategy.cpp
~/SonATA/sse-pkg/sse/PrepAntsActStrategy.h
~/SonATA/sse-pkg/sse/TscopeSetupActStrategy.cpp
~/SonATA/sse-pkg/sse/TscopeSetupActStrategy.h
~/SonATA/sse-pkg/sse/TuneDxs.h
~/SonATA/sse-pkg/sse/TuneDxs.cpp
~/SonATA/sse-pkg/sse/Followup.h
~/SonATA/sse-pkg/sse/Followup.cpp
~/SonATA/sse-pkg/sse/IdNumberFactory.h
~/SonATA/sse-pkg/sse/IdNumberFactory.cpp
~/SonATA/sse-pkg/sse/OrderedTargets.h
~/SonATA/sse-pkg/sse/OrderedTargets.cpp
~/SonATA/sse-pkg/sse/UnitOfWork.h
~/SonATA/sse-pkg/sse/ActivityWrappers.h
~/SonATA/sse-pkg/sse/ActivityWrappers.cpp

External links


← Scheduler Index Activity →
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox