GSI Object Oriented Online Offline (Go4)  GO4-6.1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4TaskHandlerCommand.cxx
Go to the documentation of this file.
1 // $Id: TGo4TaskHandlerCommand.cxx 2745 2020-04-16 08:55:15Z 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 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  TGo4Command(right)
42 {
43 }
44 
46 {
47  TGo4Task* cli = dynamic_cast<TGo4Task*> (fxReceiverBase);
48  if(cli)
49  {
50  cli->SendStatusMessage(2,kTRUE, TString::Format(
51  "%s::Command %s from master %s not allowed for %s (mode %d)",
53  }
54  else
55  {
57  }
58  return 0;
59 }
void SetReceiverName(const char *)
Definition: TGo4Command.cxx:93
TGo4CommandReceiver * fxReceiverBase
Definition: TGo4Command.h:116
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:285
Bool_t fbIsEnabled
Definition: TGo4Command.h:90
Go4CommandMode_t GetMode()
Definition: TGo4Command.h:76
static const char * GetModeDescription(Go4CommandMode_t mode)
virtual Int_t RefuseCom()