CommandMessenger.SendCommand Class Reference

A command to be send by CmdMessenger More...

## Public Member Functions

| SendCommand (int cmdId)
| Constructor. More...
| SendCommand (int cmdId, string argument)
| Constructor. More...
| SendCommand (int cmdId, string[] arguments)
| Constructor. More...
| SendCommand (int cmdId, float argument)
| Constructor. More...
| SendCommand (int cmdId, double argument)
| Constructor. More...
| SendCommand (int cmdId, UInt16 argument)
| Constructor. More...
| SendCommand (int cmdId, Int16 argument)
| Constructor. More...
| SendCommand (int cmdId, UInt32 argument)
| Constructor. More...
| SendCommand (int cmdId, Int32 argument)
| Constructor. More...
| SendCommand (int cmdId, bool argument)
| Constructor. More...
| SendCommand (int cmdId, int ackCmdId, int timeout)
| Constructor. More...
| SendCommand (int cmdId, string argument, int ackCmdId, int timeout)
| Constructor. More...
| SendCommand (int cmdId, string[] arguments, int ackCmdId, int timeout)
| Constructor. More...
| SendCommand (int cmdId, float argument, int ackCmdId, int timeout)
| Constructor. More...
| SendCommand (int cmdId, double argument, int ackCmdId, int timeout)
| Constructor. More...
| SendCommand (int cmdId, Int16 argument, int ackCmdId, int timeout)
| Constructor. More...
| SendCommand (int cmdId, UInt16 argument, int ackCmdId, int timeout)
| Constructor. More...
| SendCommand (int cmdId, Int32 argument, int ackCmdId, int timeout)
| Constructor. More...
| SendCommand (int cmdId, UInt32 argument, int ackCmdId, int timeout)
| Constructor. More...
void | AddArgument (string argument)
| Adds a command argument. More...
void | AddArguments (string[] arguments)
| Adds command arguments. More...
void | AddArgument (Single argument)
| Adds a command argument. More...
void | AddArgument (Double argument)
| Adds a command argument. More...
void | AddArgument (Int16 argument)
| Adds a command argument. More...
void | AddArgument (UInt16 argument)
| Adds a command argument. More...
void | AddArgument (Int32 argument)
| Adds a command argument. More...
void | AddArgument (UInt32 argument)
| Adds a command argument. More...
void | AddArgument (bool argument)
| Adds a command argument. More...
void | AddBinArgument (string argument)
| Adds a binary command argument. More...
void | AddBinArgument (Single argument)
| Adds a binary command argument. More...
void | AddBinArgument (Double argument)
| Adds a binary command argument. More...
void | AddBinArgument (Int16 argument)
| Adds a binary command argument. More...
void | AddBinArgument (UInt16 argument)
| Adds a binary command argument. More...
void | AddBinArgument (Int32 argument)
| Adds a binary command argument. More...
void | AddBinArgument (UInt32 argument)
| Adds a binary command argument. More...
void | AddBinArgument (bool argument)
| Adds a binary command argument. More...

## Properties

int | CmdId `[get, set]`
| Gets or sets the command ID. More...
bool | ReqAc `[get, set]`
| Indicates if we want to wait for an acknowlegde command. More...
int | AckCmdId `[get, set]`
| Gets or sets the acknowledge command ID. More...
int | Timeout `[get, set]`
| Gets or sets the time we want to wait for the acknowledgde command. More...
String[] | Arguments `[get]`
| Gets the command arguments. More...

## Detailed Description

A command to be send by CmdMessenger

## Constructor & Destructor Documentation

CommandMessenger.SendCommand.SendCommand | ( | int | cmdId | ) |

inline

Constructor.

Parameters

  cmdId | the command ID.

{
Init(cmdId, false, 0, 0);
}

CommandMessenger.SendCommand.SendCommand | ( | int | cmdId,
|  | string | argument
| ) |  |

inline

Constructor.

Parameters

  cmdId | Command ID
  argument | The argument.

References CommandMessenger.SendCommand.AddArgument().

{
Init(cmdId, false, 0, 0);
AddArgument(argument);
}
CommandMessenger.SendCommand.AddArgument
void AddArgument(string argument)
Adds a command argument.
Definition: SendCommand.cs:259

CommandMessenger.SendCommand.SendCommand | ( | int | cmdId,
|  | string[] | arguments
| ) |  |

inline

Constructor.

Parameters

  cmdId | Command ID
  arguments | The arguments.

References CommandMessenger.SendCommand.AddArguments().

{
Init(cmdId, false, 0, 0);
AddArguments(arguments);
}
CommandMessenger.SendCommand.AddArguments
void AddArguments(string[] arguments)
Adds command arguments.
Definition: SendCommand.cs:267

CommandMessenger.SendCommand.SendCommand | ( | int | cmdId,
|  | float | argument
| ) |  |

inline

Constructor.

Parameters

  cmdId | Command ID
  argument | The argument.

References CommandMessenger.SendCommand.AddArgument().

{
Init(cmdId, false, 0, 0);
AddArgument(argument);
}
CommandMessenger.SendCommand.AddArgument
void AddArgument(string argument)
Adds a command argument.
Definition: SendCommand.cs:259

CommandMessenger.SendCommand.SendCommand | ( | int | cmdId,
|  | double | argument
| ) |  |

inline

Constructor.

Parameters

  cmdId | Command ID
  argument | The argument.

References CommandMessenger.SendCommand.AddArgument().

{
Init(cmdId, false, 0, 0);
AddArgument(argument);
}
CommandMessenger.SendCommand.AddArgument
void AddArgument(string argument)
Adds a command argument.
Definition: SendCommand.cs:259

CommandMessenger.SendCommand.SendCommand | ( | int | cmdId,
|  | UInt16 | argument
| ) |  |

inline

Constructor.

Parameters

  cmdId | Command ID
  argument | The argument.

References CommandMessenger.SendCommand.AddArgument().

{
Init(cmdId, false, 0, 0);
AddArgument(argument);
}
CommandMessenger.SendCommand.AddArgument
void AddArgument(string argument)
Adds a command argument.
Definition: SendCommand.cs:259

CommandMessenger.SendCommand.SendCommand | ( | int | cmdId,
|  | Int16 | argument
| ) |  |

inline

Constructor.

Parameters

  cmdId | Command ID
  argument | The argument.

References CommandMessenger.SendCommand.AddArgument().

{
Init(cmdId, false, 0, 0);
AddArgument(argument);
}
CommandMessenger.SendCommand.AddArgument
void AddArgument(string argument)
Adds a command argument.
Definition: SendCommand.cs:259

CommandMessenger.SendCommand.SendCommand | ( | int | cmdId,
|  | UInt32 | argument
| ) |  |

inline

Constructor.

Parameters

  cmdId | Command ID
  argument | The argument.

References CommandMessenger.SendCommand.AddArgument().

{
Init(cmdId, false, 0, 0);
AddArgument(argument);
}
CommandMessenger.SendCommand.AddArgument
void AddArgument(string argument)
Adds a command argument.
Definition: SendCommand.cs:259

CommandMessenger.SendCommand.SendCommand | ( | int | cmdId,
|  | Int32 | argument
| ) |  |

inline

Constructor.

Parameters

  cmdId | Command ID
  argument | The argument.

References CommandMessenger.SendCommand.AddArgument().

{
Init(cmdId, false, 0, 0);
AddArgument(argument);
}
CommandMessenger.SendCommand.AddArgument
void AddArgument(string argument)
Adds a command argument.
Definition: SendCommand.cs:259

CommandMessenger.SendCommand.SendCommand | ( | int | cmdId,
|  | bool | argument
| ) |  |

inline

Constructor.

