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

Public Member Functions

 CounterOutputChannel (int channel)
 
 CounterOutputChannel (DyIO dyio, int channel)
 
 CounterOutputChannel (DyIOChannel channel)
 
 CounterOutputChannel (DyIOChannel channel, boolean isAsync)
 
boolean SetPosition (int pos)
 
boolean SetPosition (int pos, float time)
 
void addCounterOutputListener (ICounterOutputListener l)
 
void removeCounterOutputListener (ICounterOutputListener l)
 
void removeAllCounterOutputListeners ()
 
boolean setValue (int value)
 
void onChannelEvent (DyIOChannelEvent e)
 
boolean hasAsync ()
 
void setAsync (boolean isAsync)
 
- 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 fireOnCounterOutput (int value)
 

Private Member Functions

void init (DyIOChannel channel, boolean isAsync)
 
boolean validate ()
 

Private Attributes

ArrayList< ICounterOutputListenerlisteners = new ArrayList<ICounterOutputListener>()
 

Detailed Description

The Class CounterOutputChannel.

Definition at line 34 of file CounterOutputChannel.java.

Constructor & Destructor Documentation

◆ CounterOutputChannel() [1/4]

com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.CounterOutputChannel ( 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 45 of file CounterOutputChannel.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:

◆ CounterOutputChannel() [2/4]

com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.CounterOutputChannel ( 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 56 of file CounterOutputChannel.java.

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

Here is the call graph for this function:

◆ CounterOutputChannel() [3/4]

com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.CounterOutputChannel ( 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 66 of file CounterOutputChannel.java.

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

◆ CounterOutputChannel() [4/4]

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

Instantiates a new counter output channel.

Parameters
channelthe channel
isAsyncthe is async

Definition at line 76 of file CounterOutputChannel.java.

References com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.channel, com.neuronrobotics.sdk.dyio.DyIOChannelMode.COUNT_OUT_INT, and com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.init().

Here is the call graph for this function:

Member Function Documentation

◆ addCounterOutputListener()

void com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.addCounterOutputListener ( ICounterOutputListener  l)

addCounterOutputListener.

Parameters
ladd this listener to this channels event listeners

Definition at line 132 of file CounterOutputChannel.java.

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

◆ fireOnCounterOutput()

void com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.fireOnCounterOutput ( int  value)
protected

◆ hasAsync()

boolean com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.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 196 of file CounterOutputChannel.java.

◆ init()

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

◆ onChannelEvent()

void com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.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 189 of file CounterOutputChannel.java.

References com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.fireOnCounterOutput(), and com.neuronrobotics.sdk.dyio.DyIOChannelEvent.getSignedValue().

Here is the call graph for this function:

◆ removeAllCounterOutputListeners()

void com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.removeAllCounterOutputListeners ( )

Removes the all counter output listeners.

Definition at line 157 of file CounterOutputChannel.java.

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

◆ removeCounterOutputListener()

void com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.removeCounterOutputListener ( ICounterOutputListener  l)

removeCounterOutputListener.

Parameters
lremove this listener to this channels event listeners

Definition at line 146 of file CounterOutputChannel.java.

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

◆ setAsync()

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

Sets the async.

Parameters
isAsyncthe new async

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

Definition at line 205 of file CounterOutputChannel.java.

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

Here is the call graph for this function:

◆ SetPosition() [1/2]

boolean com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.SetPosition ( int  pos)

Set the Counter to a given position.

Parameters
posthe pos
Returns
if the action was successful

Definition at line 102 of file CounterOutputChannel.java.

◆ SetPosition() [2/2]

boolean com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.SetPosition ( int  pos,
float  time 
)

Steps the Counter though a transformation over a given amount of time.

Parameters
pos- the end position
time- the number of seconds for the transition to take place
Returns
if the action was successful

Definition at line 113 of file CounterOutputChannel.java.

References com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.flush(), com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.getChannel(), com.neuronrobotics.sdk.dyio.DyIOChannel.setCachedTime(), com.neuronrobotics.sdk.dyio.DyIOChannel.setCachedValue(), and com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.validate().

Here is the call graph for this function:

◆ setValue()

boolean com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.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 176 of file CounterOutputChannel.java.

References com.neuronrobotics.sdk.common.ByteList.addAs32(), and com.neuronrobotics.sdk.common.Log.info().

Here is the call graph for this function:

◆ validate()

boolean com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.validate ( )
private

Member Data Documentation

◆ listeners

ArrayList<ICounterOutputListener> com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.listeners = new ArrayList<ICounterOutputListener>()
private

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