예제 #1
0
        /// <summary>
        /// Create GIM AuxNetworkEnableDisable Freeform entity from Monitor GIM AuxNetworkEnableDisable Taget
        /// </summary>
        /// <param name="monTgtMsg"></param>
        /// <returns></returns>
        private FFMsg_H2G Create_H2G_GIM_AuxNetworkEnableDisable(MonitorEntity_MsgTgt monEntity)
        {
            try
            {
                MonTgt_H2G_GIM_AuxNetworkEnableDisable monTgtMsg = monEntity as MonTgt_H2G_GIM_AuxNetworkEnableDisable;
                if (monTgtMsg == null)
                {
                    return(null);
                }

                FFMsg_H2G     ffMsg       = new FFMsg_H2G();
                FFTgt_B2B_GIM ffTgtGIMMSg = new FFTgt_B2B_GIM();

                FFTgt_H2G_GIM_AuxNetworkEnableDisable ffTgtMsg = new FFTgt_H2G_GIM_AuxNetworkEnableDisable()
                {
                    EnableDisable = monTgtMsg.EnableDisable,
                    Display       = monTgtMsg.Display
                };

                ffTgtGIMMSg.AddTarget(ffTgtMsg);
                ffMsg.AddTarget(ffTgtGIMMSg);
                return(ffMsg);
            }
            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
                return(null);
            }
        }
예제 #2
0
        /// <summary>
        /// Create GIM GameIdRequest Freeform entity from Monitor GIM GameIdRequest Target
        /// </summary>
        /// <param name="monEntity"></param>
        /// <returns></returns>
        private FFMsg_H2G Create_H2G_GIM_GameIdRequest(MonitorEntity_MsgTgt monEntity)
        {
            try
            {
                MonTgt_H2G_GIM_GameIDRequest monTgtMsg = monEntity as MonTgt_H2G_GIM_GameIDRequest;
                if (monTgtMsg == null)
                {
                    return(null);
                }

                FFMsg_H2G     ffMsg       = new FFMsg_H2G();
                FFTgt_B2B_GIM ffTgtGIMMSg = new FFTgt_B2B_GIM();

                FFTgt_H2G_GIM_GameIDRequest ffTgtMsg = new FFTgt_H2G_GIM_GameIDRequest()
                {
                };

                ffTgtGIMMSg.AddTarget(ffTgtMsg);
                ffMsg.AddTarget(ffTgtGIMMSg);
                return(ffMsg);
            }
            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
                return(null);
            }
        }
예제 #3
0
        /// <summary>
        /// Create GIM GameInfo Freeform entity from Monitor GIM GameInfo Taget
        /// </summary>
        /// <param name="monTgtMsg"></param>
        /// <returns></returns>
        private FFMsg_H2G Create_H2G_GIM_GameInfo_Entity(MonitorEntity_MsgTgt monEntity)
        {
            try
            {
                MonTgt_H2G_GIM_GameIDInfo monTgtMsg = monEntity as MonTgt_H2G_GIM_GameIDInfo;
                if (monTgtMsg == null)
                {
                    return(null);
                }

                FFMsg_H2G     ffMsg       = new FFMsg_H2G();
                FFTgt_B2B_GIM ffTgtGIMMSg = new FFTgt_B2B_GIM();

                FFTgt_H2G_GIM_GameIDInfo ffTgtMsg = new FFTgt_H2G_GIM_GameIDInfo()
                {
                    SourceAddress   = monTgtMsg.SourceAddress,
                    AssetNumberInt  = monTgtMsg.AssetNumberInt,
                    PokerGamePrefix = monTgtMsg.PokerGamePrefix
                };

                ffTgtGIMMSg.AddTarget(ffTgtMsg);
                ffMsg.AddTarget(ffTgtGIMMSg);
                return(ffMsg);
            }
            catch (Exception ex)
            {
                ExceptionManager.Publish(ex);
                return(null);
            }
        }
예제 #4
0
        static void ExecutionStepsTest()
        {
            //var d = new ExecutionStepDictionary();
            //d.CreateExecutionSteps(ExecutionStepDeviceTypes.Simulator, null, null);
            //return;

            FFMsg_G2H msg = FreeformEntityFactory.CreateEntity <FFMsg_G2H>(FF_FlowDirection.G2H,
                                                                           new FFCreateEntityRequest_G2H()
            {
                MessageType   = FF_AppId_G2H_MessageTypes.FreeForm,
                Command       = FF_AppId_G2H_Commands.ResponseRequest,
                SessionID     = FF_AppId_SessionIds.GIM,
                TransactionID = 1,
                IPAddress     = Extensions.GetIpAddressString(-1),
            });

            FFTgt_B2B_GIM tgt = new FFTgt_B2B_GIM();

            msg.AddTarget(tgt);

            FFTgt_G2H_GIM_GameIDInfo tgt2 = new FFTgt_G2H_GIM_GameIDInfo();

            tgt.AddTarget(tgt2);

            tgt2.AssetNumber  = "00012345";
            tgt2.SerialNumber = "00012345";

            ExecutionStepFactory.Current.Execute(msg);
        }
