int WriteStringAsUtf8(string, string)
Writes a UTF-8 encoded string to the specified device.
Security
Trust Level Required: Full Trust
Parameters
Name | Description |
devName |
string The name of the device in the Configuration Tool. |
dataToSend |
string The string of data to write to 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.
Return
The number of bytes written to the device.
Examples
//The name of the device will be user defined in the Configuration Tool.
var devName = "device";
var stringify = "KioWare";
//write hex-encoded string to device
if(KioRawSerialDevice.WriteStringAsUtf8(devName, stringify) == stringify.length)
console.log(stringify + " written to " + devName);
Requirements
KioWare for Windows version 8.11 or greater.