Ejemplo n.º 1
0
 public IOFactory(DataServerWebClient d, GpioConnection g)
 {
     log4net.Config.XmlConfigurator.Configure();
     log        = LogManager.GetLogger("Device");
     dataServer = d;
     gpio       = g;
     driver     = GpioConnectionSettings.DefaultDriver;
 }
        public DataService(string url)
        {
            //initialize data server
            dataServer = new DataServerWebClient(url);

            //Spis = new List<Spi>();
            //Solenoids = new List<Solenoid>();
            //Alarms = new List<Alarm>();
            //Analogs = new List<Analog>();
            //Schedules = new List<Schedule>();
        }
Ejemplo n.º 3
0
        public InterfaceService(string url)
        {
            //initialize logging
            log4net.Config.XmlConfigurator.Configure();
            log = LogManager.GetLogger("Device");

            //initialize hardware
            gpio       = new GpioConnection();
            gpioDriver = new MemoryGpioConnectionDriver(); //GpioConnectionSettings.DefaultDriver;

            log.DebugFormat("InterfaceManager.Ctor()");

            //initialize data server
            dataServer = new DataServerWebClient(url);

            //initialize hardware collections
            Spis         = new List <SpiTuple>();
            Solenoids    = new List <SolenoidTuple>();
            Alarms       = new List <AlarmTuple>();
            Analogs      = new List <AnalogTuple>();
            Commands     = new List <Command>();
            CommandTypes = new List <CommandType>();
            Schedules    = new List <Schedule>();
        }