nxtlib/src/Protocol.cs
/// <summary>
/// [Internal] Open a file for reading continuously.  (This command is for internal use!)
/// When finished reading, the handle MUST be closed with 
/// the Close() command.  If an error occurs, this handle will be closed automatically.
/// </summary>
/// <param name="filename">The name of the file to write, as a string.
///   The extension must be included.  The possible file extensions are: 
/// Firmware (.rfw), Program (.rxe), OnBrick Program (.rpg), TryMe Program (.rtm),
///  Sound (.rso), Graphic (.ric), and Text (.txt).</param>
/// <returns>Pointer to the linear memory segment.</returns>
[Internal] Open a file for reading continuously.  (This command is for internal use!)
When finished reading, the handle MUST be closed with
the Close() command.  If an error occurs, this handle will be closed automatically.
[ Internal ] Open a file for reading continuously . ( This command is for internal use! ) When finished reading the handle MUST be closed with the Close () command . If an error occurs this handle will be closed automatically .
public UInt32 OpenReadLinear(string filename)
        {
            ValidateFilename(filename);
            byte[] request = new byte[22];
            request[0] = 0x01;
            request[1] = (byte)MessageCommand.OpenReadLinear_Internal;
            Encoding.ASCII.GetBytes(filename).CopyTo(request, 2);
            byte[] reply = CompleteRequest(request);
            UInt32 pointer = GetUInt32(reply, 3);
            return pointer;
        }
public UInt32 OpenReadLinear ( string filename ) { ValidateFilename ( filename ) ; byte [ ] request = new byte [ 22 ] ; request [ 0 ] = 0x01 ; request [ 1 ] = ( byte ) MessageCommand . OpenReadLinear_Internal ; Encoding . ASCII . GetBytes ( filename ) . CopyTo ( request , 2 ) ; byte [ ] reply = CompleteRequest ( request ) ; UInt32 pointer = GetUInt32 ( reply , 3 ) ; return pointer ; }
[Internal] Open a file for reading continuously.
[ Internal ] Open a file for reading continuously .
Pointer to the linear memory segment.
Pointer to the linear memory segment .
filename
string
The name of the file to write, as a string.
The extension must be included.  The possible file extensions are:
Firmware (.rfw), Program (.rxe), OnBrick Program (.rpg), TryMe Program (.rtm),
Sound (.rso), Graphic (.ric), and Text (.txt).
The name of the file to write as a string . The extension must be included . The possible file extensions are : Firmware ( . rfw ) Program ( . rxe ) OnBrick Program ( . rpg ) TryMe Program ( . rtm ) Sound ( . rso ) Graphic ( . ric ) and Text ( . txt ) .