private static object CoapGetTurtle(CoapRequest Request, object Payload)
        {
            try
            {
                StringBuilder     sb               = new StringBuilder();
                HttpServerRequest HttpRequest      = Request.ToHttpRequest();
                ISensorDataExport SensorDataExport = new SensorDataTurtleExport(sb, HttpRequest);
                ExportSensorData(SensorDataExport, new ReadoutRequest(HttpRequest));

                return(sb.ToString());
            } catch (Exception ex)
            {
                Log.Exception(ex);
                return(ex.Message);
            }
        }
        private static object CoapGetRdf(CoapRequest Request, object Payload)
        {
            try
            {
                StringBuilder     sb               = new StringBuilder();
                HttpServerRequest HttpRequest      = Request.ToHttpRequest();
                ISensorDataExport SensorDataExport = new SensorDataRdfExport(sb, HttpRequest);
                ExportSensorData(SensorDataExport, new ReadoutRequest(HttpRequest));

                XmlDocument Xml = new XmlDocument();
                Xml.LoadXml(sb.ToString());
                return(Xml);
            } catch (Exception ex)
            {
                Log.Exception(ex);
                return(ex.Message);
            }
        }
Beispiel #3
0
		private static object CoapGetTurtle (CoapRequest Request, object Payload)
		{
			try
			{
				StringBuilder sb = new StringBuilder ();
				HttpServerRequest HttpRequest = Request.ToHttpRequest ();
				ISensorDataExport SensorDataExport = new SensorDataTurtleExport (sb, HttpRequest);
				ExportSensorData (SensorDataExport, new ReadoutRequest (HttpRequest));

				return sb.ToString ();
			} catch (Exception ex)
			{
				Log.Exception (ex);
				return ex.Message;
			}
		}
Beispiel #4
0
		private static object CoapGetJson (CoapRequest Request, object Payload)
		{
			StringBuilder sb = new StringBuilder ();
			ISensorDataExport SensorDataExport = new SensorDataJsonExport (sb);
			ExportSensorData (SensorDataExport, new ReadoutRequest (Request.ToHttpRequest ()));

			return JsonUtilities.Parse (sb.ToString ());
		}
Beispiel #5
0
		private static object CoapGetXml (CoapRequest Request, object Payload)
		{
			StringBuilder sb = new StringBuilder ();
			ISensorDataExport SensorDataExport = new SensorDataXmlExport (sb, false, true);
			ExportSensorData (SensorDataExport, new ReadoutRequest (Request.ToHttpRequest ()));

			XmlDocument Xml = new XmlDocument ();
			Xml.LoadXml (sb.ToString ());
			return Xml;
		}
Beispiel #6
0
		private static object CoapGetRdf (CoapRequest Request, object Payload)
		{
			try
			{
				StringBuilder sb = new StringBuilder ();
				HttpServerRequest HttpRequest = Request.ToHttpRequest ();
				ISensorDataExport SensorDataExport = new SensorDataRdfExport (sb, HttpRequest);
				ExportSensorData (SensorDataExport, new ReadoutRequest (HttpRequest));

				XmlDocument Xml = new XmlDocument ();
				Xml.LoadXml (sb.ToString ());
				return Xml;
			} catch (Exception ex)
			{
				Log.Exception (ex);
				return ex.Message;
			}
		}
Beispiel #7
0
		private static object CoapGetTurtle (CoapRequest Request, object Payload)
		{
			StringBuilder sb = new StringBuilder ();
			HttpServerRequest HttpRequest = Request.ToHttpRequest ();
			ISensorDataExport SensorDataExport = new SensorDataTurtleExport (sb, HttpRequest);
			ExportSensorData (SensorDataExport, new ReadoutRequest (HttpRequest));

			return sb.ToString ();
		}