diff --git a/MITLIB/Dll/CommDll100D.dll b/MITLIB/Dll/CommDll100D.dll index a81038c..93f7eb3 100644 Binary files a/MITLIB/Dll/CommDll100D.dll and b/MITLIB/Dll/CommDll100D.dll differ diff --git a/MITLIB/Dll/IODll100D.dll b/MITLIB/Dll/IODll100D.dll index 92a99ef..907e68d 100644 Binary files a/MITLIB/Dll/IODll100D.dll and b/MITLIB/Dll/IODll100D.dll differ diff --git a/MITLIB/Dll/SecsGem100.dll b/MITLIB/Dll/SecsGem100.dll index 52f9c9c..3bd0e2a 100644 Binary files a/MITLIB/Dll/SecsGem100.dll and b/MITLIB/Dll/SecsGem100.dll differ diff --git a/MITLIB/Dll/Utility100D.dll b/MITLIB/Dll/Utility100D.dll index 6e13b7d..17946f1 100644 Binary files a/MITLIB/Dll/Utility100D.dll and b/MITLIB/Dll/Utility100D.dll differ diff --git a/MITLIB/Dll/mcctrdll100D.dll b/MITLIB/Dll/mcctrdll100D.dll index a135cd5..3220239 100644 Binary files a/MITLIB/Dll/mcctrdll100D.dll and b/MITLIB/Dll/mcctrdll100D.dll differ diff --git a/MITLIB/Lib/CommDll100D.lib b/MITLIB/Lib/CommDll100D.lib index 9bd6087..73157f5 100644 Binary files a/MITLIB/Lib/CommDll100D.lib and b/MITLIB/Lib/CommDll100D.lib differ diff --git a/MITLIB/Lib/IODll100D.lib b/MITLIB/Lib/IODll100D.lib index f94d552..4a222e0 100644 Binary files a/MITLIB/Lib/IODll100D.lib and b/MITLIB/Lib/IODll100D.lib differ diff --git a/MITLIB/Lib/SecsGem100.lib b/MITLIB/Lib/SecsGem100.lib index 5289461..e41203d 100644 Binary files a/MITLIB/Lib/SecsGem100.lib and b/MITLIB/Lib/SecsGem100.lib differ diff --git a/MITLIB/Lib/Utility100D.lib b/MITLIB/Lib/Utility100D.lib index e354183..d4c15d8 100644 Binary files a/MITLIB/Lib/Utility100D.lib and b/MITLIB/Lib/Utility100D.lib differ diff --git a/MITLIB/Lib/mcctrdll100D.lib b/MITLIB/Lib/mcctrdll100D.lib index e06bdbc..b17ef13 100644 Binary files a/MITLIB/Lib/mcctrdll100D.lib and b/MITLIB/Lib/mcctrdll100D.lib differ diff --git a/MITLIB/Utility/Utility.rc b/MITLIB/Utility/Utility.rc index 01ed473..3d3fa61 100644 --- a/MITLIB/Utility/Utility.rc +++ b/MITLIB/Utility/Utility.rc @@ -107,8 +107,8 @@ VS_VERSION_INFO$(VERSION_CONTROL) VERSIONINFO #else VS_VERSION_INFO VERSIONINFO #endif - FILEVERSION 6,0,0,2 - PRODUCTVERSION 6,0,0,2 + FILEVERSION 6,0,0,3 + PRODUCTVERSION 6,0,0,3 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x21L @@ -126,15 +126,15 @@ BEGIN VALUE "Comments", "1. Reduce opening and closing of MitLanguage.mdb" VALUE "CompanyName", "MIT " VALUE "FileDescription", "Utility" - VALUE "FileVersion", "6.0.0.2\0" + VALUE "FileVersion", "6.0.0.3\0" VALUE "InternalName", "Utility" VALUE "LegalCopyright", "Copyright © 2016" VALUE "LegalTrademarks", " " VALUE "OriginalFilename", "Utility.dll" VALUE "PrivateBuild", " " VALUE "ProductName", "MIT Utility" - VALUE "ProductVersion", "6.0.0.2\0" - VALUE "SpecialBuild", "mitlib-release-6-2\0" + VALUE "ProductVersion", "6.0.0.3\0" + VALUE "SpecialBuild", "mitlib-release-6-3\0" END END BLOCK "VarFileInfo" diff --git a/MITLIB/mcctrdll/MsgDecode.h b/MITLIB/mcctrdll/MsgDecode.h new file mode 100644 index 0000000..01c0fb4 --- /dev/null +++ b/MITLIB/mcctrdll/MsgDecode.h @@ -0,0 +1,49 @@ +#pragma once + +#include +#include + +#ifdef BUILD_MCCTRDLL +#define MCCTRDLLCLASS __declspec(dllexport) +#else +#define MCCTRDLLCLASS __declspec(dllimport) +#endif + +#define MC_MESSAGE_SIZE_MAX 512 + +typedef struct _MC_MSG_GRP +{ + int msgType; + int msgSize; + char byteMsg[MC_MESSAGE_SIZE_MAX]; +} MC_MSG_GRP; + +typedef struct _MSG_DATA +{ + int msgType; + std::string strByteMsg; +} MC_DATA; + +class MCCTRDLLCLASS CMsgDecode +{ +public: + CMsgDecode(void); + ~CMsgDecode(void); + + bool getMsg(MC_DATA &msg); + + void appendPacket(const char *chStream, int size); + void appendPacket(const std::string &strStream); + void appendByte(char chByte) ; + void resetBuf(); + + std::string createMsg(int nType, const std::string &strMsg); + int ReadInt32(const std::string &strBuf); + std::string WriteInt32(int nData); + +private: + void discardPacket(size_t Len); + + std::string m_strBuf; +}; + diff --git a/MITLIB/mcctrdll/mcctrdll.rc b/MITLIB/mcctrdll/mcctrdll.rc index 4feef6e..879d6a8 100644 --- a/MITLIB/mcctrdll/mcctrdll.rc +++ b/MITLIB/mcctrdll/mcctrdll.rc @@ -71,8 +71,8 @@ VS_VERSION_INFO$(VERSION_CONTROL) VERSIONINFO #else VS_VERSION_INFO VERSIONINFO #endif - FILEVERSION 6,0,0,2 - PRODUCTVERSION 6,0,0,2 + FILEVERSION 6,0,0,3 + PRODUCTVERSION 6,0,0,3 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -90,15 +90,15 @@ BEGIN VALUE "Comments", "1. Decouple GUI" VALUE "CompanyName", "MIT " VALUE "FileDescription", "mcctrdll" - VALUE "FileVersion", "6.0.0.2\0" + VALUE "FileVersion", "6.0.0.3\0" VALUE "InternalName", "mcctrdll" VALUE "LegalCopyright", "Copyright © 2016" VALUE "LegalTrademarks", " " VALUE "OriginalFilename", "mcctrdll.dll" VALUE "PrivateBuild", " " VALUE "ProductName", "MIT mcctrdll" - VALUE "ProductVersion", "6.0.0.2\0" - VALUE "SpecialBuild", "mitlib-release-6-2\0" + VALUE "ProductVersion", "6.0.0.3\0" + VALUE "SpecialBuild", "mitlib-release-6-3\0" END END BLOCK "VarFileInfo" diff --git a/MITLIB/mcctrdll/run.h b/MITLIB/mcctrdll/run.h index 32fa5cf..09bb87a 100644 --- a/MITLIB/mcctrdll/run.h +++ b/MITLIB/mcctrdll/run.h @@ -103,7 +103,10 @@ public: bool IsTaskMode(); bool IsAutoMode(); int GetMode(); + virtual void OnStopComplete(); + // virtual function to allow application to handle some operation upon Reset() + virtual void OnResetComplete(); // virtual void OnMcStopped(); // diff --git a/MITLIB/mcctrdll/runctrl.h b/MITLIB/mcctrdll/runctrl.h index c69c0e6..cef66be 100644 --- a/MITLIB/mcctrdll/runctrl.h +++ b/MITLIB/mcctrdll/runctrl.h @@ -23,6 +23,9 @@ #include "ConcurrentQueue.h" #include + +#include "MsgDecode.h" + #include #include @@ -42,13 +45,10 @@ #define STRING_MSG_OUTPUT_TRIGGER_LENGTH 13 // (strlen(("OUTPUTTRIGGER")) #define STRING_MSG_WAFERUPDATE ("WAFERUPDATE") -#define STRING_MSG_WAFERUPDATE_LENGTH 11 // (strlen(("WAFERUPDATE")) #define STRING_MSG_WAFERSETUP_DIEMOV ("WAFERDIEMOVE") -#define STRING_MSG_WAFERSETUP_DIEMOV_LENGTH 12 // (strlen((("WAFERDIEMOVE")) #define STRING_REPLY_MAINTENANCEMODE_JOBDONE ("MAINTENANCEMODE_JOBDONE,") // add comma (reply) -#define STRING_REPLY_MAINTENANCEMODE_JOBDONE_LENGTH 24 // (strlen((("MAINTENANCEMODE_JOBDONE,")) #define MOTOR_CMD_LEN 6 // strlen("MOTOR") = 6 @@ -94,8 +94,6 @@ #define WRN_LEN_MAX 160 #define JAM_LEN_MAX (WRN_LEN_MAX) -#define MC_MESSAGE_SIZE_MAX (STR_LEN_MAX) - // max number of motor aram #define MOT_PARAM_MAX 20 #define STR_ARG_MAX 20 @@ -105,15 +103,6 @@ typedef void (*DELEGATE_STRHANDLER)(LPVOID pParam, LPVOID hostDelg); -class MC_MSG_GRP -{ -public: - int msgType; - int msgSize; - char msg[MC_MESSAGE_SIZE_MAX]; -}; - -const int DEFAULT_BUFLEN = sizeof(MC_MSG_GRP); #define DEFAULT_MSG_PORT "7468" enum MACHINE_MSG_TYPE { @@ -446,7 +435,12 @@ public: 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); @@ -828,6 +822,9 @@ private: bool m_IsCustomizedTowerLight; int m_current_CustomLightId; + + // + }; #endif // !defined __RUNCTRL_H__