예제 #5
0
        public void Buf2FF_GIM_GameIDInfo_G2H()
        {
            FFMsg_G2H msg = FreeformEntityFactory.CreateEntity <FFMsg_G2H>(FF_FlowDirection.G2H,
                                                                           new FFCreateEntityRequest_G2H()
            {
                MessageType   = FF_AppId_G2H_MessageTypes.FreeForm,
                Command       = FF_AppId_G2H_Commands.ResponseRequest,
                SessionID     = FF_AppId_SessionIds.GIM,
                TransactionID = 1,
            });

            FFTgt_B2B_GIM tgt = new FFTgt_B2B_GIM();

            msg.AddTarget(tgt);

            FFTgt_G2H_GIM_GameIDInfo tgt2 = new FFTgt_G2H_GIM_GameIDInfo();

            tgt.AddTarget(tgt2);

            tgt2.AssetNumber = "12345";

            byte[] buffer  = FreeformEntityFactory.CreateBuffer(FF_FlowDirection.H2G, msg);
            string sBuffer = buffer.GetConvertBytesToHexString(string.Empty);

            Assert.AreEqual(sBuffer,
                            "[05][FB][17][01][00][01][00][01][00][1C][17][1A][02][09][01][53][75][63][63][65][73][73][21][03][04][0A][02][1E][68][04][04][00][01][23][45][05][01][47][3C]");
        }
예제 #6
0
        public void Buf2FF_GIM_GameIDInfo_H2G()
        {
            FFMsg_H2G msg = FreeformEntityFactory.CreateEntity <FFMsg_H2G>(FF_FlowDirection.H2G,
                                                                           new FFCreateEntityRequest_H2G()
            {
                PollCode      = FF_AppId_H2G_PollCodes.FreeformNoResponse,
                SessionID     = FF_AppId_SessionIds.GIM,
                TransactionID = 1,
            });

            FFTgt_B2B_GIM tgt = new FFTgt_B2B_GIM();

            msg.AddTarget(tgt);

            FFTgt_H2G_GIM_GameIDInfo tgt2 = new FFTgt_H2G_GIM_GameIDInfo();

            tgt.AddTarget(tgt2);

            tgt2.AssetNumberInt         = 00012345;
            tgt2.DisplayMessage         = "Success!";
            tgt2.EnableNetworkMessaging = true;
            tgt2.SourceAddress          = Extensions.GetIpAddress(-1);
            tgt2.PokerGamePrefix        = "G";

            byte[] buffer  = FreeformEntityFactory.CreateBuffer(FF_FlowDirection.H2G, msg);
            string sBuffer = buffer.GetConvertBytesToHexString(string.Empty);

            Assert.AreEqual(sBuffer,
                            "[05][FB][17][01][00][01][00][01][00][1C][17][1A][02][09][01][53][75][63][63][65][73][73][21][03][04][0A][02][1E][68][04][04][00][01][23][45][05][01][47][3C]");
        }
예제 #7
0
        protected override IFreeformEntity_MsgTgt CreateFreeformTarget(IMonitorEntity parent, IMonitorEntity_MsgTgt request)
        {
            MonTgt_H2G_GIM_GameIDInfo tgtSrc = request as MonTgt_H2G_GIM_GameIDInfo;

            if (tgtSrc != null)
            {
                FFTgt_B2B_GIM            tgtDest         = new FFTgt_B2B_GIM();
                FFTgt_H2G_GIM_GameIDInfo ffTgtGameIdInfo = new FFTgt_H2G_GIM_GameIDInfo()
                {
                    SourceAddress          = tgtSrc.SourceAddress,
                    AssetNumberInt         = tgtSrc.AssetNumberInt,
                    PokerGamePrefix        = tgtSrc.PokerGamePrefix,
                    EnableNetworkMessaging = tgtSrc.EnableNetworkMessaging,
                };

                tgtDest.AddTarget(ffTgtGameIdInfo);
                return(tgtDest);
            }
            return(null);
        }