Description
Encodes the calling Variable value into a binary-formatted String using the data format specified by dataType.
Timing Precision Mode
This page describes functionality in millisecond timing precision mode. Millisecond timing precision mode is deprecated and will be removed in a future release. We recommend that you migrate your Mission Plans to nanosecond timing precision mode.
Click here to see the documentation for this object in nanosecond timing precision mode.
Method Signature
Variable.EncodeAsType(
|
String dataType)
|
Arguments
dataType
|
|
Description:
|
Data type of the value to encode.
|
Valid Values:
|
Value
|
Label
|
"schar"
|
signed 1 byte integer
|
"signed char"
|
signed 1 byte integer
|
"char"
|
signed 1 byte integer
|
"int8"
|
signed 1 byte integer
|
"integer*1"
|
signed 1 byte integer
|
"uchar"
|
unsigned 1 byte integer
|
"unsigned char"
|
unsigned 1 byte integer
|
"uint8"
|
unsigned 1 byte integer
|
"short"
|
signed 2 byte integer
|
"int16"
|
signed 2 byte integer
|
"integer*2"
|
signed 2 byte integer
|
"unsigned short"
|
unsigned 2 byte integer
|
"uint16"
|
unsigned 2 byte integer
|
"int"
|
signed 4 byte integer
|
"int32"
|
signed 4 byte integer
|
"integer*4"
|
signed 4 byte integer
|
"uint32"
|
unsigned 4 byte integer
|
"unsigned int"
|
unsigned 4 byte integer
|
"unsigned long"
|
unsigned 4 byte integer
|
"int64"
|
signed 8 byte integer
|
"integer*8"
|
signed 8 byte integer
|
"uint64"
|
unsigned 8 byte integer
|
"float32"
|
4 byte floating point number
|
"real*4"
|
4 byte floating point number
|
"float"
|
4 byte floating point number
|
"float64"
|
8 byte floating point number
|
"real*8"
|
8 byte floating point number
|
"double"
|
8 byte floating point number
|
|
Return Value
Returns a String containing the encoded binary form of the calling Variable.
Syntax
myString1 = myVariable1.EncodeAsType(myString2);
|
See also
Variable Object
Matrix, Array, and Variable Math Guide
|