int SetLengthIndicators(int byteIndex = -1, int lengthModifier = 0, string callbackName = null, string devName = null)
Sets length byte indicators for reads.
Index (after any start sentinels) of the length byte in the packet, if any. Pass -1 to clear, which is the default. A successful read will end only when this length is met, excluding the length byte itself.
The length byte assumes that its value specifies the length of all data following it. However, that is not always the case. This modifier should be used to add or subtract in order to meet the required length.
Target the device via the name from the Config Tool.
On success, an incrementing number; the purpose of which is to match a particular call to a callback response. Upon failure, 0.
Trust Level Required: Full Trust
if(!KioCustomSerialDevice.SetLengthIndicators(2, -1)) console.log('Device NOT open!');
KioWare for Windows version 8.12 or greater.