Data Processing Server for individual device. Handles plugins and events related to the device.
Esempio n. 1
0
 private void UpdateLoginInformation(DeviceServer server)
 {
     if (CurrentUser != null)
     {
         server.SendPluginData("USER_LOGIN", CurrentUser);
     }
     else
     {
         server.SendPluginData("USER_LOGIN", null);
     }
 }
Esempio n. 2
0
        private void StartDeviceServer(object obj)
        {
            var config = (DeviceConfiguration)obj;

            var plugins = new List <IServerPlugin>();

            foreach (var plugin in serverPlugins)
            {
                var newInstance = CreatePluginInstance(plugin);
                if (newInstance != null)
                {
                    plugins.Add(newInstance);
                }
            }

            var server = new DeviceServer(config, plugins);

            server.Started += Server_Started;
            server.Stopped += Server_Stopped;
            devices.Add(server);
            server.Start();

            UpdateLoginInformation(server);
        }
Esempio n. 3
0
 private void UpdateLoginInformation(DeviceServer server)
 {
     if (CurrentUser != null) server.SendPluginData("USER_LOGIN", CurrentUser);
     else server.SendPluginData("USER_LOGIN", null);
 }
Esempio n. 4
0
        private void StartDeviceServer(object obj)
        {
            var config = (DeviceConfiguration)obj;

            var plugins = new List<IServerPlugin>();

            foreach (var plugin in serverPlugins)
            {
                var newInstance = CreatePluginInstance(plugin);
                if (newInstance != null) plugins.Add(newInstance);
            }

            var server = new DeviceServer(config, plugins);
            server.Started += Server_Started;
            server.Stopped += Server_Stopped;
            devices.Add(server);
            server.Start();

            UpdateLoginInformation(server);
        }
Esempio n. 5
0
 private void Server_Stopped(DeviceServer server)
 {
     Logger.Log(server.Configuration.UniqueId + " :: Device Stopped");
 }
Esempio n. 6
0
 private void Server_Stopped(DeviceServer server)
 {
     logger.Info(server.Configuration.UniqueId + " :: Device Stopped");
 }
Esempio n. 7
0
 private void Server_Started(DeviceServer server)
 {
     Logger.Log(server.Configuration.UniqueId + " :: Device Started");
 }