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/mcctrdll/runctrl.h

831 lines
23 KiB
C++

// Start =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// General information section.
// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// $Author:yongkiang$ User who last changed the file
// $Date:1/2/2013 12:17:42 PM$ Date and time of last check in
// $Revision:1.0$ Visual SourceSafe version number
// $Workfile:: runctrl.h $ Filename
// End =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
// For Testing
#if !defined __RUNCTRL_H__
#define __RUNCTRL_H__
#include "Run.h"
#include "Runtask.h"
#include "MyStringArray.h"
#include "CheckSwitch.h"
#include "structure.h"
#include "EMS.h"
#include "LotMsg.h"
#include "SemiE10RS.h"
#include "CurrentMsTime.h"
#include "Thread.h"
#include "ConcurrentQueue.h"
#include <vector>
#include "MsgDecode.h"
#include <winsock2.h>
#include <ws2tcpip.h>
#ifdef BUILD_MCCTRDLL
#define MCCTRDLLCLASS __declspec(dllexport)
#else
#define MCCTRDLLCLASS __declspec(dllimport)
#endif
// const char* DEFAULT_PORT = "27015";
#define STRING_RELAY_SET_GEN_MSG ("POSTMSGREPLY")
#define STRING_RELAY_SET_GEN_MSG_LENGTH 12 // (strlen("POSTMSGREPLY"))
#define RELAY_SET_GEN_MSG_NUM_ARFG 2
#define STRING_MSG_OUTPUT_TRIGGER ("OUTPUTTRIGGER")
#define STRING_MSG_OUTPUT_TRIGGER_LENGTH 13 // (strlen(("OUTPUTTRIGGER"))
#define STRING_MSG_WAFERUPDATE ("WAFERUPDATE")
#define STRING_MSG_WAFERSETUP_DIEMOV ("WAFERDIEMOVE")
#define STRING_REPLY_MAINTENANCEMODE_JOBDONE ("MAINTENANCEMODE_JOBDONE,") // add comma (reply)
#define MOTOR_CMD_LEN 6 // strlen("MOTOR") = 6
#define NUM_PARAM_OUTPUT_TRIGGER 4
// command strings list
#define CMD_START ("START")
#define CMD_STOP ("STOP")
#define CMD_RESET ("RESET")
#define CMD_RESTART ("RESTART")
#define CMD_PURGE ("PURGE")
#define CMD_INITPARAM ("INITPARAMETERS")
#define CMD_OPENLOT ("OPENLOT")
#define CMD_CLOSELOT ("CLOSELOT")
#define CMD_JOG ("JOG")
#define CMD_MOTOR ("MOTOR")
// command Param list
#define CMD_PARAM_MTR_HOME ("HOME")
#define CMD_PARAM_MTR_ON ("ON")
#define CMD_PARAM_MTR_OFF ("OFF")
#define CMD_PARAM_MTR_STOP ("STOP")
#define CMD_PARAM_MTR_MOVE ("MOVE")
// command Param number_of
#define NUM_PARAM_MOTOR_NON_MOV 4 // non move (but include homing)
#define NUM_PARAM_MOTOR_ACT_MOV 7 // actual move
#define MOV_SEQENCE_PARAM_NUM 1
#define MOV_MODULE_PARAM_NUM 2
#define MOV_MOTOR_PARAM_NUM 3
#define MOV_MOTOR_POS_PARAM_NUM 4
#define MOV_MOTOR_DOUB_POS_PARAM_NUM 5
#define MOV_SPEED_MODE_PARAM_NUM 6
// string messsage
#define STRING_MSG_MAINTENANCE ("MAINTENANCEMODE")
#define STRING_MSG_SYSWARN ("SET_SYSTEM_WARNING")
// strn, jam, cmd, msg len
#define STR_LEN_MAX 180
#define CMD_LEN_MAX 160
#define WRN_LEN_MAX 160
#define JAM_LEN_MAX (WRN_LEN_MAX)
// max number of motor aram
#define MOT_PARAM_MAX 20
#define STR_ARG_MAX 20
#define CMD_ARG_MAX 10
#define WRN_ARG_MAX 10
#define JAM_ARG_MAX 10
typedef void (*DELEGATE_STRHANDLER)(LPVOID pParam, LPVOID hostDelg);
#define DEFAULT_MSG_PORT "7468"
enum MACHINE_MSG_TYPE
{
STRING_RC = 1,
COMMAND_RC,
JAM_RC,
WARNING_RC,
WINMSG_RC
};
// Gary 25Aug10 V1.14.01, OPE machine status
enum OPE_MACHINE_STATUS
{
OPE_APPLICATION_START,
OPE_IDLE,
OPE_LOT_OPEN,
OPE_LOT_CLOSE,
OPE_MC_START,
OPE_MC_AUTO_STOP,
OPE_MC_MANUAL_STOP,
OPE_MC_JAM_STOP,
OPE_MC_EMERGENCY_STOP,
OPE_MC_JAM,
OPE_MC_JAM_RESET,
OPE_MC_STOP_DUE_TO_WARNING,
OPE_NO_MATERIAL_MODE,
OPE_PRODUCTION_MODE,
OPE_SCHEDULED_ACTIVITY_MODE,
OPE_ENGINEERING_MODE,
};
// Gary 25Aug10 V1.14.01, OPE machine stop mode
enum MC_STOP_MODE
{
MC_STOP_MODE_AUTO,
MC_STOP_MODE_MANUAL,
MC_STOP_MODE_JAM,
};
// Maximum Tower Lights - limit to 100 initially
enum TLIGHTS_CUSTOM
{
CUSTOM_LIGHT_000=0,
CUSTOM_LIGHT_001,
CUSTOM_LIGHT_002,
CUSTOM_LIGHT_003,
CUSTOM_LIGHT_004,
CUSTOM_LIGHT_005,
CUSTOM_LIGHT_006,
CUSTOM_LIGHT_007,
CUSTOM_LIGHT_008,
CUSTOM_LIGHT_009,
CUSTOM_LIGHT_MAX = 100,
};
enum TowerLightState {
TLIGHT_OFF_=0,
TLIGHT_ON_,
TLIGHT_ONOFF_,
MAX_LIGHT_MAX_STATE
};
const CString TLightState[MAX_LIGHT_MAX_STATE] =
{
"Off",
"On",
"OnOff"
};
class MCCTRDLLCLASS CRunCtrl : public CRunTask
{
public:
CRunCtrl(int numRun, CRun **run, CLotMsg *pLotMsg);
~CRunCtrl();
protected:
void strHandler(LPVOID pParam);
void cmdHandler(LPVOID pParam);
void jamHandler(LPVOID pParam);
void wrnHandler(LPVOID pParam);
public:
// Gary 22Jul11, V1.15.02
// method to query if lot is opened
bool IsLotOpened();
// Gary 22Jul11, V1.15.02
// method to informed runctrl that lot is opened and ready for run and
// it is used only during recovery when application restarted during processing
// of a lot.
// During normal operation, this method is not used.
void LotOpened();
bool IsMaintenanceOperationCompleted(int nModuleNo);
void StopMaintenanceOperation(int nModuleNo);
void StartMaintenanceOperation(int nModuleNo);
void UpdateEMSUnitCount();
void SetEMSOutput(int nNo, COutput *pOutput);
void SetEMSInput(int nNo, CInput *pInput);
bool CanMachineRun();
void InformAllRunCurtainSensorActivated();
void DisableJogMode();
void EnableJogMode();
bool SetOutputState(int nOutput, bool bState);
bool IsHardwareSafetyBypass();
bool IsStopButtonActivated(void);
void BypassDoor(BOOL bState);
void BypassCurtain(BOOL bState);
void SetSystemOutput(int nOutput, COutput *pOutput);
bool IsEngineeringBypass();
bool IsCurtainBypass();
bool IsDoorBypass();
void SetSystemInput(int nSwitch, CInput *pInput);
void ResetPowerUpComplete(void);
void SetModuleWarning(BOOL bState);
void SetSystemWarning(BOOL bState);
void SetIndicator(int nIndicator, COutput *output);
void GetLightStatus(CUIntArray *nLight);
void InitParameters(void);
void CloseLot(void);
void EmStopRelease(void);
// Operations
int Start();
// void Stop();
// Gary 26Aug10 V1.14.01, added parameter to indicate if the stop operation is Manual or Auto Stop
void Stop(bool bAuto = true);
void Reset();
void Restart();
void EmStop();
void SetTaskMode();
void ResetTaskMode();
bool IsTaskMode();
// GUI will call this function to set all sequence to Maintenance Mode
void SetMaintenanceMode();
// GUI will call this function to clear all sequence Maintenance Mode
void ResetMaintenanceMode();
// GUI will call this determine in Maintenance Mode
bool IsInMaintenanceMode();
// Gui will call this function to home motor in Maintenance Mode
void MaintenanceHomeMotor(int iRunSeqNo, int iMaintModuleNo, int iMotor);
// Gui will call this function to Move motor in Maintenance Mode
void MaintenanceMoveMotor(int iRunSeqNo, int iMaintModuleNo, int iMotor, int iPos,
double dPos, int iSpeed);
// GUI will call this function to Stop motor in Maintenance Mode
void MaintenanceStopMotor(int iRunSeqNo, int iMaintModuleNo, int iMotor);
// GUI will call this function to on/off output in Maintenance Mode
void MaintenanceOutput(int iRunSeqNo, int iMaintModuleNo, int iOutputNo, bool bOn);
// GUI will call this function to turn on/off motor in Maintenance Mode
void MaintenanceMotorOnOff(int iRunSeqNo, int iMaintModuleNo, int iMtrNo, bool bOn);
void StopAllMotor();
// Purging
// Threads
UINT RunThread();
// Fasteset C++ Delegates
DELEGATE_STRHANDLER strHandler2;
DELEGATE_STRHANDLER cmdHandler2;
DELEGATE_STRHANDLER wrnHandler2;
DELEGATE_STRHANDLER jamHandler2;
LPVOID hostDelgStr2;
LPVOID hostDelgCmd2;
LPVOID hostDelgWrn2;
LPVOID hostDelgJam2;
bool RegisterDelegate(int handlerType, DELEGATE_STRHANDLER, LPVOID);
// Utilities
int GetMcState();
BOOL IsModified();
void DisplayMsg(CDC *pDC, CString& msg, int xOff, int yOff, BOOL debug = false, BOOL debug_jam = false);
BOOL IsAllPowerUp(void);
// open lot
void OpenLot();
// get all SemiE10 timing
StSemiE10 GetCurrentTimeInfo();
void SetCurrentTimeInfo();
StSemiE10 m_stSemiE10;
// Get Semi Timing Time
long double GetSemiE10Time(int iEvt);
// get total uptime and down equipment state
long double GetTotalTime();
// get non scheduled time
long double GetNonScheduledTime();
// get operations time
long double GetOperationsTime();
// get uptime
long double GetUptime();
// get Downtime
long double GetDowntime();
// get engineering time
long double GetEngineeringTime();
// get manufacturing time
long double GetManufacturingTime();
// get productive time
long double GetProductiveTime();
// get standby time
long double GetStandbyTime();
// get unscheduled downtime
long double GetUnscheduledDowntime();
// get scheduled downtime
long double GetScheduledDowntime();
// Get Assist time in mins
long double GetAssistTime();
// get failure time in mins
long double GetFailureTime();
// get Mean Time Between Assist
long double GetMTBA();
// get Mean Time between Failure
long double GetMTBF();
// get Mean Time To Repair
long double GetMTTR();
// get Mean Time Between Interrupt
long double GetMTBI();
// get Units Per Hour
long GetUPH();
// get jam count
long GetJamCnt();
// get assist count
long GetAssistCnt();
// get failure count
long GetFailureCnt();
// record lot no to Lot time info
// void RecordLotNo(LPCTSTR lpLotNo, LPCTSTR lpCurTime);
// save lot info to database
void SaveLotInfo(LPCTSTR lpLotNo, LPCTSTR lpCurTime);
// get Lot record semie10 timing
StSemiE10 GetLotRecord(CString csLotNo, CString csLotStartTime);
// Delete lot record
void DeleteLotRecord(CString csLotNumber, double dStartDateTime);
// Get SemiE10 table name
CString GetSemiE10TableName();
// get all equipment substate field name
CMyStringArray GetAllSemiE10FieldName();
// Get SemiE10 combine lot record
StSemiE10 GetSemiE10CombineLotRecord(CString lpLotNo);
// Start all equipment state. Possible to start all equipment state?
void StartAllEquipState();
// Stop all equipment state
void StopAllEquipState();
// Reset all equipment state
void ResetAllEquipState();
// Get jam start date time
COleDateTime GetJamStartTime();
// Get jam End date time
COleDateTime GetJamEndTime();
// Get current Date time
COleDateTime GetCurrentTime();
// Get current Window;
HWND GetMainGuiWnd();
// send com data to all run modules in maintenance mode
void MaintenanceSendCom(LPCTSTR lpcComPort, int iBaudRate, int iDataBits,
LPCTSTR lpcParity, float fStopBits, LPCTSTR lpcFlowCtrl, LPCTSTR lpcSendMsg);
// send open com to all run modules in maintenance mode
void MaintenanceOpenCom(LPCTSTR lpcComPort, int iBaudRate, int iDataBits,
LPCTSTR lpcParity, float fStopBits, LPCTSTR lpcFlowCtrl);
// send close com to all run modules in maintenance mode
void MaintenanceCloseCom(LPCTSTR lpcComPort, int iBaudRate, int iDataBits,
LPCTSTR lpcParity, float fStopBits, LPCTSTR lpcFlowCtrl);
// send packet in maintenance mode
void MaintenanceSendPacket(LPCTSTR IpAddress, int iPortNo, LPCTSTR lpcSendMsg);
// connect port in maintenance mode
void MaintenanceConnectPort(LPCTSTR IpAddress, int iPortNo);
// connect port in maintenance mode
void MaintenanceDisconnectPort(LPCTSTR IpAddress, int iPortNo);
// find Gui Window Handler
void FindGuiWindow(CWnd* pMainWnd = NULL);
// Gui Separator
void InitGuiSeparator(void);
// Pass General Message to one or all modules(iModuleNo = -1)
void SetGenMsg(int iModuleNo, int iMsg);
SOCKET GetClientSock();
__declspec(deprecated("Use SendMachineMsgGrp( int msgType, const std::string &strMsg) instead"))
bool SendMachineMsgGrp(int msgType, int msgSize, char* msg);
//
bool SendMachineMsgGrp( int msgType, const std::string &strMsg);
bool PostRelayedMsg(UINT wp, UINT lp, UINT winMsg);
bool PostAlarmMsg(UINT wp, UINT lp, MACHINE_MSG_TYPE alarmMsgType);
bool PostMaintenanceClearMsg(UINT wp, UINT lp);
// Attributes
int m_mcState;
BOOL m_bDiagnose;
BOOL* m_pbMaintenanceMode;
enum
{
ALL_MODULES = -1,
};
// Gary 24Mar10, V1.13.4, change this object from private to public
CSemiE10RS m_SemiE10;
// Gary 16Jun10, implement Warning Message with Buzzer disable feature, START
// as well as Authroization Level to clear Jam
CPtrList m_ptrListJam;
CPtrList m_ptrListWarning;
CLotMsg *m_pLotMsg;
std::vector<int> m_vecDisabledBuzzerMsgID;
// 0 - Operator
// 1 - Technician
// 2 - Engineer
// 3 - SuperUser
struct JAM_AUTHORIZATION
{
int nJamID;
int nAuthorizationLevel;
};
std::vector<JAM_AUTHORIZATION> m_vecAuthroizationLevel;
CConcurrentQueue<std::shared_ptr<std::string> > m_strMsgQueue;
CConcurrentQueue<std::shared_ptr<std::string> > m_cmdMsgQueue;
CConcurrentQueue<std::shared_ptr<std::string> > m_jamMsgQueue;
CConcurrentQueue<std::shared_ptr<std::string> > m_wrnMsgQueue;
void AddDisabledBuzzerMsg(int nMsgID);
int GetHighestJamClearanceAuthorizationLevel();
// Gary 16Jun10, implement Warning Message with Buzzer disable feature, END
// as well as Authroization Level to clear Jam
// Set to True to Disable CRunCtrl Door Control Seqence when Machine state is not MC_RUNNING Or MC_INITIALIZING
void ByPassDoorControl(bool bByPassDoorCtrl);
// return true when acknowledged that Door Control has been by passed
bool IsDoorControlByPassed();
#if _MSC_VER >= 1600 // Version Higher than or equal to VC2010
/// Set whether run modules init parameters concurrently
void SetConcurrentIniPara(bool bConcurrentIniPara);
/// returns true if run modules init parameters concurrently else returns false
bool GetConcurrentIniPara();
#endif
void OnDestory();
void ReadParameters();
void AllModuleReadParam();
void ResetRunPuComplete();
void CheckResetRunPuComplete();
// send com data to all run modules in maintenance mode
void OnMaintenanceSendCom(LPCTSTR lpcComPort, int iBaudRate, int iDataBits, LPCTSTR lpcParity, float fStopBits,
LPCTSTR lpcFlowCtrl, LPCTSTR lpcSendMsg);
// send open com to all run modules in maintenance mode
void OnMaintenanceOpenCom(LPCTSTR lpcComPort, int iBaudRate, int iDataBits,
LPCTSTR lpcParity, float fStopBits, LPCTSTR lpcFlowCtrl);
// send close com to all run modules in maintenance mode
void OnMaintenanceCloseCom(LPCTSTR lpcComPort, int iBaudRate, int iDataBits,
LPCTSTR lpcParity, float fStopBits, LPCTSTR lpcFlowCtrl);
// send packet in maintenance mode
void OnMaintenanceSendPacket(LPCTSTR IpAddress, int iPortNo, LPCTSTR lpcSendMsg);
// connect port in maintenance mode
void OnMaintenanceConnectPort(LPCTSTR IpAddress, int iPortNo);
// disconnect port in maintenance mode
void OnMaintenanceDisconnectPort(LPCTSTR IpAddress, int iPortNo);
void SetCustomizedTowerLight(int customLightId);
void ClearCustomizedTowerLight();
bool GetCustomizedTowerLight();
// void get_SharedData(int index, int& data );
// void get_SharedData(int index, double& data);
void setMcDbIsBlocked(bool blocked);
bool getMcDbIsBlocked();
private:
void OnPowerUpCompleted();
void DoorControl();
enum
{
ESTOP_MC,
STOP_MC,
ESTOP_RELEASE_MC,
START_MC,
RESET_MC,
RESTART_MC,
MAX_MC_CTRL,
};
void SetLightStatus(void);
void InitLocalParameters(void);
BOOL IsCloseLotComplete(void);
BOOL IsWarning(void);
// Operations
void JamResetAllRun(void);
void RestartAllRun();
void SuspendAllRun();
bool ResumeAllRun();
inline void SetMcState(int state);
BOOL IsJam();
// Run Time Operations
void StartRunTime();
void StopRunTime(int state);
//
void OnMcStopped();
// Machine State
BOOL CheckMachineState();
void SaveMachineState();
void TaskProcessRxMsgFn();
void TaskTcpIPServerFn();
void EndAllRun(void);
// check current mode is to set or reset maintenance mode
void CheckMaintMode();
// start jam time
void StartJamTime();
// update time for euipment time calculation
void UpdateTime();
// Emergency stop release control
void EmStopReleaseCtrl(void);
// start machine control
int StartCtrl();
// stop machine control
// void StopCtrl();
// Gary 26Aug10 V1.14.01, added parameter to indicate if the stop operation is Manual or Auto Stop
void StopCtrl(int nStopCode);
// jam reset machine control
void ResetCtrl();
// restart machine control
void RestartCtrl();
// Emstop machine control
void EmStopCtrl();
// check current machine control
void CheckMcCtrl();
// reset all machine contrl flag
void ResetMcCtrlFlag();
// check current machine no material
void CheckMcNoMaterial();
// post jam reset message to gui
void PostJamResetToGui();
// check whether to post clear no material warning
void CheckClearNoMaterialWarn();
// inform all run modules close lot has completed
void OnCloseLotCompleted();
/// Inform all Run Modules EStop Pressed
void InformAllRunEStopPressed();
// Gary 16Aug10 V1.14.01, method to inform UI of OPE Status
bool PostOPESignal(unsigned int uintSignal);
bool PostOPEStopCode(int nStopCode);
void CheckFindGuiWindowRun();
void CheckOpenLot();
void SetOpenLot();
bool IsMaintCmdInProgress();
void WaitMaintCmdDone();
// void set_SharedData(int index, int data);
// void set_SharedData(int index, double data);
void TEST_MISC_IN_CYCLIC(int count);
void SHOW_LIGHT_CONFIG(int which_state);
// Attributes
int m_machineStateCheckCount;
CMutex m_maintMutex; // mutex to synchronised set or reset maintenance mode
CMutex m_mcCtrlMutex; // mutex to synchronised machine control
// run modules
int m_numRun;
CRun **m_run;
BOOL m_bCloseLot;
LIGHT_CONFIG m_lightConfig[NUM_MC_STATE];
LIGHT_CONFIG m_currentLightStatus;
BOOL m_bBlink;
COutput *m_copLightRed;
COutput *m_copLightAmber;
COutput *m_copLightGreen;
COutput *m_copBuzzer;
COutput *m_copStartIndicator;
COutput *m_copStopIndicator;
COutput *m_copResetIndicator;
BOOL m_bSystemWarning;
BOOL m_bModuleWarning;
bool m_bResetMaintMode; // flag to detemine reset maintenance mode
bool m_bMaintMode; // flag to determine set to maintenance mode
bool m_bCloseLotCompleted; // flag to determine close lot completed
bool m_bInMaintenanceMode; // flag to indicate at least one module is in maintenance
//
bool m_bTaskMode; // flag to set Task mode
bool m_bResetTaskMode; // flag to reset Task mode
bool m_bInTaskMode;
// Gary 24Mar10, V1.13.4, change this object from private to public
// CSemiE10RS m_SemiE10;
bool m_bMcCtrl[MAX_MC_CTRL]; // flag to determine machine control
// flag to determine whether no material warning has been post to GUI before
// true = post no material warning before
// false = have not post no material warning
bool m_bPostNoMaterial;
COleDateTime m_odtCurrentTime; // current time
COleDateTime m_odtJamStartTime; // jam Start time
COleDateTime m_odtJamEndTime; // jam end time
HWND m_hwndMainApp; // gui window handler
CCheckSwitch m_runCheckSwitch;
CEMS m_runEMS;
// indicate if in Jog Mode for stepping purpose
bool m_bJogMode;
// flag to disable buzzer during warning in Machine Stop Mode
bool m_bBuzzerOff;
// Gary 26Aug10 V1.14.01, flag to indicate if it's a manual/auto stop
bool m_bAutoStopRequested;
// Gary 22Jul11, V1.15.02, flag to indicate if a lot is open and machine is allowed to operate
bool m_bLotOpened;
// true = By Pass Door Control when machine state is not initialising or not running
bool m_bByPassDoorControl;
// true = runctrl acknowledged control of door lock has been by passed
bool m_bDoorControlByPassed;
#if _MSC_VER > 1200 // Version Higher than VC6
/// true == call run modules initparameters concurrently else call run modules initparameters sequently as in VC6 MITLIB
bool m_bConcurrentIniPara;
#endif
bool m_bFindWindow;
bool m_bIniParameters;
bool m_bResetRunPuComplete;
// Maintance mode variables
int m_iHmRunSeqNo;
int m_iHmMaintModuleNo;
int m_iHmMotor;
int m_iMvRunSeqNo;
int m_iMvMaintModuleNo;
int m_iMvMotor;
int m_iMvPos;
double m_dMvPos;
int m_iMvSpd;
int m_iStopRunSeqNo;
int m_iStopMaintModuleNo;
int m_iStopMotor;
int m_iOpRunSeqNo;
int m_iOpMaintModuleNo;
int m_iOutputNo;
int m_iOpOn;
int m_iMtrOnOffRunSeqNo;
int m_iMtrOnOffMaintModuleNo;
int m_iMtrOnOffMtrNo;
bool m_bMtrOnOff;
double m_dCurrentTime; // current time
double m_dJamStartTime; // jam Start time
double m_dJamEndTime; // jam end time
enum
{
NO_CMD = -1,
SEND_COM,
OPEN_COM,
CLOSE_COM,
SEND_PACKET,
CONNECT_PORT,
DISCONNECT_PORT,
};
int m_iComCmd;
char m_lpcComPort[10];
int m_iBaudRate;
int m_iDataBits;
char m_lpcParity[10];
float m_fStopBits;
char m_lpcFlowCtrl[10];
char m_lpcSendMsg[100];
char m_IpAddress[100];
int m_iPortNo;
// LPCTSTR lpcSendMsg;
CEvt m_evtIpControllerStartUpdate;
CEvt m_evtOpControllerStartUpdate;
CEvt m_evtMotionControllerStartUpdate;
// To inform GUI the InitParameters is completed
CEvt m_evtInitParameterCompleted;
bool m_bOnOpenLot;
bool m_bIsMcDBLocked;
bool m_bIsTcpEnabled;
// this is a tmporary fix for INITPARAMER-BUG
// - hslim
// Special Medssage - Shared data passing between WPF Gui-
// int iShared[MISC_SHARED_DATA_INTEGER_SIZE];
// double dShared[MISC_SHARED_DATA_DOUBLE_SIZE];
SOCKET m_TcpListenSocket;
SOCKET m_TcpClientSocket;
std::unique_ptr<CThread> m_thdTcpIPServer;
std::unique_ptr<CThread> m_thdProcessRxMsg;
bool m_IsCustomizedTowerLight;
int m_current_CustomLightId;
//
};
#endif // !defined __RUNCTRL_H__