Пример #1
0
        protected override bool ProcessG2HMessageInternal(ExComms.Contracts.DTO.Monitor.MonMsg_G2H request)
        {
            using (ILogMethod method = Log.LogMethod("MonitorHandler_ExtendedGameInfo", "ProcessG2HMessageInternal"))
            {
                try
                {

                    //MonTgt_G2H_ExtendedGameInfo monTgtMsg = request.Targets[0] as MonTgt_G2H_ExtendedGameInfoInfo;

                //    if (ExCommsDataContext.Current.UpdateInstallationGameInfo(monTgtMsg.installationNo,monTgtMsg.GameNumber,monTgtMsg.MaxBet,monTgtMsg.ProgressGroup,monTgtMsg.ProgressLevel,monTgtMsg.GameName,monTgtMsg.PayTableName,false,monTgtMsg.HasGameNameFramed,""))
                    {

                    }
                    
                    //++k BGSMeterHandler.Proceess
                    return true;

                }
                catch (Exception ex)
                {
                    method.Exception(ex);
                }
                return false;
            }
        }
 void IExMonServer4MonProcessor.Unsubscribe(ExComms.Contracts.DTO.Monitor.ExMonServer4MonProcessorCallbackTypes callbackType, ExComms.Contracts.DTO.UnsubscribeRequestEntity request)
 {
     _commsServerCallbackHelper.Unsubscribe(new ExMonServer4MonProcessorSubscribeEntity()
     {
         CallbackType = callbackType,
         Entity = request,
     });
 }
        bool IExMonServer4CommsServer.ProcessG2HMessage(ExComms.Contracts.DTO.Monitor.MonMsg_G2H request)
        {
            using (ILogMethod method = Log.LogMethod(this.DYN_MODULE_NAME, "ProcessG2HMessage"))
            {
                bool result = default(bool);

                try
                {
                    string ipAddress = request.IpAddress;
                    string hostAddress = request.HostIpAddress;

                    // comms server instance
                    if (!_commsServerCallbacks.ContainsKey(hostAddress))
                    {
                        _commsServerCallbacks.GetOrAdd(hostAddress, ExCommsServerHostFactoryActivatorFactory.Current.CommunicationServer);
                    }

                    // gmus associated with comms servers (by ip address)
                    if (!_commsServersMapByIp.ContainsKey(ipAddress))
                    {
                        _commsServersMapByIp.GetOrAdd(ipAddress, hostAddress);
                    }
                    else
                    {
                        _commsServersMapByIp[ipAddress] = hostAddress;
                    }

                    // get the installation no
                    if (_mapIpInsNo.ContainsKey(ipAddress))
                    {
                        request.InstallationNo = _mapIpInsNo[ipAddress];
                    }

                    // fill the request values by using installation no
                    if (request.InstallationNo > 0)
                    {
                        this.FillRequestValues(request);
                    }

                    // gmus associated with comms servers (by installation no)
                    this.UpdateCommsServerHostAddress(request.InstallationNo, hostAddress);

                    // post the message into transceiver
                    result = _transceiver.ProcessG2HMessage(request);
                }
                catch (Exception ex)
                {
                    method.Exception(ex);
                }

                return result;
            }
        }
Пример #4
0
 protected override bool OnExecuteInternal(MonitorExecutionContext context, ExComms.Contracts.DTO.Monitor.MonitorEntity_MsgTgt target)
 {
     using (ILogMethod method = Log.LogMethod(this.DYN_MODULE_NAME, "OnExecuteInternal"))
     {
         try
         {
             this.ForceMeterRead(context, target);
             return true;
         }
         catch (Exception ex)
         {
             ExceptionManager.Publish(ex);
             return false;
         }
     }
 }
        bool IExMonServer4MonProcessor.ProcessH2GMessage(ExComms.Contracts.DTO.Monitor.MonMsg_H2G request)
        {
            using (ILogMethod method = Log.LogMethod(this.DYN_MODULE_NAME, "ProcessG2HMessage"))
            {
                bool result = default(bool);

                try
                {
                    result = ((IExMonServer4CommsServer2)this).ProcessH2GMessage(request);
                }
                catch (Exception ex)
                {
                    method.Exception(ex);
                }

                return result;
            }
        }
Пример #6
0
        protected override bool OnExecuteInternal(MonitorExecutionContext context, ExComms.Contracts.DTO.Monitor.MonitorEntity_MsgTgt target)
        {
            using (ILogMethod method = Log.LogMethod(this.DYN_MODULE_NAME, "OnExecuteInternal"))
            {
                try
                {
                    MonMsg_G2H request = context.G2HMessage;
                    request.FaultSource = 200;

                    base.AddFaultEvent(request.InstallationNo, request.FaultSource, request.FaultType, string.Empty, true, request.FaultDate);
                    return base.OnExecuteInternal(context, target);
                }
                catch (Exception ex)
                {
                    method.Exception(ex);
                    return false;
                }
            }
        }
