Esempio n. 1
0
 /// <summary>
 /// 发送消息之前必须先设置解码器
 /// </summary>
 /// <param name="type"></param>
 private void SetDecoder(byte type)
 {
     if (Decoders.ContainsKey(type))
     {
         Decoder = Decoders[type];
     }
 }
Esempio n. 2
0
        protected List <LaserBaseResponse> CreateOneList(LaserBaseResponse br)
        {
            List <LaserBaseResponse> list = new List <LaserBaseResponse>();

            list.Add(br);
            return(list);
        }
Esempio n. 3
0
 private void InitializeDecoders()
 {
     Decoders       = new Dictionary <byte, LaserBaseResponse>();
     Decoders[0x00] = new LaserC00Response();
     Decoders[0x01] = new LaserC01Response();
     Decoders[0x03] = new LaserC03Response();
     Decoders[0x04] = new LaserC04Response();
     Decoders[0x05] = new LaserC05Response();
     Decoders[0x06] = new LaserC06Response();
     Decoders[0x07] = new LaserC07Response();
     Decoders[0x08] = new LaserC08Response();
     Decoders[0x09] = new LaserC09Response();
     Decoders[0x0B] = new LaserC0BResponse();
     Decoders[0x0C] = new LaserC0CResponse();
     Decoders[0x71] = new LaserC71Response();
     Decoders[0x72] = new LaserC72Response();
     Decoders[0x73] = new LaserC73Response();
     Decoders[0x74] = new LaserC74Response();
     Decoders[0x75] = new LaserC75Response();
     //initialize default decoder
     Decoder = Decoders[0x00];
 }