in leda_python/leda.py [0:0]
def _getConfig(self, key):
'''获取配置相关信息
:return: info[string]:输出信息内容
'''
if (None == self.driverMbusHandle):
raise exception.LedaBusHandleException("mbus Handle is None")
if (False == isinstance(key, str)):
raise exception.LedaParamsException("_getConfig: input args type is invalid")
reply_cb = self._getPdInfo_cb
error_cb = self._getPdInfo_errCb
self.getPdInfoSync.clear()
self.driverMbusHandle.getConfig(key, reply_cb, error_cb)
syncMsg = self.getPdInfoSync.wait(mbusConfig.MERHOD_SYNC_TIMEOUT)
if (None == syncMsg):
raise exception.LedaRPCMethodException("getPdInfo time out", exception.LEDA_ERROR_TIMEOUT)
elif (False == syncMsg["state"]):
raise exception.LedaRPCMethodException("getPdInfo failed", exception.LEDA_ERROR_FAILED)
else:
info = syncMsg["msg"]
return info