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

Public Member Functions

byte[] getCallingData ()
 
void setOpCode (String opCode)
 
String getOpCode ()
 
void setMethod (BowlerMethod method)
 
BowlerMethod getMethod ()
 
byte getLength ()
 
BowlerDatagram validate (BowlerDatagram data) throws InvalidResponseException
 
byte[] getBytes ()
 
String toString ()
 
void setData (ByteList data)
 
ByteList getCallingDataStorage ()
 
void setNamespaceIndex (int namespaceIndex)
 
int getNamespaceIndex ()
 

Static Public Member Functions

static BowlerAbstractCommand parse (BowlerDatagram data)
 

Private Attributes

String opCode
 
BowlerMethod method
 
ByteList data = new ByteList()
 
int namespaceIndex =0
 

Detailed Description

This class encapsulates the generation of a Bowler RPC. Each command should represent a unique RPC.

Author
rbreznak

Definition at line 42 of file BowlerAbstractCommand.java.

Member Function Documentation

◆ getBytes()

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

◆ getCallingData()

byte [] com.neuronrobotics.sdk.common.BowlerAbstractCommand.getCallingData ( )

Get the data that will be used to call the RPC (i.e. parameters for the RPC). Each instance of a BAC should determine the correct method for generating this data.

Returns
the parameters for the RPC

Reimplemented in com.neuronrobotics.sdk.commands.bcs.io.GetValueCommand.

Definition at line 62 of file BowlerAbstractCommand.java.

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

Referenced by com.neuronrobotics.sdk.common.BowlerAbstractCommand.getBytes(), and com.neuronrobotics.sdk.common.BowlerAbstractCommand.getLength().

Here is the call graph for this function:

◆ getCallingDataStorage()

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

Gets the calling data storage.

Returns
the calling data storage

Definition at line 244 of file BowlerAbstractCommand.java.

References com.neuronrobotics.sdk.common.BowlerAbstractCommand.data.

Referenced by 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.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.ControlAllPIDCommand.ControlAllPIDCommand(), 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.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.commands.cartesian.LinearInterpolationCommand.LinearInterpolationCommand(), com.neuronrobotics.sdk.commands.bcs.core.NamespaceCommand.NamespaceCommand(), 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.commands.bcs.io.SetAllChannelValuesCommand.SetAllChannelValuesCommand(), com.neuronrobotics.sdk.commands.bcs.io.setmode.SetChannelModeCommand.SetChannelModeCommand(), com.neuronrobotics.sdk.commands.bcs.io.SetChannelValueCommand.SetChannelValueCommand(), and com.neuronrobotics.sdk.commands.bcs.io.SetUARTBaudrateCommand.SetUARTBaudrateCommand().

◆ getLength()

byte com.neuronrobotics.sdk.common.BowlerAbstractCommand.getLength ( )

Get the total size of the command including opcode and calling data.

Returns
the full size of the command

Definition at line 111 of file BowlerAbstractCommand.java.

References com.neuronrobotics.sdk.common.BowlerAbstractCommand.getCallingData(), and com.neuronrobotics.sdk.common.BowlerAbstractCommand.opCode.

Here is the call graph for this function:

◆ getMethod()

BowlerMethod com.neuronrobotics.sdk.common.BowlerAbstractCommand.getMethod ( )

Get the method that the command will use for execution.

Returns
the method used

Definition at line 102 of file BowlerAbstractCommand.java.

References com.neuronrobotics.sdk.common.BowlerAbstractCommand.method.

◆ getNamespaceIndex()

int com.neuronrobotics.sdk.common.BowlerAbstractCommand.getNamespaceIndex ( )

Gets the namespace index.

Returns
the namespace index

Definition at line 262 of file BowlerAbstractCommand.java.

References com.neuronrobotics.sdk.common.BowlerAbstractCommand.namespaceIndex.

◆ getOpCode()

String com.neuronrobotics.sdk.common.BowlerAbstractCommand.getOpCode ( )

◆ parse()

static BowlerAbstractCommand com.neuronrobotics.sdk.common.BowlerAbstractCommand.parse ( BowlerDatagram  data)
static

Parses the.

Parameters
datathe data
Returns
the bowler abstract command

Definition at line 201 of file BowlerAbstractCommand.java.

◆ setData()

void com.neuronrobotics.sdk.common.BowlerAbstractCommand.setData ( ByteList  data)

Sets the data.

Parameters
datathe new data

Definition at line 235 of file BowlerAbstractCommand.java.

References com.neuronrobotics.sdk.common.BowlerAbstractCommand.data.

◆ setMethod()

void com.neuronrobotics.sdk.common.BowlerAbstractCommand.setMethod ( BowlerMethod  method)

Set the method that the command will use for execution.

Parameters
methodthe new method

Definition at line 93 of file BowlerAbstractCommand.java.

References com.neuronrobotics.sdk.common.BowlerAbstractCommand.method.

