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

Public Member Functions

 DyIOChannel (DyIO dyio, int channel, DyIOChannelMode mode, boolean isEditable)
 
void update (DyIO dyio, int channel, DyIOChannelMode mode, boolean isEditable)
 
int getChannelNumber ()
 
boolean isEditable ()
 
void send (BowlerAbstractCommand command)
 
void removeAllChannelModeChangeListener ()
 
void removeChannelModeChangeListener (IDyIOChannelModeChangeListener l)
 
void addChannelModeChangeListener (IDyIOChannelModeChangeListener l)
 
void removeAllChannelEventListeners ()
 
void removeChannelEventListener (IChannelEventListener l)
 
void addChannelEventListener (IChannelEventListener l)
 
boolean setMode (DyIOChannelMode mode)
 
DyIOChannelMode getMode (boolean resync)
 
DyIO getDevice ()
 
void resync (boolean all)
 
boolean canBeMode (DyIOChannelMode m)
 
boolean hasAsync ()
 
Collection< DyIOChannelModegetAvailableModes ()
 
int parseDyIOChannelEvent (DyIOChannelEvent e)
 
String toString ()
 
DyIOChannel getChannel ()
 
DyIOChannelMode getMode ()
 
int getValue ()
 
boolean setMode (DyIOChannelMode mode, boolean async)
 
boolean setValue (int value)
 
boolean flush ()
 
void setCachedValue (int cachedValue)
 
int getCachedValue ()
 
boolean getCachedMode ()
 
void setCachedMode (boolean mode)
 
void setDap (DyIOAbstractPeripheral dap)
 
DyIOAbstractPeripheral getDap ()
 
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)
 
DyIOChannelMode getCurrentMode ()
 
void setCachedTime (float cachedTime)
 
float getCachedTime ()
 
void setAsync (boolean b)
 
boolean isStreamChannel ()
 
boolean isStreamtMode (DyIOChannelMode m)
 
boolean setValue (ByteList data)
 

Protected Member Functions

void fireChannelEvent (DyIOChannelEvent e)
 
void fireModeChangeEvent (DyIOChannelMode e)
 
int getPreviousValue ()
 

Protected Attributes

int cachedValue = 0
 

Private Member Functions

void setPreviousValue (int previousValue)
 
void setDevice (DyIO device)
 
boolean isDefaultAsync (DyIOChannelMode m)
 
void resyncIfNotSynced ()
 
boolean isOutputMode (DyIOChannelMode m)
 

Private Attributes

int MAXATTEMPTS = 3
 
float cachedTime =0
 
DyIO device
 
int number
 
boolean editable
 
DyIOChannelMode current =null
 
boolean isAsync =true
 
ArrayList< IChannelEventListenerlisteners = new ArrayList<IChannelEventListener>()
 
ArrayList< IDyIOChannelModeChangeListenermodeListeners = new ArrayList< IDyIOChannelModeChangeListener>()
 
boolean cachedMode =false
 
DyIOAbstractPeripheral dap =null
 
int previousValue = 1
 
boolean haveSetMode = false
 
boolean settingMode =false
 
ArrayList< DyIOChannelModemyModes
 
boolean synced = false
 

Detailed Description

A DyIO channel. This represents a single DyIO pchannel.

Author
Kevin Harrington, Robert Breznak

Definition at line 39 of file DyIOChannel.java.

Constructor & Destructor Documentation

◆ DyIOChannel()

com.neuronrobotics.sdk.dyio.DyIOChannel.DyIOChannel ( DyIO  dyio,
int  channel,
DyIOChannelMode  mode,
boolean  isEditable 
)

Construct a channel object.

Parameters
dyioThe DyIO that the channel belongs on
channelThe Channel on the DyIO that this object corresponds to.
modeThe Type of channel.
isEditableLock the channel parameters after creation.

Definition at line 92 of file DyIOChannel.java.

References com.neuronrobotics.sdk.dyio.DyIOChannel.isEditable(), and com.neuronrobotics.sdk.dyio.DyIOChannel.update().

Here is the call graph for this function:

Member Function Documentation

◆ addChannelEventListener()

void com.neuronrobotics.sdk.dyio.DyIOChannel.addChannelEventListener ( IChannelEventListener  l)

◆ addChannelModeChangeListener()

