public static FFMsg_H2G CreateH2GMessageAckNack(string ipAddress, FF_AppId_G2H_Commands command)
        {
            switch (command)
            {
            case FF_AppId_G2H_Commands.NACK:
                return(CreateH2GMessageAckNack(ipAddress, true));

            case FF_AppId_G2H_Commands.GMUInitA0:
                return(CreateH2GMessageAckNack(ipAddress, false));

            default:
                return(null);
            }
        }
 public FFMsg_G2H CreateG2HMessage(string ipAddress, FF_AppId_SessionIds sessionId,
     FF_AppId_G2H_Commands command, FF_AppId_G2H_MessageTypes messageType,
     int transactionId)
 {
     return FreeformEntityFactory.CreateEntity<FFMsg_G2H>(FF_FlowDirection.G2H,
         new FFCreateEntityRequest_G2H()
         {
             IPAddress = ipAddress,
             Command = command,
             MessageType = messageType,
             SessionID = sessionId,
             TransactionID = transactionId,
         });
 }
 public FFMsg_G2H CreateG2HMessage(string ipAddress, FF_AppId_SessionIds sessionId,
                                   FF_AppId_G2H_Commands command, FF_AppId_G2H_MessageTypes messageType,
                                   int transactionId)
 {
     return(FreeformEntityFactory.CreateEntity <FFMsg_G2H>(FF_FlowDirection.G2H,
                                                           new FFCreateEntityRequest_G2H()
     {
         IPAddress = ipAddress,
         Command = command,
         MessageType = messageType,
         SessionID = sessionId,
         TransactionID = transactionId,
     }));
 }
        internal override IFreeformEntity ParseBufferInternal(ref IFreeformEntity entity, IFreeformEntity rootEntity, int id, byte[] buffer)
        {
            // get and verify the command
            FF_AppId_G2H_Commands command = GetCommand(buffer);

            if (command == FF_AppId_G2H_Commands.None)
            {
                Log.Warning("Invalid message passed (Invalid command)");
                return(null);
            }

            // create the entity and parse
            IFFParser parser = this.GetParserFromAppId((int)command);

            entity = parser.ParseBuffer(rootEntity, buffer);

            // valid message
            return(entity);
        }
        public static FFMsg_G2H CreateG2HMessage(string ipAddress, FF_AppId_G2H_Commands command, FF_AppId_G2H_MessageTypes messageType,
                                                 FF_AppId_SessionIds sessionId, bool isResponseRequired,
                                                 params IFreeformEntity_MsgTgt[] targets)
        {
            FFMsg_G2H msg = FreeformEntityFactory.CreateEntity <FFMsg_G2H>(FF_FlowDirection.G2H,
                                                                           new FFCreateEntityRequest_G2H_ResponseRequired()
            {
                Command            = command,
                MessageType        = messageType,
                SessionID          = sessionId,
                IPAddress          = ipAddress,
                SkipTransactionId  = true,
                IsResponseRequired = isResponseRequired,
            });

            if (targets != null)
            {
                msg.AddTargets(targets);
            }
            return(msg);
        }
 public static FFMsg_G2H CreateG2HMessage(string ipAddress, FF_AppId_G2H_Commands command, FF_AppId_G2H_MessageTypes messageType,
                                          FF_AppId_SessionIds sessionId,
                                          params IFreeformEntity_MsgTgt[] targets)
 {
     return(CreateG2HMessage(ipAddress, command, messageType, sessionId, false, targets));
 }