Core Serial Library in C#  1.2
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
Command Class Referenceabstract

An abstract class for commands of all forms to inherit from. More...

Inheritance diagram for Command:
AsciiCommand BinaryCommand

Public Member Functions

override bool Equals (object obj)
 Tests the equality of any object against this command. More...
 
abstract bool Equals (Command command)
 Checks to see if this command is equal to another Command. More...
 
abstract override int GetHashCode ()
 Returns a hash code based off the command's attributes. More...
 
abstract override string ToString ()
 Returns a human-readable representation of this command. More...
 

Public Attributes

byte DeviceAddress
 The address of the device to which to send a command, or 0 to send a command to all devices on the chain. More...
 

Protected Member Functions

 Command ()
 Creates a new instance of the Command class. More...
 

Detailed Description

An abstract class for commands of all forms to inherit from.

Constructor & Destructor Documentation

Command ( )
inlineprotected

Creates a new instance of the Command class.

Member Function Documentation

override bool Equals ( object  obj)
inline

Tests the equality of any object against this command.

Parameters
objThe object to be compared.
Returns
True if the object and this command are equal, false if they are inequal.
abstract bool Equals ( Command  command)
pure virtual

Checks to see if this command is equal to another Command.

Parameters
commandThe command to compare this one to.
Returns
True if the commands are equal, false if inequal.

Implemented in AsciiCommand, and BinaryCommand.

abstract override int GetHashCode ( )
pure virtual

Returns a hash code based off the command's attributes.

The hash code returned by this function depends on all of the attributes of the object, including the mutable ones. This means that when using this class in a HashMap or similar structure, it should be considered immutable, or else it will be lost upon being changed.

Returns
The calculated hash code.

Implemented in AsciiCommand, and BinaryCommand.

abstract override string ToString ( )
pure virtual

Returns a human-readable representation of this command.

Returns
A string representing the command.

Implemented in AsciiCommand, and BinaryCommand.

Member Data Documentation

byte DeviceAddress

The address of the device to which to send a command, or 0 to send a command to all devices on the chain.


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