GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
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
15
16#include "TGo4Task.h"
17
18TGo4TaskHandlerCommand::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
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}
@ kGo4ComModeController
Definition TGo4Command.h:30
Int_t fiCommandID
Definition TGo4Command.h:95
static const char * GetModeDescription(Go4CommandMode_t mode)
text description of current execution mode
virtual Int_t RefuseCom()
Optional action if command is not allowed (warning message e.g.)
void SetProtection(Go4CommandMode_t m)
TGo4CommandReceiver * fxReceiverBase
Bool_t fbIsSynchron
Definition TGo4Command.h:92
Bool_t fbIsEnabled
Definition TGo4Command.h:90
void SetReceiverName(const char *)
const char * GetTaskName() const
Go4CommandMode_t GetMode() const
Definition TGo4Command.h:76
Int_t RefuseCom() override
Optional action if command is not allowed (warning message e.g.)
Go4 Task.
Definition TGo4Task.h:39
void SendStatusMessage(Int_t level, Bool_t printout, const char *text,...)
Send message string in a status object to the gui.
Definition TGo4Task.cxx:272