writeInt16

[ Function ]

public writeInt16(value: number): this;

Encodes a signed integer with a value range of -32,768 to 32,767 in two bytes and appends them to the data.

Parameter

Name

Type

Description

value

number

The value to be written

Return value

Type

Description

Base64BinaryWriter

This method returns its parent object to allow concatenation of method calls.

Sample - JavaScript

var writer = new TcHmi.Base64BinaryWriter();
writer.writeInt16(32767).writeInt16(-32768);
var result1 = writer.getEncodedString(); // '/38AgA=='
writeInt16 1:

Available from version 1.10