22 lines
359 B
C++
22 lines
359 B
C++
|
#include "S7Command.h"
|
||
|
|
||
|
S7Command::S7Command(int id,unsigned int itemCount)
|
||
|
:m_itemCount(itemCount)
|
||
|
, m_waitTime(0)
|
||
|
{
|
||
|
m_id=id;
|
||
|
m_dataItems=new TS7DataItem[itemCount];
|
||
|
m_CreateTime = GetTickCount64();
|
||
|
}
|
||
|
|
||
|
|
||
|
S7Command::~S7Command(void)
|
||
|
{
|
||
|
if(m_dataItems){
|
||
|
for(int i=0;i<m_itemCount;++i){
|
||
|
delete[] m_dataItems[i].pdata;
|
||
|
}
|
||
|
delete[] m_dataItems;
|
||
|
}
|
||
|
|
||
|
}
|