Example #1
0
        public static MODBUSMaster_HoldingRegisterArray Empty()
        {
            var holdingRegisterArray = new MODBUSMaster_HoldingRegisterArray()
            {
                holdingRegisters = new List <MODBUSMaster_HoldingRegister>()
            };

            return(holdingRegisterArray);
        }
Example #2
0
        public static MODBUSMaster_HoldingRegisterArray Parse(SqlString stringToParse)
        {
            if (stringToParse.IsNull)
            {
                return(Null);
            }

            var parsedHoldingRegisterArray = new MODBUSMaster_HoldingRegisterArray()
            {
                holdingRegisters = new List <MODBUSMaster_HoldingRegister>()
            };

            var parsedString = stringToParse.Value.Split("|".ToCharArray());

            for (var i = 0; parsedString.Length > i; i++)
            {
                parsedHoldingRegisterArray.HoldingRegisters.Add(MODBUSMaster_HoldingRegister.Parse(parsedString[i]));
            }

            return(parsedHoldingRegisterArray);
        }