00001
#ifndef AlarmTestMountMultiThreadedImpl_h
00002
#define AlarmTestMountMultiThreadedImpl_h
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
#ifndef __cplusplus
00026
#error This is a C++ include file and cannot be used from plain C
00027
#endif
00028
00030
#include <acscomponentImpl.h>
00031
00033
#include <testCppAlarmSourceComponentsS.h>
00034
#include "AlarmSystemInterface.h"
00035
#include "ace/Task.h"
00036
00037
using std::string;
00038
00039
namespace testalarmsystem
00040 {
00041 class AlarmTestMountMultiThreadedImpl:
public acscomponent::ACSComponentImpl,
00042
public virtual POA_testalarmsystem::AlarmTestMountMultiThreaded
00043 {
00044
public:
00048
AlarmTestMountMultiThreadedImpl(
const ACE_CString &name,
maci::ContainerServices * containerServices);
00049
00053
virtual ~AlarmTestMountMultiThreadedImpl();
00054
00055
void faultMount(CORBA::Long threads, CORBA::Long numFaultsPerThread, CORBA::Long mountNum);
00056
void terminate_faultMount();
00057
00058
00063
void sendAlarmLongHand(std::string& fFamily, std::string& fMember,
int code,
bool active, string & threadName);
00064
void sendAlarmLongHand(std::string& fFamily, std::string& fMember,
int code,
bool active);
00065
void sendAlarmShortHand(std::string& fFamily, std::string& fMember,
int code,
bool active);
00066
void sendAlarmShortHandWithoutProperties(std::string& fFamily, std::string& fMember,
int code,
bool active);
00067
void sendAlarmControlStyle();
00068
00069 void stop() {
stopped =
true; }
00070
00071
private:
00072
00073 auto_ptr<acsalarm::AlarmSystemInterface>
alarmSource;
00074
00075 ACE_Thread_Mutex
mutex;
00076
00077 bool stopped;
00078 };
00079 };
00080
00081
#endif