public SolarLogMonitoringThread(String _URL, ConsoleOutputLogger COL, ConcurrentQueue <SolarLogDataSet> EventQueue, Int32 UpdateTime = 10000)
 {
     URL = _URL;
     SolarLogUpdateTime  = UpdateTime;
     ConsoleOutputLogger = COL;
     iQueue = EventQueue;
 }
示例#2
0
 public ActorReswitching(XS1Configuration configuration, ConsoleOutputLogger Logger, List <String> BlackList, List <String> OWOList)
 {
     XS1_Configuration   = configuration;
     TemporaryBlacklist  = BlackList;
     OnWaitOffList       = OWOList;
     ConsoleOutputLogger = Logger;
 }
示例#3
0
 public NetworkMonitoring(ConsoleOutputLogger COL, ConcurrentQueue <NetworkMonitoringDataSet> EventQueue, Int32 UpdateTime = 10000)
 {
     NetworkMonitorUpdateTime = UpdateTime;
     ConsoleOutputLogger      = COL;
     iQueue        = EventQueue;
     OnOfflineList = new Dictionary <string, bool>();
 }
示例#4
0
		public NetworkMonitoring(ConsoleOutputLogger COL, ConcurrentQueue<NetworkMonitoringDataSet> EventQueue, Int32 UpdateTime = 10000)
		{
			NetworkMonitorUpdateTime = UpdateTime;
			ConsoleOutputLogger = COL;
			iQueue = EventQueue;
			OnOfflineList = new Dictionary<string, bool>();
		}
		public SolarLogMonitoringThread(String _URL, ConsoleOutputLogger COL, ConcurrentQueue<SolarLogDataSet> EventQueue, Int32 UpdateTime = 10000)
		{
			URL = _URL;
			SolarLogUpdateTime = UpdateTime;
			ConsoleOutputLogger = COL;
			iQueue = EventQueue;
		}
示例#6
0
		public XS1MonitoringThread(String _ServerName, ConsoleOutputLogger Logger, String _Username, String _Password, ConcurrentQueue<XS1_DataObject> _Queue)
		{
			ServerName = _ServerName;
			UserName = _Username;
			Password = _Password;
			ConsoleOutputLogger = Logger;
			iQueue = _Queue;
		}
示例#7
0
 public XS1MonitoringThread(String _ServerName, ConsoleOutputLogger Logger, String _Username, String _Password, ConcurrentQueue <XS1_DataObject> _Queue)
 {
     ServerName          = _ServerName;
     UserName            = _Username;
     Password            = _Password;
     ConsoleOutputLogger = Logger;
     iQueue = _Queue;
 }
示例#8
0
 public MAXMonitoringThread(String _Hostname, Int32 _Port, ConsoleOutputLogger COL, ConcurrentQueue <IDeviceDiffSet> EventQueue, Int32 UpdateTime = 10000)
 {
     Hostname            = _Hostname;
     Port                = _Port;
     MAXUpdateTime       = UpdateTime;
     ConsoleOutputLogger = COL;
     iQueue              = EventQueue;
     LastReStoring       = DateTime.Now;
 }
示例#9
0
		public MAXMonitoringThread(String _Hostname, Int32 _Port, ConsoleOutputLogger COL, ConcurrentQueue<IDeviceDiffSet> EventQueue, Int32 UpdateTime = 10000)
		{
			Hostname = _Hostname;
			Port = _Port;
			MAXUpdateTime = UpdateTime;
			ConsoleOutputLogger = COL;
			iQueue = EventQueue;
			LastReStoring = DateTime.Now;
		}
示例#10
0
		public HttpServer(Int32 HTTP_Port, String HTTP_ListeningIP, String HTTP_DocumentRoot, TinyOnDiskStorage _Storage, TinyOnDiskStorage _LatitudeStorage, XS1Configuration _XS1_Configuration, ConsoleOutputLogger Logger, MAXMonitoringThread _ELVMAXMonitoringThread, bool AuthEnabled, String Uname, String Pword, String StartAdrFilter)
        {
            HTTPServer_Port = HTTP_Port;
            HTTPServer_ListeningIP = HTTP_ListeningIP;
            HTTPServer_DocumentRoot = HTTP_DocumentRoot;
            Storage = _Storage;
            XS1_Configuration = _XS1_Configuration;
            ConsoleOutputLogger = Logger;
			ELVMAXMonitoringThread = _ELVMAXMonitoringThread;
			LatitudeStorage = _LatitudeStorage;
			AuthorizationEnabled = AuthEnabled;
			Username = Uname;
			Password = Pword;
            AuthDisabledForAdressesThatStartWith = StartAdrFilter;
        }
