Skip to main content
Skip table of contents

4.1.8 - Raw Output/Input [UE9 Datasheet]

There are two IOTypes used to write or read raw data. These can be used to make low-level function calls (Section 5) through the UD driver. The only time these generally might be used is to access some low-level device functionality not available in the UD driver.

LJ_ioRAW_OUT
LJ_ioRAW_IN

When using these IOTypes, channel # specifies the desired communication pipe. For the UE9, 0 is the normal pipe while 1 is the streaming pipe. The number of bytes to write/read is specified in value (1-512), and x1 is a pointer to a byte array for the data. When retrieving the result, the value returned is the number of bytes actually read/written.

Following is example pseudocode to write and read the simple low-level echo command. This is the simplest UE9 command and consists simply of a write of 2 bytes (0×70, 0×70) and a read of the same two bytes.

writeArray[2] = {0x70,0x70};
numBytesToWrite = 2;
numBytesToRead = 2;

//Raw Out. This command writes the bytes to the device.
eGetPtr(lngHandle, LJ_ioRAW_OUT, 0, &numBytesToWrite, pwriteArray);

//Raw In. This command reads the bytes from the device.
eGetPtr(lngHandle, LJ_ioRAW_IN, 0, &numBytesToRead, preadArray);

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.