Пример #1
0
 public InstanceUserArray(KaitaiStream p__io, KaitaiStruct p__parent = null, InstanceUserArray p__root = null) : base(p__io)
 {
     m_parent      = p__parent;
     m_root        = p__root ?? this;
     f_userEntries = false;
     _read();
 }
        public void TestInstanceUserArray()
        {
            var r = InstanceUserArray.FromFile(SourceFile("instance_std_array.bin"));

            Assert.AreEqual(r.Ofs, 16);
            Assert.AreEqual(r.QtyEntries, 3);
            Assert.AreEqual(r.EntrySize, 4);
            Assert.AreEqual(r.UserEntries.Count, 3);
            Assert.AreEqual(r.UserEntries[0].Word1, 4369);
            Assert.AreEqual(r.UserEntries[0].Word2, 4369);
            Assert.AreEqual(r.UserEntries[1].Word1, 8738);
            Assert.AreEqual(r.UserEntries[1].Word2, 8738);
            Assert.AreEqual(r.UserEntries[2].Word1, 13107);
            Assert.AreEqual(r.UserEntries[2].Word2, 13107);
        }
Пример #3
0
        public void TestInstanceUserArray()
        {
            InstanceUserArray r = InstanceUserArray.FromFile(SourceFile("instance_std_array.bin"));

            Assert.AreEqual(r.Ofs, 0x10);
            Assert.AreEqual(r.QtyEntries, 3);
            Assert.AreEqual(r.EntrySize, 4);

            Assert.AreEqual(r.UserEntries.Count, 3);
            Assert.AreEqual(r.UserEntries[0].Word1, 0x1111);
            Assert.AreEqual(r.UserEntries[0].Word2, 0x1111);
            Assert.AreEqual(r.UserEntries[1].Word1, 0x2222);
            Assert.AreEqual(r.UserEntries[1].Word2, 0x2222);
            Assert.AreEqual(r.UserEntries[2].Word1, 0x3333);
            Assert.AreEqual(r.UserEntries[2].Word2, 0x3333);
        }
Пример #4
0
 public Entry(KaitaiStream p__io, InstanceUserArray p__parent = null, InstanceUserArray p__root = null) : base(p__io)
 {
     m_parent = p__parent;
     m_root   = p__root;
     _read();
 }