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

Public Member Functions

 ByteList ()
 
 ByteList (Byte data)
 
 ByteList (byte[] data)
 
 ByteList (String data)
 
 ByteList (int data)
 
 ByteList (int[] data)
 
 ByteList (BowlerDataType[] arguments)
 
synchronized boolean add (byte data)
 
boolean add (int data)
 
boolean add (Byte b)
 
boolean add (ISendable sendable)
 
boolean add (String data)
 
boolean add (byte[] data)
 
boolean add (int[] data)
 
boolean add (Byte[] bl)
 
boolean add (long data, int split)
 
boolean add (byte[] data, int len, int offset)
 
boolean addAs16 (int value)
 
boolean addAs32 (int value)
 
boolean addAll (Collection<? extends Byte > c)
 
boolean addAll (int index, Collection<? extends Byte > c)
 
boolean isEmpty ()
 
byte[] getBytes ()
 
synchronized byte[] getBytes (int start, int len)
 
byte[] getBytes (int index)
 
byte getByte (int index)
 
int size ()
 
Byte pop (int index)
 
Byte pop ()
 
byte[] popList (int index)
 
void clear ()
 
boolean contains (Object o)
 
boolean containsAll (Collection<?> c)
 
Byte get (int index)
 
int getUnsigned (int index)
 
int indexOf (Object o)
 
Iterator< Byte > iterator ()
 
int lastIndexOf (Object o)
 
ListIterator< Byte > listIterator ()
 
ListIterator< Byte > listIterator (int index)
 
boolean remove (Object o)
 
synchronized Byte remove (int index)
 
List< Byte > subList (int fromIndex, int toIndex)
 
Object[] toArray ()
 
String toString ()
 
String asString ()
 
void add (int arg0, Byte arg1)
 
boolean removeAll (Collection<?> c)
 
boolean retainAll (Collection<?> c)
 
Byte set (int arg0, Byte arg1)
 
void insert (int index, byte val)
 
byte[] popList (int off, int len)
 
int getStaticBufferSize ()
 
void setStaticBufferSize (int staticBufferSize)
 

Static Public Member Functions

static byte[] wrap (int value)
 
static byte[] split (long data, int split)
 
static final int convertToInt (byte[] b)
 
static int convertToInt (byte[] b, boolean Signed)
 
static byte[] convertTo16 (int value)
 
static byte[] convertTo32 (int value)
 
static int rawByteToInt (byte b)
 
static boolean isUseStaticBuffer ()
 
static void setUseStaticBuffer (boolean useStaticBuffer)
 

Private Member Functions

int getStaticBufferByteCount ()
 

Private Attributes

int staticBufferSize = BowlerDatagram.MAX_PACKET_SIZE
 
byte[] staticBuffer = new byte[staticBufferSize]
 
int staticBufferReadPointer = 0
 
int staticBufferWritePointer = 0
 
List< Byte > store = new ArrayList<Byte>()
 

Static Private Attributes

static final boolean useStaticBuffer = true
 

Detailed Description

The Class ByteList.

Definition at line 32 of file ByteList.java.

Constructor & Destructor Documentation

◆ ByteList() [1/7]

com.neuronrobotics.sdk.common.ByteList.ByteList ( )

◆ ByteList() [2/7]

com.neuronrobotics.sdk.common.ByteList.ByteList ( Byte  data)

Initial value constructor. Constructs a ByteList and populates it with the byte

Parameters
datathe initial data to load into the bytelist after construction

Definition at line 72 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.add().

Here is the call graph for this function:

◆ ByteList() [3/7]

com.neuronrobotics.sdk.common.ByteList.ByteList ( byte[]  data)

Initial value constructor. Constructs a ByteList and populates it with the given byte array

Parameters
datathe initial data to load into the bytelist after construction

Definition at line 81 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.add().

Here is the call graph for this function:

◆ ByteList() [4/7]

com.neuronrobotics.sdk.common.ByteList.ByteList ( String  data)

Initial value constructor. Constructs a ByteList and populates it with the given string

Parameters
datathe initial data to load into the bytelist after construction

Definition at line 91 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.add().

Here is the call graph for this function:

◆ ByteList() [5/7]

com.neuronrobotics.sdk.common.ByteList.ByteList ( int  data)

Initial value constructor. Constructs a ByteList and populates it with the given int

Parameters
datathe initial data to load into the bytelist after construction

Definition at line 100 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.add().

