Ejemplo n.º 1
0
        public void 退币信号延时检测指令(string Code, string Address)
        {
            RouteInfo route;

            if (GetRouteInfo(Code, out route))
            {
                if (route.IsOnline)
                {
                    Info.HeadInfo.机头绑定信息 bind = new Info.HeadInfo.机头绑定信息();
                    bind.控制器令牌 = Code;
                    bind.短地址   = Address;
                    Info.HeadInfo.机头信息 h = Info.HeadInfo.GetHeadInfoByShort(bind);
                    if (h != null)
                    {
                        FrameData data = new FrameData();
                        data.commandType  = CommandType.远程被动退分解锁指令;
                        data.routeAddress = route.Segment;
                        List <byte> dataList = new List <byte>();
                        dataList.Add((byte)Convert.ToByte(Address, 16));
                        dataList.Add(0x01);
                        byte[] Send = PubLib.GetFrameDataBytes(data, dataList.ToArray(), CommandType.远程被动退分解锁指令);

                        SendData(Send, route.RemotePoint);
                    }
                }
            }
        }
Ejemplo n.º 2
0
        public void 远程投币上分(string Code, string Address, string ICCardID, int Coins)
        {
            RouteInfo route;

            if (GetRouteInfo(Code, out route))
            {
                if (route.IsOnline)
                {
                    Info.HeadInfo.机头绑定信息 bind = new Info.HeadInfo.机头绑定信息();
                    bind.控制器令牌 = Code;
                    bind.短地址   = Address;
                    Info.HeadInfo.机头信息 h = Info.HeadInfo.GetHeadInfoByShort(bind);
                    if (h != null)
                    {
                        h.常规.当前卡片号 = ICCardID;
                        FrameData data = new FrameData();
                        data.commandType  = CommandType.远程投币上分指令;
                        data.routeAddress = route.Segment;
                        List <byte> dataList = new List <byte>();
                        dataList.Add((byte)Convert.ToByte(Address, 16));
                        dataList.AddRange(BitConverter.GetBytes((UInt16)Coins));
                        dataList.AddRange(BitConverter.GetBytes((UInt16)h.远程投币上分流水号));
                        byte[] Send = PubLib.GetFrameDataBytes(data, dataList.ToArray(), CommandType.远程投币上分指令);

                        SendData(Send, route.RemotePoint);
                    }
                }
            }
        }