示例#11
0
        public static SolarLogDataSet UpdateSolarLog(String URL, ConsoleOutputLogger COL)
        {
            SolarLogDataSet Output = new SolarLogDataSet();;

            // create a web client and get the data
            String fullURL = "http://" + URL + "/min_cur.js?nocache";

            WebClient client = new WebClient();

            try
            {
                String SolarLogValue = client.DownloadString(fullURL);

                // hurray, we got a string!
                // let's parse it!

                String[] LbL = SolarLogValue.Replace("\r", "").Split(new char[] { '\n' });

                foreach (String _line in LbL)
                {
                    #region Pac
                    if (_line.StartsWith("var Pac="))
                    {
                        Output.Pac = Convert.ToInt32(_line.Replace("var Pac=", ""));
                    }
                    #endregion

                    #region aPdc
                    if (_line.StartsWith("var aPdc="))
                    {
                        String firstpart_removed = _line.Replace("var aPdc=new Array(", "");
                        Output.aPdc = Convert.ToInt32(firstpart_removed.Remove(firstpart_removed.IndexOf(',')));
                    }
                    #endregion
                }
            }
            catch (Exception e)
            {
                COL.WriteLine("SolarLog Exception: " + e.Message);
                return(null);
            }

            return(Output);
        }
示例#12
0
		public static SolarLogDataSet UpdateSolarLog(String URL, ConsoleOutputLogger COL)
		{
			SolarLogDataSet Output = new SolarLogDataSet();;

			// create a web client and get the data
			String fullURL = "http://"+URL+"/min_cur.js?nocache";

			WebClient client = new WebClient ();

			try
			{
				String SolarLogValue = client.DownloadString(fullURL);

				// hurray, we got a string!
				// let's parse it!

				String[] LbL = SolarLogValue.Replace("\r","").Split(new char[] {'\n'});

				foreach(String _line in LbL)
				{
					#region Pac
					if (_line.StartsWith("var Pac="))
					{
						Output.Pac = Convert.ToInt32(_line.Replace("var Pac=",""));
					}
					#endregion

					#region aPdc
					if (_line.StartsWith("var aPdc="))
					{
						String firstpart_removed = _line.Replace("var aPdc=new Array(","");
						Output.aPdc = Convert.ToInt32( firstpart_removed.Remove(firstpart_removed.IndexOf(',')));
					}
					#endregion
				}
			}
			catch(Exception e)
			{
				COL.WriteLine("SolarLog Exception: "+e.Message);
				return null;
			}

			return Output;
		}
示例#13
0
		/// <summary>
		/// Each HTTP processor object handles one client.  If Keep-Alive is enabled then this
		/// object will be reused for subsequent requests until the client breaks keep-alive.
		/// This usually happens when it times out.  Because this could easily lead to a DoS
		/// attack, we keep track of the number of open processors and only allow 100 to be
		/// persistent active at any one time.  Additionally, we do not allow more than 500
		/// outstanding requests.
		/// </summary>
		/// <param name="docRoot">Root-Directory of the HTTP Server</param>
		/// <param name="s">the Socket to work with</param>
		/// <param name="webserver">the "master" HttpServer Object of this Client</param>
		public HttpProcessor(Socket s, String HTTP_DocumentRoot, TinyOnDiskStorage Storage, TinyOnDiskStorage LatitudeStorage, XS1Configuration _XS1_Configuration, ConsoleOutputLogger Logger, MAXMonitoringThread ELVMAXMonitoring, bool AuthEnabled, String Uname, String Pword, String StartAddrFilter)
		{
			this.s = s;
			HTTPServer_DocumentRoot = HTTP_DocumentRoot;
			JSON_Data = new JSONData(Storage,Logger);
			docRootFile = new FileInfo(HTTPServer_DocumentRoot);
			headers = new Hashtable();
            XS1_Configuration = _XS1_Configuration;
            ConsoleOutputLogger = Logger;
			internal_proxy = new HTTPProxy(ConsoleOutputLogger,ELVMAXMonitoring);
			ELVMAX = ELVMAXMonitoring;
			SensorDataStore = Storage;
			//LatitudeDataStore = LatitudeStorage;
			//LatitudeGeoLocation = new Geolocation(LatitudeStorage,Logger);
			AuthorizationEnabled = AuthEnabled;
			Username = Uname;
			Password = Pword;
            AuthDisabledForAdressesThatStartWith = StartAddrFilter;
		}
示例#14
0
		public LoggingThread(String _ServerName, ConsoleOutputLogger Logger,TinyOnDiskStorage _actor_store, TinyOnDiskStorage _sensor_store, TinyOnDiskStorage _unknown_store, TinyOnDiskStorage _miataru_store, String _Username, String _Password, Int32 _ConfigurationCacheMinutes)
        {
            actor_data_store = _actor_store;
            sensor_data_store = _sensor_store;
            unknown_data_store = _unknown_store;
			miataru_data_store = _miataru_store;
            ServerName = _ServerName;
            UserName = _Username;
            Password = _Password;
            ConfigurationCacheMinutes = _ConfigurationCacheMinutes;
            ConsoleOutputLogger = Logger;
			XS1_DataQueue = new ConcurrentQueue<XS1_DataObject>();
			MAX_DataQueue = new ConcurrentQueue<IDeviceDiffSet>();
            SolarLog_DataQueue = new ConcurrentQueue<SolarLogDataSet>();
            NetworkMonitor_Queue = new ConcurrentQueue<NetworkMonitoringDataSet>();

			if (Properties.Settings.Default.AlarmingEnabled)
				Alarming_Queue = new ConcurrentQueue<IAlarmingEvent>();

        }
示例#15
0
        public LoggingThread(String _ServerName, ConsoleOutputLogger Logger, TinyOnDiskStorage _actor_store, TinyOnDiskStorage _sensor_store, TinyOnDiskStorage _unknown_store, TinyOnDiskStorage _miataru_store, String _Username, String _Password, Int32 _ConfigurationCacheMinutes)
        {
            actor_data_store          = _actor_store;
            sensor_data_store         = _sensor_store;
            unknown_data_store        = _unknown_store;
            miataru_data_store        = _miataru_store;
            ServerName                = _ServerName;
            UserName                  = _Username;
            Password                  = _Password;
            ConfigurationCacheMinutes = _ConfigurationCacheMinutes;
            ConsoleOutputLogger       = Logger;
            XS1_DataQueue             = new ConcurrentQueue <XS1_DataObject>();
            MAX_DataQueue             = new ConcurrentQueue <IDeviceDiffSet>();
            SolarLog_DataQueue        = new ConcurrentQueue <SolarLogDataSet>();
            NetworkMonitor_Queue      = new ConcurrentQueue <NetworkMonitoringDataSet>();

            if (Properties.Settings.Default.AlarmingEnabled)
            {
                Alarming_Queue = new ConcurrentQueue <IAlarmingEvent>();
            }
        }
示例#16
0
 public AlarmingThread(ConsoleOutputLogger Logger, ConcurrentQueue <IAlarmingEvent> _AlarmQueue, TinyOnDiskStorage sensor_data, TinyOnDiskStorage actor_data, TinyOnDiskStorage latitude_data)
 {
     ConsoleOutputLogger = Logger;
     Alarming_Queue      = _AlarmQueue;
     SMSGateway          = new SMS77Gateway(Properties.Settings.Default.AlarmingSMS77Username, Properties.Settings.Default.AlarmingSMS77Password);
 }
示例#17
0
 public MiataruThread(ConsoleOutputLogger Logger, TinyOnDiskStorage DataStore, Int32 UpdateTime = 30000)
 {
     ConsoleOutputLogger = Logger;
     MiataruUpdateTime   = UpdateTime;
     miatarustore        = DataStore;
 }
示例#18
0
 public ScriptingTimerThread(LoggingThread __LoggingThreadInstance, ConsoleOutputLogger Logger)
 {
     //_LoggingThreadInstance = __LoggingThreadInstance;
     ConsoleOutputLogger = Logger;
 }
示例#19
0
 /// <summary>
 /// Initializes a new instance of the <see cref="xs1_data_logging.SensorCheck"/> class.
 /// </summary>
 public SensorCheck(ConsoleOutputLogger Logger)
 {
     ConsoleOutputLogger = Logger;
 }
示例#20
0
		/// <summary>
		/// Initializes a new instance of the <see cref="xs1_data_logging.SensorCheck"/> class.
		/// </summary>
		public SensorCheck (ConsoleOutputLogger Logger)
		{
            ConsoleOutputLogger = Logger;
		}
示例#21
0
 public HTTPProxy(ConsoleOutputLogger Logger, MAXMonitoringThread ELVMAXMonitoringThread)
 {
     ConsoleOutputLogger = Logger;
     ELVMAX = ELVMAXMonitoringThread;
 }
示例#22
0
 public ScriptingTimerThread(LoggingThread __LoggingThreadInstance, ConsoleOutputLogger Logger)
 {
     //_LoggingThreadInstance = __LoggingThreadInstance;
     ConsoleOutputLogger = Logger;
 }
示例#23
0
		public AlarmingThread(ConsoleOutputLogger Logger, ConcurrentQueue<IAlarmingEvent> _AlarmQueue, TinyOnDiskStorage sensor_data, TinyOnDiskStorage actor_data, TinyOnDiskStorage latitude_data)
		{
			ConsoleOutputLogger = Logger;
			Alarming_Queue = _AlarmQueue;
			SMSGateway = new SMS77Gateway(Properties.Settings.Default.AlarmingSMS77Username,Properties.Settings.Default.AlarmingSMS77Password);
		}
示例#24
0
		public HTTPProxy (ConsoleOutputLogger Logger, MAXMonitoringThread ELVMAXMonitoringThread)
		{
            ConsoleOutputLogger = Logger;
			ELVMAX = ELVMAXMonitoringThread;
		}