Here is the call graph for this function:

◆ ByteList() [6/7]

com.neuronrobotics.sdk.common.ByteList.ByteList ( int[]  data)

Instantiates a new byte list.

Parameters
datathe data

Definition at line 109 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.add().

Here is the call graph for this function:

◆ ByteList() [7/7]

com.neuronrobotics.sdk.common.ByteList.ByteList ( BowlerDataType[]  arguments)

Instantiates a new byte list.

Parameters
argumentsthe arguments

Definition at line 120 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.add().

Here is the call graph for this function:

Member Function Documentation

◆ add() [1/11]

boolean com.neuronrobotics.sdk.common.ByteList.add ( Byte  b)

Adds the.

Parameters
bthe b
Returns
true, if successful

Definition at line 197 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.add().

Here is the call graph for this function:

◆ add() [2/11]

synchronized boolean com.neuronrobotics.sdk.common.ByteList.add ( byte  data)

Adds a single byte to the bytelist and return the status of the additon.

Parameters
datathe data
Returns
if the addition was successful

Definition at line 149 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.getBytes(), com.neuronrobotics.sdk.common.ByteList.getStaticBufferByteCount(), com.neuronrobotics.sdk.common.Log.info(), com.neuronrobotics.sdk.common.ByteList.isUseStaticBuffer(), com.neuronrobotics.sdk.common.ByteList.setStaticBufferSize(), com.neuronrobotics.sdk.common.ByteList.staticBuffer, com.neuronrobotics.sdk.common.ByteList.staticBufferSize, com.neuronrobotics.sdk.common.ByteList.staticBufferWritePointer, and com.neuronrobotics.sdk.common.ByteList.store.

Referenced by com.neuronrobotics.sdk.common.ByteList.add(), com.neuronrobotics.sdk.common.ByteList.addAll(), com.neuronrobotics.sdk.common.ByteList.addAs16(), com.neuronrobotics.sdk.common.ByteList.addAs32(), com.neuronrobotics.sdk.commands.bcs.io.AsyncCommand.AsyncCommand(), com.neuronrobotics.sdk.common.device.server.bcs.rpc.BcsRpcArgsCommand.BcsRpcArgsCommand(), com.neuronrobotics.sdk.common.device.server.bcs.rpc.BcsRpcCommand.BcsRpcCommand(), com.neuronrobotics.sdk.commands.neuronrobotics.bowlercam.BlobCommand.BlobCommand(), com.neuronrobotics.sdk.common.ByteList.ByteList(), com.neuronrobotics.sdk.commands.bcs.io.ConfigAsyncCommand.ConfigAsyncCommand(), com.neuronrobotics.sdk.commands.bcs.pid.DyPID.ConfigureDynamicPIDCommand.ConfigureDynamicPIDCommand(), com.neuronrobotics.sdk.commands.bcs.pid.ConfigurePDVelocityCommand.ConfigurePDVelocityCommand(), com.neuronrobotics.sdk.commands.bcs.pid.ConfigurePIDCommand.ConfigurePIDCommand(), com.neuronrobotics.sdk.commands.bcs.pid.ControlPIDCommand.ControlPIDCommand(), com.neuronrobotics.sdk.commands.neuronrobotics.bootloader.EraseFlashCommand.EraseFlashCommand(), com.neuronrobotics.sdk.commands.bcs.core.ErrorCommand.ErrorCommand(), com.neuronrobotics.sdk.dyio.DyIOChannel.flush(), com.neuronrobotics.sdk.common.BowlerAbstractCommand.getBytes(), com.neuronrobotics.sdk.common.BowlerDatagram.getBytes(), com.neuronrobotics.sdk.commands.bcs.io.GetChannelModeCommand.GetChannelModeCommand(), com.neuronrobotics.sdk.commands.bcs.io.GetChannelModeListCommand.GetChannelModeListCommand(), com.neuronrobotics.sdk.common.RpcEncapsulation.getCommand(), com.neuronrobotics.sdk.commands.neuronrobotics.bowlercam.ImageCommand.ImageCommand(), com.neuronrobotics.sdk.commands.neuronrobotics.bowlercam.ImageURLCommand.ImageURLCommand(), com.neuronrobotics.sdk.common.ByteList.insert(), com.neuronrobotics.sdk.commands.cartesian.LinearInterpolationCommand.LinearInterpolationCommand(), com.neuronrobotics.sdk.network.BowlerUDPServer.loadPacketFromPhy(), com.neuronrobotics.sdk.commands.bcs.core.NamespaceCommand.NamespaceCommand(), com.neuronrobotics.sdk.bowlercam.device.BowlerCamDevice.onAsyncResponse(), com.neuronrobotics.sdk.common.RpcEncapsulation.parseResponse(), com.neuronrobotics.sdk.commands.bcs.pid.PDVelocityCommand.PDVelocityCommand(), com.neuronrobotics.sdk.commands.neuronrobotics.dyio.PowerCommand.PowerCommand(), com.neuronrobotics.sdk.dyio.peripherals.ServoChannel.powerOverridePacket.powerOverridePacket(), com.neuronrobotics.sdk.commands.neuronrobotics.bootloader.ProgramSectionCommand.ProgramSectionCommand(), com.neuronrobotics.sdk.commands.neuronrobotics.dyio.ProvisionCommand.ProvisionCommand(), com.neuronrobotics.sdk.commands.bcs.core.ReadyCommand.ReadyCommand(), com.neuronrobotics.sdk.commands.bcs.pid.ResetPIDCommand.ResetPIDCommand(), com.neuronrobotics.sdk.commands.bcs.core.RpcArgumentsCommand.RpcArgumentsCommand(), com.neuronrobotics.sdk.commands.bcs.core.RpcCommand.RpcCommand(), com.neuronrobotics.sdk.commands.bcs.safe.SafeModeCommand.SafeModeCommand(), com.neuronrobotics.sdk.dyio.peripherals.SPIChannel.sendSPIStream(), com.neuronrobotics.sdk.commands.bcs.io.setmode.SetChannelModeCommand.SetChannelModeCommand(), com.neuronrobotics.sdk.commands.bcs.io.SetChannelValueCommand.SetChannelValueCommand(), com.neuronrobotics.sdk.common.BowlerDatagram.setData(), com.neuronrobotics.sdk.commands.bcs.io.SetUARTBaudrateCommand.SetUARTBaudrateCommand(), and com.neuronrobotics.sdk.dyio.DyIOInputStream.write().