Пример #7
0
        protected override bool OnExecuteInternal(MonitorExecutionContext context, ExComms.Contracts.DTO.Monitor.MonitorEntity_MsgTgt target)
        {
            using (ILogMethod method = Log.LogMethod(this.DYN_MODULE_NAME, "OnExecuteInternal"))
            {
                try
                {
                    MonMsg_G2H request = context.G2HMessage;
                    string faultDesc = request.FaultType == (int)FaultType_NonPriorityEvent.CommsStopped ? "Polling Failed" : "Polling Resumed";

                    base.AddFaultEvent(request.InstallationNo, request.FaultSource, request.FaultType, faultDesc, true, request.FaultDate);
                    return base.OnExecuteInternal(context, target);
                }
                catch (Exception ex)
                {
                    method.Exception(ex);
                    return false;
                }
            }
        }
Пример #8
0
        protected override bool ProcessG2HMessageInternal(ExComms.Contracts.DTO.Monitor.MonMsg_G2H request)
        {
            using (ILogMethod method = Log.LogMethod("MonitorHandler_CardLessPlay", "ProcessG2HMessageInternal"))
            {
                DateTime dDate = default(System.DateTime);
                dDate = request.FaultDate;

                try
                {
                    ExCommsDataContext.Current.AddFaultEvent(request.InstallationNo, request.FaultSource, request.FaultType, "", true, dDate);
                }
                catch (Exception ex)
                {
                    ExceptionManager.Publish(ex);
                }

                return true;
            }
        }
        protected override bool OnExecuteInternal(MonitorExecutionContext context, ExComms.Contracts.DTO.Monitor.MonitorEntity_MsgTgt target)
        {
            using (ILogMethod method = Log.LogMethod(this.DYN_MODULE_NAME, "OnExecuteInternal"))
            {
                bool result = default(bool);

                try
                {
                    MonMsg_G2H request = context.G2HMessage;
                    DateTime dDate = request.FaultDate;
                    return ExCommsDataContext.Current.InsertGeneralEvents(request.InstallationNo, target.FaultType, true, dDate, target.FaultSource);
                }
                catch (Exception ex)
                {
                    method.Exception(ex);
                }

                return result;
            }
        }
Пример #10
0
        protected override bool ProcessG2HMessageInternal(ExComms.Contracts.DTO.Monitor.MonMsg_G2H request)
        {
            using (ILogMethod method = Log.LogMethod("MonitorHandler_GameInfo", "ProcessG2HMessageInternal"))
            {
                try
                {
                    MonTgt_G2H_GameInfo monTgtMsg = request.Targets[0] as MonTgt_G2H_GameInfo;
                  
                 //   if (ExCommsDataContext.Current.UpdateSession_MGMD_MeterHistory(monTgtMsg))
                    {

                    }
                    method.Debug("Snap taken, now update the latest meters in floor financials");
                    //++k BGSMeterHandler.Proceess
                    return true;

                }
                catch (Exception ex)
                {
                    method.Exception(ex);
                }
                return false;
            }
        }
 ExComms.Contracts.DTO.Monitor.MonMsg_G2H IExMonServer4MonClient.ProcessH2GMessageSync(ExComms.Contracts.DTO.Monitor.MonMsg_H2G request)
 {
     throw new NotImplementedException();
 }
 bool IExMonServer4MonClient.ProcessG2HMessage(ExComms.Contracts.DTO.Monitor.MonMsg_G2H request)
 {
     throw new NotImplementedException();
 }
 void IExMonServer4MonClient.Unsubscribe(ExComms.Contracts.DTO.Monitor.ExMonServer4MonClientCallbackTypes callbackType, ExComms.Contracts.DTO.UnsubscribeRequestEntity request)
 {
     throw new NotImplementedException();
 }
Пример #14
0
 protected override bool ProcessH2GMessageInternal(ExComms.Contracts.DTO.Monitor.MonMsg_H2G response)
 {
     return false;
 }
Пример #15
0
 protected override bool ProcessG2HMessageInternal(ExComms.Contracts.DTO.Monitor.MonMsg_G2H request)
 {
     return false;
 }
        bool IExMonServer4CommsServer2.ProcessH2GMessage(ExComms.Contracts.DTO.Monitor.MonMsg_H2G request)
        {
            using (ILogMethod method = Log.LogMethod(this.DYN_MODULE_NAME, "ProcessG2HMessage"))
            {
                bool result = default(bool);

                try
                {
                    // unable to get the instllation no
                    if (request.InstallationNo <= 0)
                    {
                        Log.Info("Unable to get the installation no.");
                        return false;
                    }

                    // find the host by installation no or ip address
                    string hostIpAddress = string.Empty;
                    if (_commsServersMapByInsno.ContainsKey(request.InstallationNo))
                    {
                        _commsServersMapByInsno.TryGetValue(request.InstallationNo, out hostIpAddress);
                    }
                    else if (!request.IpAddress.IsEmpty() &&
                            _commsServersMapByIp.ContainsKey(request.IpAddress))
                    {
                        _commsServersMapByIp.TryGetValue(request.IpAddress, out hostIpAddress);
                        _commsServersMapByInsno.GetOrAdd(request.InstallationNo, hostIpAddress);
                    }

                    // get the callback by host ip address
                    if (!hostIpAddress.IsEmpty() &&
                        _commsServerCallbacks.ContainsKey(hostIpAddress))
                    {
                        IExMonServer4CommsServerCallback callback = _commsServerCallbacks[hostIpAddress];
                        if (callback != null)
                        {
                            request.HostIpAddress = hostIpAddress;
                            result = callback.ProcessH2GMessage(request);
                        }
                    }
                }
                catch (Exception ex)
                {
                    method.Exception(ex);
                }

                return result;
            }
        }