00001 #ifndef RT_SUPPLIER_H 00002 #define RT_SUPPLIER_H 00003 /* @(#) $Id: acsncRTSupplier.h,v 1.19 2008/10/09 07:57:41 cparedes Exp $ 00004 * ALMA - Atacama Large Millimiter Array 00005 * (c) Associated Universities Inc., 2002 00006 * (c) European Southern Observatory, 2002 00007 * Copyright by ESO (in the framework of the ALMA collaboration) 00008 * and Cosylab 2002, All rights reserved 00009 * 00010 * This library is free software; you can redistribute it and/or 00011 * modify it under the terms of the GNU Lesser General Public 00012 * License as published by the Free Software Foundation; either 00013 * version 2.1 of the License, or (at your option) any later version. 00014 * 00015 * This library is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 * Lesser General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU Lesser General Public 00021 * License along with this library; if not, write to the Free Software 00022 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00023 */ 00024 00031 #include "acsncSupplier.h" 00032 #include <queue> 00033 namespace nc { 00055 class RTSupplier : public Supplier 00056 { 00057 public: 00059 00065 RTSupplier(const char* channelName, 00066 acscomponent::ACSComponentImpl* component); 00067 00076 virtual void 00077 disconnect(); 00078 00093 template <class T> void 00094 publishData(T data); 00096 protected: 00100 virtual ~RTSupplier(); 00101 00114 static void 00115 worker(void* param_p); 00116 00120 baci::BACIThreadManager *threadManager_mp; 00121 00125 std::queue<CosNotification::StructuredEvent> unpublishedEvents_m; 00126 00132 CORBA::Any any_m; 00133 00138 ACE_Thread_Mutex eventQueueMutex_m; 00139 00140 private: 00144 void operator=(const RTSupplier&); 00145 00149 RTSupplier(const RTSupplier&); 00150 }; 00151 }; 00152 00153 00154 #include "acsncRTSupplier.i" 00155 00156 #endif