Array ReadBytes (string)

Reads bytes from the specified device.

Security

Trust Level Required: Full Trust

Parameters

Name Description
devName string
The name of the device in the Configuration Tool.

Return

An array of bytes read from the device.

Remarks

The Configuration Tool will allow the user to provide a name for the device and provide a description. This name will be used for all communication between KioWare and the device. It is mandatory to use the identical string when calling into this method.

Examples


//The name of the device will be user defined in the Configuration Tool.
var devName = "device";
var readData;
if(KioRawSerialDevice.IsOpen(devName))	
{
	readData = KioRawSerialDevice.ReadBytes(devName);
	if(readData.length > 0)
		for(var i = 0; i < readData.length; i++)
			console.log(readData[i]);
	else
		console.log('0 bytes read from ' + devName);
}
    

Requirements

KioWare for Windows version 8.11 or greater.