示例#1
0
        public bool NastavAktualniCas([FromUri] byte addr)
        {
            Logger.Info("+");

            if (RunConfig.IsMockupMode)
            {
                return(true);
            }

            try
            {
                //return SlevyrService.NastavAktualniCas(addr);
                SlevyrService.NastavAktualniCasQueued(addr);
                return(true);
            }
            catch (KeyNotFoundException)
            {
                throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.NotFound));
            }
        }
示例#2
0
        public bool NastavAktualniCasAllUnits()
        {
            Logger.Info("+");

            if (RunConfig.IsMockupMode)
            {
                return(true);
            }

            try
            {
                foreach (var addr in RunConfig.UnitAddrs)
                {
                    SlevyrService.NastavAktualniCasQueued(addr);
                }
                return(true);
            }
            catch (KeyNotFoundException)
            {
                throw new HttpResponseException(new HttpResponseMessage(HttpStatusCode.NotFound));
            }
        }