void com.neuronrobotics.sdk.dyio.DyIOChannel.addChannelModeChangeListener ( IDyIOChannelModeChangeListener  l)

Add an object that wishes to receive channel updates.

Parameters
lThe object that wishes to receive updates.

Definition at line 174 of file DyIOChannel.java.

References com.neuronrobotics.sdk.dyio.DyIOChannel.modeListeners.

◆ canBeMode()

boolean com.neuronrobotics.sdk.dyio.DyIOChannel.canBeMode ( DyIOChannelMode  m)

This method verifies that this channel can be set to the mode given.

Parameters
mthe mode that is desired
Returns
if this channel has the capacity to become this mode

Definition at line 275 of file DyIOChannel.java.

References com.neuronrobotics.sdk.dyio.DyIOChannel.getAvailableModes().

Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.fireModeChangeEvent(), and com.neuronrobotics.sdk.dyio.DyIOChannel.setMode().

Here is the call graph for this function:

◆ configAdvancedAsyncAutoSample() [1/2]

boolean com.neuronrobotics.sdk.dyio.DyIOChannel.configAdvancedAsyncAutoSample ( )

This method configures the advanced async mode for a given DyIO channel to trigger on any event where the value is sampled on a real-time This sets the sample time to 100 ms clock and sent as async regardless of value change.

Returns
true if success

Definition at line 711 of file DyIOChannel.java.

◆ configAdvancedAsyncAutoSample() [2/2]

boolean com.neuronrobotics.sdk.dyio.DyIOChannel.configAdvancedAsyncAutoSample ( int  msTime)

This method configures the advanced async mode for a given DyIO channel to trigger on any event where the value is sampled on a real-time clock and sent as async regardless of value change.

Parameters
msTimethe sample time in MiliSeconds
Returns
true if success

Definition at line 757 of file DyIOChannel.java.

References com.neuronrobotics.sdk.dyio.DyIO.configAdvancedAsyncAutoSample(), com.neuronrobotics.sdk.dyio.DyIOChannel.getChannelNumber(), com.neuronrobotics.sdk.dyio.DyIOChannel.getDevice(), and com.neuronrobotics.sdk.dyio.DyIOChannel.isAsync.

Here is the call graph for this function:

◆ configAdvancedAsyncDeadBand() [1/2]

boolean com.neuronrobotics.sdk.dyio.DyIOChannel.configAdvancedAsyncDeadBand ( int  deadbandSize)

This method configures the advanced async mode for a given DyIO channel to trigger on any event where the values are outside a deadband This sets the sample time to 100 ms.

Parameters
deadbandSizethe size in sensor units of the deadband
Returns
true if success

Definition at line 688 of file DyIOChannel.java.

◆ configAdvancedAsyncDeadBand() [2/2]

boolean com.neuronrobotics.sdk.dyio.DyIOChannel.configAdvancedAsyncDeadBand ( int  msTime,
int  deadbandSize 
)

This method configures the advanced async mode for a given DyIO channel to trigger on any event where the values are outside a deadband.

Parameters
msTimethe sample time in MiliSeconds
deadbandSizethe size in sensor units of the deadband
Returns
true if success

Definition at line 732 of file DyIOChannel.java.

References com.neuronrobotics.sdk.dyio.DyIO.configAdvancedAsyncDeadBand(), com.neuronrobotics.sdk.dyio.DyIOChannel.getChannelNumber(), com.neuronrobotics.sdk.dyio.DyIOChannel.getDevice(), and com.neuronrobotics.sdk.dyio.DyIOChannel.isAsync.

Here is the call graph for this function:

◆ configAdvancedAsyncNotEqual() [1/2]

boolean com.neuronrobotics.sdk.dyio.DyIOChannel.configAdvancedAsyncNotEqual ( )

This method configures the advanced async mode for a given DyIO channel to trigger on any event where the values are not equal. This sets the sample time to 100 ms

Returns
true is success

Definition at line 677 of file DyIOChannel.java.

◆ configAdvancedAsyncNotEqual() [2/2]

boolean com.neuronrobotics.sdk.dyio.DyIOChannel.configAdvancedAsyncNotEqual ( int  msTime)

This method configures the advanced async mode for a given DyIO channel to trigger on any event where the values are not equal.

Parameters
msTimethe sample time in MiliSeconds
Returns
true if success

