MonoBrick Mindstorms Communication Library
Public Member Functions | Protected Attributes | Properties | List of all members
MonoBrick.BrickCommand Class Reference

Class for creating a command More...

Inheritance diagram for MonoBrick.BrickCommand:
MonoBrick.EV3.Command MonoBrick.NXT.Command

Public Member Functions

void Append (bool b)
 Append a bool value More...
 
void Append (String s)
 Append a string More...
 
void Append (String s, int maxSize, bool padWithZero)
 Append a string More...
 
void Append (byte b)
 Append a byte More...
 
void Append (sbyte b)
 Append a signed byte More...
 
void Append (UInt16 data)
 Append a UInt16 More...
 
void Append (Int16 data)
 Append a Int16 More...
 
void Append (UInt32 data)
 Append a UInt32 More...
 
void Append (Int32 data)
 Append a Int32 More...
 
void Append (float data)
 Append a float More...
 
void Append (byte[] data)
 Append a byte array More...
 
void Append (byte[] data, int offset)
 Append a byte array More...
 
void Append (byte[] data, int offset, int length)
 Append a byte array More...
 
void AppendZeros (int zeros)
 Appends zeros More...
 

Protected Attributes

List< byte > dataArr = new List<byte>()
 A list that holds the data bytes of the command More...
 
bool replyRequired
 Does the command require a reply More...
 

Properties

bool ReplyRequired [get]
 Gets a value indicating whether a reply is required. More...
 
byte[] Data [get]
 Gets byte array of the command More...
 
int Length [get]
 Gets the length of the command More...
 

Detailed Description

Class for creating a command

Member Function Documentation

void MonoBrick.BrickCommand.Append ( bool  b)
inline

Append a bool value

Parameters
bThe bool value to append
void MonoBrick.BrickCommand.Append ( String  s)
inline

Append a string

Parameters
sThe string to append
void MonoBrick.BrickCommand.Append ( String  s,
int  maxSize,
bool  padWithZero 
)
inline

Append a string

Parameters
sThe string to append
maxSizeThe maximum size to append
padWithZeroIf set to true and string length is less that maxsize the remaining bytes will be padded with zeros If set to false and string length is less that maxsize no padding will be added
void MonoBrick.BrickCommand.Append ( byte  b)
inline

Append a byte

Parameters
bThe byte value to append
void MonoBrick.BrickCommand.Append ( sbyte  b)
inline

Append a signed byte

Parameters
bThe signed byte to append
void MonoBrick.BrickCommand.Append ( UInt16  data)
inline

Append a UInt16

Parameters
dataThe UInt16 to append
void MonoBrick.BrickCommand.Append ( Int16  data)
inline

Append a Int16

Parameters
dataThe Int16 to append
void MonoBrick.BrickCommand.Append ( UInt32  data)
inline

Append a UInt32

Parameters
dataThe UInt32 to append
void MonoBrick.BrickCommand.Append ( Int32  data)
inline

Append a Int32

Parameters
dataThe Int32 to append
void MonoBrick.BrickCommand.Append ( float  data)
inline

Append a float

Parameters
dataThe float to append
void MonoBrick.BrickCommand.Append ( byte[]  data)
inline

Append a byte array

Parameters
dataThe array to append
void MonoBrick.BrickCommand.Append ( byte[]  data,
int  offset 
)
inline

Append a byte array

Parameters
dataThe array to append
offsetThe byte array offset
void MonoBrick.BrickCommand.Append ( byte[]  data,
int  offset,
int  length 
)
inline

Append a byte array

Parameters
dataThe array to append
offsetThe byte array offset
lengthThe length to append
void MonoBrick.BrickCommand.AppendZeros ( int  zeros)
inline

Appends zeros

Parameters
zerosNumber of zeros to append

Member Data Documentation

List<byte> MonoBrick.BrickCommand.dataArr = new List<byte>()
protected

A list that holds the data bytes of the command

bool MonoBrick.BrickCommand.replyRequired
protected

Does the command require a reply

Property Documentation

byte [] MonoBrick.BrickCommand.Data
get

Gets byte array of the command

The command data

int MonoBrick.BrickCommand.Length
get

Gets the length of the command

The length of the command

bool MonoBrick.BrickCommand.ReplyRequired
get

Gets a value indicating whether a reply is required.

true if reply required; otherwise, false.


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