Esempio n. 1
0
        public ClientListener(CalorimeterClient client) : base(false)
        {
            this.client       = client;
            Acknowledge       = false;
            NotifyTermination = null;
            NonAcknowledge    = null;

            int fLength = client.Ini.GetInteger("Device", "FValueLength");
            int nLength = client.Ini.GetInteger("Device", "NValueLength");

            FValues = new float[fLength];
            NValues = new UInt16[nLength];

            packet     = new ClientReceivePacket(fLength * 4 + nLength * 2 + 17);
            clientArgs = new ClientReceiveArgs();

            logger        = new UlLogger();
            logger.Active = true;
            logger.Path   = client.Ini.GetString("Listener", "LogPath");
            logger.FName  = client.Ini.GetString("Listener", "LogFileName");
            logger.AddHead("CLIENT->SERVER");
            logger.AddHead("CLIENT<-SERVER");
            logger.AddHead("NOTE");
            logger.AddHead("EXCEPTION");

            Logging = GetLogging();
        }
Esempio n. 2
0
        static public void CreateLogger()
        {
            Ini = new UlIniFile(csConfigIniFName);

            TLog       = new UlLogger();
            TLog.Path  = Ini.GetString("Log", "TotalPath");
            TLog.FName = Ini.GetString("Log", "TotalFileName");
            TLog.AddHead("NOTE");
            TLog.AddHead("ERROR");
            TLog.AddHead("EXCEPTION");
        }
Esempio n. 3
0
        public ClientSender(CalorimeterClient client)
        {
            this.client = client;
            packet      = new ClientSendPacket();

            logger        = new UlLogger();
            logger.Active = true;
            logger.Path   = client.Ini.GetString("Sender", "LogPath");
            logger.FName  = client.Ini.GetString("Sender", "LogFileName");
            logger.AddHead("CLIENT->SERVER");
            logger.AddHead("NOTE");
            logger.AddHead("EXCEPTION");

            Logging = GetLogging();
        }
Esempio n. 4
0
        public ServerSender(CalorimeterServer server) : base(false)
        {
            this.server = server;
            packet      = new ServerSendPacket(server.Devices.Bytes.Length + 17);

            logger        = new UlLogger();
            logger.Active = true;
            logger.Path   = server.Ini.GetString("Sender", "LogPath");
            logger.FName  = server.Ini.GetString("Sender", "LogFileName");
            logger.AddHead("SERVER->CLIENT");
            logger.AddHead("NOTE");
            logger.AddHead("EXCEPTION");

            Logging = GetLogging();
        }
Esempio n. 5
0
        public ServerListener(CalorimeterServer server) : base(false)
        {
            this.server    = server;
            packet         = new ServerReceivePacket(64);
            ChangedClients = null;

            logger        = new UlLogger();
            logger.Active = true;
            logger.Path   = server.Ini.GetString("Listener", "LogPath");
            logger.FName  = server.Ini.GetString("Listener", "LogFileName");
            logger.AddHead("SERVER->CLIENT");
            logger.AddHead("SERVER<-CLIENT");
            logger.AddHead("NOTE");
            logger.AddHead("EXCEPTION");

            Logging = GetLogging();
        }
Esempio n. 6
0
        static public void Create()
        {
            UserNo    = 0;
            Authority = EUserAuthority.Viewer;

            Ini = new UlIniFile(csConfigIniFName);

            TLog       = new UlLogger();
            TLog.Path  = Ini.GetString("Log", "TotalPath");
            TLog.FName = Ini.GetString("Log", "TotalFileName");
            TLog.AddHead("NOTE");
            TLog.AddHead("ERROR");
            TLog.AddHead("EXCEPTION");

            Server = new CalorimeterServer(Ini);

            Db          = new CalorimeterDatabase();
            Db.Database = Ini.GetString("Database", "FileName");
            Db.Open();

            Db.Load(Ini.GetInteger("Calibrator", "CalibrationNo"));
        }