public override void Start() { //Using "Sensor:" to indicate clearly in the log where this line came from. logger.Log("Sensor:Started: {0} ", ToString()); // remoteSync flag can be set to true, if the Platform Settings has the Cloud storage // information i.e., DataStoreAccountName, DataStoreAccountKey values datastream = base.CreateValueDataStream <StrKey, StrValue>("data", true, 10 * 60); SensorService sensorService = new SensorService(logger, this); serviceHost = new SafeServiceHost(logger, typeof(ISensorContract), sensorService, this, Constants.AjaxSuffix, moduleInfo.BaseURL()); serviceHost.Open(); appServer = new WebFileServer(moduleInfo.BinaryDir(), moduleInfo.BaseURL(), logger); //........... instantiate the list of other ports that we are interested in accessibleSensorPorts = new List <VPort>(); //..... get the list of current ports from the platform IList <VPort> allPortsList = GetAllPortsFromPlatform(); if (allPortsList != null) { ProcessAllPortsList(allPortsList); } this.receivedMessageList = new Queue <string>(); mTimer = new Timer(60000); //1 minute mTimer.Elapsed += new ElapsedEventHandler(doDataMonitoring); gAlertEmailAddress = GetPrivateConfSetting("NotificationEmail"); gHome_Id = GetConfSetting("HomeId"); //location to save information Directory.CreateDirectory(moduleInfo.WorkingDir()); gMonitoringMemoryFile = moduleInfo.WorkingDir() + "\\" + "monitoringMemory.txt"; CheckForPreviousMonitoringValues(); }
public override void Start() { //Using "Sensor:" to indicate clearly in the log where this line came from. logger.Log("Sensor:Started: {0} ", ToString()); // remoteSync flag can be set to true, if the Platform Settings has the Cloud storage // information i.e., DataStoreAccountName, DataStoreAccountKey values datastream = base.CreateValueDataStream<StrKey, StrValue>("data", true, 10 * 60); SensorService sensorService = new SensorService(logger, this); serviceHost = new SafeServiceHost(logger, typeof(ISensorContract), sensorService, this, Constants.AjaxSuffix, moduleInfo.BaseURL()); serviceHost.Open(); appServer = new WebFileServer(moduleInfo.BinaryDir(), moduleInfo.BaseURL(), logger); //........... instantiate the list of other ports that we are interested in accessibleSensorPorts = new List<VPort>(); //..... get the list of current ports from the platform IList<VPort> allPortsList = GetAllPortsFromPlatform(); if (allPortsList != null) ProcessAllPortsList(allPortsList); this.receivedMessageList = new Queue<string>(); mTimer = new Timer(60000); //1 minute mTimer.Elapsed += new ElapsedEventHandler(doDataMonitoring); gAlertEmailAddress = GetPrivateConfSetting("NotificationEmail"); gHome_Id = GetConfSetting("HomeId"); //location to save information Directory.CreateDirectory(moduleInfo.WorkingDir()); gMonitoringMemoryFile = moduleInfo.WorkingDir() + "\\" + "monitoringMemory.txt"; CheckForPreviousMonitoringValues(); }
public override void Start() { logger.Log("Started: {0} ", ToString()); SensorService dummyService = new SensorService(logger, this); serviceHost = new SafeServiceHost(logger, typeof(ISensorContract), dummyService, this, Constants.AjaxSuffix, moduleInfo.BaseURL()); serviceHost.Open(); appServer = new WebFileServer(moduleInfo.BinaryDir(), moduleInfo.BaseURL(), logger); //........... instantiate the list of other ports that we are interested in accessibleSensorPorts = new List<VPort>(); //..... get the list of current ports from the platform IList<VPort> allPortsList = GetAllPortsFromPlatform(); if (allPortsList != null) ProcessAllPortsList(allPortsList); this.receivedMessageList = new List<string>(); this.tagList = new List<string>(); // remoteSync flag can be set to true, if the Platform Settings has the Cloud storage // information i.e., DataStoreAccountName, DataStoreAccountKey values datastream = base.CreateFileStream<StrKey, StrValue>("data", true /* remoteSync */); }