Referenced by 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.commands.neuronrobotics.bootloader.BootloaderIDCommand.BootloaderIDCommand(), com.neuronrobotics.sdk.commands.cartesian.CancelPrintCommand.CancelPrintCommand(), 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.ControlAllPIDCommand.ControlAllPIDCommand(), 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.commands.neuronrobotics.dyio.GetAllChannelValuesCommand.GetAllChannelValuesCommand(), 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.bcs.io.GetDyIOChannelCountCommand.GetDyIOChannelCountCommand(), com.neuronrobotics.sdk.commands.bcs.pid.GetPIDChannelCountCommand.GetPIDChannelCountCommand(), com.neuronrobotics.sdk.commands.bcs.io.GetValueCommand.GetValueCommand(), com.neuronrobotics.sdk.commands.neuronrobotics.bowlercam.ImageCommand.ImageCommand(), com.neuronrobotics.sdk.commands.neuronrobotics.bowlercam.ImageURLCommand.ImageURLCommand(), com.neuronrobotics.sdk.commands.neuronrobotics.dyio.InfoFirmwareRevisionCommand.InfoFirmwareRevisionCommand(), com.neuronrobotics.sdk.commands.bcs.pid.KillAllPIDCommand.KillAllPIDCommand(), com.neuronrobotics.sdk.commands.cartesian.LinearInterpolationCommand.LinearInterpolationCommand(), com.neuronrobotics.sdk.commands.bcs.core.NamespaceCommand.NamespaceCommand(), com.neuronrobotics.sdk.commands.bcs.pid.PDVelocityCommand.PDVelocityCommand(), com.neuronrobotics.sdk.commands.bcs.core.PingCommand.PingCommand(), com.neuronrobotics.sdk.common.BowlerAbstractConnection.PingCommand.PingCommand(), 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.neuronrobotics.bootloader.ResetChipCommand.ResetChipCommand(), 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.commands.bcs.io.SetAllChannelValuesCommand.SetAllChannelValuesCommand(), com.neuronrobotics.sdk.commands.bcs.io.setmode.SetChannelModeCommand.SetChannelModeCommand(), com.neuronrobotics.sdk.commands.bcs.io.SetChannelValueCommand.SetChannelValueCommand(), and com.neuronrobotics.sdk.commands.bcs.io.SetUARTBaudrateCommand.SetUARTBaudrateCommand().

◆ setNamespaceIndex()

void com.neuronrobotics.sdk.common.BowlerAbstractCommand.setNamespaceIndex ( int  namespaceIndex)

Sets the namespace index.

Parameters
namespaceIndexthe new namespace index

Definition at line 253 of file BowlerAbstractCommand.java.

References com.neuronrobotics.sdk.common.BowlerAbstractCommand.namespaceIndex.

Referenced by com.neuronrobotics.sdk.common.RpcEncapsulation.getCommand().

◆ setOpCode()

void com.neuronrobotics.sdk.common.BowlerAbstractCommand.setOpCode ( String  opCode)

Set the operation code string. To conform to the Bowler standard, the string should be 4 characters.

Parameters
opCodethe RPC operation code to be implemented.

Definition at line 71 of file BowlerAbstractCommand.java.

References com.neuronrobotics.sdk.common.BowlerAbstractCommand.opCode.

Referenced by 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.commands.neuronrobotics.bootloader.BootloaderIDCommand.BootloaderIDCommand(), com.neuronrobotics.sdk.commands.cartesian.CancelPrintCommand.CancelPrintCommand(), 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.ControlAllPIDCommand.ControlAllPIDCommand(), 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.commands.neuronrobotics.dyio.GetAllChannelValuesCommand.GetAllChannelValuesCommand(), 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.bcs.io.GetDyIOChannelCountCommand.GetDyIOChannelCountCommand(), com.neuronrobotics.sdk.commands.bcs.pid.GetPIDChannelCountCommand.GetPIDChannelCountCommand(), com.neuronrobotics.sdk.commands.bcs.io.GetValueCommand.GetValueCommand(), com.neuronrobotics.sdk.commands.neuronrobotics.bowlercam.ImageCommand.ImageCommand(), com.neuronrobotics.sdk.commands.neuronrobotics.bowlercam.ImageURLCommand.ImageURLCommand(), com.neuronrobotics.sdk.commands.neuronrobotics.dyio.InfoFirmwareRevisionCommand.InfoFirmwareRevisionCommand(), com.neuronrobotics.sdk.commands.bcs.pid.KillAllPIDCommand.KillAllPIDCommand(), com.neuronrobotics.sdk.commands.cartesian.LinearInterpolationCommand.LinearInterpolationCommand(), com.neuronrobotics.sdk.commands.bcs.core.NamespaceCommand.NamespaceCommand(), com.neuronrobotics.sdk.commands.bcs.pid.PDVelocityCommand.PDVelocityCommand(), com.neuronrobotics.sdk.commands.bcs.core.PingCommand.PingCommand(), com.neuronrobotics.sdk.common.BowlerAbstractConnection.PingCommand.PingCommand(), 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.neuronrobotics.bootloader.ResetChipCommand.ResetChipCommand(), 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.commands.bcs.io.SetAllChannelValuesCommand.SetAllChannelValuesCommand(), com.neuronrobotics.sdk.commands.bcs.io.setmode.SetChannelModeCommand.SetChannelModeCommand(), com.neuronrobotics.sdk.commands.bcs.io.SetChannelValueCommand.SetChannelValueCommand(), and com.neuronrobotics.sdk.commands.bcs.io.SetUARTBaudrateCommand.SetUARTBaudrateCommand().

◆ toString()

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

Definition at line 218 of file BowlerAbstractCommand.java.

References com.neuronrobotics.sdk.common.BowlerAbstractCommand.getBytes().

Here is the call graph for this function:

◆ validate()

BowlerDatagram com.neuronrobotics.sdk.common.BowlerAbstractCommand.validate ( BowlerDatagram  data) throws InvalidResponseException

Member Data Documentation

◆ data

ByteList com.neuronrobotics.sdk.common.BowlerAbstractCommand.data = new ByteList()
private

◆ method

BowlerMethod com.neuronrobotics.sdk.common.BowlerAbstractCommand.method
private

◆ namespaceIndex

int com.neuronrobotics.sdk.common.BowlerAbstractCommand.namespaceIndex =0
private

◆ opCode

String com.neuronrobotics.sdk.common.BowlerAbstractCommand.opCode
private

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