Send command to Lego NXT brick and read reply.
Namespace:
AForge.Robotics.LegoAssembly: AForge.Robotics.Lego (in AForge.Robotics.Lego.dll) Version: 2.2.3.0 (2.2.3.0)
Syntax
Parameters
- command
- Type: array<
System..::.Byte
>[]()[]
Command to send.
- reply
- Type: array<
System..::.Byte
>[]()[]
Buffer to receive reply into.
Return Value
Returns true if the command was sent successfully and reply was received, otherwise false.
Exceptions
| Exception | Condition |
|---|---|
| System..::.NullReferenceException | Communication can not be performed, because connection with NXT brick was not established yet. |
| System..::.ArgumentException | Reply buffer size is smaller than the reply data size. |
| System..::.ApplicationException | Reply does not correspond to command (second byte of reply should be equal to second byte of command). |
| System..::.ApplicationException | Error occurred on NXT brick side. |