Parameters

  cmdId | Command ID
  argument | The argument.

References CommandMessenger.SendCommand.AddArgument().

{
Init(cmdId, false, 0, 0);
AddArgument(argument);
}
CommandMessenger.SendCommand.AddArgument
void AddArgument(string argument)
Adds a command argument.
Definition: SendCommand.cs:259

CommandMessenger.SendCommand.SendCommand | ( | int | cmdId,
|  | int | ackCmdId,
|  | int | timeout
| ) |  |

inline

Constructor.

Parameters

  cmdId | Command ID
  ackCmdId | Acknowlegde command ID.
  timeout | The timeout on waiting for an acknowlegde

{
Init(cmdId, true, ackCmdId, timeout);
}

CommandMessenger.SendCommand.SendCommand | ( | int | cmdId,
|  | string | argument,
|  | int | ackCmdId,
|  | int | timeout
| ) |  |

inline

Constructor.

Parameters

  cmdId | Command ID
  argument | The argument.
  ackCmdId | Acknowlegde command ID.
  timeout | The timeout on waiting for an acknowlegde

References CommandMessenger.SendCommand.AddArgument().

{
Init(cmdId, true, ackCmdId, timeout);
AddArgument(argument);
}
CommandMessenger.SendCommand.AddArgument
void AddArgument(string argument)
Adds a command argument.
Definition: SendCommand.cs:259

CommandMessenger.SendCommand.SendCommand | ( | int | cmdId,
|  | string[] | arguments,
|  | int | ackCmdId,
|  | int | timeout
| ) |  |

inline

Constructor.

Parameters

  cmdId | Command ID
  arguments | The arguments.
  ackCmdId | Acknowlegde command ID.
  timeout | The timeout on waiting for an acknowlegde

References CommandMessenger.SendCommand.AddArguments().

{
Init(cmdId, true, ackCmdId, timeout);
AddArguments(arguments);
}
CommandMessenger.SendCommand.AddArguments
void AddArguments(string[] arguments)
Adds command arguments.
Definition: SendCommand.cs:267

CommandMessenger.SendCommand.SendCommand | ( | int | cmdId,
|  | float | argument,
|  | int | ackCmdId,
|  | int | timeout
| ) |  |

inline

Constructor.

Parameters

  cmdId | Command ID
  argument | The argument.
  ackCmdId | Acknowlegde command ID.
  timeout | The timeout on waiting for an acknowlegde

References CommandMessenger.SendCommand.AddArgument().

{
Init(cmdId, true, ackCmdId, timeout);
AddArgument(argument);
}
CommandMessenger.SendCommand.AddArgument
void AddArgument(string argument)
Adds a command argument.
Definition: SendCommand.cs:259

CommandMessenger.SendCommand.SendCommand | ( | int | cmdId,
|  | double | argument,
|  | int | ackCmdId,
|  | int | timeout
| ) |  |

inline

Constructor.

Parameters

  cmdId | Command ID
  argument | The argument.
  ackCmdId | Acknowlegde command ID.
  timeout | The timeout on waiting for an acknowlegde

References CommandMessenger.SendCommand.AddArgument().

{
Init(cmdId, true, ackCmdId, timeout);
AddArgument(argument);
}
CommandMessenger.SendCommand.AddArgument
void AddArgument(string argument)
Adds a command argument.
Definition: SendCommand.cs:259

CommandMessenger.SendCommand.SendCommand | ( | int | cmdId,
|  | Int16 | argument,
|  | int | ackCmdId,
|  | int | timeout
| ) |  |

inline

Constructor.

Parameters

  cmdId | Command ID
  argument | The argument.
  ackCmdId | Acknowlegde command ID.
  timeout | The timeout on waiting for an acknowlegde

References CommandMessenger.SendCommand.AddArgument().

