Data Processing Server for individual device. Handles plugins and events related to the device.
Beispiel #1
0
 private void UpdateLoginInformation(DeviceServer server)
 {
     if (CurrentUser != null)
     {
         server.SendPluginData("USER_LOGIN", CurrentUser);
     }
     else
     {
         server.SendPluginData("USER_LOGIN", null);
     }
 }
        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);
        }
Beispiel #3
0
 private void UpdateLoginInformation(DeviceServer server)
 {
     if (CurrentUser != null) server.SendPluginData("USER_LOGIN", CurrentUser);
     else server.SendPluginData("USER_LOGIN", null);
 }
        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);
        }
 private void Server_Stopped(DeviceServer server)
 {
     Logger.Log(server.Configuration.UniqueId + " :: Device Stopped");
 }
 private void Server_Stopped(DeviceServer server)
 {
     logger.Info(server.Configuration.UniqueId + " :: Device Stopped");
 }
Beispiel #7
0
 private void Server_Started(DeviceServer server)
 {
     Logger.Log(server.Configuration.UniqueId + " :: Device Started");
 }