Esempio n. 1
0
        protected override IMonitorEntity CreateEntityInternal(IMonitorEntity parent, IFreeformEntity request)
        {
            IFreeformEntity_Msg msgFF  = request as IFreeformEntity_Msg;
            IMonitorEntity_Msg  msgMon = this.CreateMonitorMessage();

            msgMon.IpAddress = msgFF.IpAddress;
            return(msgMon);
        }
Esempio n. 2
0
        protected override IFreeformEntity CreateEntityInternal(IMonitorEntity parent, IMonitorEntity request)
        {
            IMonitorEntity_Msg  monMsg = request as IMonitorEntity_Msg;
            IFreeformEntity_Msg ffMsg  = this.CreateFreeformMessage();

            ffMsg.IpAddress = monMsg.IpAddress;
            return(ffMsg);
        }
Esempio n. 3
0
        static void TestMeterMessage()
        {
            string msg = "[C0][A8][02][12][05][A2][B9][0F][B0][00][01][00][01][01][5B][10][2A][01][CF][00][00][00][00][00][0F][08][00][00][00][00][00][00][00][00][00][00][00][00][00][20][30][30][30][00][30][30][30][30][00][00][00][01][30][30][30][00][00][00][00][0F][49][02][01][04][00][00][31][17][02][04][00][50][45][55][03][04][00][09][40][35][04][04][00][00][00][00][05][04][00][00][00][00][06][04][00][00][00][00][29][04][00][01][51][21][2A][04][00][00][05][43][2B][04][00][00][00][00][2C][04][00][00][00][00][30][04][00][00][00][00][31][04][00][00][00][00][0F][3D][02][07][04][00][00][00][01][08][04][00][00][00][01][09][04][00][00][00][01][0A][04][00][00][00][00][0B][04][00][00][00][01][0C][04][00][00][00][00][2E][04][00][00][00][00][2F][04][00][00][00][00][0D][04][00][00][00][00][0E][04][00][00][66][00][0F][3F][02][13][05][00][00][00][85][21][14][05][00][00][15][07][82][15][05][00][00][00][00][00][16][05][00][00][00][00][00][17][04][00][00][00][03][18][04][00][00][00][52][19][04][00][00][00][00][1A][04][00][00][00][00][24][00][25][00][28][04][01][52][51][01][0F][32][02][0F][04][00][00][00][00][10][04][00][00][00][00][11][04][00][00][00][00][12][04][00][00][00][00][1F][04][00][00][00][00][20][04][00][00][00][00][26][05][00][00][00][00][00][27][04][00][00][00][00][0F][21][02][1B][04][01][19][70][00][1C][04][01][37][43][19][1D][04][00][00][00][00][1E][04][00][00][00][00][28][04][01][52][51][01][2D][00][10][0B][07][1D][03][13][24][39][1C][03][02][21][14][D6]";

            byte[]             buf    = GetBuffer(msg);
            UdpFreeformEntity  buffer = FreeformEntityFactory.CreateUdpEntity(FF_FlowDirection.G2H, buf);
            IFreeformEntity    ff     = FreeformEntityFactory.CreateEntity(FF_FlowDirection.G2H, buffer);
            IMonitorEntity_Msg mon    = MonitorEntityFactory.CreateEntity(ff as FFMsg_G2H);
        }
Esempio n. 4
0
        static void TestTicketMessage()
        {
            string msg =
                "[C0][A8][02][12][05][A2][BC][8A][8D][00][01][00][01][00][11][0A][02][06][00][10][0B][07][1D][03][12][57][09][1C][03][02][21][14][57]";

            byte[]             buf    = GetBuffer(msg);
            UdpFreeformEntity  buffer = FreeformEntityFactory.CreateUdpEntity(FF_FlowDirection.G2H, buf);
            IFreeformEntity    ff     = FreeformEntityFactory.CreateEntity(FF_FlowDirection.G2H, buffer);
            IMonitorEntity_Msg mon    = MonitorEntityFactory.CreateEntity(ff as FFMsg_G2H);
        }
Esempio n. 5
0
        //static void InitKeyExchangeStartG2H()
        //{
        //    FreeformEncryptionHelper.InitKeyExchangeStart(
        //        ModuleHelper.Current.CreateH2GMessage(IPADDR,
        //        FF_AppId_SessionIds.Security,
        //        FF_AppId_H2G_PollCodes.FreeformResponse));
        //}

        //static void InitKeyExchangeStartH2G()
        //{
        //    FreeformEncryptionHelper.InitKeyExchangeStart(
        //        ModuleHelper.Current.CreateH2GMessage(IPADDR,
        //        FF_AppId_SessionIds.Security,
        //        FF_AppId_H2G_PollCodes.FreeformResponse));
        //}

        //static void InitKeyExchangeEnd()
        //{
        //    byte[] key = new byte[] { 10, 11, 12, 34, 56, 78, 96, 89, 44 };
        //    FreeformEncryptionHelper.InitKeyExchangeEnd(
        //        ModuleHelper.Current.CreateH2GMessage(IPADDR,
        //        FF_AppId_SessionIds.Security,
        //        FF_AppId_H2G_PollCodes.FreeformResponse),
        //        key);
        //}
        static void TestPIDData()
        {
            return;

            string msg = "[C0][A8][02][10][05][A2][B9][1C][4F][00][01][00][01][00][05][1C][03][0F][01][00][FF]";

            byte[]             buf    = GetBuffer(msg);
            UdpFreeformEntity  buffer = FreeformEntityFactory.CreateUdpEntity(FF_FlowDirection.G2H, buf);
            IFreeformEntity    ff     = FreeformEntityFactory.CreateEntity(FF_FlowDirection.G2H, buffer);
            IMonitorEntity_Msg mon    = MonitorEntityFactory.CreateEntity(ff as FFMsg_G2H);
        }
Esempio n. 6
0
 protected virtual IThreadPoolExecutor <MonMsg_H2G> GetExecutorH2G(IMonitorEntity_Msg msg)
 {
     return(_h2gExecutor_NonPrio);
 }
Esempio n. 7
0
 protected virtual IThreadPoolExecutor <MonMsg_G2H> GetExecutorG2H(IMonitorEntity_Msg msg)
 {
     return(_g2hExecutor_NonPrio);
 }
 protected virtual IThreadPoolExecutor<MonMsg_H2G> GetExecutorH2G(IMonitorEntity_Msg msg)
 {
     return _h2gExecutor_NonPrio;
 }
 protected virtual IThreadPoolExecutor<MonMsg_G2H> GetExecutorG2H(IMonitorEntity_Msg msg)
 {
     return _g2hExecutor_NonPrio;
 }