Esempio n. 1
0
        public static MBusFrame CreateShortFrame(byte controlField, byte addressField)
        {
            MBusFrame mbusFrame = new MBusFrame
            {
                FrameType    = MBusFrameType.ShortFrame,
                AddressField = addressField,
                ControlField = controlField
            };

            return(mbusFrame);
        }
Esempio n. 2
0
        public static MBusFrame CreateChangePrimaryAddressFrame(byte from, byte to)
        {
            MBusFrame mbusFrame = new MBusFrame
            {
                FrameType    = MBusFrameType.LongFrame,
                AddressField = from,
                ControlField = 0x53,
                CiField      = 0x51
            };

            mbusFrame.UserData = new byte[] { 0x01, 0x7A, to };
            return(mbusFrame);
        }