Class: NewRemote::Receiver

Inherits:
Object
  • Object
show all
Defined in:
ext/new_remote/new_remote.cpp

Class Method Summary collapse

Class Method Details

.receive(pin, minRepeats) ⇒ Object



60
61
62
63
64
65
66
67
68
69
# File 'ext/new_remote/new_remote.cpp', line 60

static VALUE wrap_receiver_receive(VALUE self, VALUE pin, VALUE minRepeats) {
	NewRemoteReceiver::init(NUM2INT(pin), NUM2INT(minRepeats), wrap_receiver_callback);

	/* Wait forever until receiving SIGINT/SIGTERM. */
	while (!signal_received) {
		sleep(1);
	}

	return self;
}