Value types¶
Overview¶
NCP data types are mapped onto python types as follows:
NCP type | Python type |
---|---|
i32 | int |
u32 | ncplib.u32 |
i64 | ncplib.i64 |
u64 | ncplib.u64 |
f32 | float |
f64 | ncplib.f64 |
string | str |
raw | bytes |
data i8 | array.array(typecode="b") |
data i16 | array.array(typecode="h") |
data i32 | array.array(typecode="i") |
data u8 | array.array(typecode="B") |
data u16 | array.array(typecode="H") |
data u32 | array.array(typecode="I") |
data u64 | array.array(typecode="L") |
data i64 | array.array(typecode="l") |
data f32 | array.array(typecode="f") |
data f64 | array.array(typecode="d") |