Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

TGo4TaskHandlerCommand.cxx

Go to the documentation of this file.
00001 //-------------------------------------------------------------
00002 //        Go4 Release Package v3.04-01 (build 30401)
00003 //                      28-November-2008
00004 //---------------------------------------------------------------
00005 //   The GSI Online Offline Object Oriented (Go4) Project
00006 //   Experiment Data Processing at EE 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 "TGo4Log.h"
00019 #include "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 Int_t TGo4TaskHandlerCommand::RefuseCom()
00053 {
00054 TGo4Task* cli=dynamic_cast<TGo4Task*> (fxReceiverBase);
00055 if(cli)
00056    {
00057       cli->SendStatusMessage(2,kTRUE, "%s::Command %s from master %s not allowed for %s (mode %d)",
00058                      GetTaskName(), GetName(), GetTaskName(),GetModeDescription(GetMode()), GetMode());
00059    }
00060 else
00061    {
00062       TGo4Command::RefuseCom();
00063    }
00064 return 0;
00065 }
00066 
00067 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Fri Nov 28 12:59:06 2008 for Go4-v3.04-1 by  doxygen 1.4.2