Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Related Pages

ScanRequest.cpp

00001 #include "ScanRequest.h"
00002 #include "CalibrationController.h"
00003 #include "RequestException.h"
00004 #include "Sct/SctNames.h"
00005 #include "Sct/BugReport.h"
00006 
00007 namespace SctCalibrationController {
00008   namespace Ipc {
00009     
00010     MinimalScanRequest::MinimalScanRequest() :
00011       m_clockByTwo(false),
00012       m_width(768) {
00013     };
00014     
00015     CORBA::Boolean MinimalScanRequest::clockByTwoNice() {
00016       return m_clockByTwo;
00017     }
00018     
00019     CORBA::Long MinimalScanRequest::widthNice() {
00020       return m_width;
00021     }
00022     
00023     void MinimalScanRequest::setWidthNice(CORBA::Long value) {
00024       m_width=value;
00025     }
00026     
00027     void MinimalScanRequest::setClockByTwoNice(CORBA::Boolean value) {
00028       m_clockByTwo=value;
00029     }
00030     
00031     CORBA::Boolean MinimalScanRequest::configureModulesNice(){
00032       return false;
00033     }
00034     
00035     CORBA::Long MinimalScanRequest::delayNice(){
00036       return 1;
00037     }
00038     
00039     Sct_SctApi::Scan_ptr MinimalScanRequest::getScanNice(){
00040       //m_scan->incRef();
00041       return Sct_SctApi::Scan::_duplicate(m_scan);
00042     }
00043     
00044     void MinimalScanRequest::setScanNice(Sct_SctApi::Scan_ptr scan){
00045       m_scan=Sct_SctApi::Scan::_duplicate(scan);
00046     }
00047     
00048     CORBA::Boolean MinimalScanRequest::isRawNice(){
00049       return false;
00050     }
00051 
00052 
00053 
00055     
00056     ScanRequestImpl::ScanRequestImpl() : IPCObject<POA_Sct_CalibrationController::ScanRequest>() {
00057     }
00058 
00059     
00060     CORBA::Boolean ScanRequestImpl::isRawCorba(//Sct_CalibrationControllerStatus *_status
00061 ) {
00062       return isRawNice();
00063     }
00064 
00065   CORBA::Boolean ScanRequestImpl::clockByTwoCorba(//Sct_CalibrationControllerStatus *_status
00066                                              ) {
00067     return clockByTwoNice();
00068   }
00069     
00070     
00071     CORBA::Long ScanRequestImpl::widthCorba(//Sct_CalibrationControllerStatus *_status
00072 ) {
00073       return widthNice();
00074     }
00075 
00076     void ScanRequestImpl::setWidthCorba(//Sct_CalibrationControllerStatus *_status,
00077                                    CORBA::Long value) {
00078       setWidthNice(value);
00079     }
00080     
00081     void ScanRequestImpl::setClockByTwoCorba(//Sct_CalibrationControllerStatus *_status, 
00082                                         CORBA::Boolean value) {
00083       setClockByTwoNice(value);
00084     }
00085     
00086     CORBA::Boolean ScanRequestImpl:: configureModulesCorba(//Sct_CalibrationControllerStatus *_status
00087 ){
00088       return configureModulesNice();
00089     }
00090     
00091     CORBA::Long ScanRequestImpl::delayCorba(//Sct_CalibrationControllerStatus *_status
00092                               ){
00093       return delayNice();
00094     }
00095     
00096     Sct_SctApi::Scan_ptr ScanRequestImpl::getScanCorba(//Sct_CalibrationControllerStatus *_status
00097 ){
00098       return getScanNice();
00099     }
00100     
00101     void ScanRequestImpl::setScanCorba(//Sct_CalibrationControllerStatus *_status, 
00102                                   Sct_SctApi::Scan_ptr scan){
00103       Sct::BugReport("BUG01", "ScanRequest.cpp","Will this infinite recurse?  It must not! Sleeping 1 sec",1000000);
00104       setScanNice(scan);
00105     }
00106 
00107 
00108 /*
00109 ScanRequestAdapter::ScanRequestAdapter(Sct_CalibrationController::ScanRequest_ptr req) : request(req) {
00110 }
00111 
00112 bool ScanRequestAdapter::configureModules() {
00113   try {
00114     return request->configureModules();
00115   } catch (const CORBA::Exception & status) {
00116     throw RequestException(status, "ScanRequestAdapter::configureModules failed", __FILE__, __LINE__);    
00117   };
00118 }
00119 
00120 bool ScanRequestAdapter::clockByTwo() {
00121   try {
00122     return request->clockByTwo();
00123   } catch (const CORBA::Exception & status) {
00124     throw RequestException(status, "ScanRequestAdapter::clockByTwo failed", __FILE__, __LINE__);    
00125   };
00126 }
00127 
00128 void ScanRequestAdapter::setClockByTwo(bool value) {
00129   try {
00130     request->setClockByTwo(value);
00131   } catch (const CORBA::Exception & status) {
00132     throw RequestException(status, "ScanRequestAdapter::setClockByTwo failed", __FILE__, __LINE__);    
00133   };
00134 }
00135 
00136 bool ScanRequestAdapter::isRaw() {
00137   try {
00138     return request->isRaw();
00139   } catch (const CORBA::Exception & status) {
00140     throw RequestException(status, "ScanRequestAdapter::setConfigureModules failed", __FILE__, __LINE__);    
00141   };
00142 }
00143 
00144 long ScanRequestAdapter::delay() {
00145   try {
00146     return request->configureModules();
00147   } catch (const CORBA::Exception & status) {
00148     throw RequestException(status, "ScanRequestAdapter::setConfigureModules failed", __FILE__, __LINE__);    
00149   };
00150 }
00151 
00152 long ScanRequestAdapter::width() {
00153     try {
00154       return request->width();
00155     } catch (const CORBA::Exception & status) {
00156     throw RequestException(status, "ScanRequestAdapter::setConfigureModules failed", __FILE__, __LINE__);    
00157     };
00158 }
00159 
00160 void ScanRequestAdapter::setWidth(long width) {
00161   try {
00162     request->setWidth(width);
00163   } catch (const CORBA::Exception & status) {
00164       throw RequestException(status, "ScanRequestAdapter::setConfigureModules failed", __FILE__, __LINE__);    
00165   };
00166 }
00167     
00168 Sct_SctApi::Scan_ptr ScanRequestAdapter::getScan() {
00169   try {
00170     return request->getScan();
00171   } catch (const CORBA::Exception & status) {
00172     throw RequestException(status, "ScanRequestAdapter::getScan failed", __FILE__, __LINE__);
00173   };
00174 }
00175 
00176 void ScanRequestAdapter::setScan(Sct_SctApi::Scan_ptr scan) {
00177   try {
00178     request->setScan(scan);
00179   } catch (const CORBA::Exception & status) {
00180     throw RequestException(status, "ScanRequestAdapter::setScan failed", __FILE__, __LINE__);
00181   };
00182 }
00183 */
00184   }
00185 }

Generated on Thu Feb 10 02:40:14 2005 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5