Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

/Go4CommandsTaskHandler/TGo4TaskHandlerCommand.cxx

Go to the documentation of this file.
00001 //---------------------------------------------------------------
00002 //        Go4 Release Package v2.10-5 (build 21005) 
00003 //                      03-Nov-2005
00004 //---------------------------------------------------------------
00005 //       The GSI Online Offline Object Oriented (Go4) Project
00006 //       Experiment Data Processing at DVEE department, GSI
00007 //---------------------------------------------------------------
00008 //
00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI
00010 //                    Planckstr. 1, 64291 Darmstadt, Germany
00011 //Contact:            http://go4.gsi.de
00012 //----------------------------------------------------------------
00013 //This software can be used under the license agreements as stated
00014 //in Go4License.txt file which is part of the distribution.
00015 //----------------------------------------------------------------
00016 #include "TGo4TaskHandlerCommand.h"
00017 
00018 #include "Go4Log/TGo4Log.h"
00019 #include "Go4TaskHandler/TGo4Task.h"
00020 
00021 TGo4TaskHandlerCommand::TGo4TaskHandlerCommand(const char* name, const char* description)
00022 : TGo4Command(name,description,5)
00023 {
00024    fbIsEnabled=kTRUE;
00025    fbIsSynchron=kTRUE;
00026    SetReceiverName("Task"); // sets the receiver name checked by command invoker
00027                                   // receiver name neednt be class name!
00028    SetProtection(kGo4ComModeController); // only controller connection may execute these commands
00029 }
00030 
00031 TGo4TaskHandlerCommand::TGo4TaskHandlerCommand()
00032 : TGo4Command()
00033 {
00034    fbIsEnabled=kTRUE;
00035    fbIsSynchron=kTRUE;
00036    SetReceiverName("Task"); // sets the receiver name checked by command invoker
00037                                   // receiver name neednt be class name!
00038    SetProtection(kGo4ComModeController);
00039    fiCommandID=5;
00040 }
00041 
00042 
00043 TGo4TaskHandlerCommand::~TGo4TaskHandlerCommand()
00044 {
00045 }
00046 
00047 TGo4TaskHandlerCommand::TGo4TaskHandlerCommand(const TGo4TaskHandlerCommand &right)
00048   :TGo4Command(right)
00049 {
00050 }
00051 
00052 TGo4TaskHandlerCommand & TGo4TaskHandlerCommand::operator=(const TGo4TaskHandlerCommand &right)
00053 {
00054    if (&right!=this)
00055       {
00056          TGo4Command::operator=(right); // copy base class members
00057           // put additional member copies here...
00058 
00059          return *this;
00060       }
00061    else
00062       {
00063          // copy is already source object
00064          return *this;
00065       }
00066 }
00067 
00068 
00069 Int_t TGo4TaskHandlerCommand::RefuseCom()
00070 {
00071 TGo4Task* cli=dynamic_cast<TGo4Task*> (fxReceiverBase);
00072 if(cli)
00073    {
00074       cli->SendStatusMessage(2,kTRUE, "%s::Command %s from master %s not allowed for %s (mode %d)",
00075                      GetTaskName(), GetName(), GetTaskName(),GetModeDescription(GetMode()), GetMode());
00076    }   
00077 else
00078    {
00079       TGo4Command::RefuseCom();
00080    }
00081 return 0;      
00082 }
00083 
00084 
00085 ClassImp(TGo4TaskHandlerCommand)
00086 
00087 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Tue Nov 8 10:55:51 2005 for Go4-v2.10-5 by doxygen1.2.15