Device module: add macros to get info directly + add test for it