Exemple #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);
            }
        }
        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);
        }