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

Classes

class  UARTRxChannel
 
class  UARTTxChannel
 

Public Member Functions

 UARTChannel ()
 
 UARTChannel (DyIO d)
 
byte[] getBytes ()
 
byte[] getBytes (int size)
 
boolean sendBytes (ByteList stream) throws IOException
 
int getInStreamSize ()
 
boolean inStreamDataReady ()
 
boolean setUARTBaudrate (int baudrate)
 
DyIOOutputStream getOutStream ()
 
DyIOInputStream getInputStream ()
 
void removeAllUARTStreamListener ()
 
void removeUARTStreamListener (IUARTStreamListener l)
 
void addUARTStreamListener (IUARTStreamListener l)
 

Static Public Attributes

static final int UART_IN = 17
 
static final int UART_OUT = 16
 

Protected Member Functions

void fireChannelEvent (DyIOChannelEvent e)
 

Private Attributes

ArrayList< IUARTStreamListenerlisteners = new ArrayList<IUARTStreamListener>()
 

Detailed Description

The Class UARTChannel.

Definition at line 40 of file UARTChannel.java.

Constructor & Destructor Documentation

◆ UARTChannel() [1/2]

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

Instantiates a new UART channel.

Definition at line 63 of file UARTChannel.java.

References com.neuronrobotics.sdk.common.DeviceManager.getSpecificDevice().

Here is the call graph for this function:

◆ UARTChannel() [2/2]

com.neuronrobotics.sdk.dyio.peripherals.UARTChannel.UARTChannel ( DyIO  d)

Instantiates a new UART channel.

Parameters
dthe d

Definition at line 72 of file UARTChannel.java.

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

Here is the call graph for this function:

Member Function Documentation

◆ addUARTStreamListener()

void com.neuronrobotics.sdk.dyio.peripherals.UARTChannel.addUARTStreamListener ( IUARTStreamListener  l)

Add an object that wishes to receive channel updates.

Parameters
lThe object that wishes to receive updates.

Definition at line 211 of file UARTChannel.java.

Referenced by com.neuronrobotics.sdk.addons.irobot.Create.Create().

◆ fireChannelEvent()

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

Fire channel event.

Parameters
ethe e

Definition at line 223 of file UARTChannel.java.

◆ getBytes() [1/2]

byte [] com.neuronrobotics.sdk.dyio.peripherals.UARTChannel.getBytes ( )

Gets the bytes.

Returns
the bytes

Implements com.neuronrobotics.sdk.common.ISendable.

Definition at line 82 of file UARTChannel.java.

References com.neuronrobotics.sdk.dyio.peripherals.UARTChannel.UARTRxChannel.getInStreamSize().

Referenced by com.neuronrobotics.sdk.addons.irobot.Create.onChannelEvent().

Here is the call graph for this function:

◆ getBytes() [2/2]

byte [] com.neuronrobotics.sdk.dyio.peripherals.UARTChannel.getBytes ( int  size)

Gets the bytes.

Parameters
sizethe size
Returns
the bytes

Definition at line 92 of file UARTChannel.java.

References com.neuronrobotics.sdk.dyio.peripherals.UARTChannel.UARTRxChannel.getBytes().

Here is the call graph for this function:

◆ getInputStream()

DyIOInputStream com.neuronrobotics.sdk.dyio.peripherals.UARTChannel.getInputStream ( )

Gets the input stream.

Returns
the input stream

Definition at line 181 of file UARTChannel.java.

◆ getInStreamSize()

int com.neuronrobotics.sdk.dyio.peripherals.UARTChannel.getInStreamSize ( )

Gets the in stream size.

Returns
the in stream size

Definition at line 114 of file UARTChannel.java.

References com.neuronrobotics.sdk.dyio.peripherals.UARTChannel.UARTRxChannel.getInStreamSize().

Referenced by com.neuronrobotics.sdk.dyio.peripherals.UARTChannel.inStreamDataReady().

Here is the call graph for this function:

◆ getOutStream()

DyIOOutputStream com.neuronrobotics.sdk.dyio.peripherals.UARTChannel.getOutStream ( )

Gets the out stream.

Returns
the out stream

Definition at line 172 of file UARTChannel.java.

◆ inStreamDataReady()

boolean com.neuronrobotics.sdk.dyio.peripherals.UARTChannel.inStreamDataReady ( )

In stream data ready.

Returns
true, if successful

Definition at line 123 of file UARTChannel.java.

References com.neuronrobotics.sdk.dyio.peripherals.UARTChannel.getInStreamSize().

Here is the call graph for this function:

◆ removeAllUARTStreamListener()

void com.neuronrobotics.sdk.dyio.peripherals.UARTChannel.removeAllUARTStreamListener ( )

Clear list of objects that have subscribed to channel updates.

Definition at line 188 of file UARTChannel.java.

◆ removeUARTStreamListener()

void com.neuronrobotics.sdk.dyio.peripherals.UARTChannel.removeUARTStreamListener ( IUARTStreamListener  l)

Remove a particular subscription.

Parameters
lThe object that has subscribed to updates

Definition at line 198 of file UARTChannel.java.

◆ sendBytes()

boolean com.neuronrobotics.sdk.dyio.peripherals.UARTChannel.sendBytes ( ByteList  stream) throws IOException

Send bytes.

Parameters
streamthe stream
Returns
true, if successful
Exceptions
IOExceptionSignals that an I/O exception has occurred.

Definition at line 104 of file UARTChannel.java.

References com.neuronrobotics.sdk.dyio.peripherals.UARTChannel.UARTTxChannel.putStream().

Referenced by com.neuronrobotics.sdk.addons.irobot.Create.send().

Here is the call graph for this function:

◆ setUARTBaudrate()

boolean com.neuronrobotics.sdk.dyio.peripherals.UARTChannel.setUARTBaudrate ( int  baudrate)

Sets the uart baudrate.

Parameters
baudratethe baudrate
Returns
true, if successful

Definition at line 133 of file UARTChannel.java.

References com.neuronrobotics.sdk.common.BowlerMethod.CRITICAL, com.neuronrobotics.sdk.dyio.DyIO.isLegacyParser(), com.neuronrobotics.sdk.dyio.DyIO.send(), and com.neuronrobotics.sdk.dyio.peripherals.UARTChannel.UART_IN.

Referenced by com.neuronrobotics.sdk.addons.irobot.Create.Create().

Here is the call graph for this function:

Member Data Documentation

◆ listeners

ArrayList<IUARTStreamListener> com.neuronrobotics.sdk.dyio.peripherals.UARTChannel.listeners = new ArrayList<IUARTStreamListener>()
private

The listeners.

Definition at line 43 of file UARTChannel.java.

◆ UART_IN

final int com.neuronrobotics.sdk.dyio.peripherals.UARTChannel.UART_IN = 17
static

The Constant UART_IN.

Definition at line 46 of file UARTChannel.java.

Referenced by com.neuronrobotics.sdk.dyio.peripherals.UARTChannel.setUARTBaudrate().

◆ UART_OUT

final int com.neuronrobotics.sdk.dyio.peripherals.UARTChannel.UART_OUT = 16
static

The Constant UART_OUT.

Definition at line 49 of file UARTChannel.java.


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