Here is the call graph for this function:

◆ add() [3/11]

boolean com.neuronrobotics.sdk.common.ByteList.add ( Byte[]  bl)

Adds each value of a given array to the ByteList. If the addition failed, then any added bytes are removed.

Parameters
blthe bl
Returns
true, if successful

Definition at line 271 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.add(), and com.neuronrobotics.sdk.common.ByteList.size().

Here is the call graph for this function:

◆ add() [4/11]

boolean com.neuronrobotics.sdk.common.ByteList.add ( byte[]  data)

Adds each value of a given array to the ByteList. If the addition failed, then any added bytes are removed.

Parameters
datathe data
Returns
if the addition was successful

Definition at line 227 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.add(), and com.neuronrobotics.sdk.common.ByteList.size().

Here is the call graph for this function:

◆ add() [5/11]

boolean com.neuronrobotics.sdk.common.ByteList.add ( byte[]  data,
int  len,
int  offset 
)

Adds len bytes from data starting at the offset.

Parameters
datathe data
lenthe len
offsetthe offset
Returns
true, if successful

Definition at line 310 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.add().

Here is the call graph for this function:

◆ add() [6/11]

void com.neuronrobotics.sdk.common.ByteList.add ( int  arg0,
Byte  arg1 
)

Adds the.

Parameters
arg0the arg0
arg1the arg1

Definition at line 998 of file ByteList.java.

◆ add() [7/11]

boolean com.neuronrobotics.sdk.common.ByteList.add ( int  data)

Adds an int to the bytelist cast as a single byte.

Parameters
datathe data
Returns
if the addition was successful

Definition at line 183 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.add().

Here is the call graph for this function:

◆ add() [8/11]

boolean com.neuronrobotics.sdk.common.ByteList.add ( int[]  data)

Adds each value of a given array to the ByteList. If the addition failed, then any added bytes are removed.

Parameters
datathe data
Returns
if the addition was successful

Definition at line 249 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.add(), and com.neuronrobotics.sdk.common.ByteList.size().

Here is the call graph for this function:

◆ add() [9/11]

boolean com.neuronrobotics.sdk.common.ByteList.add ( ISendable  sendable)

Gets the bytes from a sendable and adds them to the bytelist.

Parameters
sendablethe sendable
Returns
true, if successful

