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

Public Member Functions

 PPMReaderChannel ()
 
 PPMReaderChannel (DyIOChannel channel)
 
void stopAllCrossLinks ()
 
void setCrossLink (int[] links)
 
int[] getCrossLink ()
 
int[] getValues ()
 
void addPPMReaderListener (IPPMReaderListener l)
 
void onChannelEvent (DyIOChannelEvent e)
 
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 (int value) throws InvalidResponseException
 
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 ()
 
void setAsync (boolean b)
 
int getConfiguration ()
 

Static Public Attributes

static final int NO_CROSSLINK = 0xff
 

Private Member Functions

void updateValues ()
 

Private Attributes

int[] crossLinks =null
 

Static Private Attributes

static final DyIOChannelMode myMode = DyIOChannelMode.PPM_IN
 

Detailed Description

This class is a wrapper for the DyIO PPM signal reader. This manages taking Channel 23 and using it to read values from the VEX rc controller (others might be supported as well)

Author
hephaestus

Definition at line 25 of file PPMReaderChannel.java.

Constructor & Destructor Documentation

◆ PPMReaderChannel() [1/2]

com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.PPMReaderChannel ( )

Void constructor assumes you are suing the DyIORegestry and channel 23.

Definition at line 42 of file PPMReaderChannel.java.

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

Here is the call graph for this function:

◆ PPMReaderChannel() [2/2]

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

Member Function Documentation

◆ addPPMReaderListener()

void com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.addPPMReaderListener ( IPPMReaderListener  l)

Add a PPM reader listener.

Parameters
lthe IPPMReaderListener to add

Definition at line 178 of file PPMReaderChannel.java.

◆ getCrossLink()

int [] com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.getCrossLink ( )

Request the cross link map.

Returns
an array of integers corosponding to the cross linking for the DyIO outputs

Definition at line 106 of file PPMReaderChannel.java.

References com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.crossLinks, and com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.updateValues().

Here is the call graph for this function:

◆ getValues()

int [] com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.getValues ( )

Get the current state of the PPM reader.

Returns
the values of the current state of the PPM channels

Definition at line 123 of file PPMReaderChannel.java.

References com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.updateValues().

Referenced by com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.onChannelEvent().

Here is the call graph for this function:

◆ hasAsync()

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

◆ onChannelEvent()

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

◆ setCrossLink()

void com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.setCrossLink ( int[]  links)

This sets up the PPM cross link. For each PPM channel you can assign it one DyIO output channel as its direct control. Indecies in the array corospond to the PPM channel, and values corospond to the DyIO output channel

Parameters
linksan array of channel numbers corosponding to the PPM channel to do a direct 1:1 mapping

Definition at line 78 of file PPMReaderChannel.java.

References com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.crossLinks, com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.getChannel(), com.neuronrobotics.sdk.dyio.DyIOChannel.getDevice(), com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.myMode, com.neuronrobotics.sdk.common.BowlerMethod.POST, and com.neuronrobotics.sdk.dyio.DyIO.send().

Referenced by com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.stopAllCrossLinks().

Here is the call graph for this function:

◆ stopAllCrossLinks()

void com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.stopAllCrossLinks ( )

◆ updateValues()

void com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.updateValues ( )
private

Member Data Documentation

◆ crossLinks

int [] com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.crossLinks =null
private

◆ myMode

final DyIOChannelMode com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.myMode = DyIOChannelMode.PPM_IN
staticprivate

◆ NO_CROSSLINK

final int com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.NO_CROSSLINK = 0xff
static

The Constant NO_CROSSLINK.

Definition at line 37 of file PPMReaderChannel.java.

Referenced by com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.stopAllCrossLinks().


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