public ActionResult <BreakerSetupObject> Get(int id)
        {
            id = id - 1;

            SmartDASService service;

            try {
                service = new SmartDASService();
                service.Connect();
            } catch (Exception e) {
                return(StatusCode(500, e));
            }

            if (id >= 0 && id < 9)
            {
                try {
                    var breakers = service.getBreakerConfigurations();
                    service.Disconnect();
                    return(breakers[id]);
                } catch (Exception e) {
                    service.Disconnect();
                    return(StatusCode(500, e));
                }
            }
            else
            {
                service.Disconnect();
                return(NotFound());
            }
        }
        public ActionResult <BreakerSetupObject> Put(int id, [FromBody] BreakerSetupObject newConfiguration)
        {
            id = id - 1;

            SmartDASService service;

            try {
                service = new SmartDASService();
                service.Connect();
            } catch (Exception e) {
                return(StatusCode(500, e));
            }

            try {
                if (id >= 0 && id < 9)
                {
                    var breakers = service.getBreakerConfigurations();

                    breakers[id] = newConfiguration;

                    breakers = service.setBreakerConfigurations(breakers);
                    service.Disconnect();
                    return(breakers[id]);
                }
                else
                {
                    service.Disconnect();
                    return(NotFound());
                }
            } catch (Exception e) {
                service.Disconnect();
                return(StatusCode(500, e));
            }
        }
        public ActionResult <BreakerSetupObject[]> Get()
        {
            var service = new SmartDASService();

            service.Connect();
            try {
                var breakerConfig = service.getBreakerConfigurations();
                service.Disconnect();
                return(breakerConfig);
            } catch (Exception e) {
                service.Disconnect();
                return(StatusCode(500, e));
            }
        }