Definition at line 207 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.add(), and com.neuronrobotics.sdk.common.ISendable.getBytes().

Here is the call graph for this function:

◆ add() [10/11]

boolean com.neuronrobotics.sdk.common.ByteList.add ( long  data,
int  split 
)

Splits a long into the given number of peices then adds them to the bytelist. This method should be avoided as it will be removed with 1.0 and add16 or add32 should be used instead.

Parameters
datathe data
splitthe split
Returns
true, if successful

Definition at line 296 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.add(), and com.neuronrobotics.sdk.common.ByteList.split().

Here is the call graph for this function:

◆ add() [11/11]

boolean com.neuronrobotics.sdk.common.ByteList.add ( String  data)

Adds each member of a given array to the ByteList. If the addition failed, then any added bytes are removed.

Parameters
datathe data
Returns
if the addition was successful

Definition at line 217 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.add().

Here is the call graph for this function:

◆ addAll() [1/2]

boolean com.neuronrobotics.sdk.common.ByteList.addAll ( Collection<? extends Byte >  c)

Adds the all.

Parameters
cthe c
Returns
true, if successful

Definition at line 346 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.add().

Here is the call graph for this function:

◆ addAll() [2/2]

boolean com.neuronrobotics.sdk.common.ByteList.addAll ( int  index,
Collection<? extends Byte >  c 
)

Adds the all.

Parameters
indexthe index
cthe c
Returns
true, if successful

Definition at line 362 of file ByteList.java.

◆ addAs16()

boolean com.neuronrobotics.sdk.common.ByteList.addAs16 ( int  value)

◆ addAs32()

boolean com.neuronrobotics.sdk.common.ByteList.addAs32 ( int  value)

Add an integer as a 32 bit value.

Parameters
valuethe value
Returns
true, if successful

Definition at line 332 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.add(), and com.neuronrobotics.sdk.common.ByteList.convertTo32().

Referenced by com.neuronrobotics.sdk.commands.neuronrobotics.bowlercam.BlobCommand.BlobCommand(), com.neuronrobotics.sdk.commands.bcs.io.ConfigAsyncCommand.ConfigAsyncCommand(), com.neuronrobotics.sdk.commands.bcs.pid.ConfigurePDVelocityCommand.ConfigurePDVelocityCommand(), com.neuronrobotics.sdk.commands.bcs.pid.ConfigurePIDCommand.ConfigurePIDCommand(), com.neuronrobotics.sdk.commands.bcs.pid.ControlAllPIDCommand.ControlAllPIDCommand(), com.neuronrobotics.sdk.commands.bcs.pid.ControlPIDCommand.ControlPIDCommand(), com.neuronrobotics.sdk.dyio.DyIOChannel.flush(), com.neuronrobotics.sdk.common.RpcEncapsulation.getCommand(), com.neuronrobotics.sdk.commands.neuronrobotics.bowlercam.ImageCommand.ImageCommand(), com.neuronrobotics.sdk.commands.cartesian.LinearInterpolationCommand.LinearInterpolationCommand(), com.neuronrobotics.sdk.commands.bcs.pid.PDVelocityCommand.PDVelocityCommand(), com.neuronrobotics.sdk.commands.neuronrobotics.bootloader.ProgramSectionCommand.ProgramSectionCommand(), com.neuronrobotics.sdk.commands.bcs.pid.ResetPIDCommand.ResetPIDCommand(), com.neuronrobotics.sdk.commands.bcs.io.SetAllChannelValuesCommand.SetAllChannelValuesCommand(), com.neuronrobotics.sdk.commands.bcs.io.SetChannelValueCommand.SetChannelValueCommand(), com.neuronrobotics.sdk.dyio.peripherals.CounterInputChannel.setValue(), and com.neuronrobotics.sdk.dyio.peripherals.CounterOutputChannel.setValue().

Here is the call graph for this function:

◆ asString()

String com.neuronrobotics.sdk.common.ByteList.asString ( )

◆ clear()

void com.neuronrobotics.sdk.common.ByteList.clear ( )

◆ contains()

boolean com.neuronrobotics.sdk.common.ByteList.contains ( Object  o)

Contains.

Parameters
othe o
Returns
true, if successful

Definition at line 605 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.isUseStaticBuffer(), and com.neuronrobotics.sdk.common.ByteList.store.

Here is the call graph for this function:

◆ containsAll()

boolean com.neuronrobotics.sdk.common.ByteList.containsAll ( Collection<?>  c)

