예제 #1
0
        static public IRDB Create(System.Configuration.ApplicationSettingsBase settings, IREncoding encoding = IREncoding.HEX, String dbnameKey = null)
        {
            IRDB db = dbnameKey != null?DB.Create <IRDB>(settings, dbnameKey) : DB.Create <IRDB>(settings);

            db.Encoding = encoding;
            return(db);
        }
예제 #2
0
        public IRReceiver(String id, String name, int receivePin, IRDB db = null) : base(id, name, db)
        {
            Category = DeviceCategory.IR_RECEIVER;

            _receivePin = receivePin;
            _receiving  = false;

            ConfigurePin(_receivePin, PinMode.DigitalInput);

            ArduinoCommand cmd = new ArduinoCommand();

            cmd.CommandAlias = "Start";
            cmd.Type         = ArduinoCommand.CommandType.START;
            AddCommand(cmd);

            cmd = new ArduinoCommand();
            cmd.CommandAlias = "Stop";
            cmd.Type         = ArduinoCommand.CommandType.STOP;
            AddCommand(cmd);

            cmd = new ArduinoCommand();
            cmd.CommandAlias = "Save";
            cmd.Type         = ArduinoCommand.CommandType.SAVE;
            AddCommand(cmd);
        }
예제 #3
0
        public IRTransmitter(String id, String name, int enablePin, int transmitPin, IRDB db = null) : base(id, name, db)
        {
            Category = DeviceCategory.IR_TRANSMITTER;

            _enablePin   = enablePin;
            _transmitPin = transmitPin;
            ConfigurePin(_enablePin, PinMode.DigitalOutput);
            if (transmitPin != ArduinoPin.BOARD_SPECIFIED)
            {
                ConfigurePin(_transmitPin, PinMode.PwmOutput);
            }
        }
예제 #4
0
 public IRReceiver(int receivePin, IRDB db = null) : this("irr" + receivePin, "IRR", receivePin, db)
 {
 }
 public IRGenericReceiver(int receivePin, IRDB db = null) : base(receivePin, db)
 {
 }
 public IRGenericReceiver(String id, String name, int receivePin, IRDB db = null) : base(id, name, receivePin, db)
 {
 }
예제 #7
0
 public IRSamsungTV(String id, int enablePin, int transmitPin, IRDB db) : base(id, "SSTV", enablePin, transmitPin, db)
 {
     DeviceName = DEVICE_NAME;
 }
예제 #8
0
 public IRTransmitter(int enablePin, int transmitPin, IRDB db = null) : this("irt" + enablePin, "IRT", enablePin, transmitPin, db)
 {
 }
 public IRGenericTransmitter(int enablePin, int transmitPin, IRDB db = null) : base(enablePin, transmitPin, db)
 {
 }
 public IRGenericTransmitter(String id, String name, int enablePin, int transmitPin, IRDB db = null) : base(id, name, enablePin, transmitPin, db)
 {
 }
 public IRLGHomeTheater(String id, int enablePin, int transmitPin, IRDB db) : base(id, "LGHT", enablePin, transmitPin, db)
 {
     DeviceName     = DEVICE_NAME;
     RepeatInterval = REPEAT_INTERVAL;
 }
예제 #12
0
 public IRDevice(String id, String name, IRDB db = null) : base(id, name)
 {
     DB = db;
 }