BowlerKernel
|
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 |
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)
Definition at line 25 of file PPMReaderChannel.java.
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().
com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.PPMReaderChannel | ( | DyIOChannel | channel | ) |
Takes a DyIO channel which must be channel 23.
channel | the channel |
Definition at line 51 of file PPMReaderChannel.java.
References com.neuronrobotics.sdk.dyio.DyIOChannel.addChannelEventListener(), com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.channel, com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.getChannel(), com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.myMode, and com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.setMode().
void com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.addPPMReaderListener | ( | IPPMReaderListener | l | ) |
Add a PPM reader listener.
l | the IPPMReaderListener to add |
Definition at line 178 of file PPMReaderChannel.java.
int [] com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.getCrossLink | ( | ) |
Request the cross link map.
Definition at line 106 of file PPMReaderChannel.java.
References com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.crossLinks, and com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.updateValues().
int [] com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.getValues | ( | ) |
Get the current state of the PPM reader.
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().
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.
Reimplemented from com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.
Definition at line 208 of file PPMReaderChannel.java.
void com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.onChannelEvent | ( | DyIOChannelEvent | e | ) |
On channel event.
e | the e |
Implements com.neuronrobotics.sdk.dyio.IChannelEventListener.
Definition at line 186 of file PPMReaderChannel.java.
References com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.crossLinks, com.neuronrobotics.sdk.common.ByteList.getBytes(), com.neuronrobotics.sdk.dyio.DyIOChannelEvent.getData(), com.neuronrobotics.sdk.common.ByteList.getUnsigned(), and com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.getValues().
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
links | an 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().
void com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.stopAllCrossLinks | ( | ) |
Shut down the internal corss link system.
Definition at line 65 of file PPMReaderChannel.java.
References com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.crossLinks, com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.NO_CROSSLINK, and com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.setCrossLink().
|
private |
Update values.
Definition at line 133 of file PPMReaderChannel.java.
References com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.crossLinks, com.neuronrobotics.sdk.common.Log.debug(), com.neuronrobotics.sdk.common.BowlerMethod.GET, com.neuronrobotics.sdk.dyio.peripherals.DyIOAbstractPeripheral.getChannel(), com.neuronrobotics.sdk.common.BowlerDatagram.getData(), com.neuronrobotics.sdk.dyio.DyIOChannel.getDevice(), com.neuronrobotics.sdk.common.ByteList.getUnsigned(), com.neuronrobotics.sdk.dyio.DyIO.send(), and com.neuronrobotics.sdk.common.ByteList.size().
Referenced by com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.getCrossLink(), and com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.getValues().
|
private |
The cross links.
Definition at line 31 of file PPMReaderChannel.java.
Referenced by com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.getCrossLink(), com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.onChannelEvent(), com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.setCrossLink(), com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.stopAllCrossLinks(), and com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.updateValues().
|
staticprivate |
The Constant myMode.
Definition at line 28 of file PPMReaderChannel.java.
Referenced by com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.PPMReaderChannel(), and com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.setCrossLink().
|
static |
The Constant NO_CROSSLINK.
Definition at line 37 of file PPMReaderChannel.java.
Referenced by com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.stopAllCrossLinks().