Contains all.

Parameters
cthe c
Returns
true, if successful

Definition at line 622 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.isUseStaticBuffer(), and com.neuronrobotics.sdk.common.ByteList.store.

Here is the call graph for this function:

◆ convertTo16()

static byte [] com.neuronrobotics.sdk.common.ByteList.convertTo16 ( int  value)
static

Convert to16.

Parameters
valuethe value
Returns
the byte[]

Definition at line 962 of file ByteList.java.

Referenced by com.neuronrobotics.sdk.common.ByteList.addAs16().

◆ convertTo32()

static byte [] com.neuronrobotics.sdk.common.ByteList.convertTo32 ( int  value)
static

Convert to32.

Parameters
valuethe value
Returns
the byte[]

Definition at line 977 of file ByteList.java.

Referenced by com.neuronrobotics.sdk.common.ByteList.addAs32(), and com.neuronrobotics.sdk.commands.bcs.io.SetUARTBaudrateCommand.SetUARTBaudrateCommand().

◆ convertToInt() [1/2]

static final int com.neuronrobotics.sdk.common.ByteList.convertToInt ( byte[]  b)
static

◆ convertToInt() [2/2]

static int com.neuronrobotics.sdk.common.ByteList.convertToInt ( byte[]  b,
boolean  Signed 
)
static

toInt Takes a ByteList and turns it into the int that the stream represents. Assumes the 0th element is the most significant byte Assumes the entire stream is one number

Parameters
bThe byte array with the byte data in it
SignedIf the stream should be treated as a signed integer
Returns
a long representing the value in the stream

Definition at line 928 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.rawByteToInt().

Here is the call graph for this function:

◆ get()

Byte com.neuronrobotics.sdk.common.ByteList.get ( int  index)

◆ getByte()

byte com.neuronrobotics.sdk.common.ByteList.getByte ( int  index)

◆ getBytes() [1/3]

byte [] com.neuronrobotics.sdk.common.ByteList.getBytes ( )

Gets the bytes.

Returns
the bytes

Implements com.neuronrobotics.sdk.common.ISendable.

Definition at line 383 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.size().

Referenced by com.neuronrobotics.sdk.common.ByteList.add(), com.neuronrobotics.sdk.common.ByteList.asString(), com.neuronrobotics.sdk.namespace.bcs.pid.LegacyPidNamespaceImp.GetAllPIDPosition(), com.neuronrobotics.sdk.common.ByteList.getByte(), com.neuronrobotics.sdk.common.BowlerAbstractCommand.getBytes(), com.neuronrobotics.sdk.common.BowlerDatagram.getBytes(), com.neuronrobotics.sdk.common.ByteList.getBytes(), com.neuronrobotics.sdk.common.BowlerAbstractCommand.getCallingData(), com.neuronrobotics.sdk.common.BowlerDatagram.getData(), com.neuronrobotics.sdk.dyio.DyIO.getDyIOChannelCount(), com.neuronrobotics.sdk.dyio.DyIO.getHeartBeatTime(), com.neuronrobotics.sdk.common.BowlerDatagram.getPayload(), com.neuronrobotics.sdk.namespace.bcs.pid.LegacyPidNamespaceImp.getPIDChannelCount(), com.neuronrobotics.sdk.namespace.bcs.pid.LegacyPidNamespaceImp.GetPIDPosition(), com.neuronrobotics.sdk.common.BowlerAbstractDevice.getRevisions(), com.neuronrobotics.sdk.common.BowlerDatagram.getRPC(), com.neuronrobotics.sdk.common.BowlerAbstractConnection.getRpcList(), com.neuronrobotics.sdk.common.ByteList.insert(), com.neuronrobotics.sdk.common.ByteList.iterator(), com.neuronrobotics.sdk.bowlercam.device.BowlerCamDevice.onAsyncResponse(), com.neuronrobotics.sdk.namespace.bcs.pid.LegacyPidNamespaceImp.onAsyncResponse(), com.neuronrobotics.sdk.namespace.bcs.pid.PidNamespaceImp.onAsyncResponse(), com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.onChannelEvent(), com.neuronrobotics.sdk.dyio.peripherals.SPIChannel.onChannelEvent(), com.neuronrobotics.sdk.common.BowlerDatagram.parse(), com.neuronrobotics.sdk.pid.PDVelocityConfiguration.PDVelocityConfiguration(), com.neuronrobotics.sdk.pid.PIDConfiguration.PIDConfiguration(), com.neuronrobotics.sdk.pid.PIDEvent.PIDEvent(), com.neuronrobotics.sdk.pid.PIDLimitEvent.PIDLimitEvent(), com.neuronrobotics.sdk.common.ByteList.popList(), com.neuronrobotics.sdk.dyio.DyIO.powerEvent(), com.neuronrobotics.sdk.common.ByteList.subList(), com.neuronrobotics.sdk.common.ByteList.toString(), and com.neuronrobotics.sdk.dyio.peripherals.SPIChannel.write().

