Пример #1
0
 public void ToStreamTest()
 {
     IntHexConverter target = new IntHexConverter();
     Assert.AreEqual<string>("0001", target.ToStream(1));
     Assert.AreEqual<string>("0002", target.ToStream(2));
     Assert.AreEqual<string>("0003", target.ToStream(3));
 }
Пример #2
0
 public void ToStreamThrowsArgumentOutOfRangeException2Test()
 {
     IntHexConverter target = new IntHexConverter();
     target.ToStream(65536);
 }
Пример #3
0
        private static string DemounterStatusStream3()
        {
            BoolConverter boolConverter = new BoolConverter();
            IntHexConverter intConverter = new IntHexConverter();
            string stream = "00FF"                             // station ID + pc ID
                            + boolConverter.ToStream(false)   // carrier plate arrival flag
                            + boolConverter.ToStream(true)    // IS error flag
                            + boolConverter.ToStream(true)    // carrier plate barcode read OK flag
                            + boolConverter.ToStream(false)   // carrier plate demount start flag
                            + intConverter.ToStream(6)        // carrier plate wafer size
                            + intConverter.ToStream(7)        // carrier plate wafer count
                            + "0003"                           // demount cassette station
                            + intConverter.ToStream(1)        // wafer demount counter
                            + boolConverter.ToStream(true)    // CP demount complete
                            + "0001"                           // empty CP routing
                            + "000000000000000000000000"       // ... some data ...
                            + "0002"                           // remove cassette from demount station
                            + intConverter.ToStream(6)        // cassette wafer size
                            + "0001"                           // destination station number of cassette
                            + "0002"                           // cassette barcode read start flag
                            + boolConverter.ToStream(true)    // cassette barcode read OK flag
                            + "00000000000000000000000000000000000000000000" // ... some data ...
                            + boolConverter.ToStream(false)   // spatula check flag
                            + boolConverter.ToStream(true)    // station 1 cassette sensor
                            + boolConverter.ToStream(false)   // station 2 cassette sensor
                            + boolConverter.ToStream(true)    // station 3 cassette sensor
                            + boolConverter.ToStream(true)    // station 4 cassette sensor
                            + "0003"                           // demounter machine state
                            + "\u0003"                         // ETX
                            ;

            return stream;
        }
Пример #4
0
        private static string StockerStatusStream3()
        {
            BoolConverter boolConverter = new BoolConverter();
            IntHexConverter intConverter = new IntHexConverter();
            string stream = "00FF"                             // station ID + pc ID
                            + boolConverter.ToStream(true)    // carrier plate arrival flag
                            + boolConverter.ToStream(true)    // IS Error Flag
                            + "0001"                           // CP Routing
                            + boolConverter.ToStream(false)   // magazine full flag
                            + boolConverter.ToStream(true)    // operator magazine change request flag
                            + boolConverter.ToStream(true)    // IS magazine change flag
                            + boolConverter.ToStream(true)    // magazine change start flag
                            + boolConverter.ToStream(true)    // input magazine barcode OK Flag
                            + "00000000000000000000000000000000" // ... some data ...
                            + intConverter.ToStream(6)        // wafer size requested
                            + boolConverter.ToStream(false)   // magazine request flag
                            + "0002"                           // stocker inventory
                            + boolConverter.ToStream(false)   // output magazine arrive flag
                            + "0002"                           // magazine selection
                            + intConverter.ToStream(3)        // polishline number
                            + "\u0003"                         // ETX
                            ;

            return stream;
        }
        public void LotDataToStream1Test()
        {
            string lotId = "NCHFYRT";
            List<ICassette> cassettes = PlcHelper.GetCassetteList(2);
            LotCassetteInfoToStreamConverter_Accessor target = new LotCassetteInfoToStreamConverter_Accessor();

            StringConverter stringConverter = new StringConverter();
            IntHexConverter intConverter = new IntHexConverter();

            string expected = stringConverter.ToStream(lotId).PadRight(28, '0');
            expected += stringConverter.ToStream(cassettes[0].CassetteId);
            expected = expected.PadRight(44, '0');
            expected += stringConverter.ToStream(cassettes[1].CassetteId);
            expected = expected.PadRight(60, '0');
            expected = expected.PadRight(220, '0') + intConverter.ToStream(cassettes.Count);

            Assert.AreEqual<string>(expected, target.LotDataToStream(PlcHelper.GetLotData(lotId, cassettes, PlcHelper.GetWaferList(50, 2))));
        }