操作步骤:
1.拉取v4.2.0,编译好后,加载window的fdb_lib.dll
2.起一个client的Publish方法
3.client调用异步的get_async方法是OK的
4.client调用同步的get_sync方法,直接报AttributeError: function 'fdb_client_get_event_sync' not found
主要client的publish代码:
if name == 'main':
client = server1()
client.ex_client()
while True:
et = client.Example.ElapseTime()
et.hour = 13
et.minute = 59
et.second = 5
client.publish(client.Example.NTF_ELAPSE_TIME, 'python topic 1', et.SerializeToString())
time.sleep(1)
主要client的get_sync和get_async代码:
if name == 'main':
client = server1()
操作步骤: 1.拉取v4.2.0,编译好后,加载window的fdb_lib.dll 2.起一个client的Publish方法 3.client调用异步的get_async方法是OK的 4.client调用同步的get_sync方法,直接报AttributeError: function 'fdb_client_get_event_sync' not found
主要client的publish代码: if name == 'main': client = server1()
client.ex_client()
主要client的get_sync和get_async代码: if name == 'main': client = server1()
client.ex_client()
####################### client的get_sync和get_async的报错信息如下 ################################ D:\works\ENVS\NOBO-ENV\Scripts\python.exe D:/works/NoboProject/NoBoCIA/common/fdbus/fdbus_template/fdbus_client_template1.py 2021-05-14 15:46:53.683 | INFO | NoBoCIA.common.fdbus.lib.BaseFdbus:start_name_server:97 - Connect qnx host server successful! 2021-05-14 15:46:58.726 | INFO | NoBoCIA.common.fdbus.lib.BaseFdbus:start_name_server:106 - Start name server successful! 2021-05-14 15:46:58.744 | INFO | main:on_online:52 - onOnline for client server1 2021-05-14 15:46:58.745 | INFO | NoBoCIA.common.fdbus.lib.BaseFdbus:on_online:516 - onOnline for client server1 2021-05-14 15:46:59.740 | INFO | NoBoCIA.common.fdbus.lib.BaseFdbus:on_get_event:547 - onGetEvent for client server1, code:3,topic:b'python topic 1',size:92 Traceback (most recent call last): File "D:\works\NoboProject\NoBoCIA\common\fdbus\fdbus_template\fdbus_client_template1.py", line 103, in
msg = client.get_sync(client.Example.NTF_ELAPSE_TIME, 'python topic 1')
File "D:\works\NoboProject\NoBoCIA\common\fdbus\lib\BaseFdbus.py", line 447, in get_sync
self.fdb_clib.fdb_client_get_event_sync.argtypes = [ctypes.c_void_p,
File "d:\app\python\lib\ctypes__init.py", line 387, in getattr
func = self.getitem(name)
File "d:\app\python\lib\ctypes\init.py", line 392, in getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function 'fdb_client_get_event_sync' not found