Definition at line 720 of file DyIOChannel.java.

References com.neuronrobotics.sdk.dyio.DyIO.configAdvancedAsyncNotEqual(), com.neuronrobotics.sdk.dyio.DyIOChannel.getChannelNumber(), com.neuronrobotics.sdk.dyio.DyIOChannel.getDevice(), and com.neuronrobotics.sdk.dyio.DyIOChannel.isAsync.

Here is the call graph for this function:

◆ configAdvancedAsyncTreshhold() [1/2]

boolean com.neuronrobotics.sdk.dyio.DyIOChannel.configAdvancedAsyncTreshhold ( int  msTime,
int  threshholdValue,
AsyncThreshholdEdgeType  edgeType 
)

This method configures the advanced async mode for a given DyIO channel to trigger on any event where the value crosses a threshhold.

Parameters
msTimethe sample time in MiliSeconds
threshholdValuea value setpoint that triggers an even when it is crossed
edgeTypeRising, Falling, or both
Returns
true if success

Definition at line 745 of file DyIOChannel.java.

References com.neuronrobotics.sdk.dyio.DyIO.configAdvancedAsyncTreshhold(), com.neuronrobotics.sdk.dyio.DyIOChannel.getChannelNumber(), com.neuronrobotics.sdk.dyio.DyIOChannel.getDevice(), and com.neuronrobotics.sdk.dyio.DyIOChannel.isAsync.

Here is the call graph for this function:

◆ configAdvancedAsyncTreshhold() [2/2]

boolean com.neuronrobotics.sdk.dyio.DyIOChannel.configAdvancedAsyncTreshhold ( int  threshholdValue,
AsyncThreshholdEdgeType  edgeType 
)

This method configures the advanced async mode for a given DyIO channel to trigger on any event where the value crosses a threshhold This sets the sample time to 100 ms.

Parameters
threshholdValuea value setpoint that triggers an even when it is crossed
edgeTypeRising, Falling, or both
Returns
true if success

Definition at line 700 of file DyIOChannel.java.

◆ fireChannelEvent()

void com.neuronrobotics.sdk.dyio.DyIOChannel.fireChannelEvent ( DyIOChannelEvent  e)
protected

◆ fireModeChangeEvent()

void com.neuronrobotics.sdk.dyio.DyIOChannel.fireModeChangeEvent ( DyIOChannelMode  e)
protected

◆ flush()

boolean com.neuronrobotics.sdk.dyio.DyIOChannel.flush ( )

◆ getAvailableModes()

Collection<DyIOChannelMode> com.neuronrobotics.sdk.dyio.DyIOChannel.getAvailableModes ( )

◆ getCachedMode()

boolean com.neuronrobotics.sdk.dyio.DyIOChannel.getCachedMode ( )

This method checks if this channel is in cache/flush mode.

Returns
true if in cache/flush mode

Definition at line 640 of file DyIOChannel.java.

References com.neuronrobotics.sdk.dyio.DyIOChannel.cachedMode.

◆ getCachedTime()

float com.neuronrobotics.sdk.dyio.DyIOChannel.getCachedTime ( )

Gets the current cached time.

Returns
the cached time

Definition at line 792 of file DyIOChannel.java.

References com.neuronrobotics.sdk.dyio.DyIOChannel.cachedTime.

Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.flush().

◆ getCachedValue()

int com.neuronrobotics.sdk.dyio.DyIOChannel.getCachedValue ( )

Provides access to the current cache value.

Returns
the cached value

Definition at line 633 of file DyIOChannel.java.

References com.neuronrobotics.sdk.dyio.DyIOChannel.cachedValue.

Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.flush().

◆ getChannel()

DyIOChannel com.neuronrobotics.sdk.dyio.DyIOChannel.getChannel ( )

This method returns the channel object when requested.

Returns
the DyIOChannel object

Implements com.neuronrobotics.sdk.dyio.IDyIOChannel.

Definition at line 416 of file DyIOChannel.java.

Referenced by com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.getChannel().

◆ getChannelNumber()

int com.neuronrobotics.sdk.dyio.DyIOChannel.getChannelNumber ( )

◆ getCurrentMode()

DyIOChannelMode com.neuronrobotics.sdk.dyio.DyIOChannel.getCurrentMode ( )

◆ getDap()