{
Init(cmdId, true, ackCmdId, timeout);
AddArgument(argument);
}
CommandMessenger.SendCommand.AddArgument
void AddArgument(string argument)
Adds a command argument.
Definition: SendCommand.cs:259

CommandMessenger.SendCommand.SendCommand | ( | int | cmdId,
|  | UInt16 | argument,
|  | int | ackCmdId,
|  | int | timeout
| ) |  |

inline

Constructor.

Parameters

  cmdId | Command ID
  argument | The argument.
  ackCmdId | Acknowlegde command ID.
  timeout | The timeout on waiting for an acknowlegde

References CommandMessenger.SendCommand.AddArgument().

{
Init(cmdId, true, ackCmdId, timeout);
AddArgument(argument);
}
CommandMessenger.SendCommand.AddArgument
void AddArgument(string argument)
Adds a command argument.
Definition: SendCommand.cs:259

CommandMessenger.SendCommand.SendCommand | ( | int | cmdId,
|  | Int32 | argument,
|  | int | ackCmdId,
|  | int | timeout
| ) |  |

inline

Constructor.

Parameters

  cmdId | Command ID
  argument | The argument.
  ackCmdId | Acknowlegde command ID.
  timeout | The timeout on waiting for an acknowlegde

References CommandMessenger.SendCommand.AddArgument().

{
Init(cmdId, true, ackCmdId, timeout);
AddArgument(argument);
}
CommandMessenger.SendCommand.AddArgument
void AddArgument(string argument)
Adds a command argument.
Definition: SendCommand.cs:259

CommandMessenger.SendCommand.SendCommand | ( | int | cmdId,
|  | UInt32 | argument,
|  | int | ackCmdId,
|  | int | timeout
| ) |  |

inline

Constructor.

Parameters

  cmdId | Command ID
  argument | The argument.
  ackCmdId | Acknowlegde command ID.
  timeout | The timeout on waiting for an acknowlegde

References CommandMessenger.SendCommand.AddArgument().

{
Init(cmdId, true, ackCmdId, timeout);
AddArgument(argument);
}
CommandMessenger.SendCommand.AddArgument
void AddArgument(string argument)
Adds a command argument.
Definition: SendCommand.cs:259

## Member Function Documentation

void CommandMessenger.SendCommand.AddArgument | ( | string | argument | ) |

inline

Adds a command argument.

Parameters

  argument | The argument.

Referenced by CommandMessenger.SendCommand.AddArgument(), and CommandMessenger.SendCommand.SendCommand().

{
if (argument != null)
_arguments.Add(argument);
}

void CommandMessenger.SendCommand.AddArgument | ( | Single | argument | ) |

inline

Adds a command argument.

Parameters

  argument | The argument.

{
_arguments.Add(argument.ToString(CultureInfo.InvariantCulture));
}

void CommandMessenger.SendCommand.AddArgument | ( | Double | argument | ) |

inline

Adds a command argument.

Parameters

  argument | The argument.

{
_arguments.Add(argument.ToString(CultureInfo.InvariantCulture));
}

void CommandMessenger.SendCommand.AddArgument | ( | Int16 | argument | ) |

inline

Adds a command argument.

Parameters

  argument | The argument.

{
_arguments.Add(argument.ToString(CultureInfo.InvariantCulture));
}

void CommandMessenger.SendCommand.AddArgument | ( | UInt16 | argument | ) |

inline

Adds a command argument.

Parameters

  argument | The argument.

{
_arguments.Add(argument.ToString(CultureInfo.InvariantCulture));
}

void CommandMessenger.SendCommand.AddArgument | ( | Int32 | argument | ) |

inline

Adds a command argument.

Parameters

  argument | The argument.

{
_arguments.Add(argument.ToString(CultureInfo.InvariantCulture));
}

void CommandMessenger.SendCommand.AddArgument | ( | UInt32 | argument | ) |

inline

Adds a command argument.

Parameters

  argument | The argument.

