コード例 #1
0
 protected override void AddSubParsersInternal()
 {
     this.AddBufferEntityParser((int)FF_GIM_GameIDInfoTags.GMUGameNumber, (int)FF_EntityId_Targets_GIM_GameIDInfo.GMUGameNumber,
                                (tgt, idx, len, buf) =>
     {
         ((FFTgt_G2H_GIM_GameIDInfo)tgt).GMUNumber = FreeformHelper.GetASCIIStringValue(buf);
         return(null);
     });
     this.AddBufferEntityParser((int)FF_GIM_GameIDInfoTags.GameGameNumber, (int)FF_EntityId_Targets_GIM_GameIDInfo.GameGameNumber,
                                (tgt, idx, len, buf) =>
     {
         ((FFTgt_G2H_GIM_GameIDInfo)tgt).AssetNumber = FreeformHelper.GetASCIIStringValue(buf);
         return(null);
     });
     this.AddBufferEntityParser((int)FF_GIM_GameIDInfoTags.ManufacturerID, (int)FF_EntityId_Targets_GIM_GameIDInfo.ManufacturerID,
                                (tgt, idx, len, buf) =>
     {
         ((FFTgt_G2H_GIM_GameIDInfo)tgt).ManufacturerID = FreeformHelper.GetHexStringValue(buf);
         return(null);
     });
     this.AddBufferEntityParser((int)FF_GIM_GameIDInfoTags.SerialNumber, (int)FF_EntityId_Targets_GIM_GameIDInfo.SerialNumber,
                                (tgt, idx, len, buf) =>
     {
         ((FFTgt_G2H_GIM_GameIDInfo)tgt).SerialNumber = FreeformHelper.GetASCIIStringValue(buf);
         return(null);
     });
     this.AddBufferEntityParser((int)FF_GIM_GameIDInfoTags.MACAddress, (int)FF_EntityId_Targets_GIM_GameIDInfo.MACAddress,
                                (tgt, idx, len, buf) =>
     {
         ((FFTgt_G2H_GIM_GameIDInfo)tgt).MACAddress = FreeformHelper.GetHexStringValue(buf, ':');
         return(null);
     });
     this.AddBufferEntityParser((int)FF_GIM_GameIDInfoTags.SASVersion, (int)FF_EntityId_Targets_GIM_GameIDInfo.SASVersion,
                                (tgt, idx, len, buf) =>
     {
         ((FFTgt_G2H_GIM_GameIDInfo)tgt).SASVersion = FreeformHelper.GetASCIIStringValue(buf);
         return(null);
     });
     this.AddBufferEntityParser((int)FF_GIM_GameIDInfoTags.GMUVersion, (int)FF_EntityId_Targets_GIM_GameIDInfo.GMUVersion,
                                (tgt, idx, len, buf) =>
     {
         ((FFTgt_G2H_GIM_GameIDInfo)tgt).GMUVersion = FreeformHelper.GetASCIIStringValue(buf);
         return(null);
     });
 }
コード例 #2
0
        internal override IFreeformEntity ParseBufferInternal(ref IFreeformEntity entity, IFreeformEntity rootEntity, int id, byte[] buffer)
        {
            FFTgt_G2H_GMUEvent_StdData tgt = new FFTgt_G2H_GMUEvent_StdData();

            tgt.ExceptionCode    = buffer[0].GetAppId <FF_GmuId_GMUEvent_XCodes, FF_AppId_GMUEvent_XCodes>();
            tgt.JackpotID        = buffer[1].GetAppId <FF_GmuId_GMUEvent_JackpotIDs, FF_AppId_GMUEvent_JackpotIDs>();
            tgt.EmployeeCardID   = FreeformHelper.GetHexStringValue(buffer, 2, 2);
            tgt.LastBet          = FreeformHelper.GetBCDValue <short>(buffer, 4, 2);
            tgt.DoorStatus       = FreeformHelper.GetBytesToNumberUInt8(buffer, 6, 1);
            tgt.OptionByte       = FreeformHelper.GetBytesToNumberUInt8(buffer, 7, 1);
            tgt.JackpotAmount    = FreeformHelper.GetBytesToBCDDouble(buffer, 8, 6);
            tgt.PlayerCard       = FreeformHelper.GetBCDValueString(buffer, 0, 14, 5);
            tgt.BonusPoints      = FreeformHelper.GetBCDValue <short>(buffer, 19, 2);
            tgt.LastBill         = FreeformHelper.GetBytesToNumberUInt8(buffer, 21, 1);
            tgt.SMICode          = FreeformHelper.GetASCIIStringValueTrim(buffer, 22, 8);
            tgt.GameDenomination = FreeformHelper.GetBCDValue <int>(buffer, 30, 4);
            tgt.CasinoID         = FreeformHelper.GetASCIIStringValueTrim(buffer, 34, 3);
            tgt.BonusCountdown   = FreeformHelper.GetBCDValue <short>(buffer, 37, 2);
            tgt.BonusPoints      = FreeformHelper.GetBCDValue <short>(buffer, 39, 2);
            return(tgt);
        }