<dependency>
<groupId>osgi.enroute.examples.iot.pi </groupId>
<artifactId>osgi.enroute.examples.iot.pi.command.provider </artifactId>
<version>1.0.0 </version>
</dependency>
import org.osgi.service.component.annotations.*;
import osgi.enroute.examples.iot.pi.provider.*;
@Component(service = MyComponent.class, property = { "osgi.command.scope=pi", "osgi.command.function=gpio" })
public class MyComponent {
@Reference
private Gpio gpio;
public void gpio(int pin, String command) {
gpio.setState(pin, command);
}
}
-Durl=http://enroute.osgi.org/tables
-Dmqtt-host=tcp://localhost:1883
pi:gpio 12 HIGH