DyIOAbstractPeripheral com.neuronrobotics.sdk.dyio.DyIOChannel.getDap ( )

This method provides access to the abstract perpheral that will be using this channel object.

Returns
the dap

Definition at line 667 of file DyIOChannel.java.

References com.neuronrobotics.sdk.dyio.DyIOChannel.dap.

◆ getDevice()

DyIO com.neuronrobotics.sdk.dyio.DyIOChannel.getDevice ( )

◆ getMode() [1/2]

DyIOChannelMode com.neuronrobotics.sdk.dyio.DyIOChannel.getMode ( )

◆ getMode() [2/2]

DyIOChannelMode com.neuronrobotics.sdk.dyio.DyIOChannel.getMode ( boolean  resync)

Gets the mode of the channel. If resync is true, then the channel will do a live query to the device for its current mode and cache it to the channel for future use.

Identical to calling resync(false) before getMode()

Parameters
resyncthe resync
Returns
the mode

Definition at line 238 of file DyIOChannel.java.

References com.neuronrobotics.sdk.dyio.DyIOChannel.getMode(), and com.neuronrobotics.sdk.dyio.DyIOChannel.resync().

Referenced by com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.DyIOAbstractPeripheral(), com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.getConfigurationFromDevice(), com.neuronrobotics.sdk.dyio.DyIO.getMode(), com.neuronrobotics.sdk.dyio.DyIOInputStream.read(), and com.neuronrobotics.sdk.dyio.DyIOOutputStream.write().

Here is the call graph for this function:

◆ getPreviousValue()

int com.neuronrobotics.sdk.dyio.DyIOChannel.getPreviousValue ( )
protected

◆ getValue()

int com.neuronrobotics.sdk.dyio.DyIOChannel.getValue ( )

◆ hasAsync()

boolean com.neuronrobotics.sdk.dyio.DyIOChannel.hasAsync ( )

Checks the current mode of this channel and checks if it is possible for it to have async.

Returns
thru if it is possible to be async

Definition at line 287 of file DyIOChannel.java.

References com.neuronrobotics.sdk.dyio.DyIOChannel.getMode().

Here is the call graph for this function:

◆ isDefaultAsync()

boolean com.neuronrobotics.sdk.dyio.DyIOChannel.isDefaultAsync ( DyIOChannelMode  m)
private

Checks if is default async.

Parameters
mthe m
Returns
true, if is default async

Definition at line 860 of file DyIOChannel.java.

Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.setMode().

◆ isEditable()

boolean com.neuronrobotics.sdk.dyio.DyIOChannel.isEditable ( )

Can the parameters of this channel be edited?.

Returns
True if the parameters can be changed

Definition at line 134 of file DyIOChannel.java.

References com.neuronrobotics.sdk.dyio.DyIOChannel.editable.

Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.DyIOChannel(), and com.neuronrobotics.sdk.dyio.DyIOChannel.update().

◆ isOutputMode()

boolean com.neuronrobotics.sdk.dyio.DyIOChannel.isOutputMode ( DyIOChannelMode  m)
private

Checks if is output mode.

Parameters
mthe m
Returns
true, if is output mode

Definition at line 920 of file DyIOChannel.java.

◆ isStreamChannel()

boolean com.neuronrobotics.sdk.dyio.DyIOChannel.isStreamChannel ( )

◆ isStreamtMode()

boolean com.neuronrobotics.sdk.dyio.DyIOChannel.isStreamtMode ( DyIOChannelMode  m)

Checks if is streamt mode.

Parameters
mthe m
Returns
true, if is streamt mode

Definition at line 883 of file DyIOChannel.java.

◆ parseDyIOChannelEvent()

int com.neuronrobotics.sdk.dyio.DyIOChannel.parseDyIOChannelEvent ( DyIOChannelEvent  e)

This method gets the value represented by the date portion of a DyIOChannelEvent.

Parameters
ethe event to parse
Returns
the value represented by the data section

Definition at line 341 of file DyIOChannel.java.

References com.neuronrobotics.sdk.dyio.DyIOChannelEvent.getValue(), and com.neuronrobotics.sdk.dyio.DyIOChannel.isStreamChannel().

Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.fireChannelEvent().

Here is the call graph for this function:

◆ removeAllChannelEventListeners()

void com.neuronrobotics.sdk.dyio.DyIOChannel.removeAllChannelEventListeners ( )

