Ejemplo n.º 1
0
        public void TestBcdUserTypeBe()
        {
            var r = BcdUserTypeBe.FromFile(SourceFile("bcd_user_type_be.bin"));

            Assert.AreEqual(r.Ltr.AsInt, 12345678);
            Assert.AreEqual(r.Ltr.AsStr, "12345678");
            Assert.AreEqual(r.Rtl.AsInt, 87654321);
            Assert.AreEqual(r.Rtl.AsStr, "87654321");
            Assert.AreEqual(r.LeadingZeroLtr.AsInt, 123456);
            Assert.AreEqual(r.LeadingZeroLtr.AsStr, "00123456");
        }
Ejemplo n.º 2
0
 public LeadingZeroLtrObj(KaitaiStream p__io, BcdUserTypeBe p__parent = null, BcdUserTypeBe p__root = null) : base(p__io)
 {
     m_parent = p__parent;
     m_root   = p__root;
     f_asInt  = false;
     f_digit2 = false;
     f_digit4 = false;
     f_digit3 = false;
     f_digit5 = false;
     f_digit8 = false;
     f_digit6 = false;
     f_asStr  = false;
     f_digit1 = false;
     f_digit7 = false;
     _read();
 }
Ejemplo n.º 3
0
 public BcdUserTypeBe(KaitaiStream p__io, KaitaiStruct p__parent = null, BcdUserTypeBe p__root = null) : base(p__io)
 {
     m_parent = p__parent;
     m_root   = p__root ?? this;
     _read();
 }