Changeset 10292


Ignore:
Timestamp:
Apr 7, 2011, 8:41:36 AM (9 years ago)
Author:
tbretz
Message:
Replaced -> by . in AddTransition and AddConfiguration.
Location:
trunk/FACT++/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/FACT++/src/dataLogger.cc

    r10289 r10292  
    290290                AddStateName(kSM_BadRunConfig,   "ErrRunFolder");
    291291
    292                 /*Add the possible transitions for this machine*/
    293                 AddTransition(kSM_DailyOpen, fTransStart, kSM_Ready, kSM_BadDailyConfig) //start the daily logging. daily file location must be specified already
    294                         ->AssignFunction(boost::bind(&DataLogger::StartPlease, this));
    295                 AddTransition(kSM_Ready, fTransStop, kSM_DailyOpen, kSM_WaitingRun, kSM_Logging) //stop the data logging
    296                         ->AssignFunction(boost::bind(&DataLogger::GoToReadyPlease, this));
    297                 AddTransition(kSM_Logging, fTransStartRun, kSM_WaitingRun, kSM_BadRunConfig) //start the run logging. run file location must be specified already.
    298                         ->AssignFunction(boost::bind(&DataLogger::StartRunPlease, this));
    299                 AddTransition(kSM_WaitingRun, fTransStopRun, kSM_Logging)
    300                         ->AssignFunction(boost::bind(&DataLogger::StopRunPlease, this));
    301                 AddTransition(kSM_Ready, fTransReset, kSM_Error, kSM_BadDailyConfig, kSM_BadRunConfig, kSM_Error) //transition to exit error states. dunno if required or not, would close the daily file if already openned.
    302                         ->AssignFunction(boost::bind(&DataLogger::GoToReadyPlease, this));
    303                 AddTransition(kSM_WaitingRun, fTransWait, kSM_DailyOpen)
    304                         ->AssignFunction(boost::bind(&DataLogger::DailyToWaitRunPlease, this));
    305                 /*Add the possible configurations for this machine*/
    306                 AddConfiguration(fConfigDay, "C", kSM_Ready, kSM_BadDailyConfig) //configure the daily file location. cannot be done before the file is actually opened
    307                         ->AssignFunction(boost::bind(&DataLogger::ConfigureDailyFileName, this, _1));
    308                 AddConfiguration(fConfigRun, "C", kSM_Ready, kSM_BadDailyConfig, kSM_DailyOpen, kSM_WaitingRun, kSM_BadRunConfig) //configure the run file location. cannot be done before the file is actually opened, and not in a dailly related error.
    309                         ->AssignFunction(boost::bind(&DataLogger::ConfigureRunFileName, this, _1));
    310                
     292                /*Add the possible transitions for this machine*/
     293
     294                //start the daily logging. daily file location must be specified already
     295                AddTransition(kSM_DailyOpen, fTransStart, kSM_Ready, kSM_BadDailyConfig).
     296                    AssignFunction(boost::bind(&DataLogger::StartPlease, this));
     297
     298                //stop the data logging
     299                AddTransition(kSM_Ready, fTransStop, kSM_DailyOpen, kSM_WaitingRun, kSM_Logging).
     300                    AssignFunction(boost::bind(&DataLogger::GoToReadyPlease, this));
     301
     302                //start the run logging. run file location must be specified already.
     303                AddTransition(kSM_Logging, fTransStartRun, kSM_WaitingRun, kSM_BadRunConfig).
     304                    AssignFunction(boost::bind(&DataLogger::StartRunPlease, this));
     305
     306                AddTransition(kSM_WaitingRun, fTransStopRun, kSM_Logging).
     307                    AssignFunction(boost::bind(&DataLogger::StopRunPlease, this));
     308
     309                 //transition to exit error states. dunno if required or not, would close the daily file if already openned.
     310                AddTransition(kSM_Ready, fTransReset, kSM_Error, kSM_BadDailyConfig, kSM_BadRunConfig, kSM_Error).
     311                    AssignFunction(boost::bind(&DataLogger::GoToReadyPlease, this));
     312
     313                AddTransition(kSM_WaitingRun, fTransWait, kSM_DailyOpen).
     314                    AssignFunction(boost::bind(&DataLogger::DailyToWaitRunPlease, this));
     315
     316                /*Add the possible configurations for this machine*/
     317                //configure the daily file location. cannot be done before the file is actually opened
     318                AddConfiguration(fConfigDay, "C", kSM_Ready, kSM_BadDailyConfig).
     319                    AssignFunction(boost::bind(&DataLogger::ConfigureDailyFileName, this, _1));
     320
     321                 //configure the run file location. cannot be done before the file is actually opened, and not in a dailly related error.
     322                AddConfiguration(fConfigRun, "C", kSM_Ready, kSM_BadDailyConfig, kSM_DailyOpen, kSM_WaitingRun, kSM_BadRunConfig).
     323                    AssignFunction(boost::bind(&DataLogger::ConfigureRunFileName, this, _1));
     324
    311325                //Provide a logging command
    312326                //I get the feeling that I should be going through the EventImp
     
    314328                //is already done in StateMachineImp.cc
    315329                //Thus I'll simply add a configuration, which I will treat as the logging command
    316                 AddConfiguration(fConfigLog, "C", kSM_DailyOpen, kSM_Logging, kSM_WaitingRun, kSM_BadRunConfig)
    317                         ->AssignFunction(boost::bind(&DataLogger::LogMessagePlease, this, _1));
    318                
     330                AddConfiguration(fConfigLog, "C", kSM_DailyOpen, kSM_Logging, kSM_WaitingRun, kSM_BadRunConfig).
     331                    AssignFunction(boost::bind(&DataLogger::LogMessagePlease, this, _1));
     332
    319333                fServiceList.SetHandler(this);
    320334                CheckForServicesUpdate();
  • trunk/FACT++/src/dclient5.cc

    r10286 r10292  
    249249        AddStateName(kSM_Stopping,      "Stopping");
    250250
    251         AddTransition(kSM_Running,   "START", kSM_Connected)
    252             ->AssignFunction(boost::bind(&StateMachineFAD::Start, this, _1, 5));
     251        AddTransition(kSM_Running,   "START", kSM_Connected).
     252            AssignFunction(boost::bind(&StateMachineFAD::Start, this, _1, 5));
    253253        AddTransition(kSM_Connected, "STOP",  kSM_Running);
    254254
     
    261261        T::AddConfiguration("TESTIC",   "I:2;C");
    262262
    263         T::AddConfiguration("CMD", "C")
    264             ->AssignFunction(boost::bind(&StateMachineFAD::Command, this, _1));
     263        T::AddConfiguration("CMD", "C").
     264            AssignFunction(boost::bind(&StateMachineFAD::Command, this, _1));
    265265
    266266        AddTransition(kSM_Reconnect, "RECONNECT");
Note: See TracChangeset for help on using the changeset viewer.