The Domain Manager protocol uses a range of integer values to identify the types of data being passed. These are used when a primitive is permitted to handle more than one data type as an argument or return value. For example, the invoke() primitive can take arguments of any type, such as integer, string, and Boolean. When specifying a type as a primitive function argument you can either use the numeric value or the mnemonic string, as shown in the following example. For a string, either use “13” or “STRING”. When type codes are returned by primitives, they are always returned as the numeric code.
To convert from the numeric code to the mnemonic string and back, use one of the built-in TYPE methods of the InCharge::session module, as shown:
-
$mnemonic = $session->TYPE( $code )
-
$code = $session->TYPE( $mnemonic )
Type codes describes the type code values that are used.
Constant |
Literal |
Description |
---|---|---|
0 |
VOID |
void (nothing) |
1 |
ERR |
error condition |
2 |
BOOLEAN |
boolean (1 = true, 0 = false) |
3 |
INT |
signed integer |
4 |
UNSIGNED |
unsigned integer |
5 |
LONG |
signed long integer |
6 |
UNSIGNEDLONG |
unsigned long integer |
7 |
SHORT |
signed short integer |
8 |
UNSIGNEDSHORT |
unsigned short integer |
9 |
FLOAT |
floating point |
10 |
DOUBLE |
double length floating point |
12 |
CHAR |
1-byte character |
13 |
STRING |
string |
14 |
OBJREF |
object (class and instance) |
15 |
OBJCONSTREF |
constant object reference |
16 |
BOOLEAN_SET |
set of booleans |
17 |
INT_SET |
set of signed integers |
18 |
UNSIGNED_SET |
set of unsigned integers |
19 |
LONG_SET |
set of signed long integers |
20 |
UNSIGNEDLONG_SET |
set of unsigned long integers |
21 |
SHORT_SET |
set of signed short integers |
22 |
UNSIGNEDSHORT_SET |
set of unsigned short integers |
23 |
FLOAT_SET |
set of floating point numbers |
24 |
DOUBLE_SET |
set of double length floats |
26 |
CHAR_SET |
set of 1-byte characters |
27 |
STRING_SET |
set of strings |
28 |
OBJREF_SET |
set of objects (class and instance) |
29 |
OBJCONSTREF_SET |
set of constant object references |
30 |
ANYVALARRAY |
set of values (types included) |
31 |
ANYVALARRAY_SET |
two-dimensional array of values |