{
_arguments.Add(argument.ToString(CultureInfo.InvariantCulture));
}

void CommandMessenger.SendCommand.AddArgument | ( | bool | argument | ) |

inline

Adds a command argument.

Parameters

  argument | The argument.

References CommandMessenger.SendCommand.AddArgument().

{
AddArgument((Int32) (argument ? 1 : 0));
}
CommandMessenger.SendCommand.AddArgument
void AddArgument(string argument)
Adds a command argument.
Definition: SendCommand.cs:259

void CommandMessenger.SendCommand.AddArguments | ( | string[] | arguments | ) |

inline

Adds command arguments.

Parameters

  arguments | The arguments.

Referenced by CommandMessenger.SendCommand.SendCommand().

{
if (arguments != null)
_arguments.AddRange(arguments);
}

void CommandMessenger.SendCommand.AddBinArgument | ( | string | argument | ) |

inline

Adds a binary command argument.

Parameters

  argument | The argument.

{
_arguments.Add(Escaping.Escape(argument));
}

void CommandMessenger.SendCommand.AddBinArgument | ( | Single | argument | ) |

inline

Adds a binary command argument.

Parameters

  argument | The argument.

{
_arguments.Add(BinaryConverter.ToString(argument));
}

void CommandMessenger.SendCommand.AddBinArgument | ( | Double | argument | ) |

inline

Adds a binary command argument.

Parameters

  argument | The argument.

{
_arguments.Add(BinaryConverter.ToString(argument));
}

void CommandMessenger.SendCommand.AddBinArgument | ( | Int16 | argument | ) |

inline

Adds a binary command argument.

Parameters

  argument | The argument.

{
_arguments.Add(BinaryConverter.ToString(argument));
}

void CommandMessenger.SendCommand.AddBinArgument | ( | UInt16 | argument | ) |

inline

Adds a binary command argument.

Parameters

  argument | The argument.

{
_arguments.Add(BinaryConverter.ToString(argument));
}

void CommandMessenger.SendCommand.AddBinArgument | ( | Int32 | argument | ) |

inline

Adds a binary command argument.

Parameters

  argument | The argument.

{
_arguments.Add(BinaryConverter.ToString(argument));
}

void CommandMessenger.SendCommand.AddBinArgument | ( | UInt32 | argument | ) |

inline

Adds a binary command argument.

Parameters

  argument | The argument.

{
_arguments.Add(BinaryConverter.ToString(argument));
}

void CommandMessenger.SendCommand.AddBinArgument | ( | bool | argument | ) |

inline

Adds a binary command argument.

Parameters

  argument | The argument.

{
_arguments.Add(BinaryConverter.ToString(argument ? (byte) 1 : (byte) 0));
}

## Property Documentation

int CommandMessenger.SendCommand.AckCmdId

getset

Gets or sets the acknowledge command ID.

the acknowledge command ID.

Referenced by CommandMessenger.CmdMessenger.SendCommand().

String [] CommandMessenger.SendCommand.Arguments

get

Gets the command arguments.

The arguments, first one is the command ID

Referenced by CommandMessenger.CmdMessenger.SendCommand().

int CommandMessenger.SendCommand.CmdId

getset

Gets or sets the command ID.

The command ID.

Referenced by CommandMessenger.CmdMessenger.SendCommand().

bool CommandMessenger.SendCommand.ReqAc

getset

Indicates if we want to wait for an acknowlegde command.

true if request acknowledge, false if not.

Referenced by CommandMessenger.CmdMessenger.SendCommand().

int CommandMessenger.SendCommand.Timeout

getset

Gets or sets the time we want to wait for the acknowledgde command.

The timeout on waiting for an acknowlegde

Referenced by CommandMessenger.CmdMessenger.SendCommand().

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

- D:/My Documents/Github/Arduino-Code-and-Libraries/Libraries/CmdMessenger/CSharp/CommandMessenger/SendCommand.cs