Search in sources :

Example 1 with ICounterOutputListener

use of com.neuronrobotics.sdk.dyio.peripherals.ICounterOutputListener in project java-bowler by NeuronRobotics.

the class StepperPrismaticLink method setChannel.

public void setChannel(CounterOutputChannel c) {
    channel = c;
    channel.getChannel().setCachedMode(true);
    channel.addCounterOutputListener(new ICounterOutputListener() {

        @Override
        public void onCounterValueChange(CounterOutputChannel source, int value) {
            if (source == channel) {
                fireLinkListener(value);
            }
        }
    });
}
Also used : ICounterOutputListener(com.neuronrobotics.sdk.dyio.peripherals.ICounterOutputListener) CounterOutputChannel(com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel)

Example 2 with ICounterOutputListener

use of com.neuronrobotics.sdk.dyio.peripherals.ICounterOutputListener in project java-bowler by NeuronRobotics.

the class StepperRotoryLink method setChannel.

public void setChannel(CounterOutputChannel c) {
    channel = c;
    channel.getChannel().setCachedMode(true);
    channel.addCounterOutputListener(new ICounterOutputListener() {

        @Override
        public void onCounterValueChange(CounterOutputChannel source, int value) {
            if (source == channel) {
                fireLinkListener(value);
            }
        }
    });
}
Also used : ICounterOutputListener(com.neuronrobotics.sdk.dyio.peripherals.ICounterOutputListener) CounterOutputChannel(com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel)

Aggregations

CounterOutputChannel (com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel)2 ICounterOutputListener (com.neuronrobotics.sdk.dyio.peripherals.ICounterOutputListener)2