Skip to main content

IDL Basic Types

HDDS supports all IDL 4.2 basic types.

Primitive Types

Boolean

boolean flag;
bool enabled; // alias

Characters

char c;        // 8-bit character
wchar wc; // Wide character (UTF-32)

Octet

octet raw_byte;  // Unsigned 8-bit (mapped to uint8_t)

Void

void  // Used in operation returns

Integer Types

Classic Types (IDL 2.x compatible)

short s;              // 16-bit signed
unsigned short us; // 16-bit unsigned
long l; // 32-bit signed
unsigned long ul; // 32-bit unsigned
long long ll; // 64-bit signed
unsigned long long ull; // 64-bit unsigned

Fixed-Width Types (IDL 4.x)

int8_t  i8;   // 8-bit signed
int16_t i16; // 16-bit signed
int32_t i32; // 32-bit signed
int64_t i64; // 64-bit signed

uint8_t u8; // 8-bit unsigned
uint16_t u16; // 16-bit unsigned
uint32_t u32; // 32-bit unsigned
uint64_t u64; // 64-bit unsigned

Type Mapping

IDL TypeRustC/C++Python
int8_ti8int8_tint
int16_t / shorti16int16_tint
int32_t / longi32int32_tint
int64_t / long longi64int64_tint
uint8_t / octetu8uint8_tint
uint16_tu16uint16_tint
uint32_tu32uint32_tint
uint64_tu64uint64_tint

Floating-Point Types

float f;        // 32-bit IEEE 754
double d; // 64-bit IEEE 754
long double ld; // Extended precision (mapped to f64 in Rust)
IDL TypeRustC/C++Python
floatf32floatfloat
doublef64doublefloat
long doublef64long doublefloat

String Types

Unbounded Strings

string name;    // Variable-length string
wstring wname; // Wide string (UTF-32)

Bounded Strings

string<64> short_name;   // Max 64 characters
wstring<128> wide_name; // Max 128 wide characters
IDL TypeRustCPython
stringStringchar*str
string<N>String (validated)char[N+1]str
wstringStringwchar_t*str

Fixed-Point Decimal

fixed<10, 3> price;  // 10 digits, 3 after decimal
// Represents values like 1234567.890
note

Fixed-point types are useful for financial applications where floating-point rounding is unacceptable.

Constants

const int32_t MAX_SIZE = 1000;
const double PI = 3.14159265359;
const boolean DEBUG = TRUE;
const string VERSION = "1.0.0";

Constant Expressions

const int32_t TEN = 5 + 5;
const int32_t SHIFTED = 1 << 3; // 8
const int32_t HEX = 0xFF00; // Hex literal
const int32_t OCTAL = 0o755; // Octal literal
const int32_t MASKED = HEX & 0xFF; // Bitwise AND

Supported operators: +, -, *, /, %, <<, >>, &, |, ^, &&, ||

Next Steps