Clear list of objects that have subscribed to channel updates.

Definition at line 184 of file DyIOChannel.java.

References com.neuronrobotics.sdk.dyio.DyIOChannel.listeners.

◆ removeAllChannelModeChangeListener()

void com.neuronrobotics.sdk.dyio.DyIOChannel.removeAllChannelModeChangeListener ( )

Clear list of objects that have subscribed to channel updates.

Definition at line 150 of file DyIOChannel.java.

References com.neuronrobotics.sdk.dyio.DyIOChannel.modeListeners.

◆ removeChannelEventListener()

void com.neuronrobotics.sdk.dyio.DyIOChannel.removeChannelEventListener ( IChannelEventListener  l)

Remove a particular subscription.

Parameters
lThe object that has subscribed to updates

Definition at line 194 of file DyIOChannel.java.

References com.neuronrobotics.sdk.dyio.DyIOChannel.listeners.

◆ removeChannelModeChangeListener()

void com.neuronrobotics.sdk.dyio.DyIOChannel.removeChannelModeChangeListener ( IDyIOChannelModeChangeListener  l)

Remove a particular subscription.

Parameters
lThe object that has subscribed to updates

Definition at line 160 of file DyIOChannel.java.

References com.neuronrobotics.sdk.dyio.DyIOChannel.modeListeners.

◆ resync()

void com.neuronrobotics.sdk.dyio.DyIOChannel.resync ( boolean  all)

◆ resyncIfNotSynced()

void com.neuronrobotics.sdk.dyio.DyIOChannel.resyncIfNotSynced ( )
private

Resync if not synced.

Definition at line 870 of file DyIOChannel.java.

References com.neuronrobotics.sdk.dyio.DyIOChannel.resync(), and com.neuronrobotics.sdk.dyio.DyIOChannel.synced.

Here is the call graph for this function:

◆ send()

void com.neuronrobotics.sdk.dyio.DyIOChannel.send ( BowlerAbstractCommand  command)

Send a command to the Channel's DyIO.

Parameters
commandThe command to send.

Definition at line 142 of file DyIOChannel.java.

References com.neuronrobotics.sdk.dyio.DyIOChannel.getDevice(), and com.neuronrobotics.sdk.dyio.DyIO.send().

Here is the call graph for this function:

◆ setAsync()

void com.neuronrobotics.sdk.dyio.DyIOChannel.setAsync ( boolean  b)

Sets the asynchronus mode for this channel.

Parameters
bthe new async

Definition at line 801 of file DyIOChannel.java.

References com.neuronrobotics.sdk.dyio.DyIOChannel.getMode(), and com.neuronrobotics.sdk.dyio.DyIOChannel.setMode().

Here is the call graph for this function:

◆ setCachedMode()

void com.neuronrobotics.sdk.dyio.DyIOChannel.setCachedMode ( boolean  mode)

This method enables/disables cache/flush mode for this channel.

Parameters
modethe new cached mode

Definition at line 649 of file DyIOChannel.java.

References com.neuronrobotics.sdk.dyio.DyIOChannel.cachedMode.

Referenced by com.neuronrobotics.sdk.dyio.sequencer.CoreScheduler.addServoChannel().

◆ setCachedTime()

void com.neuronrobotics.sdk.dyio.DyIOChannel.setCachedTime ( float  cachedTime)

Sets the time to store for use by the flush. THis will only be used when flush is called from the channel If flush is called from the DyIO, time stored here will be ignored

Parameters
cachedTimethe new cached time

Definition at line 783 of file DyIOChannel.java.

References com.neuronrobotics.sdk.dyio.DyIOChannel.cachedTime.

Referenced by com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.SetPosition(), com.neuronrobotics.sdk.dyio.peripherals.ServoChannel.SetPosition(), and com.neuronrobotics.sdk.dyio.DyIOChannel.setValue().

◆ setCachedValue()

void com.neuronrobotics.sdk.dyio.DyIOChannel.setCachedValue ( int  cachedValue)

THis method allows the user to set a chached value to be sent to the device when a flush is called later on. THis method will not send this value to the device, a flush must be called later to send it.

Parameters
cachedValuethe value to store as the cached value

Definition at line 624 of file DyIOChannel.java.

