Ejemplo n.º 1
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);
        }
Ejemplo n.º 2
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]");
        }
        public void CreateEntity()
        {
            FFMsg_G2H_3 ff = FreeformEntityFactory.CreateEntity <FFMsg_G2H_3>(FF_FlowDirection.G2H,
                                                                              new FFCreateEntityRequest_G2H()
            {
                Command = FF_AppId_G2H_Commands.Freeform3Response
            });
            FFTgt_B2B_GIM gim = new FFTgt_B2B_GIM();

            ff.Targets.Add(gim);
            FFTgt_G2H_GIM_GameIDInfo gid = new FFTgt_G2H_GIM_GameIDInfo();

            gim.Targets.Add(gid);
        }
Ejemplo n.º 4
0
        protected override IMonitorEntity_MsgTgt CreateMonitorTarget(IMonitorEntity parent, IFreeformEntity_MsgTgt request)
        {
            FFTgt_G2H_GIM_GameIDInfo tgtSrc = request as FFTgt_G2H_GIM_GameIDInfo;

            if (tgtSrc != null)
            {
                MonTgt_G2H_GIM_GameIDInfo tgtDest = new MonTgt_G2H_GIM_GameIDInfo()
                {
                    GMUNumber      = tgtSrc.GMUNumber,
                    AssetNumber    = tgtSrc.AssetNumber,
                    ManufacturerID = tgtSrc.ManufacturerID,
                    SerialNumber   = tgtSrc.SerialNumber,
                    MACAddress     = tgtSrc.MACAddress,
                    SASVersion     = tgtSrc.SASVersion,
                    GMUVersion     = tgtSrc.GMUVersion
                };
                return(tgtDest);
            }
            return(null);
        }