BowlerKernel
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel Class Reference
Inheritance diagram for com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel:
Inheritance graph
[legend]
Collaboration diagram for com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel:
Collaboration graph
[legend]

Public Member Functions

 CounterInputChannel (int channel)
 
 CounterInputChannel (DyIO dyio, int channel)
 
 CounterInputChannel (DyIOChannel channel)
 
 CounterInputChannel (DyIOChannel channel, boolean isAsync)
 
void addCounterInputListener (ICounterInputListener l)
 
void removeCounterInputListener (ICounterInputListener l)
 
void removeAllCounterInputListeners ()
 
void onChannelEvent (DyIOChannelEvent e)
 
void setAsync (boolean isAsync)
 
boolean setValue (int value)
 
boolean hasAsync ()
 
- Public Member Functions inherited from com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral
 DyIOAbstractPeripheral (DyIOChannel channel, DyIOChannelMode myMode, boolean async)
 
DyIOChannelMode getClassMode ()
 
boolean isEnabled ()
 
boolean setMode ()
 
boolean setMode (boolean async)
 
boolean setMode (DyIOChannelMode mode, boolean async)
 
DyIOChannel getChannel ()
 
DyIOChannelMode getMode ()
 
boolean setValue (ByteList value) throws InvalidResponseException
 
int getValue () throws InvalidResponseException
 
boolean SavePosition (int pos)
 
boolean configAdvancedAsyncNotEqual ()
 
boolean configAdvancedAsyncDeadBand (int deadbandSize)
 
boolean configAdvancedAsyncTreshhold (int threshholdValue, AsyncThreshholdEdgeType edgeType)
 
boolean configAdvancedAsyncAutoSample ()
 
boolean configAdvancedAsyncNotEqual (int msTime)
 
boolean configAdvancedAsyncDeadBand (int msTime, int deadbandSize)
 
boolean configAdvancedAsyncTreshhold (int msTime, int threshholdValue, AsyncThreshholdEdgeType edgeType)
 
boolean configAdvancedAsyncAutoSample (int msTime)
 
boolean flush ()
 
int getConfiguration ()
 

Protected Member Functions

void fireOnCounterInput (int value)
 

Private Member Functions

void init (DyIOChannel channel, boolean isAsync)
 

Private Attributes

ArrayList< ICounterInputListenerlisteners = new ArrayList<ICounterInputListener>()
 

Detailed Description

The Class CounterInputChannel.

Definition at line 31 of file CounterInputChannel.java.

Constructor & Destructor Documentation

◆ CounterInputChannel() [1/4]

com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.CounterInputChannel ( int  channel)

Constructor. Creates an counter input input channel that is syncronous only by default.

Parameters
channel- the channel object requested from the DyIO

Definition at line 42 of file CounterInputChannel.java.

References com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.channel, com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.getChannel(), and com.neuronrobotics.sdk.common.DeviceManager.getSpecificDevice().

Here is the call graph for this function:

◆ CounterInputChannel() [2/4]

com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.CounterInputChannel ( DyIO  dyio,
int  channel 
)

Constructor. Creates an counter input input channel that is syncronous only by default.

Parameters
dyiothe dyio
channel- the channel object requested from the DyIO

Definition at line 53 of file CounterInputChannel.java.

References com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.channel, and com.neuronrobotics.sdk.dyio.DyIO.getChannel().

Here is the call graph for this function:

◆ CounterInputChannel() [3/4]

com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.CounterInputChannel ( DyIOChannel  channel)

Constructor. Creates an counter input input channel that is syncronous only by default.

Parameters
channel- the channel object requested from the DyIO

Definition at line 63 of file CounterInputChannel.java.

References com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.channel.

◆ CounterInputChannel() [4/4]

com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.CounterInputChannel ( DyIOChannel  channel,
boolean  isAsync 
)

Instantiates a new counter input channel.

Parameters
channelthe channel
isAsyncthe is async

Definition at line 73 of file CounterInputChannel.java.

References com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.channel, com.neuronrobotics.sdk.dyio.DyIOChannelMode.COUNT_IN_INT, and com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.init().

Here is the call graph for this function:

Member Function Documentation

◆ addCounterInputListener()

void com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.addCounterInputListener ( ICounterInputListener  l)

addCounterInputListener.

Parameters
ladd this listener to this channels event listeners

Definition at line 99 of file CounterInputChannel.java.

References com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.listeners.

◆ fireOnCounterInput()

void com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.fireOnCounterInput ( int  value)
protected

◆ hasAsync()

boolean com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.hasAsync ( )

This method is to check if this peripheral is capable to be set as up as asynchronous.

Returns
if it cna be async

Reimplemented from com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.

Definition at line 172 of file CounterInputChannel.java.

◆ init()

void com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.init ( DyIOChannel  channel,
boolean  isAsync 
)
private

◆ onChannelEvent()

void com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.onChannelEvent ( DyIOChannelEvent  e)

onChannelEvent Send the counter value to all the listening objects.

Parameters
ethe e

Implements com.neuronrobotics.sdk.dyio.IChannelEventListener.

Definition at line 145 of file CounterInputChannel.java.

References com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.fireOnCounterInput(), and com.neuronrobotics.sdk.dyio.DyIOChannelEvent.getSignedValue().

Here is the call graph for this function:

◆ removeAllCounterInputListeners()

void com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.removeAllCounterInputListeners ( )

Removes the all counter input listeners.

Definition at line 124 of file CounterInputChannel.java.

References com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.listeners.

◆ removeCounterInputListener()

void com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.removeCounterInputListener ( ICounterInputListener  l)

removeCounterInputListener.

Parameters
lremove this listener to this channels event listeners

Definition at line 113 of file CounterInputChannel.java.

References com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.listeners.

◆ setAsync()

void com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.setAsync ( boolean  isAsync)

Sets the async.

Parameters
isAsyncthe new async

Reimplemented from com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.

Definition at line 154 of file CounterInputChannel.java.

References com.neuronrobotics.sdk.dyio.DyIOChannelMode.COUNT_IN_INT, and com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.setMode().

Here is the call graph for this function:

◆ setValue()

boolean com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.setValue ( int  value)

This method sets the value of the output of the giver peripheral.

Parameters
valueSets this value to the channel
Returns
if the set worked
Exceptions
InvalidResponseExceptionthe invalid response exception

Reimplemented from com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.

Definition at line 162 of file CounterInputChannel.java.

References com.neuronrobotics.sdk.common.ByteList.addAs32().

Here is the call graph for this function:

Member Data Documentation

◆ listeners

ArrayList<ICounterInputListener> com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.listeners = new ArrayList<ICounterInputListener>()
private

The documentation for this class was generated from the following file: