c++ wrapper: reading temperature