public int GetNextData(ref IDataStruct pDataStruct, ushort waitseconds) { var datastruct = new DtuDataStruct(); var result = GPRSDTUWrapper.DSGetNextData(ref datastruct, waitseconds); if (pDataStruct == null) { pDataStruct = new DataStruct(); } pDataStruct.Id = datastruct.m_dtuId; pDataStruct.DataBuff = datastruct.m_data_buf; pDataStruct.DataLength = datastruct.m_data_len; pDataStruct.DataType = datastruct.m_data_type; pDataStruct.ReceiveTime = datastruct.m_recv_time; return(result); }
public static extern int DSGetNextData(ref DtuDataStruct pDataStruct, ushort waitseconds);