Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions
port.Port Class Reference
Inheritance diagram for port.Port:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __init__
def recv
def send

Public Attributes

 daemon
 finish
 footer
 header
 opts
 sock

Static Public Attributes

tuple checksum_struct = struct.Struct("<hh")

Private Member Functions

def _checksum

Detailed Description

Common base class for DataPort and ControlPort. Provides functionality to
    recv/send Applanix-formatted packets from the socket. Could in future 
    support LoggingPort and DisplayPort.

Definition at line 55 of file port.py.


Constructor & Destructor Documentation

def port.Port.__init__ (   self,
  sock,
  opts 
)

Definition at line 61 of file port.py.


Member Function Documentation

def port.Port._checksum (   cls,
  buff 
) [private]
Compute Applanix checksum. Expects a StringIO with a 
  size that is a multiple of four bytes. 

Definition at line 142 of file port.py.

def port.Port.recv (   self,
  d = False 
)
Receive a packet from the port's socket.
Returns (pkt_id, pkt_str), where pkt_id is ("$GRP"|"$MSG", num)
Returns None, None when no data. 

Definition at line 72 of file port.py.

def port.Port.send (   self,
  header,
  message 
)
Sends a header/msg/footer out the socket. Takes care of computing
length field for header and checksum field for footer. 

Definition at line 109 of file port.py.


Member Data Documentation

tuple port.Port::checksum_struct = struct.Struct("<hh") [static]

Definition at line 59 of file port.py.

Definition at line 61 of file port.py.

Definition at line 61 of file port.py.

Definition at line 61 of file port.py.

Definition at line 61 of file port.py.

Definition at line 61 of file port.py.

Definition at line 61 of file port.py.


The documentation for this class was generated from the following file:


applanix_bridge
Author(s): Mike Purvis
autogenerated on Thu Jan 2 2014 11:05:14