You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mitlib.pub/MITLIB/GuiDLL/GuiOutputController.h

59 lines
1.3 KiB
C++

#pragma once
#ifdef BUILD_GUIDLL
#define DLLCLASS __declspec(dllexport)
#include <boost/interprocess/managed_shared_memory.hpp>
using namespace boost::interprocess;
#else
#define DLLCLASS __declspec(dllimport)
class managed_shared_memory;
#endif
class COpStatus;
class DLLCLASS CGuiOutputController
{
public:
CGuiOutputController(void);
~CGuiOutputController(void);
// allocate array size for output array
void InitOutputArray();
BOOL IsOff(const COutputSetting &OutputSetting);
BOOL IsOn(const COutputSetting &OutputSetting);
BOOL Off(const COutputSetting &OutputSetting);
BOOL On(const COutputSetting &OutputSetting);
// return the size of gOutputArray
int GetSizeofOutputArray();
// make a copy of gOutputArray
void CopyOutputStatus();
// check if there is state change in output
BOOL IsOutputStateChange(int iOutputNo, BOOL &bOutputState);
long GetOutputStatusSize();
BOOL GetOutputStatus(int nIndex);
// Get name of Output point
char* GetOutputName(int nIndex);
// copy of gOutputArray that is used to compare the output state during machine running vs
// output state in maintenance mode
BOOL *m_bpOutputArray;
// to keep track output state array size
int m_iOutputStateArraySize;
private:
managed_shared_memory *m_managed_shm;
COpStatus *m_pOpStatus;
};