Buffer commandFrame = appSnd
.buildRequestMsg(operateMode, BINARY_OUTPUT_COMMAND, (byte) 1,
new int[] { index }, WITH_DATA);
// int previous_marker = commandFrame.length();
commandFrame.writeByte(toBytes(index, 1)[0]);
commandFrame.setMarker(7);
commandFrame.writeByte(controlCode);
// commandFrame.setMarker(previous_marker);