References com.neuronrobotics.sdk.dyio.DyIOChannel.cachedValue.

Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.getValue(), com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.SetPosition(), com.neuronrobotics.sdk.dyio.peripherals.ServoChannel.SetPosition(), and com.neuronrobotics.sdk.dyio.DyIOChannel.setValue().

◆ setDap()

void com.neuronrobotics.sdk.dyio.DyIOChannel.setDap ( DyIOAbstractPeripheral  dap)

THis sets up the abstract peripheral object that is using this channel object.

Parameters
dapthe new dap

Definition at line 658 of file DyIOChannel.java.

References com.neuronrobotics.sdk.dyio.DyIOChannel.dap.

Referenced by com.neuronrobotics.sdk.dyio.peripherals.ServoChannel.ServoChannel().

◆ setDevice()

void com.neuronrobotics.sdk.dyio.DyIOChannel.setDevice ( DyIO  device)
private

Sets the device.

Parameters
devicethe new device

Definition at line 850 of file DyIOChannel.java.

References com.neuronrobotics.sdk.dyio.DyIOChannel.device.

Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.update().

◆ setMode() [1/2]

boolean com.neuronrobotics.sdk.dyio.DyIOChannel.setMode ( DyIOChannelMode  mode)

◆ setMode() [2/2]

boolean com.neuronrobotics.sdk.dyio.DyIOChannel.setMode ( DyIOChannelMode  mode,
boolean  async 
)

Set the mode of a channel.

Parameters
modethe mode to set the channel to
asyncif it should be async or not
Returns
if the action was successful

Legacy

Implements com.neuronrobotics.sdk.dyio.IDyIOChannel.

Definition at line 473 of file DyIOChannel.java.

References com.neuronrobotics.sdk.dyio.DyIOChannel.canBeMode(), com.neuronrobotics.sdk.dyio.DyIO.configAdvancedAsyncNotEqual(), com.neuronrobotics.sdk.common.Log.debug(), com.neuronrobotics.sdk.common.Log.error(), com.neuronrobotics.sdk.dyio.DyIOChannel.fireModeChangeEvent(), com.neuronrobotics.sdk.dyio.DyIOChannelMode.get(), com.neuronrobotics.sdk.common.ByteList.getByte(), com.neuronrobotics.sdk.dyio.DyIO.getChannel(), com.neuronrobotics.sdk.dyio.DyIOChannel.getChannelNumber(), com.neuronrobotics.sdk.dyio.DyIO.getChannels(), com.neuronrobotics.sdk.dyio.DyIOChannel.getCurrentMode(), com.neuronrobotics.sdk.dyio.DyIOChannel.getDevice(), com.neuronrobotics.sdk.common.InvalidResponseException.getMessage(), com.neuronrobotics.sdk.dyio.DyIOChannel.getMode(), com.neuronrobotics.sdk.dyio.DyIOChannel.haveSetMode, com.neuronrobotics.sdk.common.Log.info(), com.neuronrobotics.sdk.dyio.DyIOChannel.isAsync, com.neuronrobotics.sdk.dyio.DyIOChannel.isDefaultAsync(), com.neuronrobotics.sdk.dyio.DyIOChannel.MAXATTEMPTS, com.neuronrobotics.sdk.dyio.DyIOChannel.number, com.neuronrobotics.sdk.common.BowlerMethod.POST, com.neuronrobotics.sdk.dyio.DyIO.resync(), com.neuronrobotics.sdk.dyio.DyIO.send(), com.neuronrobotics.sdk.dyio.DyIOChannelMode.SERVO_OUT, com.neuronrobotics.sdk.dyio.DyIO.setMuteResyncOnModeChange(), and com.neuronrobotics.sdk.dyio.DyIOChannel.settingMode.

Here is the call graph for this function:

◆ setPreviousValue()

void com.neuronrobotics.sdk.dyio.DyIOChannel.setPreviousValue ( int  previousValue)
private

Sets the previous value.

Parameters
previousValuethe new previous value

Definition at line 813 of file DyIOChannel.java.

References com.neuronrobotics.sdk.dyio.DyIOChannel.previousValue.

Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.fireChannelEvent(), and com.neuronrobotics.sdk.dyio.DyIOChannel.getValue().

◆ setValue() [1/2]

boolean com.neuronrobotics.sdk.dyio.DyIOChannel.setValue ( ByteList  value)

