예제 #1
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    input.SkipLastField();
                    break;

                case 10: {
                    Name = input.ReadString();
                    break;
                }

                case 16: {
                    type_ = (global::Com.Richisland.Proto.pb_data_type)input.ReadEnum();
                    break;
                }

                case 24: {
                    Size = input.ReadInt32();
                    break;
                }

                case 34: {
                    Value = input.ReadBytes();
                    break;
                }

                case 40: {
                    Time = input.ReadInt64();
                    break;
                }

                case 48: {
                    Quality = input.ReadInt32();
                    break;
                }

                case 56: {
                    status_ = (global::Com.Richisland.Proto.pb_data_status)input.ReadEnum();
                    break;
                }

                case 64: {
                    unit_ = (global::Com.Richisland.Proto.pb_data_unit)input.ReadEnum();
                    break;
                }
                }
            }
        }
예제 #2
0
 public void MergeFrom(pb_config_tag other)
 {
     if (other == null)
     {
         return;
     }
     if (other.TagId != 0)
     {
         TagId = other.TagId;
     }
     if (other.TagName.Length != 0)
     {
         TagName = other.TagName;
     }
     if (other.SaveTagName.Length != 0)
     {
         SaveTagName = other.SaveTagName;
     }
     if (other.PublishTagName.Length != 0)
     {
         PublishTagName = other.PublishTagName;
     }
     if (other.DataType != 0)
     {
         DataType = other.DataType;
     }
     if (other.DataFormat != 0)
     {
         DataFormat = other.DataFormat;
     }
     if (other.StringDataEncoding != 0)
     {
         StringDataEncoding = other.StringDataEncoding;
     }
     if (other.CorrectCoefficient != 0F)
     {
         CorrectCoefficient = other.CorrectCoefficient;
     }
     if (other.AdiustParameters != 0F)
     {
         AdiustParameters = other.AdiustParameters;
     }
     if (other.DataUnit != 0)
     {
         DataUnit = other.DataUnit;
     }
 }
예제 #3
0
 public void MergeFrom(pb_data_sensor other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     if (other.Type != 0)
     {
         Type = other.Type;
     }
     if (other.Size != 0)
     {
         Size = other.Size;
     }
     if (other.Value.Length != 0)
     {
         Value = other.Value;
     }
     if (other.Time != 0L)
     {
         Time = other.Time;
     }
     if (other.Quality != 0)
     {
         Quality = other.Quality;
     }
     if (other.Status != 0)
     {
         Status = other.Status;
     }
     if (other.Unit != 0)
     {
         Unit = other.Unit;
     }
 }
예제 #4
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    input.SkipLastField();
                    break;

                case 8: {
                    TagId = input.ReadInt32();
                    break;
                }

                case 18: {
                    TagName = input.ReadString();
                    break;
                }

                case 26: {
                    SaveTagName = input.ReadString();
                    break;
                }

                case 34: {
                    PublishTagName = input.ReadString();
                    break;
                }

                case 40: {
                    dataType_ = (global::Com.Richisland.Proto.pb_data_type)input.ReadEnum();
                    break;
                }

                case 48: {
                    DataFormat = input.ReadInt32();
                    break;
                }

                case 56: {
                    stringDataEncoding_ = (global::Com.Richisland.Proto.pb_encoding_type)input.ReadEnum();
                    break;
                }

                case 69: {
                    CorrectCoefficient = input.ReadFloat();
                    break;
                }

                case 77: {
                    AdiustParameters = input.ReadFloat();
                    break;
                }

                case 80: {
                    dataUnit_ = (global::Com.Richisland.Proto.pb_data_unit)input.ReadEnum();
                    break;
                }
                }
            }
        }