23 #ifndef SYNTHESIS_SIITERBOT
24 #define SYNTHESIS_SIITERBOT
26 #if ! defined(WITHOUT_DBUS)
37 #if ! defined(WITHOUT_DBUS)
39 #include <dbus-cpp/dbus.h>
41 #include <dbus-c++/dbus.h>
48 #include <condition_variable>
53 #ifdef INTERACTIVE_ITERATION
54 #include <casadbus/interfaces/SynthImager.adaptor.h>
65 class SIIterBot_adaptor;
202 #if defined(WITHOUT_DBUS)
203 std::map<std::string,casac::variant> getDetails( );
205 void controlUpdate(
const std::map<std::string, casac::variant>& parameters);
207 #ifdef INTERACTIVE_ITERATION
208 std::map<std::string,DBus::Variant> getDetails();
209 void controlUpdate(
const std::map<std::string, DBus::Variant>& parameters);
312 #
if defined(INTERACTIVE_ITERATION) && ! defined(WITHOUT_DBUS)
314 private edu::nrao::casa::SynthesisImager_adaptor,
315 public DBus::IntrospectableAdaptor,
316 public DBus::ObjectAdaptor
320 SIIterBot_adaptor( std::shared_ptr<SIIterBot_state> state,
const std::string &bus_name,
const std::string &object_path );
327 #ifdef INTERACTIVE_ITERATION
328 edu::nrao::casa::SynthesisImager_adaptor::interactionRequired( val );
333 #if defined(WITHOUT_DBUS)
334 void controlUpdate(
const std::map< std::string, casac::variant >& newParams)
336 state->controlUpdate(newParams);
339 void controlUpdate(
const std::map< std::string, ::DBus::Variant >& newParams)
341 #ifdef INTERACTIVE_ITERATION
342 state->controlUpdate(newParams);
350 { state->interactionComplete( ); }
352 { state->changePauseFlag(pauseState); }
354 { state->changeStopFlag(stopState); }
356 { state->changeInteractiveMode(interactiveMode); }
358 {
return state->getDescription( ); }
359 #if defined(WITHOUT_DBUS)
360 std::map< std::string, casac::variant > getDetails( )
362 return state->getDetails( );
365 {
return state->getSummary( ); }
370 #ifdef INTERACTIVE_ITERATION
371 return state->getDetails( );
373 return std::map< std::string, ::DBus::Variant >( );
377 {
return state->getSummary( ); }
381 std::shared_ptr<SIIterBot_state>
state;
void changeNiter(casacore::Int niter)
void mergeSubIterBot(SISubIterBot& subIterBot);
casacore::Int getMajorCycleCount()
void resetMinorCycleInitInfo()
bool incrementController()
casacore::Bool itsUpdatedModelFlag
casacore::Float readThreshold(casacore::Record recordIn, casacore::String id)
casacore::Float itsMinPsfFraction
virtual void mergeCycleInitializationRecord(casacore::Record &)
casacore::Float itsInteractiveThreshold
casacore::Bool itsStopFlag
virtual casacore::Record getDetailsRecord()
virtual void mergeCycleExecutionRecord(casacore::Record &)
casacore::Bool itsInteractiveMode
casacore::Float itsMaxPsfFraction
void interactionComplete()
std::condition_variable interactionCond
casacore::Float itsNsigmaThreshold
casacore::Float itsPrevPeakResidual
void changeStopFlag(const bool &stopState)
void changeStopFlag(const bool &stopEnabled)
casacore::Float itsNsigma
casacore::Float itsPeakResidual
casacore::Int itsIterDone
std::recursive_mutex recordMutex
void changeCycleThreshold(casacore::Float cyclethreshold)
void changeMinPsfFraction(casacore::Float minpsffraction)
casacore::Float itsCycleThreshold
virtual void waitForInteractiveInput()
void addSummaryMajor()
casacore::Int getRemainingNiter(); casacore::Int getCompletedNiter();
casacore::Float itsInitPeakResidual
void incrementMajorCycleCount()
casacore::Record getSubIterBotRecord();
void changeInteractiveNiter(casacore::Int interactiveniter)
bool decrementController()
::DBus::Variant getSummary()
void changeThreshold(casacore::Float threshold)
casacore::Bool itsIsCycleThresholdAuto
casacore::Float itsMinPeakResidualNoMask
casacore::Int itsCycleNiter
void changePauseFlag(const bool &pauseState)
casacore::Bool itsIsThresholdAuto
casacore::Float itsMaxPsfSidelobe
void changeCycleFactor(casacore::Float cyclefactor)
virtual bool interactiveInputRequired()
void setDescription(const std::string &value)
casacore::Float itsMaskSum
casacore::Float itsMadRMS
bool decrementController()
casacore::Int itsMaxCycleIterDone
void changeInteractiveThreshold(casacore::Float cyclethreshold)
std::recursive_mutex descriptionMutex
casacore::Float itsLoopGain
void changePauseFlag(const bool &pauseEnabled)
casacore::Int itsNSummaryFields
void setControlsFromRecord(casacore::Record &recordIn)
casacore::Int itsStopCode
virtual int cleanComplete(casacore::Bool lastcyclecheck=casacore::False)
virtual bool majorCycleRequired(casacore::Float currentPeakResidual);
void controlUpdate(const std::map< std::string,::DBus::Variant > &newParams)
SIIterBot_state & operator=(const SIIterBot_state &)
casacore::Float itsMinPeakResidual
A hierarchical collection of named fields of various types.
bool Bool
Define the standard types used by Casacore.
SIIterBot_adaptor * adaptor
int getNumberOfControllers()
casacore::Int itsInteractiveIterDone
SIIterBot_state(const SIIterBot_state &)
make SIIterBot_state uncopyable...
void printOut(casacore::String prefix, casacore::Bool verbose)
casacore::Array< casacore::Int > itsSummaryMajor
std::string itsDescription
virtual void mergeMinorCycleSummary(const casacore::Array< casacore::Double > &summary)
std::recursive_mutex mutex
casacore::Float itsMinorCyclePeakResidual
casacore::Int itsInteractiveNiter
std::map< std::string,::DBus::Variant > getDetails()
void changeNsigma(casacore::Float nsigma)
void acceptCallbacks(SIIterBot_adaptor *siba)
void denyCallbacks(SIIterBot_adaptor *siba)
void addHandler(SIIterBot_adaptor *)
void updateCycleThreshold()
casacore::Bool itsPauseFlag
casacore::Float itsPeakResidualNoMask
void changeMaxPsfFraction(casacore::Float maxpsffraction)
void changeInteractiveMode(const bool &interactiveEnabled)
casacore::Float itsThreshold
String: the storage and methods of handling collections of characters.
void changeInteractiveMode(const bool &interactiveMode)
void changeLoopGain(casacore::Float loopgain)
casacore::Float itsPrevPeakResidualNoMask
casacore::Float itsCycleFactor
std::shared_ptr< SIIterBot_state > state
std::shared_ptr< SIIterBot_callback > callback
std::mutex interactionMutex
casacore::Int itsPrevMajorCycleCount
void removeHandler(SIIterBot_adaptor *)
std::string getDescription()
casacore::Int itsNiter
protects itsDescription
void changeCycleNiter(casacore::Int cycleniter)
std::string getDescription()
void interactionRequired(const bool &val)
casacore::Array< casacore::Double > itsSummaryMinor
bool incrementController()
virtual casacore::Record getMinorCycleControls()
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
START *virtual casacore::Record getSummaryRecord()
Functions for runtime parameter modification.
casacore::Int itsMajorDone
void interactionRequired(bool)
DBus::Variant getSummary()
void interactionComplete()
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.