00001 //--------------------------------------------------------------- 00002 // Go4 Release Package v2.10-5 (build 21005) 00003 // 03-Nov-2005 00004 //--------------------------------------------------------------- 00005 // The GSI Online Offline Object Oriented (Go4) Project 00006 // Experiment Data Processing at DVEE 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 /* Generated by Together */ 00017 00018 #include "TGo4ComDisconnectSlave.h" 00019 #include "Go4Log/TGo4Log.h" 00020 #include "Go4TaskHandler/TGo4Master.h" 00021 00022 TGo4ComDisconnectSlave::TGo4ComDisconnectSlave() 00023 :TGo4TaskHandlerCommand("MRDisconnectSlave","disconnect the specified slave") 00024 { 00025 SetReceiverName("MasterTask"); // sets the receiver name checked by command invoker 00026 // receiver name neednt be class name! 00027 fbIsLocal = kTRUE; 00028 fxSlaveName = "currentslave"; 00029 fbWaitForSlave = kTRUE; 00030 } 00031 00032 TGo4ComDisconnectSlave::~TGo4ComDisconnectSlave() 00033 { 00034 00035 } 00036 00037 00038 Int_t TGo4ComDisconnectSlave::ExeCom() 00039 { 00040 TGo4Master* master=dynamic_cast<TGo4Master*>(fxReceiverBase); 00041 if(master) 00042 { 00043 TGo4Log::Debug(" removing slave %s",fxSlaveName.Data()); 00044 if(!master->DisconnectSlave(fxSlaveName.Data(), fbWaitForSlave)) 00045 { 00046 TGo4Log::Debug(" ComDisconnectSlave: Sorry, the specified slave is not connected "); 00047 return 1; 00048 } 00049 else 00050 { 00051 TGo4Log::Debug(" ComDisconnectSlave: Slave %s is removed ",fxSlaveName.Data()); 00052 return 0; 00053 } 00054 } 00055 else 00056 { 00057 TGo4Log::Debug(" !!! ComRemoveClient ''%s'': NO RECEIVER ERROR!!!",GetName()); 00058 return 1; 00059 } 00060 return -1; 00061 } 00062 00063 ClassImp(TGo4ComDisconnectSlave); 00064 00065 //----------------------------END OF GO4 SOURCE FILE ---------------------