public void SendSetResponse(PhysicalAddress destination, uint xid, DCP.BlockOptions option, DCP.BlockErrors status)
        {
            Trace.WriteLine("Sending Set " + option.ToString() + " response", null);

            MemoryStream mem = new MemoryStream();

            //ethernet
            Ethernet.Encode(mem, destination, adapter.MacAddress, Ethernet.Type.VLanTaggedFrame);

            //VLAN
            VLAN.Encode(mem, VLAN.Priorities.Priority0, VLAN.Type.PN);

            //Profinet Real Time
            RT.EncodeFrameId(mem, RT.FrameIds.DCP_Get_Set_PDU);

            //Profinet DCP
            DCP.EncodeSetResponse(mem, xid, option, status);

            //Send
            Send(mem);
        }
        public IAsyncResult BeginGetRequest(PhysicalAddress destination, DCP.BlockOptions option)
        {
            Trace.WriteLine("Sending Get " + option.ToString() + " request", null);

            MemoryStream mem = new MemoryStream();

            //ethernet
            Ethernet.Encode(mem, destination, adapter.MacAddress, Ethernet.Type.VLanTaggedFrame);

            //VLAN
            VLAN.Encode(mem, VLAN.Priorities.Priority0, VLAN.Type.PN);

            //Profinet Real Time
            RT.EncodeFrameId(mem, RT.FrameIds.DCP_Get_Set_PDU);

            //Profinet DCP
            UInt16 xid = ++lastXid;

            DCP.EncodeGetRequest(mem, xid, option);
            //start Async
            return(new ProfinetAsyncDcpResult(this, mem, xid));
        }