A class to represent ASCII commands to be sent to Zaber devices.
More...
|
int | AxisNumber = 0 |
| The number of the axis to which to send a command, or 0 to send a command to all axes. More...
|
|
string | Data = "" |
| The data of the command to be sent to the device. More...
|
|
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...
|
|
A class to represent ASCII commands to be sent to Zaber devices.
Create an empty command.
Data is set to the empty string instead of null by default, so this constructor can be used to quickly create the minimal ASCII command ("/\n"
).
Parses the string "command" and creates a representation of that ASCII command.
- Parameters
-
command | The string to be parsed into a Command object. |
Create a new AsciiCommand for a specified ZaberAsciiAxis.
This constructor is an alias for AsciiCommand( targetAxis.Parent.Address, targetAxis.Number, data)
. It is provided as a convenience.
- Parameters
-
targetAxis | The axis to which to send this command. |
data | The data of the command to be sent, including command keywords and any command parameters. |
AsciiCommand |
( |
byte |
deviceAddress, |
|
|
int |
axisNumber, |
|
|
string |
data |
|
) |
| |
|
inline |
Create a new AsciiCommand from a specified set of arguments.
- Parameters
-
deviceAddress | The address of the device to which to send this command. |
axisNumber | The number of the axis to which to send this command. |
data | The data of the command to be sent, including command keywords and any command parameters. |
override bool Equals |
( |
object |
obj | ) |
|
|
inlineinherited |
Tests the equality of any object against this command.
- Parameters
-
obj | The object to be compared. |
- Returns
- True if the object and this command are equal, false if they are inequal.
override bool Equals |
( |
Command |
command | ) |
|
|
inlinevirtual |
Checks to see if this command is equal to another Command.
- Parameters
-
command | The command to compare this one to. |
- Returns
- True if the commands are equal, false if inequal.
Implements Command.
Checks whether this AsciiCommand is equal to another one.
Equality is based on attribute equality, including mutable attributes. There is no guarantee that if a Command equals another at a certain time, it will always equal that other Command in the future.
- Parameters
-
command | The command to which to compare this one. |
- Returns
- True if the commands are equal, false if they are inequal.
override int GetHashCode |
( |
| ) |
|
|
inlinevirtual |
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.
Implements Command.
override string ToString |
( |
| ) |
|
|
inlinevirtual |
Returns a human-readable representation of this command.
This method will return the "encoded" string format of the command which should be sent to the device. This is also the format expected by the AsciiCommand constructor which takes one argument, a string.
- Returns
- A string representing the command.
Implements Command.
The number of the axis to which to send a command, or 0 to send a command to all axes.
Most commands must be sent to axis 0: only certain commands can be sent to particular axes. See the Zaber ASCII Protocol Manual for more info.
The data of the command to be sent to the device.
The data string may contain one or more command keywords, as well as extra data related to that command.
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: