PinState state = ((PinDigitalStateChangeEvent)event).getState();
// process event callbacks for digital listeners
for (GpioPinListener listener : pin.getListeners()) {
if (listener instanceof GpioPinListenerDigital) {
((GpioPinListenerDigital)listener).handleGpioPinDigitalStateChangeEvent(new GpioPinDigitalStateChangeEvent(event.getSource(), pin, state));
}
}
// process triggers
for (GpioTrigger trigger : pin.getTriggers()) {