Here is the call graph for this function:

◆ getBytes() [2/3]

byte [] com.neuronrobotics.sdk.common.ByteList.getBytes ( int  index)

Get Bytes after an index.

Parameters
indexThe index
Returns
the bytes

Definition at line 453 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.getBytes(), and com.neuronrobotics.sdk.common.ByteList.size().

Here is the call graph for this function:

◆ getBytes() [3/3]

synchronized byte [] com.neuronrobotics.sdk.common.ByteList.getBytes ( int  start,
int  len 
)

Get a specific amount of bytes.

Parameters
startStart byte
lenDesired Length
Returns
The desired Bytes.

Definition at line 394 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.isUseStaticBuffer(), com.neuronrobotics.sdk.common.ByteList.size(), com.neuronrobotics.sdk.common.ByteList.staticBuffer, com.neuronrobotics.sdk.common.ByteList.staticBufferReadPointer, and com.neuronrobotics.sdk.common.ByteList.store.

Here is the call graph for this function:

◆ getStaticBufferByteCount()

int com.neuronrobotics.sdk.common.ByteList.getStaticBufferByteCount ( )
private

◆ getStaticBufferSize()

int com.neuronrobotics.sdk.common.ByteList.getStaticBufferSize ( )

Gets the static buffer size.

Returns
the static buffer size

Definition at line 1122 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.staticBufferSize.

Referenced by com.neuronrobotics.sdk.common.ByteList.setStaticBufferSize().

◆ getUnsigned()

int com.neuronrobotics.sdk.common.ByteList.getUnsigned ( int  index)

◆ indexOf()

int com.neuronrobotics.sdk.common.ByteList.indexOf ( Object  o)

Index of.

Parameters
othe o
Returns
the int

Definition at line 675 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.isUseStaticBuffer(), and com.neuronrobotics.sdk.common.ByteList.store.

Here is the call graph for this function:

◆ insert()

void com.neuronrobotics.sdk.common.ByteList.insert ( int  index,
byte  val 
)

◆ isEmpty()

boolean com.neuronrobotics.sdk.common.ByteList.isEmpty ( )

Check if the bytelist is empty.

Returns
true, if is empty

Definition at line 372 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.getStaticBufferByteCount(), com.neuronrobotics.sdk.common.ByteList.isUseStaticBuffer(), and com.neuronrobotics.sdk.common.ByteList.store.

Here is the call graph for this function:

◆ isUseStaticBuffer()

static boolean com.neuronrobotics.sdk.common.ByteList.isUseStaticBuffer ( )
static

◆ iterator()

Iterator<Byte> com.neuronrobotics.sdk.common.ByteList.iterator ( )

◆ lastIndexOf()

int com.neuronrobotics.sdk.common.ByteList.lastIndexOf ( Object  o)

Last index of.

Parameters
othe o
Returns
the int

Definition at line 722 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.isUseStaticBuffer(), and com.neuronrobotics.sdk.common.ByteList.store.

Here is the call graph for this function:

◆ listIterator() [1/2]

ListIterator<Byte> com.neuronrobotics.sdk.common.ByteList.listIterator ( )

List iterator.

Returns
the list iterator

Definition at line 738 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.isUseStaticBuffer(), and com.neuronrobotics.sdk.common.ByteList.store.

Here is the call graph for this function:

◆ listIterator() [2/2]

ListIterator<Byte> com.neuronrobotics.sdk.common.ByteList.listIterator ( int  index)

List iterator.

Parameters
indexthe index
Returns
the list iterator

Definition at line 755 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.isUseStaticBuffer(), and com.neuronrobotics.sdk.common.ByteList.store.

Here is the call graph for this function:

◆ pop() [1/2]

Byte com.neuronrobotics.sdk.common.ByteList.pop ( )

Removes the first byte from the buffer and returns it. If the buffer is empty, null is returned

