/// <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); } }
/// <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); } }
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); }
/// <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); } }
static void TestGIM() { FFMsg_G2H msg = FreeformEntityFactory.CreateEntity <FFMsg_G2H>(FF_FlowDirection.G2H, new FFCreateEntityRequest_G2H() { Command = FF_AppId_G2H_Commands.ResponseRequest, MessageType = FF_AppId_G2H_MessageTypes.FreeForm, SessionID = FF_AppId_SessionIds.GIM, IPAddress = "192.168.10.2", SkipTransactionId = true, }); FFTgt_B2B_GIM gim = new FFTgt_B2B_GIM() { GIMData = new FFTgt_G2H_GIM_GameIDInfo() { AssetNumber = "1111", GMUNumber = "1112", SerialNumber = "1113", ManufacturerID = "1114", MACAddress = "1115", SASVersion = "1116", GMUVersion = "1117", } }; msg.AddTarget(gim); FFMsgHandlerFactory.Current.Execute(msg); }
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 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]"); }
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); }
private void btnSend_Click(object sender, RoutedEventArgs e) { using (ILogMethod method = Log.LogMethod("", "Method")) { try { string input = "[C0][A8][02][10][05][A2][BC][17][B1][00][01][00][01][00][5E][17][5C][01][5A][01][05][30][30][30][30][32][02][05][31][32][33][34][35][03][02][42][39][04][0C][30][30][30][30][30][30][30][31][32][33][34][35][05][06][00][16][80][01][47][4D][06][03][36][30][31][07][2B][4F][63][74][20][31][38][20][32][30][31][33][20][31][35][3A][35][32][3A][31][37][20][56][65][72][2D][33][30][30][2E][30][35][2E][31][34][61][20][4F][70][74][69][6F][6E][73][C4]"; FFMsg_G2H g2h = FreeformEntityFactory.CreateEntity <FFMsg_G2H>(FF_FlowDirection.G2H, FreeformHelper.GetBufferFromHexString(input)); IFreeformEntity_MsgTgt tgt = g2h.Targets[0]; FFMsg_G2H msg = FreeformEntityFactory.CreateEntity <FFMsg_G2H>(FF_FlowDirection.G2H, new FFCreateEntityRequest_G2H() { Command = FF_AppId_G2H_Commands.ResponseRequest, MessageType = FF_AppId_G2H_MessageTypes.FreeForm, SessionID = FF_AppId_SessionIds.GIM, TransactionID = 0xB1, IPAddress = "192.168.2.16" }); FFTgt_B2B_GIM gim = new FFTgt_B2B_GIM() { GIMData = new FFTgt_G2H_GIM_GameIDInfo() { AssetNumber = txtAssetNumber.Text, GMUNumber = txtGMUNumber.Text, SerialNumber = txtSerialNumber.Text, ManufacturerID = txtManufacturerID.Text, MACAddress = txtMACAddress.Text, SASVersion = txtSASVersion.Text, GMUVersion = txtGMUVersion.Text, } }; msg.AddTarget(gim); byte[] bytes = FreeformEntityFactory.CreateBuffer(FF_FlowDirection.G2H, msg); string data = FreeformEntityFactory.CreateBufferHexString(FF_FlowDirection.G2H, msg); _socket.Send(bytes, bytes.Length, _ep); } catch (Exception ex) { method.Exception(ex); } } }
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); }
public void AuxNetworkEnableDisable() { FFMsg_H2G ff = FreeformEntityFactory.CreateEntity <FFMsg_H2G>(FF_FlowDirection.H2G, new FFCreateEntityRequest_H2G() { PollCode = FF_AppId_H2G_PollCodes.Freeform2, SessionID = FF_AppId_SessionIds.GIM, TransactionID = 178, }); FFTgt_B2B_GIM gim = new FFTgt_B2B_GIM(); ff.Targets.Add(gim); FFTgt_H2G_GIM_AuxNetworkEnableDisable gid = new FFTgt_H2G_GIM_AuxNetworkEnableDisable(); gid.EnableDisable = true; gid.Display = "Welcome to BMC 12.5"; gim.Targets.Add(gid); byte[] data = FreeformEntityFactory.CreateBuffer(FF_FlowDirection.H2G, ff); }