54 #define VID_SUBSYS_MASK 0x70000000
55 #define VID_SUBSYS_SHIFT 28
56 #define VID_VARIDX_MASK 0x0FF00000
57 #define VID_VARIDX_SHIFT 20
59 #define VID_BASETYP_MASK 0x000C0000
60 #define VID_BASETYP_SHIFT 18
61 #define VID_SCLSIZE_MASK 0x00030000
62 #define VID_SCLSIZE_SHIFT 16
64 #define VID_SCLTYP_MASK 0x000F0000
65 #define VID_SCLTYP_SHIFT 16
67 #define VID_SCLTYP_U8 0x0
68 #define VID_SCLTYP_U16 0x1
69 #define VID_SCLTYP_U32 0x2
70 #define VID_SCLTYP_U64 0x3
71 #define VID_SCLTYP_I8 0x4
72 #define VID_SCLTYP_I16 0x5
73 #define VID_SCLTYP_I32 0x6
74 #define VID_SCLTYP_I64 0x7
75 // F8 and F16 not supported
76 #define VID_SCLTYP_BOOL 0x8
77 #define VID_SCLTYP_F32 0xA
78 #define VID_SCLTYP_F64 0xB
80 #define VID_VIRTUAL BIT(15)
81 #define VID_READABLE BIT(14)
82 #define VID_WRITABLE BIT(13)
83 #define VID_CONFIG BIT(12)
85 #define VID_ARRSIZE_MASK 0x00000FFF
86 #define VID_ARRSIZE_SHIFT 0
101 return ((varID & VID_ARRSIZE_MASK) >> VID_ARRSIZE_SHIFT) + 1;
112 return 1 << ((varID & VID_SCLSIZE_MASK) >> VID_SCLSIZE_SHIFT);
122 return (varID & VID_SCLTYP_MASK) >> VID_SCLTYP_SHIFT;
static int vidVarSize(int varID)
Returns the total size of the variable.
#define VID_WRITABLE
Variable is readable.
static int vidArrSize(int varID)
Returns the number of elements in the array of this variable.
static int vidType(int varID)
Returns the type of the variable.
#define VID_READABLE
Variable is writable.
static bool vidIsReadable(int varID)
Checks if a variable is readable.
const char *const vidTypeNames[16]
Types names.
static int vidSclSize(int varID)
Returns the size of the scalar part of variable in bytes.
static bool vidIsWritable(int varID)
Checks if a variable is readable.