Returns
the byte

Definition at line 512 of file ByteList.java.

Referenced by com.neuronrobotics.sdk.common.ByteList.pop().

◆ pop() [2/2]

Byte com.neuronrobotics.sdk.common.ByteList.pop ( int  index)

Removes bytes from the start of the buffer upto and including the given index. If the index is greater than the size of the buffer, null is returned otherwise the byte at the given index is returned.

Parameters
indexthe index
Returns
the byte

Definition at line 492 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.clear(), com.neuronrobotics.sdk.common.ByteList.pop(), and com.neuronrobotics.sdk.common.ByteList.size().

Referenced by com.neuronrobotics.sdk.dyio.DyIOChannel.getValue(), com.neuronrobotics.sdk.network.BowlerUDPServer.loadPacketFromPhy(), com.neuronrobotics.sdk.dyio.DyIO.onAsyncResponse(), com.neuronrobotics.sdk.common.RpcEncapsulation.parseResponse(), and com.neuronrobotics.sdk.dyio.DyIOInputStream.read().

Here is the call graph for this function:

◆ popList() [1/2]

byte [] com.neuronrobotics.sdk.common.ByteList.popList ( int  index)

◆ popList() [2/2]

byte [] com.neuronrobotics.sdk.common.ByteList.popList ( int  off,
int  len 
)

Pop list.

Parameters
offthe offset from which to start
lenthe number of bytes to pop
Returns
the byte[]

Definition at line 1088 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.size().

Here is the call graph for this function:

◆ rawByteToInt()

static int com.neuronrobotics.sdk.common.ByteList.rawByteToInt ( byte  b)
static

Raw byte to int.

Parameters
bthe b
Returns
the int

Definition at line 1072 of file ByteList.java.

Referenced by com.neuronrobotics.sdk.common.ByteList.convertToInt().

◆ remove() [1/2]

synchronized Byte com.neuronrobotics.sdk.common.ByteList.remove ( int  index)

◆ remove() [2/2]

boolean com.neuronrobotics.sdk.common.ByteList.remove ( Object  o)

Removes the.

Parameters
othe o
Returns
true, if successful

Definition at line 772 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.isUseStaticBuffer(), and com.neuronrobotics.sdk.common.ByteList.store.

Here is the call graph for this function:

◆ removeAll()

boolean com.neuronrobotics.sdk.common.ByteList.removeAll ( Collection<?>  c)

Removes the all.

Parameters
cthe c
Returns
true, if successful

Definition at line 1012 of file ByteList.java.

◆ retainAll()

boolean com.neuronrobotics.sdk.common.ByteList.retainAll ( Collection<?>  c)

Retain all.

Parameters
cthe c
Returns
true, if successful

Definition at line 1026 of file ByteList.java.

◆ set()

Byte com.neuronrobotics.sdk.common.ByteList.set ( int  arg0,
Byte  arg1 
)

Sets the.

Parameters
arg0the arg0
arg1the arg1
Returns
the byte

Definition at line 1041 of file ByteList.java.

◆ setStaticBufferSize()

void com.neuronrobotics.sdk.common.ByteList.setStaticBufferSize ( int  staticBufferSize)

◆ setUseStaticBuffer()

static void com.neuronrobotics.sdk.common.ByteList.setUseStaticBuffer ( boolean  useStaticBuffer)
static

Sets the use static buffer.

Parameters
useStaticBufferthe new use static buffer

Definition at line 1113 of file ByteList.java.

◆ size()

int com.neuronrobotics.sdk.common.ByteList.size ( )

Get the size of the bytelist.

Returns
the int

Definition at line 478 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.getStaticBufferByteCount(), com.neuronrobotics.sdk.common.ByteList.isUseStaticBuffer(), and com.neuronrobotics.sdk.common.ByteList.store.

