nxtlib/src/Protocol.cs
/// <summary>
/// [Native] Reads the number of bytes readable in a lowpeed sensor port.
/// </summary>
/// <param name="port">The port of the attached sensor.</param>
/// <returns>The data from the lowspeed sensor, as a byte array.</returns>
[Native] Reads the number of bytes readable in a lowpeed sensor port.
[ Native ] Reads the number of bytes readable in a lowpeed sensor port .
public byte[] LowspeedRead(SensorPort port)
        {
            byte[] request = new byte[] {
            0x00,
            (byte) DirectCommand.LSRead,
            (byte) port
            };
            byte[] reply = CompleteRequest(request);
            byte bytesRead = reply[3];
            byte[] rxData = new byte[bytesRead];
            Array.Copy(reply, 4, rxData, 0, bytesRead);
            return rxData;
        }
public byte [ ] LowspeedRead ( SensorPort port ) { byte [ ] request = new byte [ ] { 0x00 , ( byte ) DirectCommand . LSRead , ( byte ) port } ; byte [ ] reply = CompleteRequest ( request ) ; byte bytesRead = reply [ 3 ] ; byte [ ] rxData = new byte [ bytesRead ] ; Array . Copy ( reply , 4 , rxData , 0 , bytesRead ) ; return rxData ; }
[Native] Reads the number of bytes readable in a lowpeed sensor port.
[ Native ] Reads the number of bytes readable in a lowpeed sensor port .
The data from the lowspeed sensor, as a byte array.
The data from the lowspeed sensor as a byte array .
port
SensorPort
The port of the attached sensor.
The port of the attached sensor .