Beispiel #1
0
        public static TourniquetteEvent Parse(string s)
        {
            var items = s.Split(';');
            var t     = new TourniquetteEvent();

            t.Ingang   = GetIngang(items[0]);
            t.DateTime = GetDate(items[1], items[2]);

            return(t);
        }
Beispiel #2
0
        private static void WriteToGost(TourniquetteEvent ev)
        {
            var server     = "https://gostarena.westeurope.cloudapp.azure.com/v1.0";
            var obs        = new Observation();
            var datastream = new Datastream();

            datastream.Id = 32;
            switch (ev.Ingang)
            {
            case 'A':
                datastream.Id = 32;
                break;

            case 'B':
                datastream.Id = 33;
                break;

            case 'C':
                datastream.Id = 34;
                break;

            case 'D':
                datastream.Id = 35;
                break;

            case 'E':
                datastream.Id = 36;
                break;

            case 'F':
                datastream.Id = 37;
                break;

            case 'G':
                datastream.Id = 38;
                break;

            case 'H':
                datastream.Id = 39;
                break;

            case 'I':
                datastream.Id = 40;
                break;

            case 'J':
                datastream.Id = 41;
                break;

            case 'K':
                datastream.Id = 42;
                break;

            case 'L':
                datastream.Id = 43;
                break;

            case 'M':
                datastream.Id = 44;
                break;
            }

            obs.Datastream     = datastream;
            obs.result         = 1;
            obs.phenomenonTime = ev.DateTime;
            PostJson <Observation>(server + "/observations", obs);
            // var returnedObservation = client.CreateObservation(obs);
        }