Referenced by com.neuronrobotics.sdk.common.ByteList.add(), com.neuronrobotics.sdk.dyio.DyIOInputStream.available(), com.neuronrobotics.sdk.common.BowlerDatagram.genCRC(), com.neuronrobotics.sdk.common.ByteList.get(), com.neuronrobotics.sdk.dyio.DyIO.getAllChannelModes(), com.neuronrobotics.sdk.namespace.bcs.pid.LegacyPidNamespaceImp.GetAllPIDPosition(), com.neuronrobotics.sdk.dyio.DyIO.getAvailibleChannelModes(), com.neuronrobotics.sdk.common.ByteList.getByte(), com.neuronrobotics.sdk.common.BowlerDatagram.getBytes(), com.neuronrobotics.sdk.common.ByteList.getBytes(), com.neuronrobotics.sdk.common.RpcEncapsulation.getCommand(), com.neuronrobotics.sdk.common.BowlerAbstractConnection.getNamespaces(), com.neuronrobotics.sdk.common.ByteList.getUnsigned(), com.neuronrobotics.sdk.common.ByteList.iterator(), com.neuronrobotics.sdk.network.BowlerUDPServer.loadPacketFromPhy(), com.neuronrobotics.sdk.common.device.server.BowlerAbstractDeviceServer.onAllResponse(), com.neuronrobotics.sdk.bowlercam.device.BowlerCamDevice.onAsyncResponse(), com.neuronrobotics.sdk.common.BowlerDatagram.parse(), com.neuronrobotics.sdk.common.ByteList.pop(), com.neuronrobotics.sdk.common.ByteList.popList(), com.neuronrobotics.sdk.dyio.DyIO.powerEvent(), com.neuronrobotics.sdk.commands.neuronrobotics.bootloader.ProgramSectionCommand.ProgramSectionCommand(), com.neuronrobotics.sdk.common.BowlerDatagram.toString(), com.neuronrobotics.sdk.common.ByteList.toString(), com.neuronrobotics.sdk.dyio.peripherals.PPMReaderChannel.updateValues(), com.neuronrobotics.sdk.commands.bcs.io.GetChannelModeCommand.validate(), and com.neuronrobotics.sdk.common.BowlerAbstractConnection.write().

Here is the call graph for this function:

◆ split()

static byte [] com.neuronrobotics.sdk.common.ByteList.split ( long  data,
int  split 
)
static

Split.

Parameters
datathe data
splitthe split
Returns
the byte[]

Definition at line 884 of file ByteList.java.

Referenced by com.neuronrobotics.sdk.common.ByteList.add().

◆ subList()

List<Byte> com.neuronrobotics.sdk.common.ByteList.subList ( int  fromIndex,
int  toIndex 
)

Sub list.

Parameters
fromIndexthe from index
toIndexthe to index
Returns
the list

Definition at line 812 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.getBytes(), com.neuronrobotics.sdk.common.ByteList.isUseStaticBuffer(), and com.neuronrobotics.sdk.common.ByteList.store.

Here is the call graph for this function:

◆ toArray()

Object [] com.neuronrobotics.sdk.common.ByteList.toArray ( )

To array.

Returns
the object[]

Definition at line 833 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.isUseStaticBuffer(), and com.neuronrobotics.sdk.common.ByteList.store.

Here is the call graph for this function:

◆ toString()

String com.neuronrobotics.sdk.common.ByteList.toString ( )

Definition at line 843 of file ByteList.java.

References com.neuronrobotics.sdk.common.ByteList.getBytes(), and com.neuronrobotics.sdk.common.ByteList.size().

Here is the call graph for this function:

◆ wrap()

static byte [] com.neuronrobotics.sdk.common.ByteList.wrap ( int  value)
static

Utility method used to quickly return a single int as a byte array.

Parameters
valuethe value
Returns
the byte[]

Definition at line 554 of file ByteList.java.

Referenced by com.neuronrobotics.sdk.commands.bcs.io.GetValueCommand.getCallingData().

Member Data Documentation

◆ staticBuffer

byte [] com.neuronrobotics.sdk.common.ByteList.staticBuffer = new byte[staticBufferSize]
private

◆ staticBufferReadPointer

int com.neuronrobotics.sdk.common.ByteList.staticBufferReadPointer = 0
private

◆ staticBufferSize

int com.neuronrobotics.sdk.common.ByteList.staticBufferSize = BowlerDatagram.MAX_PACKET_SIZE
private

◆ staticBufferWritePointer

int com.neuronrobotics.sdk.common.ByteList.staticBufferWritePointer = 0
private

◆ store

List<Byte> com.neuronrobotics.sdk.common.ByteList.store = new ArrayList<Byte>()
private

◆ useStaticBuffer

final boolean com.neuronrobotics.sdk.common.ByteList.useStaticBuffer = true
staticprivate

The Constant useStaticBuffer.

Definition at line 35 of file ByteList.java.

Referenced by com.neuronrobotics.sdk.common.ByteList.isUseStaticBuffer().


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