public byte[] BuildResponse() { var PDUResp = PDU.BuildResponse(); var Response = new byte[PDUResp.Length + 3]; PDUResp.CopyTo(Response, 1); return(Response); }
public byte[] BuildResponse() { var PDUResp = PDU.BuildResponse(); var Response = new byte[PDUResp.Length + 3]; Response[0] = (byte)(Device as RTU_Device).Address; PDUResp.CopyTo(Response, 1); var crc = CRC.Get(Response, PDUResp.Length + 1); Response[PDUResp.Length + 1] = ((byte)(crc & 0xFF)); Response[PDUResp.Length + 2] = ((byte)(crc >> 8)); return(Response); }