public IRpdDumpRule Build()
        {
            var rule = new RpdDumpRuleSimple {
                Type = 0
            };

            if (_condition.UseValueAbs)
            {
                rule.Type += 0x01;
            }
            if (_condition.UseHighLimit)
            {
                rule.Type += 0x02;
            }
            if (_condition.UseLowLimit)
            {
                rule.Type += 0x04;
            }
            if (_condition.UseControlValue)
            {
                rule.Type += 0x08;
            }

            rule.MaxValue     = (short)_condition.HighLimit;
            rule.MinValue     = (short)_condition.LowLimit;
            rule.ControlValue = (short)_condition.ControlValue;
            return(rule);
        }
        public IRpdDumpRule Build()
        {
            var rule = new RpdDumpRuleSimple();
            var br   = new AdvancedBinaryReader(_stream, false);

            rule.Type         = br.ReadByte();
            rule.ControlValue = br.ReadInt16();
            rule.MaxValue     = br.ReadInt16();
            rule.MinValue     = br.ReadInt16();
            return(rule);
        }