91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 152KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-05-24
  • 語言: C/C++
  • 標(biāo)簽: MODBUS??TCP??SERVER??源碼??

資源簡介

MODBUS TCP SERVER 源碼,c++,實(shí)現(xiàn)了功能碼 03,16。只是自己用于測試時(shí)開發(fā)的,功能有限,但可自行擴(kuò)充。希望對您有用。

資源截圖

代碼片段和文件信息

//?ClientSocket.cpp?:?implementation?file
//

#include?“stdafx.h“
#include?“ClientSocket.h“
#include?“ModbusTCPServer.h“
#include?“ModbusTCPServerDlg.h“

#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
//?CClientSocket
CClientSocket::CClientSocket(CModbusTCPServerDlg*?pParent)
{
m_pParent=pParent;
}

CClientSocket::CClientSocket()
{
m_pParent=NULL;
}
CClientSocket::~CClientSocket()
{
}


//?Do?not?edit?the?following?lines?which?are?needed?by?ClassWizard.
#if?0
BEGIN_MESSAGE_MAP(CClientSocket?CSocket)
//{{AFX_MSG_MAP(CClientSocket)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
#endif //?0

/////////////////////////////////////////////////////////////////////////////
//?CClientSocket?member?functions

void?CClientSocket::OnReceive(int?nErrorCode)?
{
//?TODO:?Add?your?specialized?code?here?and/or?call?the?base?class
CSocket::OnReceive(nErrorCode);
char lpBuf[MAXCHARS+1];
int?nBufLen;

memset(lpBuf0sizeof(lpBuf));
nBufLen=Receive(lpBufMAXCHARS);
m_pParent->ProcessCommand(thislpBufnBufLen);
}

void?CClientSocket::SendData(char?*data?DWORD?datalen)
{
UINT?nSends?=?0;
while(nSends {
nSends?+=?Send(data+nSendsdatalen-nSends0);
}
}

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----

?????文件???????1353??2017-07-31?22:37??Modbus?Tcp?Server\ModbusTCPServer\ModbusTCPServer\ClientSocket.cpp

?????文件???????1432??2017-08-01?09:46??Modbus?Tcp?Server\ModbusTCPServer\ModbusTCPServer\ClientSocket.h

?????文件?????106688??2017-08-01?12:04??Modbus?Tcp?Server\ModbusTCPServer\ModbusTCPServer\ModbusTCPServer.aps

?????文件???????2204??2017-07-31?11:28??Modbus?Tcp?Server\ModbusTCPServer\ModbusTCPServer\ModbusTCPServer.cpp

?????文件????????496??2017-07-31?11:03??Modbus?Tcp?Server\ModbusTCPServer\ModbusTCPServer\ModbusTCPServer.h

?????文件??????11674??2017-08-01?12:04??Modbus?Tcp?Server\ModbusTCPServer\ModbusTCPServer\ModbusTCPServer.rc

?????文件???????6171??2017-07-31?11:31??Modbus?Tcp?Server\ModbusTCPServer\ModbusTCPServer\ModbusTCPServer.vcxproj

?????文件???????2424??2017-07-31?11:31??Modbus?Tcp?Server\ModbusTCPServer\ModbusTCPServer\ModbusTCPServer.vcxproj.filters

?????文件????????143??2017-07-31?11:03??Modbus?Tcp?Server\ModbusTCPServer\ModbusTCPServer\ModbusTCPServer.vcxproj.user

?????文件??????10356??2017-08-01?12:00??Modbus?Tcp?Server\ModbusTCPServer\ModbusTCPServer\ModbusTCPServerDlg.cpp

?????文件???????1394??2017-08-01?11:01??Modbus?Tcp?Server\ModbusTCPServer\ModbusTCPServer\ModbusTCPServerDlg.h

?????文件???????3224??2017-07-31?11:03??Modbus?Tcp?Server\ModbusTCPServer\ModbusTCPServer\ReadMe.txt

????.......?????67777??2009-08-31?02:31??Modbus?Tcp?Server\ModbusTCPServer\ModbusTCPServer\res\ModbusTCPServer.ico

?????文件????????686??2017-07-31?11:03??Modbus?Tcp?Server\ModbusTCPServer\ModbusTCPServer\res\ModbusTCPServer.rc2

?????文件???????2018??2017-08-01?11:32??Modbus?Tcp?Server\ModbusTCPServer\ModbusTCPServer\resource.h

?????文件???????1073??2017-07-31?11:36??Modbus?Tcp?Server\ModbusTCPServer\ModbusTCPServer\ServerSocket.cpp

?????文件???????1307??2017-07-31?11:36??Modbus?Tcp?Server\ModbusTCPServer\ModbusTCPServer\ServerSocket.h

?????文件????????148??2017-07-31?11:03??Modbus?Tcp?Server\ModbusTCPServer\ModbusTCPServer\stdafx.cpp

?????文件???????1683??2017-07-31?11:03??Modbus?Tcp?Server\ModbusTCPServer\ModbusTCPServer\stdafx.h

?????文件????????234??2017-07-31?11:03??Modbus?Tcp?Server\ModbusTCPServer\ModbusTCPServer\targetver.h

?????文件????????912??2017-07-31?11:03??Modbus?Tcp?Server\ModbusTCPServer\ModbusTCPServer.sln

????..A..H.????164352??2017-08-01?12:04??Modbus?Tcp?Server\ModbusTCPServer\ModbusTCPServer.suo

?????目錄??????????0??2017-07-31?11:03??Modbus?Tcp?Server\ModbusTCPServer\ModbusTCPServer\res

?????目錄??????????0??2017-08-01?14:04??Modbus?Tcp?Server\ModbusTCPServer\ModbusTCPServer

?????目錄??????????0??2017-08-01?14:04??Modbus?Tcp?Server\ModbusTCPServer

?????目錄??????????0??2017-07-31?11:03??Modbus?Tcp?Server

-----------?---------??----------?-----??----

???????????????387749????????????????????26


評論

共有 條評論