botsense  3.2.0
RoadNarrows Client-Server Proxied Services Framework
BotSense.bsNull Namespace Reference

BotSense Swigged Null Python Interface Module. More...

Classes

class  _object
 

Functions

def swig_import_helper ()
 
def bsNullGetMsgName (pClient, hndVConn, uMsgId)
 
def bsNullReqOpen (pClient, bInitTrace)
 
def bsNullReqClose (pClient, hndVConn)
 
def bsNullReqWrite (pClient, hndVConn, wbuf, uWriteLen)
 
def NullGetMsgName (client, hndVConn, msgId)
 
def NullReqOpen (client, trace=False)
 
def NullReqClose (client, hndVConn)
 
def NullReqWrite (client, hndVConn, wbuf)
 

Variables

 BS_NULL_DEV_NAME = _bsNull.BS_NULL_DEV_NAME
 
 BS_NULL_SERVER_MOD = _bsNull.BS_NULL_SERVER_MOD
 
 BS_NULL_CLIENT_LIB = _bsNull.BS_NULL_CLIENT_LIB
 
 bsNullGetMsgName = _bsNull.bsNullGetMsgName
 
 bsNullReqOpen = _bsNull.bsNullReqOpen
 
 bsNullReqClose = _bsNull.bsNullReqClose
 
 bsNullReqWrite = _bsNull.bsNullReqWrite
 

Detailed Description

BotSense Swigged Null Python Interface Module.

Author
Robin Knight (robin.nosp@m..kni.nosp@m.ght@r.nosp@m.oadn.nosp@m.arrow.nosp@m.s.co.nosp@m.m)
Copyright:
(C) 2010. RoadNarrows LLC.
(http://www.roadnarrows.com)
All Rights Reserved

Function Documentation

def BotSense.bsNull.NullGetMsgName (   client,
  hndVConn,
  msgId 
)
Get the DevNull message name.

    For each (virtual connection, message id) 2-tuple, there can be a known
    name string (provided the id is valid and an application provides the
    information).

    Parameters:
      client    - BotSenseTypes.BsClient instance.
      hndVConn  - Virtual connection handle (ignored).
      msgId     - DevNull message id.

    Return:
      Returns message name string if it can be determined.
      Otherwise returns 'unknown'.

Definition at line 142 of file bsNull.py.

142 def NullGetMsgName(client, hndVConn, msgId):
143  """ Get the DevNull message name.
144 
145  For each (virtual connection, message id) 2-tuple, there can be a known
146  name string (provided the id is valid and an application provides the
147  information).
148 
149  Parameters:
150  client - BotSenseTypes.BsClient instance.
151  hndVConn - Virtual connection handle (ignored).
152  msgId - DevNull message id.
153 
154  Return:
155  Returns message name string if it can be determined.
156  Otherwise returns 'unknown'.
157  """
158  bsTypes.BsClient.ChkClient(client)
159  return bsNullGetMsgName(client.pClient, hndVConn, msgId)
160 
def NullGetMsgName(client, hndVConn, msgId)
Definition: bsNull.py:142
def BotSense.bsNull.NullReqClose (   client,
  hndVConn 
)
Proxy server request to close client's proxied /dev/null device virtual
    connection.

    Raises a BotSenseError exception on failure.

    Parameters:
      client    - BotSenseTypes.BsClient instance.
      hndVConn  - Virtual connection handle.

Definition at line 180 of file bsNull.py.

180 def NullReqClose(client, hndVConn):
181  """ Proxy server request to close client's proxied /dev/null device virtual
182  connection.
183 
184  Raises a BotSenseError exception on failure.
185 
186  Parameters:
187  client - BotSenseTypes.BsClient instance.
188  hndVConn - Virtual connection handle.
189  """
190  bsTypes.BsClient.ChkClient(client)
191  rc = bsNullReqClose(client.pClient, hndVConn)
192  bsError.ChkReturnIsOk(rc,
193  "Client %s: DevNull Close request failed." % (client.AttrGetName()))
194 
def NullReqClose(client, hndVConn)
Definition: bsNull.py:180
def BotSense.bsNull.NullReqOpen (   client,
  trace = False 
)
Proxy server request to establish a virtual connection to the /dev/null
    device.

    Raises a BotSenseError exception on failure.

    Parameters:
      client    - BotSenseTypes.BsClient instance.
      trace     - Initial message tracing enable(true)/disable(false) state.

    Return
      New virtual connection handle.

Definition at line 161 of file bsNull.py.

161 def NullReqOpen(client, trace=False):
162  """ Proxy server request to establish a virtual connection to the /dev/null
163  device.
164 
165  Raises a BotSenseError exception on failure.
166 
167  Parameters:
168  client - BotSenseTypes.BsClient instance.
169  trace - Initial message tracing enable(true)/disable(false) state.
170 
171  Return
172  New virtual connection handle.
173  """
174  bsTypes.BsClient.ChkClient(client)
175  hndVConn = bsNullReqOpen(client.pClient, trace)
176  bsError.ChkReturnIsNonNeg(hndVConn,
177  "Client %s: DevNull Open request failed." % (client.AttrGetName()))
178  return hndVConn
179 
def NullReqOpen(client, trace=False)
Definition: bsNull.py:161
def BotSense.bsNull.NullReqWrite (   client,
  hndVConn,
  wbuf 
)
DevNull request to write /dev/null.

    Raises a BotSenseError exception on failure.

    Parameters:
      client    - BotSenseTypes.BsClient instance.
      hndVConn  - Virtual connection handle.
      wbuf      - Write buffer.

    Return:
      Number of bytes written.

Definition at line 195 of file bsNull.py.

195 def NullReqWrite(client, hndVConn, wbuf):
196  """ DevNull request to write /dev/null.
197 
198  Raises a BotSenseError exception on failure.
199 
200  Parameters:
201  client - BotSenseTypes.BsClient instance.
202  hndVConn - Virtual connection handle.
203  wbuf - Write buffer.
204 
205  Return:
206  Number of bytes written.
207  """
208  bsTypes.BsClient.ChkClient(client)
209  wbytebuf = bsTypes.ByteBuf.Clone(wbuf)
210  wbytebuf.copyToSwigObj(len(wbytebuf))
211  n = bsNullReqWrite(client.pClient, hndVConn, wbytebuf.getSwigObj(),
212  len(wbytebuf))
213  bsError.ChkReturnIsNonNeg(n,
214  "Client %s: DevNull Write request failed." % (client.AttrGetName()))
215  return n
216 
217 
218 # This file is compatible with both classic and new-style classes.
219 
220 
221 
def NullReqWrite(client, hndVConn, wbuf)
Definition: bsNull.py:195