![]() |
botsense
3.2.0
RoadNarrows Client-Server Proxied Services Framework
|
Public Member Functions | |
def | __init__ (self, clientName='bsclient') |
def | __del__ (self) |
def | __sizeof__ (self) |
def | AttrGetName (self) |
def | AttrGetTraceState (self, hndVConn) |
def | AttrGetVConnCount (self) |
def | AttrHasVConn (self, hndVConn) |
def | AttrGetDevName (self, hndVConn) |
def | AttrGetModName (self, hndVConn) |
def | AttrSetLogging (self, nLevel) |
def | AttrGetConnState (self) |
def | AttrGetTimeouts (self) |
def | AttrSetTimeouts (self, reqTimeout, rspTimeout) |
def | GetMsgName (self, hndVConn, msgId) |
def | Trans (self, hndVConn, reqMsgId, reqBuf, rspMsgId, rspMaxSize=bsCore.BSPROXY_MSG_BODY_MAX) |
Static Public Member Functions | |
def | ChkClient (obj) |
Public Attributes | |
pClient | |
Pointer to opaque object. | |
BotSense Client Wrapper Class. The BsClient class provides a safe wrapper around the BsClient_T * opaque object.
Definition at line 72 of file BotSenseTypes.py.
def BotSense.BotSenseTypes.BsClient.__init__ | ( | self, | |
clientName = 'bsclient' |
|||
) |
Create and initialize BotSense client instance. Parameters: clientName - Proxied client name string.
Definition at line 80 of file BotSenseTypes.py.
def BotSense.BotSenseTypes.BsClient.__del__ | ( | self | ) |
Delete BotSense client instance.
Definition at line 98 of file BotSenseTypes.py.
References BotSense.BotSenseTypes.BsClient.pClient.
def BotSense.BotSenseTypes.BsClient.__sizeof__ | ( | self | ) |
x.__sizeof__() -- size of swig object, in bytes.
Definition at line 106 of file BotSenseTypes.py.
References BotSense.BotSenseTypes.BsClient.pClient.
Referenced by BotSense.BotSenseTypes.ByteBuf.sizeof().
def BotSense.BotSenseTypes.BsClient.AttrGetConnState | ( | self | ) |
Get the client's connection state. Return: Dictionary specifying connection state.
Definition at line 232 of file BotSenseTypes.py.
References BotSense.BotSenseTypes.BsClient._ChkSelf(), and BotSense.BotSenseTypes.BsClient.pClient.
def BotSense.BotSenseTypes.BsClient.AttrGetDevName | ( | self, | |
hndVConn | |||
) |
Get the proxied device name associated with the given handle. Parameters: hndVConn - Virtual connection handle. Return: On success, returns the device URI string. If no device is found, then '#nodev#' is returned. On parameter check failure, a BotSenseError exception is raised.
Definition at line 182 of file BotSenseTypes.py.
References BotSense.BotSenseTypes.BsClient._ChkSelf(), and BotSense.BotSenseTypes.BsClient.pClient.
def BotSense.BotSenseTypes.BsClient.AttrGetModName | ( | self, | |
hndVConn | |||
) |
Get the proxied interface module name associated with the given handle. Parameters: hndVConn - Virtual connection handle. Return: On success, returns the I/F module URI string. If no module is found, then '#nomod#' is returned. On parameter check failure, a BotSenseError exception is raised.
Definition at line 201 of file BotSenseTypes.py.
References BotSense.BotSenseTypes.BsClient._ChkSelf(), and BotSense.BotSenseTypes.BsClient.pClient.
def BotSense.BotSenseTypes.BsClient.AttrGetName | ( | self | ) |
Get the client's name. Return: On success, returns client string name. On parameter check failure, a BotSenseError exception is raised.
Definition at line 115 of file BotSenseTypes.py.
References BotSense.BotSenseTypes.BsClient._ChkSelf(), and BotSense.BotSenseTypes.BsClient.pClient.
Referenced by BotSense.BotSenseTypes.BsClient.Trans().
def BotSense.BotSenseTypes.BsClient.AttrGetTimeouts | ( | self | ) |
Get the client's request and response timeouts in seconds.
Definition at line 251 of file BotSenseTypes.py.
References BotSense.BotSenseTypes.BsClient._ChkSelf(), and BotSense.BotSenseTypes.BsClient.pClient.
def BotSense.BotSenseTypes.BsClient.AttrGetTraceState | ( | self, | |
hndVConn | |||
) |
Get a client's virtual connection trace state. Parameters: hndVConn - Virtual connection handle. Return: On success, returns True (enabled) or False (disabled). On parameter check failure, a BotSenseError exception is raised.
Definition at line 130 of file BotSenseTypes.py.
References BotSense.BotSenseTypes.BsClient._ChkSelf(), and BotSense.BotSenseTypes.BsClient.pClient.
def BotSense.BotSenseTypes.BsClient.AttrGetVConnCount | ( | self | ) |
Get a client's virtual connection trace state. Return: On success, returns client's virtual connection count. On parameter check failure, a BotSenseError exception is raised.
Definition at line 149 of file BotSenseTypes.py.
References BotSense.BotSenseTypes.BsClient._ChkSelf(), and BotSense.BotSenseTypes.BsClient.pClient.
def BotSense.BotSenseTypes.BsClient.AttrHasVConn | ( | self, | |
hndVConn | |||
) |
Check if the client has a virtual connection associated with the given handle. Parameters: hndVConn - Virtual connection handle. Return: On success, returns True or False. On parameter check failure, a BotSenseError exception is raised.
Definition at line 162 of file BotSenseTypes.py.
References BotSense.BotSenseTypes.BsClient._ChkSelf(), and BotSense.BotSenseTypes.BsClient.pClient.
def BotSense.BotSenseTypes.BsClient.AttrSetLogging | ( | self, | |
nLevel | |||
) |
Set the client's diagnostic logging threshold. Parameters: nLevel - New logging threshold level.
Definition at line 221 of file BotSenseTypes.py.
References BotSense.BotSenseTypes.BsClient._ChkSelf(), and BotSense.BotSenseTypes.BsClient.pClient.
def BotSense.BotSenseTypes.BsClient.AttrSetTimeouts | ( | self, | |
reqTimeout, | |||
rspTimeout | |||
) |
Set the client's request and response timeouts in seconds. Parameters: reqTimeout - Request (write) timeout. rspTimeout - Response (read) timeout.
Definition at line 265 of file BotSenseTypes.py.
References BotSense.BotSenseTypes.BsClient._ChkSelf(), and BotSense.BotSenseTypes.BsClient.pClient.
|
static |
Static check if object is a valid BsClient object. Parameters: obj - Object instance.
Definition at line 340 of file BotSenseTypes.py.
def BotSense.BotSenseTypes.BsClient.GetMsgName | ( | self, | |
hndVConn, | |||
msgId | |||
) |
Get the message name string. For each (virtual connection, message id) 2-tuple, the message name can be determinied (provided the msgid is valid and an application provides the information). Parameters: hndVConn - Virtual connection handle. msgId - Message id. Return: On success, returns the message name string. If the name cannot be determined, then 'unknown' is returned. On parameter check failure, a BotSenseError exception is raised.
Definition at line 277 of file BotSenseTypes.py.
References BotSense.BotSenseTypes.BsClient._ChkSelf(), BotSense.BotSenseTypes.BsClient.pClient, and BotSense.BotSenseTypes.BsClient.Trans().
def BotSense.BotSenseTypes.BsClient.Trans | ( | self, | |
hndVConn, | |||
reqMsgId, | |||
reqBuf, | |||
rspMsgId, | |||
rspMaxSize = bsCore.BSPROXY_MSG_BODY_MAX |
|||
) |
Execute a request - response transaction with the server. The request message header is automatically generated. The response message header is stripped off from the received response. Raises a BotSenseError exception on failure. Parameters: hndVConn - Virtual connection handle. reqMsgId - Virtual connection unique request message id. reqBuf - Packed request message body. rspMsgId - Virtual connection expected response message id. rspMaxSize - Maximum expected response body size. Return: Packed response message body buffer.
Definition at line 299 of file BotSenseTypes.py.
References BotSense.BotSenseTypes.BsClient._ChkSelf(), BotSense.BotSenseTypes.BsClient.AttrGetName(), BotSense.BotSenseTypes.BsClient.pClient, and BotSense.BotSenseTypes.sizeof().
Referenced by BotSense.BotSenseTypes.BsClient.GetMsgName().