◆ setValue() [2/2]

boolean com.neuronrobotics.sdk.dyio.DyIOChannel.setValue ( int  value)

Set the value of a channel. Channels may not be able to be set to certain or potentially any values depending on the mode that a channel is in.

Parameters
valuethe value to set
Returns
if the action was successful

Implements com.neuronrobotics.sdk.dyio.IDyIOChannel.

Definition at line 563 of file DyIOChannel.java.

References com.neuronrobotics.sdk.dyio.DyIOChannel.cachedMode, com.neuronrobotics.sdk.dyio.DyIOChannel.dap, com.neuronrobotics.sdk.dyio.DyIOChannel.flush(), com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.flush(), com.neuronrobotics.sdk.dyio.DyIOChannel.setCachedTime(), and com.neuronrobotics.sdk.dyio.DyIOChannel.setCachedValue().

Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.flush(), com.neuronrobotics.sdk.dyio.DyIO.setValue(), and com.neuronrobotics.sdk.dyio.DyIOOutputStream.write().

Here is the call graph for this function:

◆ toString()

String com.neuronrobotics.sdk.dyio.DyIOChannel.toString ( )

Definition at line 408 of file DyIOChannel.java.

References com.neuronrobotics.sdk.dyio.DyIOChannel.getChannelNumber(), and com.neuronrobotics.sdk.dyio.DyIOChannel.getMode().

Here is the call graph for this function:

◆ update()

void com.neuronrobotics.sdk.dyio.DyIOChannel.update ( DyIO  dyio,
int  channel,
DyIOChannelMode  mode,
boolean  isEditable 
)

Member Data Documentation

◆ cachedMode

boolean com.neuronrobotics.sdk.dyio.DyIOChannel.cachedMode =false
private

◆ cachedTime

float com.neuronrobotics.sdk.dyio.DyIOChannel.cachedTime =0
private

◆ cachedValue

int com.neuronrobotics.sdk.dyio.DyIOChannel.cachedValue = 0
protected

◆ current

DyIOChannelMode com.neuronrobotics.sdk.dyio.DyIOChannel.current =null
private

The current.

Definition at line 57 of file DyIOChannel.java.

Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.getCurrentMode().

◆ dap

DyIOAbstractPeripheral com.neuronrobotics.sdk.dyio.DyIOChannel.dap =null
private

◆ device

DyIO com.neuronrobotics.sdk.dyio.DyIOChannel.device
private

◆ editable

boolean com.neuronrobotics.sdk.dyio.DyIOChannel.editable
private

◆ haveSetMode

boolean com.neuronrobotics.sdk.dyio.DyIOChannel.haveSetMode = false
private

The have set mode.

Definition at line 81 of file DyIOChannel.java.

Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.setMode().

◆ isAsync

boolean com.neuronrobotics.sdk.dyio.DyIOChannel.isAsync =true
private

◆ listeners

ArrayList<IChannelEventListener> com.neuronrobotics.sdk.dyio.DyIOChannel.listeners = new ArrayList<IChannelEventListener>()
private

◆ MAXATTEMPTS

int com.neuronrobotics.sdk.dyio.DyIOChannel.MAXATTEMPTS = 3
private

◆ modeListeners

ArrayList< IDyIOChannelModeChangeListener> com.neuronrobotics.sdk.dyio.DyIOChannel.modeListeners = new ArrayList< IDyIOChannelModeChangeListener>()
private

◆ myModes

ArrayList<DyIOChannelMode> com.neuronrobotics.sdk.dyio.DyIOChannel.myModes
private

This method gets a collection of all of the possible channel modes for this channel.

Definition at line 303 of file DyIOChannel.java.

Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.getAvailableModes().

◆ number

int com.neuronrobotics.sdk.dyio.DyIOChannel.number
private

◆ previousValue

int com.neuronrobotics.sdk.dyio.DyIOChannel.previousValue = 1
private

◆ settingMode

boolean com.neuronrobotics.sdk.dyio.DyIOChannel.settingMode =false
private

The setting mode.

Definition at line 84 of file DyIOChannel.java.

Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.setMode().

◆ synced

boolean com.neuronrobotics.sdk.dyio.DyIOChannel.synced = false
private

The synced.

Definition at line 865 of file DyIOChannel.java.

Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.resyncIfNotSynced().


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