Package PyMata :: Module pymata_serial :: Class PyMataSerial
[hide private]
[frames] | no frames]

Class PyMataSerial

source code

        object --+        
                 |        
threading._Verbose --+    
                     |    
      threading.Thread --+
                         |
                        PyMataSerial

This class manages the serial port for Arduino serial communications

Instance Methods [hide private]
 
__init__(self, port_id, command_deque)
Constructor:
source code
 
stop(self) source code
 
is_stopped(self) source code
 
open(self)
open the serial port using the configuration data returns a reference to this instance
source code
 
close(self)
Close the serial port return: None
source code
 
write(self, data)
write the data to the serial port return: None
source code
 
run(self)
This method continually runs.
source code

Inherited from threading.Thread: __repr__, getName, isAlive, isDaemon, is_alive, join, setDaemon, setName, start

Inherited from threading.Thread (private): _reset_internal_locks, _set_daemon, _set_ident

Inherited from threading._Verbose (private): _note

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  arduino = Serial<id=0x290da90, open=False>(port=None, baudrate...
  port_id = ''
  baud_rate = 57600
  timeout = 1
  command_deque = None
Properties [hide private]

Inherited from threading.Thread: daemon, ident, name

Inherited from threading.Thread (private): _block

Inherited from object: __class__

Method Details [hide private]

__init__(self, port_id, command_deque)
(Constructor)

source code 

Constructor:

Parameters:
  • command_deque - A reference to the deque shared with the _command_handler
Overrides: object.__init__

run(self)

source code 

This method continually runs. If an incoming character is available on the serial port it is read and placed on the _command_deque

Returns:
Never Returns
Overrides: threading.Thread.run

Class Variable Details [hide private]

arduino

Value:
Serial<id=0x290da90, open=False>(port=None, baudrate=9600, bytesize=8,\
 parity='N', stopbits=1, timeout=None, xonxoff=False, rtscts=False, ds\
rdtr=False)