Ejemplo n.º 1
0
        public void getRemaining()
        {
            StringStack SS = new StringStack("11223344556677889900");

            Assert.AreEqual("1122", SS.getBytes(2));
            Assert.AreEqual("33", SS.getByte());
            Assert.AreEqual("44", SS.getByte());
            Assert.AreEqual("556677", SS.getBytes(3));
            Assert.AreEqual("889900", SS.getRemaining());
        }
Ejemplo n.º 2
0
        public void GetBytesTest()
        {
            StringStack SS = new StringStack("112233445566778899");

            Assert.AreEqual("1122", SS.getBytes(2));
            Assert.AreEqual("33", SS.getByte());
            Assert.AreEqual("44", SS.getByte());
            Assert.AreEqual("556677", SS.getBytes(3));
            Assert.AreEqual("112233445566778899", SS.OriginalString);
        }
Ejemplo n.º 3
0
        public void GetByteTest()
        {
            StringStack SS = new StringStack("112233445566");

            Assert.AreEqual("11", SS.getByte());
            Assert.AreEqual("22", SS.getByte());
            Assert.AreEqual("33", SS.getByte());
            Assert.AreEqual("44", SS.getByte());
            Assert.AreEqual("112233445566", SS.OriginalString);
        }
Ejemplo n.º 4
0
        public Data_0340(string val)
        {
            StringStack SS = new StringStack(val);
            TP_MTI = SS.getByte();
            TPOA = new TPDA();
            val = TPOA.parse(SS.getRemaining());

            SS = new StringStack(val);
            TP_PID = SS.getByte();
            TP_DCS = SS.getByte();
            TP_SCTS = SS.getBytes(7);

            UserData = new Data_0348(SS.getRemaining());
        }
Ejemplo n.º 5
0
        public Data_0340(string val)
        {
            StringStack SS = new StringStack(val);

            TP_MTI = SS.getByte();
            TPOA   = new TPDA();
            val    = TPOA.parse(SS.getRemaining());

            SS      = new StringStack(val);
            TP_PID  = SS.getByte();
            TP_DCS  = SS.getByte();
            TP_SCTS = SS.getBytes(7);

            UserData = new Data_0348(SS.getRemaining());
        }
Ejemplo n.º 6
0
        public Data_0348(string val)
        {
            StringStack SS = new StringStack(val);
            TPUDL = Convert.ToInt32(Convert.ToByte(SS.getByte(),16));
            UDHL =SS.getByte();
            IEIa =SS.getByte();
            IEDa =SS.getByte();
            CPL = SS.getBytes(2);
            CHL = Convert.ToInt32(Convert.ToByte(SS.getByte(), 16));
            SPI = SS.getBytes(2);
            Kic  = SS.getByte();
            Kid = SS.getByte();
            TAR = SS.getBytes(3);
            CNTR = SS.getBytes(5);
            PCNTR = SS.getByte();

            if (CHL > 13)
            {
                RC_CC_DS = SS.getBytes(CHL - 13);
            }

            SecureData = SS.getRemaining();
        }
Ejemplo n.º 7
0
        public Data_0348(string val)
        {
            StringStack SS = new StringStack(val);

            TPUDL = Convert.ToInt32(Convert.ToByte(SS.getByte(), 16));
            UDHL  = SS.getByte();
            IEIa  = SS.getByte();
            IEDa  = SS.getByte();
            CPL   = SS.getBytes(2);
            CHL   = Convert.ToInt32(Convert.ToByte(SS.getByte(), 16));
            SPI   = SS.getBytes(2);
            Kic   = SS.getByte();
            Kid   = SS.getByte();
            TAR   = SS.getBytes(3);
            CNTR  = SS.getBytes(5);
            PCNTR = SS.getByte();

            if (CHL > 13)
            {
                RC_CC_DS = SS.getBytes(CHL - 13);
            }

            SecureData = SS.getRemaining();
        }