00001
#ifndef archive_event_supplier_H
00002
#define archive_event_supplier_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
#ifndef __cplusplus
00031
#error This is a C++ include file and cannot be used from plain C
00032
#endif
00033
00038
#include <lokiSingleton.h>
00039
#include <baciC.h>
00040
00041
#include <basencSupplier.h>
00042
00051 class ArchiveSupplier :
public BaseSupplier
00052 {
00053
public:
00057
ArchiveSupplier();
00058
00062
virtual ~ArchiveSupplier();
00063
00076
template <
class T>
00077
void
00078 sendEvent(CORBA::Short priority,
00079 ACS::Time timeStamp,
00080
const std::string& component,
00081
const std::string& property,
00082 T value,
00083
const std::string& container=
"")
00084 {
00085 CORBA::Any any;
00086 any <<= value;
00087
00088 this->
send_event(priority,
00089 timeStamp,
00090 component,
00091 property,
00092 any,
00093 container);
00094 }
00095
00108
void
00109
send_event(CORBA::Short priority,
00110 ACS::Time timeStamp,
00111
const std::string& component,
00112
const std::string& property,
00113 CORBA::Any value,
00114
const std::string& container);
00115
00116
protected:
00117
00121
virtual const char*
00122 getNotificationFactoryName()
00123 {
return acscommon::ARCHIVE_NOTIFICATION_FACTORY_NAME;}
00124
00128
virtual const char*
00129 getChannelDomain()
00130 {
return acscommon::ARCHIVING_DOMAIN;}
00131
00135
virtual const char*
00136 getChannelKind()
00137 {
return acscommon::ARCHIVING_CHANNEL_KIND; }
00138
00142
virtual const char*
00143 getEventType()
00144 {
return ""; }
00145
00146 };
00147
00152
typedef Loki::SingletonHolder<
ArchiveSupplier,
00153 Loki::CreateUsingNew,
00154 Loki::PhoenixSingleton,
00155 Loki::SingleThreaded>
ArchiveSupplierSingleton;
00156
00157
#endif