ipcclient Package

ipcclient Package

_c_smartbus_ipccli_interface Module

‘smartbus 进程通信客户端C-API ctypes 对照翻译

使用ctypes将C-API的函数与基本数据结构做一对一的翻译,没有进行更进一步的包装。

date:2013-1-28
author:lxy@heosng.net
smartbus.ipcclient._c_smartbus_ipccli_interface.lib_filename = 'libbusipccli.so'

smartbus IPC 客户端默认的共享/动态库文件名。在WINNT系统下,默认是 busipccli.dll。

smartbus.ipcclient._c_smartbus_ipccli_interface.load_lib(filepath='libbusipccli.so')

加载共享/动态库

参数:filepath – 动态/共享库文件名

client Module

smartbus 进程间通信客户端的Python接口类客户端类型 :author: lxy@hesong.net :date: 2013-6-8

class smartbus.ipcclient.client.Client(username=None, password=None, extInfo=None, encoding='utf-8')

基类:builtins.object

SmartBus IPC 客户端类

这个类封装了 SmartBus IPC 客户端的一系列方法与事件

addr_expr
clientid
clienttype
connect(username=None, password=None)
classmethod finalize()
get_addr_expr()
get_clientid()
get_clienttype()
get_unitid()
classmethod initialize(clientid, clienttype, onglobalconnect=None, libraryfile='libbusipccli.so', logging_option=(True, 10, 40))

初始化

这是一个类方法。调用其他方法前,必须首先使用这个方法初始化库。 :param clientid: 客户端ID。在同一个节点中,ID必须唯一。不得小于等于16 :param clienttype: 客户端类型。 :param onglobalconnect: :param libraryfile:

classmethod instance(username=None, password=None, extInfo=None)
invokeFlow(server, process, project, flow, parameters=, []isNeedReturn=True, timeout=30)
classmethod isInitialized()
library
onConnectFail(unitId, errno)
onConnectSuccess(unitId)
onDisconnect()
onInvokeFlowAcknowledge(packInfo, project, invokeId, ack, msg)
onInvokeFlowError(packInfo, project, invokeId, errno)
onInvokeFlowRespond(packInfo, project, invokeId, result)
onInvokeFlowTimeout(packInfo, project, invokeId)
onReceiveText(packInfo, txt)
ping(dstUnitId, dstClientId, dstClientType, data, encoding=None)
send(cmd, cmdType, dstUnitId, dstClientId, dstClientType, data, encoding=None)
unitid