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

Public Member Functions

 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 (int value) throws InvalidResponseException
 
boolean setValue (ByteList value) throws InvalidResponseException
 
int getValue () throws InvalidResponseException
 
boolean SavePosition (int pos)
 
abstract boolean hasAsync ()
 
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 ()
 
void setAsync (boolean b)
 
int getConfiguration ()
 

Private Member Functions

int getConfigurationFromDevice ()
 
void setConfiguration (int configuration)
 

Private Attributes

DyIOChannel channel
 
boolean enabled = false
 
int configuration =0
 

Detailed Description

The Class DyIOAbstractPeripheral.

Definition at line 31 of file DyIOAbstractPeripheral.java.

Constructor & Destructor Documentation

◆ DyIOAbstractPeripheral()

com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.DyIOAbstractPeripheral ( DyIOChannel  channel,
DyIOChannelMode  myMode,
boolean  async 
)

Member Function Documentation

◆ configAdvancedAsyncAutoSample() [1/2]

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

◆ configAdvancedAsyncAutoSample() [2/2]

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

◆ configAdvancedAsyncDeadBand() [1/2]

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

◆ configAdvancedAsyncDeadBand() [2/2]

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

◆ configAdvancedAsyncNotEqual() [1/2]

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

Referenced by com.neuronrobotics.sdk.dyio.sequencer.ServoOutputScheduleChannel.addAnalogInputListener(), com.neuronrobotics.sdk.addons.kinematics.AnalogPrismaticLink.setAnalogChannel(), and com.neuronrobotics.sdk.addons.kinematics.AnalogRotoryLink.setAnalogChannel().

◆ configAdvancedAsyncNotEqual() [2/2]

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

◆ configAdvancedAsyncTreshhold() [1/2]

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

◆ configAdvancedAsyncTreshhold() [2/2]

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

◆ flush()

boolean com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.flush ( )

◆ getChannel()

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

Returns the channel object used by the peripheral.

Returns
returns the channel object

Implements com.neuronrobotics.sdk.dyio.IDyIOChannel.

Definition at line 141 of file DyIOAbstractPeripheral.java.

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

Referenced by com.neuronrobotics.sdk.dyio.sequencer.CoreScheduler.addServoChannel(), com.neuronrobotics.sdk.dyio.peripherals.AnalogInputChannel.AnalogInputChannel(), com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.CounterInputChannel(), com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.CounterOutputChannel(), com.neuronrobotics.sdk.dyio.peripherals.DCMotorOutputChannel.DCMotorOutputChannel(), com.neuronrobotics.sdk.dyio.peripherals.DigitalInputChannel.DigitalInputChannel(), com.neuronrobotics.sdk.dyio.peripherals.DigitalOutputChannel.DigitalOutputChannel(), com.neuronrobotics.sdk.dyio.peripherals.ServoChannel.disablePowerOverride(), com.neuronrobotics.sdk.dyio.peripherals.ServoChannel.enablePowerOverride(), com.neuronrobotics.sdk.dyio.sequencer.ServoOutputScheduleChannel.getAnalogInputChannelNumber(), com.neuronrobotics.sdk.dyio.sequencer.ServoOutputScheduleChannel.getChannelNumber(), com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.getConfigurationFromDevice(), com.neuronrobotics.sdk.dyio.sequencer.ServoOutputScheduleChannel.getInputChannelNumber(), com.neuronrobotics.sdk.dyio.sequencer.ServoOutputScheduleChannel.initInput(), com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.PPMReaderChannel(), com.neuronrobotics.sdk.dyio.peripherals.PWMOutputChannel.PWMOutputChannel(), com.neuronrobotics.sdk.dyio.peripherals.ServoChannel.ServoChannel(), com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.setCrossLink(), com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.SetPosition(), com.neuronrobotics.sdk.dyio.peripherals.ServoChannel.SetPosition(), and com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.updateValues().

