public static TunnelingAck Parse(byte[] buffer, int index) { TunnelingAck request = new TunnelingAck { Header = KnxNetIPHeader.Parse(buffer, index), ConnectionHeader = KnxNetBodyConnectionHeader.Parse(buffer, index + 6) }; return(request); }
public static TunnelingRequest Parse(byte[] buffer, int index) { TunnelingRequest request = new TunnelingRequest { Header = KnxNetIPHeader.Parse(buffer, index), ConnectionHeader = KnxNetBodyConnectionHeader.Parse(buffer, index + 6) }; int cemiFrameSize = request.Header.Size - request.ConnectionHeader.StructureLength - request.Header.HeaderSize; if (cemiFrameSize == 0) { return(request); } CommonExternalMessageInterface msg; CommonExternalMessageInterface.TryParse(buffer, index + 10, cemiFrameSize, out msg); request.Message = msg; return(request); }