GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4TaskHandlerCommand.cxx
Go to the documentation of this file.
1 // $Id: TGo4TaskHandlerCommand.cxx 1033 2013-11-05 15:30:01Z linev $
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 für 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 "TGo4Log.h"
17 #include "TGo4Task.h"
18 
19 TGo4TaskHandlerCommand::TGo4TaskHandlerCommand(const char* name, const char* description) :
20  TGo4Command(name,description,5)
21 {
22  fbIsEnabled=kTRUE;
23  fbIsSynchron=kTRUE;
24  SetReceiverName("Task"); // sets the receiver name checked by command invoker
25  // receiver name neednt be class name!
26  SetProtection(kGo4ComModeController); // only controller connection may execute these commands
27 }
28 
30  TGo4Command()
31 {
32  fbIsEnabled=kTRUE;
33  fbIsSynchron=kTRUE;
34  SetReceiverName("Task"); // sets the receiver name checked by command invoker
35  // receiver name neednt be class name!
37  fiCommandID=5;
38 }
39 
40 
42  TGo4Command(right)
43 {
44 }
45 
47 {
48  TGo4Task* cli = dynamic_cast<TGo4Task*> (fxReceiverBase);
49  if(cli)
50  {
51  cli->SendStatusMessage(2,kTRUE, TString::Format(
52  "%s::Command %s from master %s not allowed for %s (mode %d)",
54  }
55  else
56  {
58  }
59  return 0;
60 }
void SetReceiverName(const char *)
Definition: TGo4Command.cxx:92
TGo4CommandReceiver * fxReceiverBase
Definition: TGo4Command.h:117
const char * GetTaskName() const
Definition: TGo4Command.cxx:98
Int_t fiCommandID
Definition: TGo4Command.h:96
Bool_t fbIsSynchron
Definition: TGo4Command.h:93
void SetProtection(Go4CommandMode_t m)
Definition: TGo4Command.h:105
void SendStatusMessage(Int_t level, Bool_t printout, const char *text,...)
Definition: TGo4Task.cxx:303
Bool_t fbIsEnabled
Definition: TGo4Command.h:91
Go4CommandMode_t GetMode()
Definition: TGo4Command.h:77
static const char * GetModeDescription(Go4CommandMode_t mode)
virtual Int_t RefuseCom()