nxtlib/src/Protocol.cs
/// <summary> 
/// [Native] Boot the NXT.  THIS COMMAND MAY ONLY BE ACCEPTED BY USB!
/// </summary>
[Native] Boot the NXT.  THIS COMMAND MAY ONLY BE ACCEPTED BY USB!
[ Native ] Boot the NXT . THIS COMMAND MAY ONLY BE ACCEPTED BY USB!
public void Boot()
        {
            byte[] request = new byte[21];
            request[0] = 0x01;
            request[1] = (byte)MessageCommand.Boot;
            Encoding.ASCII.GetBytes("Let's dance: SAMBA").CopyTo(request, 2);
            byte[] reply = CompleteRequest(request);
            string result = Encoding.ASCII.GetString(reply, 3, 4).TrimEnd('\0');
            if (result != "Yes")
            {
                throw new NXTReplyIncorrect();
            }
            return;
        }
public void Boot ( ) { byte [ ] request = new byte [ 21 ] ; request [ 0 ] = 0x01 ; request [ 1 ] = ( byte ) MessageCommand . Boot ; Encoding . ASCII . GetBytes ( " " ) . CopyTo ( request , 2 ) ; byte [ ] reply = CompleteRequest ( request ) ; string result = Encoding . ASCII . GetString ( reply , 3 , 4 ) . TrimEnd ( ' \0 ' ) ; if ( result != " " ) { throw new NXTReplyIncorrect ( ) ; } return ; }
[Native] Boot the NXT.
[ Native ] Boot the NXT .