Public Member Functions | Public Attributes | Static Public Attributes | Private Member Functions
applanix_bridge.port.Port Class Reference

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 applanix_bridge.port.Port.__init__ (   self,
  sock,
  opts 
)

Definition at line 61 of file port.py.


Member Function Documentation

def applanix_bridge.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 applanix_bridge.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 applanix_bridge.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 applanix_bridge::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 Aug 27 2015 12:15:53