Public Member Functions | Public Attributes | List of all members
indoor_positioning.communication.tcp_socket.TCPSocket Class Reference

Public Member Functions

def __init__ (self, host, port=10001)
 
def close (self)
 
def get_line (self, eol_character)
 
def open (self)
 
def send (self, msg)
 

Public Attributes

 host
 
 port
 
 sock
 

Detailed Description

Establish a TCP/IP connection with a connected device.

Definition at line 9 of file tcp_socket.py.

Constructor & Destructor Documentation

def indoor_positioning.communication.tcp_socket.TCPSocket.__init__ (   self,
  host,
  port = 10001 
)
Initialize reader class for serial connection.
:param host: String: IP address of the device you want to communicate with
:param port: Int (default=10001): port to use for the connection

Definition at line 11 of file tcp_socket.py.

Member Function Documentation

def indoor_positioning.communication.tcp_socket.TCPSocket.close (   self)
Close the socket.

Definition at line 33 of file tcp_socket.py.

def indoor_positioning.communication.tcp_socket.TCPSocket.get_line (   self,
  eol_character 
)
Return a single line from the TCP stream with a custom end-of-line character.
:param eol_character: Bytes: character or sequence to use as end-of-line character.
:return: Bytes: the most recent line that has been sent via the socket connection

Definition at line 52 of file tcp_socket.py.

def indoor_positioning.communication.tcp_socket.TCPSocket.open (   self)
Open a socket to establish TCP/IP connection.

Definition at line 25 of file tcp_socket.py.

def indoor_positioning.communication.tcp_socket.TCPSocket.send (   self,
  msg 
)
Send message to the socket.
:param msg: String: message to be sent to the socket

Definition at line 42 of file tcp_socket.py.

Member Data Documentation

indoor_positioning.communication.tcp_socket.TCPSocket.host

Definition at line 18 of file tcp_socket.py.

indoor_positioning.communication.tcp_socket.TCPSocket.port

Definition at line 20 of file tcp_socket.py.

indoor_positioning.communication.tcp_socket.TCPSocket.sock

Definition at line 22 of file tcp_socket.py.


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


indoor_positioning
Author(s): Christian Arndt
autogenerated on Mon Jun 10 2019 13:33:13