Here is the call graph for this function:

◆ getClassMode()

DyIOChannelMode com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.getClassMode ( )

This method retrieves the channel mode of this peripheral.

Returns
the class mode

Definition at line 89 of file DyIOAbstractPeripheral.java.

◆ getConfiguration()

int com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.getConfiguration ( )

Gets the configuration.

Returns
the configuration

Definition at line 349 of file DyIOAbstractPeripheral.java.

◆ getConfigurationFromDevice()

int com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.getConfigurationFromDevice ( )
private

◆ getMode()

DyIOChannelMode com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.getMode ( )

This method gets the current mode of this peripheral.

Returns
returns the mode of this channel

Implements com.neuronrobotics.sdk.dyio.IDyIOChannel.

Definition at line 151 of file DyIOAbstractPeripheral.java.

Referenced by com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.validate(), and com.neuronrobotics.sdk.dyio.peripherals.ServoChannel.validate().

◆ getValue()

int com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.getValue ( ) throws InvalidResponseException

◆ hasAsync()

abstract boolean com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.hasAsync ( )
abstract

◆ isEnabled()

boolean com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.isEnabled ( )

◆ SavePosition()

boolean com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.SavePosition ( int  pos)

This method sets the value of the output of the giver peripheral, and also stores this value as the "default" value in non volatile memory to use at startup of the peripheral.

Parameters
posthe position to set as the new starting point for the channel
Returns
if the save worked or not.

Definition at line 199 of file DyIOAbstractPeripheral.java.

References com.neuronrobotics.sdk.common.BowlerMethod.CRITICAL.

◆ setAsync()

void com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.setAsync ( boolean  b)

◆ setConfiguration()

void com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.setConfiguration ( int  configuration)
private

Sets the configuration.

Parameters
configurationthe new configuration

Definition at line 358 of file DyIOAbstractPeripheral.java.

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

◆ setMode() [1/3]

boolean com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.setMode ( )

◆ setMode() [2/3]

boolean com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.setMode ( boolean  async)

This method sets the current mode of this peripheral.

Parameters
asyncIf the channel should be set into async mode
Returns
if the set worked. Not all channels have all peripherals

Definition at line 117 of file DyIOAbstractPeripheral.java.

◆ setMode() [3/3]

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

This method sets the current mode of this peripheral.

Parameters
modethe DyIO mode to set the channel to
asyncIf the channel should be set into async mode
Returns
if the set worked. Not all channels have all peripherals
Exceptions
InvalidResponseExceptionthe invalid response exception

Implements com.neuronrobotics.sdk.dyio.IDyIOChannel.

Definition at line 129 of file DyIOAbstractPeripheral.java.

◆ setValue() [1/2]

boolean com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.setValue ( ByteList  value) throws InvalidResponseException

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

Implements com.neuronrobotics.sdk.dyio.IDyIOChannel.

Definition at line 175 of file DyIOAbstractPeripheral.java.

◆ setValue() [2/2]

boolean com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.setValue ( int  value) throws InvalidResponseException

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

Implements com.neuronrobotics.sdk.dyio.IDyIOChannel.

Reimplemented in com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel, and com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.

Definition at line 163 of file DyIOAbstractPeripheral.java.

Referenced by com.neuronrobotics.sdk.dyio.peripherals.PWMOutputChannel.SetDutyPercent(), com.neuronrobotics.sdk.dyio.peripherals.DigitalOutputChannel.setHigh(), and com.neuronrobotics.sdk.dyio.peripherals.DCMotorOutputChannel.SetVelocity().

Member Data Documentation

◆ channel

DyIOChannel com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.channel
private

◆ configuration

int com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.configuration =0
private

The configuration.

Definition at line 40 of file DyIOAbstractPeripheral.java.

◆ enabled

boolean com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.enabled = false
private

The enabled.

Definition at line 37 of file DyIOAbstractPeripheral.java.


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