GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
TGo4TaskHandlerCommand.cxx
Go to the documentation of this file.
1 // $Id$
2 //-----------------------------------------------------------------------
3 // The GSI Online Offline Object Oriented (Go4) Project
4 // Experiment Data Processing at EE department, GSI
5 //-----------------------------------------------------------------------
6 // Copyright (C) 2000- GSI Helmholtzzentrum fuer Schwerionenforschung GmbH
7 // Planckstr. 1, 64291 Darmstadt, Germany
8 // Contact: http://go4.gsi.de
9 //-----------------------------------------------------------------------
10 // This software can be used under the license agreements as stated
11 // in Go4License.txt file which is part of the distribution.
12 //-----------------------------------------------------------------------
13 
14 #include "TGo4TaskHandlerCommand.h"
15 
16 #include "TGo4Task.h"
17 
18 TGo4TaskHandlerCommand::TGo4TaskHandlerCommand(const char *name, const char *description) :
19  TGo4Command(name,description,5)
20 {
21  fbIsEnabled = kTRUE;
22  fbIsSynchron = kTRUE;
23  SetReceiverName("Task"); // sets the receiver name checked by command invoker
24  // receiver name neednt be class name!
25  SetProtection(kGo4ComModeController); // only controller connection may execute these commands
26 }
27 
29  TGo4Command()
30 {
31  fbIsEnabled = kTRUE;
32  fbIsSynchron = kTRUE;
33  SetReceiverName("Task"); // sets the receiver name checked by command invoker
34  // receiver name neednt be class name!
36  fiCommandID = 5;
37 }
38 
39 
41 {
42  TGo4Task* cli = dynamic_cast<TGo4Task*> (fxReceiverBase);
43  if(cli) {
44  cli->SendStatusMessage(2,kTRUE, "%s::Command %s from master %s not allowed for %s (mode %d)",
46  } else {
48  }
49  return 0;
50 }
void SetReceiverName(const char *)
Definition: TGo4Command.cxx:93
TGo4CommandReceiver * fxReceiverBase
Definition: TGo4Command.h:116
Go4CommandMode_t GetMode() const
Definition: TGo4Command.h:76
const char * GetTaskName() const
Definition: TGo4Command.cxx:99
Int_t fiCommandID
Definition: TGo4Command.h:95
Bool_t fbIsSynchron
Definition: TGo4Command.h:92
void SetProtection(Go4CommandMode_t m)
Definition: TGo4Command.h:104
void SendStatusMessage(Int_t level, Bool_t printout, const char *text,...)
Definition: TGo4Task.cxx:272
Bool_t fbIsEnabled
Definition: TGo4Command.h:90
static const char * GetModeDescription(Go4CommandMode_t mode)
virtual Int_t RefuseCom()