From 363f14707f864c03a047427c43542031c7e4fc90 Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Tue, 4 Jun 2013 21:14:29 -0700 Subject: [PATCH 01/30] Getting rid of these until they're needed. --- pyad2usb/util.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/pyad2usb/util.py b/pyad2usb/util.py index 893bcae..e153b87 100644 --- a/pyad2usb/util.py +++ b/pyad2usb/util.py @@ -44,18 +44,6 @@ class Firmware(object): STAGE_UPLOADING = 4 STAGE_DONE = 5 - def __init__(self): - """ - Constructor - """ - pass - - def __del__(self): - """ - Destructor - """ - pass - @staticmethod def upload(dev, filename, progress_callback=None): """ From ec13e78af1a2c57b4b55fe6dda637d0a6df852be Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Tue, 4 Jun 2013 21:21:53 -0700 Subject: [PATCH 02/30] Removed temp tracebacks and made exceptions consistent in device open calls. --- pyad2usb/devices.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/pyad2usb/devices.py b/pyad2usb/devices.py index 26e8cbc..3c06d80 100644 --- a/pyad2usb/devices.py +++ b/pyad2usb/devices.py @@ -9,7 +9,6 @@ import threading import serial import serial.tools.list_ports import socket -import traceback from pyftdi.pyftdi.ftdi import * from pyftdi.pyftdi.usbtools import * from . import util @@ -60,8 +59,6 @@ class Device(object): while self._running: try: self._device.read_line(timeout=10) - except util.CommError, err: - traceback.print_exc(err) # TEMP except util.TimeoutError, err: pass @@ -143,7 +140,7 @@ class USBDevice(Device): except (usb.core.USBError, FtdiError), err: self.on_close() - raise util.CommError('Error opening AD2USB device: {0}'.format(str(err))) + raise util.NoDeviceError('Error opening AD2USB device: {0}'.format(str(err))) else: self._running = True if not no_reader_thread: @@ -486,7 +483,7 @@ class SocketDevice(Device): except socket.error, err: self.on_close() - traceback.print_exc(err) # TEMP + raise util.NoDeviceError('Error opening AD2SOCKET device at {0}:{1}'.format(self._host, self._port)) else: self._running = True From f805f50732befbf33ad9d944919cd66371190a18 Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Tue, 4 Jun 2013 22:17:26 -0700 Subject: [PATCH 03/30] Moved some stuff to the base class. Cleanup and consistency changes. --- pyad2usb/devices.py | 133 ++++++++++++++------------------------------ 1 file changed, 43 insertions(+), 90 deletions(-) diff --git a/pyad2usb/devices.py b/pyad2usb/devices.py index 3c06d80..b9d2b10 100644 --- a/pyad2usb/devices.py +++ b/pyad2usb/devices.py @@ -26,16 +26,43 @@ class Device(object): on_write = event.Event('Called when data has been written to the device') def __init__(self): - pass + self._id = '' + self._buffer = '' + self._interface = None + self._device = None + self._running = False + self._read_thread = ReadThread(self) # NOTE: not sure this is going to work.. def __del__(self): pass + @property + def id(self): + return self._id + + @id.setter + def id(self, value): + self._id = value + + def is_reader_alive(self): + """ + Indicates whether or not the reader thread is alive. + """ + return self._read_thread.is_alive() + + def stop_reader(self): + """ + Stops the reader thread. + """ + self._read_thread.stop() + class ReadThread(threading.Thread): """ Reader thread which processes messages from the device. """ + READ_TIMEOUT = 10 + def __init__(self, device): """ Constructor @@ -58,7 +85,7 @@ class Device(object): while self._running: try: - self._device.read_line(timeout=10) + self._device.read_line(timeout=self.READ_TIMEOUT) except util.TimeoutError, err: pass @@ -79,7 +106,6 @@ class USBDevice(Device): """ Returns all FTDI devices matching our vendor and product IDs. """ - devices = [] try: @@ -93,20 +119,14 @@ class USBDevice(Device): """ Constructor """ - Device.__init__(self) + self._device = Ftdi() + self._interface = interface self._vendor_id = vid self._product_id = pid self._serial_number = serial self._description = description - self._buffer = '' - self._device = Ftdi() - self._running = False - self._interface = interface - self._id = '' - - self._read_thread = Device.ReadThread(self) def open(self, baudrate=BAUDRATE, interface=None, index=0, no_reader_thread=False): """ @@ -165,22 +185,6 @@ class USBDevice(Device): self.on_close() - @property - def id(self): - return self._id - - def is_reader_alive(self): - """ - Indicates whether or not the reader thread is alive. - """ - return self._read_thread.is_alive() - - def stop_reader(self): - """ - Stops the reader thread. - """ - self._read_thread.stop() - def write(self, data): """ Writes data to the device. @@ -237,6 +241,8 @@ class USBDevice(Device): time.sleep(0.001) except (usb.core.USBError, FtdiError), err: + timer.cancel() + raise util.CommError('Error reading from AD2USB device: {0}'.format(str(err))) else: if got_line: @@ -285,18 +291,9 @@ class SerialDevice(Device): """ Device.__init__(self) - self._device = serial.Serial(timeout=0, writeTimeout=0) # Timeout = non-blocking to match pyftdi. - self._read_thread = Device.ReadThread(self) - self._buffer = '' - self._running = False self._interface = interface self._id = interface - - def __del__(self): - """ - Destructor - """ - pass + self._device = serial.Serial(timeout=0, writeTimeout=0) # Timeout = non-blocking to match pyftdi. def open(self, baudrate=BAUDRATE, interface=None, index=None, no_reader_thread=False): """ @@ -323,7 +320,6 @@ class SerialDevice(Device): # # Moving it to this point seems to resolve # all issues with it. - self._id = '{0}'.format(self._interface) except (serial.SerialException, ValueError), err: self.on_close() @@ -331,7 +327,7 @@ class SerialDevice(Device): raise util.NoDeviceError('Error opening AD2SERIAL device on port {0}.'.format(interface)) else: self._running = True - self.on_open((None, "AD2SERIAL")) # TODO: Fixme. + self.on_open(('N/A', "AD2SERIAL")) if not no_reader_thread: self._read_thread.start() @@ -350,22 +346,6 @@ class SerialDevice(Device): self.on_close() - @property - def id(self): - return self._id - - def is_reader_alive(self): - """ - Indicates whether or not the reader thread is alive. - """ - return self._read_thread.is_alive() - - def stop_reader(self): - """ - Stops the reader thread. - """ - self._read_thread.stop() - def write(self, data): """ Writes data to the device. @@ -389,7 +369,6 @@ class SerialDevice(Device): """ Reads a line from the device. """ - def timeout_event(): timeout_event.reading = False @@ -449,35 +428,25 @@ class SocketDevice(Device): Serial to IP interface. """ - def __init__(self, interface=None): + def __init__(self, interface=("localhost", 10000)): """ Constructor """ - self._host = "localhost" - self._port = 10000 - self._device = None - self._buffer = '' - self._running = False - self._id = '' - - self._read_thread = Device.ReadThread(self) - - def __del__(self): - """ - Destructor - """ - pass + self._interface = interface + self._host, self._port = interface def open(self, baudrate=None, interface=None, index=0, no_reader_thread=False): """ Opens the device. """ if interface is not None: + self._interface = interface self._host, self._port = interface try: self._device = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self._device.connect((self._host, self._port)) + self._id = '{0}:{1}'.format(self._host, self._port) except socket.error, err: @@ -487,7 +456,7 @@ class SocketDevice(Device): else: self._running = True - self.on_open((None, "AD2SOCKET")) # TEMP: Change me. + self.on_open(('N/A', "AD2SOCKET")) if not no_reader_thread: self._read_thread.start() @@ -507,22 +476,6 @@ class SocketDevice(Device): self.on_close() - @property - def id(self): - return self._id - - def is_reader_alive(self): - """ - Indicates whether or not the reader thread is alive. - """ - return self._read_thread.is_alive() - - def stop_reader(self): - """ - Stops the reader thread. - """ - self._read_thread.stop() - def write(self, data): """ Writes data to the device. @@ -545,8 +498,6 @@ class SocketDevice(Device): except socket.error, err: raise util.CommError('Error while reading from device: {0}'.format(str(err))) - # ??? - Should we trigger an on_read here as well? - return data def read_line(self, timeout=0.0): @@ -588,6 +539,8 @@ class SocketDevice(Device): time.sleep(0.001) except socket.error, err: + timer.cancel() + raise util.CommError('Error reading from Socket device: {0}'.format(str(err))) else: if got_line: From 4d5eeb5d4fdc2c44fcacb9cf671a826c5e453395 Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Tue, 4 Jun 2013 22:42:25 -0700 Subject: [PATCH 04/30] Simplified ridiculous message classes. Cleanup. --- pyad2usb/ad2usb.py | 477 +++++---------------------------------------- 1 file changed, 53 insertions(+), 424 deletions(-) diff --git a/pyad2usb/ad2usb.py b/pyad2usb/ad2usb.py index 64d3787..2ef526c 100644 --- a/pyad2usb/ad2usb.py +++ b/pyad2usb/ad2usb.py @@ -70,12 +70,6 @@ class Overseer(object): self.start() - def __del__(self): - """ - Destructor - """ - pass - def close(self): """ Clean up and shut down. @@ -143,6 +137,7 @@ class Overseer(object): for d in removed_devices: self._overseer.on_detached(d) + except util.CommError, err: pass @@ -155,9 +150,6 @@ class AD2USB(object): """ # High-level Events - on_open = event.Event('Called when the device has been opened.') - on_close = event.Event('Called when the device has been closed.') - on_status_changed = event.Event('Called when the panel status changes.') on_power_changed = event.Event('Called when panel power switches between AC and DC.') on_alarm = event.Event('Called when the alarm is triggered.') @@ -167,6 +159,8 @@ class AD2USB(object): on_message = event.Event('Called when a message has been received from the device.') # Low-level Events + on_open = event.Event('Called when the device has been opened.') + on_close = event.Event('Called when the device has been closed.') on_read = event.Event('Called when a line has been read from the device.') on_write = event.Event('Called when data has been written to the device.') @@ -174,20 +168,13 @@ class AD2USB(object): """ Constructor """ + self._device = device self._power_status = None self._alarm_status = None self._bypass_status = None - self._device = device - self._address_mask = 0xFF80 # TEMP - def __del__(self): - """ - Destructor - """ - pass - def open(self, baudrate=None, interface=None, index=None, no_reader_thread=False): """ Opens the device. @@ -219,6 +206,9 @@ class AD2USB(object): """ Parses messages from the panel. """ + if data is None: + return None + msg = None if data[0] != '!': @@ -293,24 +283,24 @@ class Message(object): """ Constructor """ - self._ready = False - self._armed_away = False - self._armed_home = False - self._backlight_on = False - self._programming_mode = False - self._beeps = -1 - self._zone_bypassed = False - self._ac_power = False - self._chime_on = False - self._alarm_event_occurred = False - self._alarm_sounding = False - self._numeric_code = "" - self._text = "" - self._cursor_location = -1 - self._data = "" - self._mask = "" - self._bitfield = "" - self._panel_data = "" + self.ready = False + self.armed_away = False + self.armed_home = False + self.backlight_on = False + self.programming_mode = False + self.beeps = -1 + self.zone_bypassed = False + self.ac_power = False + self.chime_on = False + self.alarm_event_occurred = False + self.alarm_sounding = False + self.numeric_code = "" + self.text = "" + self.cursor_location = -1 + self.data = "" + self.mask = "" + self.bitfield = "" + self.panel_data = "" self._regex = re.compile('("(?:[^"]|"")*"|[^,]*),("(?:[^"]|"")*"|[^,]*),("(?:[^"]|"")*"|[^,]*),("(?:[^"]|"")*"|[^,]*)') @@ -326,25 +316,25 @@ class Message(object): if m is None: raise util.InvalidMessageError('Received invalid message: {0}'.format(data)) - self._bitfield, self._numeric_code, self._panel_data, alpha = m.group(1, 2, 3, 4) - self._mask = int(self._panel_data[3:3+8], 16) - - self._data = data - self._ready = not self._bitfield[1:2] == "0" - self._armed_away = not self._bitfield[2:3] == "0" - self._armed_home = not self._bitfield[3:4] == "0" - self._backlight_on = not self._bitfield[4:5] == "0" - self._programming_mode = not self._bitfield[5:6] == "0" - self._beeps = int(self._bitfield[6:7], 16) - self._zone_bypassed = not self._bitfield[7:8] == "0" - self._ac_power = not self._bitfield[8:9] == "0" - self._chime_on = not self._bitfield[9:10] == "0" - self._alarm_event_occurred = not self._bitfield[10:11] == "0" - self._alarm_sounding = not self._bitfield[11:12] == "0" - self._text = alpha.strip('"') - - if int(self._panel_data[19:21], 16) & 0x01 > 0: - self._cursor_location = int(self._bitfield[21:23], 16) # Alpha character index that the cursor is on. + self.bitfield, self.numeric_code, self.panel_data, alpha = m.group(1, 2, 3, 4) + self.mask = int(self.panel_data[3:3+8], 16) + + self.data = data + self.ready = not self.bitfield[1:2] == "0" + self.armed_away = not self.bitfield[2:3] == "0" + self.armed_home = not self.bitfield[3:4] == "0" + self.backlight_on = not self.bitfield[4:5] == "0" + self.programming_mode = not self.bitfield[5:6] == "0" + self.beeps = int(self.bitfield[6:7], 16) + self.zone_bypassed = not self.bitfield[7:8] == "0" + self.ac_power = not self.bitfield[8:9] == "0" + self.chime_on = not self.bitfield[9:10] == "0" + self.alarm_event_occurred = not self.bitfield[10:11] == "0" + self.alarm_sounding = not self.bitfield[11:12] == "0" + self.text = alpha.strip('"') + + if int(self.panel_data[19:21], 16) & 0x01 > 0: + self.cursor_location = int(self.bitfield[21:23], 16) # Alpha character index that the cursor is on. def __str__(self): """ @@ -352,258 +342,6 @@ class Message(object): """ return 'msg > {0:0<9} [{1}{2}{3}] -- ({4}) {5}'.format(hex(self.mask), 1 if self.ready else 0, 1 if self.armed_away else 0, 1 if self.armed_home else 0, self.numeric_code, self.text) - @property - def ready(self): - """ - Indicates whether or not the panel is ready. - """ - return self._ready - - @ready.setter - def ready(self, value): - """ - Sets the value indicating whether or not the panel is ready. - """ - self._ready = value - - @property - def armed_away(self): - """ - Indicates whether or not the panel is armed in away mode. - """ - return self._armed_away - - @armed_away.setter - def armed_away(self, value): - """ - Sets the value indicating whether or not the panel is armed in away mode. - """ - self._armed_away = value - - @property - def armed_home(self): - """ - Indicates whether or not the panel is armed in home/stay mode. - """ - return self._armed_home - - @armed_home.setter - def armed_home(self, value): - """ - Sets the value indicating whether or not the panel is armed in home/stay mode. - """ - self._armed_home = value - - @property - def backlight_on(self): - """ - Indicates whether or not the panel backlight is on. - """ - return self._backlight_on - - @backlight_on.setter - def backlight_on(self, value): - """ - Sets the value indicating whether or not the panel backlight is on. - """ - self._backlight_on = value - - @property - def programming_mode(self): - """ - Indicates whether or not the panel is in programming mode. - """ - return self._programming_mode - - @programming_mode.setter - def programming_mode(self, value): - """ - Sets the value indicating whether or not the panel is in programming mode. - """ - self._programming_mode = value - - @property - def beeps(self): - """ - Returns the number of beeps associated with this message. - """ - return self._beeps - - @beeps.setter - def beeps(self, value): - """ - Sets the number of beeps associated with this message. - """ - self._beeps = value - - @property - def zone_bypassed(self): - """ - Indicates whether or not zones have been bypassed. - """ - return self._zone_bypassed - - @zone_bypassed.setter - def zone_bypassed(self, value): - """ - Sets the value indicating whether or not zones have been bypassed. - """ - self._zone_bypassed = value - - @property - def ac_power(self): - """ - Indicates whether or not the system is on AC power. - """ - return self._ac_power - - @ac_power.setter - def ac_power(self, value): - """ - Sets the value indicating whether or not the system is on AC power. - """ - self._ac_power = value - - @property - def chime_on(self): - """ - Indicates whether or not panel chimes are enabled. - """ - return self._chime_on - - @chime_on.setter - def chime_on(self, value): - """ - Sets the value indicating whether or not the panel chimes are enabled. - """ - self._chime_on = value - - @property - def alarm_event_occurred(self): - """ - Indicates whether or not an alarm event has occurred. - """ - return self._alarm_event_occurred - - @alarm_event_occurred.setter - def alarm_event_occurred(self, value): - """ - Sets the value indicating whether or not an alarm event has occurred. - """ - self._alarm_event_occurred = value - - @property - def alarm_sounding(self): - """ - Indicates whether or not an alarm is currently sounding. - """ - return self._alarm_sounding - - @alarm_sounding.setter - def alarm_sounding(self, value): - """ - Sets the value indicating whether or not an alarm is currently sounding. - """ - self._alarm_sounding = value - - @property - def numeric_code(self): - """ - Numeric indicator of associated with message. For example: If zone #3 is faulted, this value is 003. - """ - return self._numeric_code - - @numeric_code.setter - def numeric_code(self, value): - """ - Sets the numeric indicator associated with this message. - """ - self._numeric_code = value - - @property - def text(self): - """ - Alphanumeric text associated with this message. - """ - return self._text - - @text.setter - def text(self, value): - """ - Sets the alphanumeric text associated with this message. - """ - self._text = value - - @property - def cursor_location(self): - """ - Indicates which text position has the cursor underneath it. - """ - return self._cursor_location - - @cursor_location.setter - def cursor_location(self, value): - """ - Sets the value indicating which text position has the cursor underneath it. - """ - self._cursor_location = value - - @property - def data(self): - """ - Raw representation of the message from the panel. - """ - return self._data - - @data.setter - def data(self, value): - """ - Sets the raw representation of the message from the panel. - """ - self._data = value - - @property - def mask(self): - """ - The panel mask for which this message is intended. - """ - return self._mask - - @mask.setter - def mask(self, value): - """ - Sets the panel mask for which this message is intended. - """ - self._mask = value - - @property - def bitfield(self): - """ - The bit field associated with this message. - """ - return self._bitfield - - @bitfield.setter - def bitfield(self, value): - """ - Sets the bit field associated with this message. - """ - self._bitfield = value - - @property - def panel_data(self): - """ - The binary field associated with this message. - """ - return self._panel_data - - @panel_data.setter - def panel_data(self, value): - """ - Sets the binary field associated with this message. - """ - self._panel_data = value - class ExpanderMessage(object): """ Represents a message from a zone or relay expansion module. @@ -615,11 +353,11 @@ class ExpanderMessage(object): """ Constructor """ - self._type = None - self._address = None - self._channel = None - self._value = None - self._raw = None + self.type = None + self.address = None + self.channel = None + self.value = None + self.raw = None if data is not None: self._parse_message(data) @@ -653,76 +391,6 @@ class ExpanderMessage(object): elif header == '!REL': self.type = ExpanderMessage.RELAY - @property - def address(self): - """ - The relay address from which the message originated. - """ - return self._address - - @address.setter - def address(self, value): - """ - Sets the relay address from which the message originated. - """ - self._address = value - - @property - def channel(self): - """ - The zone expander channel from which the message originated. - """ - return self._channel - - @channel.setter - def channel(self, value): - """ - Sets the zone expander channel from which the message originated. - """ - self._channel = value - - @property - def value(self): - """ - The value associated with the message. - """ - return self._value - - @value.setter - def value(self, value): - """ - Sets the value associated with the message. - """ - self._value = value - - @property - def raw(self): - """ - The raw message from the expander device. - """ - return self._raw - - @raw.setter - def raw(self, value): - """ - Sets the raw message from the expander device. - """ - self._value = value - - @property - def type(self): - """ - The type of expander associated with this message. - """ - return self._type - - @type.setter - def type(self, value): - """ - Sets the type of expander associated with this message. - """ - self._type = value - class RFMessage(object): """ Represents a message from an RF receiver. @@ -731,9 +399,9 @@ class RFMessage(object): """ Constructor """ - self._raw = None - self._serial_number = None - self._value = None + self.raw = None + self.serial_number = None + self.value = None if data is not None: self._parse_message(data) @@ -751,43 +419,4 @@ class RFMessage(object): self.raw = data _, values = data.split(':') - self.serial_number, self.value = values.split(',') - - @property - def serial_number(self): - """ - The serial number for the RF receiver. - """ - return self._serial_number - - @serial_number.setter - def serial_number(self, value): - self._serial_number = value - - @property - def value(self): - """ - The value of the RF message. - """ - return self._value - - @value.setter - def value(self, value): - """ - Sets the value of the RF message. - """ - self._value = value - - @property - def raw(self): - """ - The raw message from the RF receiver. - """ - return self._raw - - @raw.setter - def raw(self, value): - """ - Sets the raw message from the RF receiver. - """ - self._raw = value + self.serial_number, self.value = values.split(',') \ No newline at end of file From 716927aefb2153c7d96e3586c8c85b2f8f7b2606 Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Wed, 5 Jun 2013 20:52:08 -0700 Subject: [PATCH 05/30] Fixed a couple issues so the previous rework will function. Test code. --- pyad2usb/devices.py | 4 +++- pyftdi | 2 +- test.py | 6 +++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/pyad2usb/devices.py b/pyad2usb/devices.py index b9d2b10..119ae1b 100644 --- a/pyad2usb/devices.py +++ b/pyad2usb/devices.py @@ -31,7 +31,7 @@ class Device(object): self._interface = None self._device = None self._running = False - self._read_thread = ReadThread(self) # NOTE: not sure this is going to work.. + self._read_thread = Device.ReadThread(self) # NOTE: not sure this is going to work.. def __del__(self): pass @@ -432,6 +432,8 @@ class SocketDevice(Device): """ Constructor """ + Device.__init__(self) + self._interface = interface self._host, self._port = interface diff --git a/pyftdi b/pyftdi index e58079b..0c3e671 120000 --- a/pyftdi +++ b/pyftdi @@ -1 +1 @@ -../../pyftdi/pyftdi/ \ No newline at end of file +../pyftdi/pyftdi \ No newline at end of file diff --git a/test.py b/test.py index 038cbeb..8ed297d 100755 --- a/test.py +++ b/test.py @@ -199,7 +199,7 @@ def test_factory_watcher(): overseer.close() def test_socket(): - dev = pyad2usb.ad2usb.devices.SocketDevice(interface=("localhost", 10000)) + dev = pyad2usb.ad2usb.devices.SocketDevice(interface=("singularity.corp.nutech.com", 10000)) a2u = pyad2usb.ad2usb.AD2USB(dev) a2u.on_open += handle_open @@ -281,7 +281,7 @@ try: signal.signal(signal.SIGINT, signal_handler) #test_serial() - upload_serial() + #upload_serial() #test_usb() #test_usb_serial() @@ -290,7 +290,7 @@ try: #upload_usb() #upload_usb_serial() - #test_socket() + test_socket() #upload_socket() #test_no_read_thread() From 7b63a8ddc80c20c4e21f8af99ef07874d5edefc1 Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Wed, 5 Jun 2013 20:56:49 -0700 Subject: [PATCH 06/30] Moved pyftdi to a submodule. --- .gitmodules | 3 +++ libs/pyftdi | 1 + pyftdi | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 .gitmodules create mode 160000 libs/pyftdi diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..e4f16b5 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "libs/pyftdi"] + path = libs/pyftdi + url = git@git.corp.nutech.com:nutech/pyftdi diff --git a/libs/pyftdi b/libs/pyftdi new file mode 160000 index 0000000..b1a3412 --- /dev/null +++ b/libs/pyftdi @@ -0,0 +1 @@ +Subproject commit b1a341240b29750d6448ac452c611c09c238e5d6 diff --git a/pyftdi b/pyftdi index 0c3e671..356cfd1 120000 --- a/pyftdi +++ b/pyftdi @@ -1 +1 @@ -../pyftdi/pyftdi \ No newline at end of file +libs/pyftdi/pyftdi/ \ No newline at end of file From e5689917358d16a30c208e3a4729923f150ff951 Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Wed, 5 Jun 2013 21:20:45 -0700 Subject: [PATCH 07/30] Added boot event and reboot method. --- pyad2usb/ad2usb.py | 9 +++++++++ test.py | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/pyad2usb/ad2usb.py b/pyad2usb/ad2usb.py index 2ef526c..3dbde7a 100644 --- a/pyad2usb/ad2usb.py +++ b/pyad2usb/ad2usb.py @@ -154,6 +154,7 @@ class AD2USB(object): on_power_changed = event.Event('Called when panel power switches between AC and DC.') on_alarm = event.Event('Called when the alarm is triggered.') on_bypass = event.Event('Called when a zone is bypassed.') + on_boot = event.Event('Called when the device finishes bootings.') # Mid-level Events on_message = event.Event('Called when a message has been received from the device.') @@ -189,6 +190,12 @@ class AD2USB(object): self._device.close() self._device = None + def reboot(self): + """ + Reboots the device. + """ + self._device.write('=') + @property def id(self): return self._device.id @@ -224,6 +231,8 @@ class AD2USB(object): msg = ExpanderMessage(data) elif header == '!RFX': msg = RFMessage(data) + elif data.startswith('!Ready'): + self.on_boot() return msg diff --git a/test.py b/test.py index 8ed297d..66fcbde 100755 --- a/test.py +++ b/test.py @@ -71,6 +71,9 @@ def handle_firmware(stage): elif stage == pyad2usb.ad2usb.util.Firmware.STAGE_DONE: print "\r\nDone!" +def handle_boot(sender, args): + print 'boot', args + def upload_usb(): dev = pyad2usb.ad2usb.devices.USBDevice() @@ -211,8 +214,10 @@ def test_socket(): a2u.on_power_changed += handle_power_changed a2u.on_alarm += handle_alarm_bell a2u.on_bypass += handle_bypass + a2u.on_boot += handle_boot a2u.open() + a2u.reboot() print dev._id From 56af5b083d058575772fc8712b40959913d6b251 Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Wed, 5 Jun 2013 21:47:01 -0700 Subject: [PATCH 08/30] Added LRRMessage. --- pyad2usb/ad2usb.py | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/pyad2usb/ad2usb.py b/pyad2usb/ad2usb.py index 3dbde7a..494de9e 100644 --- a/pyad2usb/ad2usb.py +++ b/pyad2usb/ad2usb.py @@ -231,6 +231,8 @@ class AD2USB(object): msg = ExpanderMessage(data) elif header == '!RFX': msg = RFMessage(data) + elif header == '!LRR': + msg = LRRMessage(data) elif data.startswith('!Ready'): self.on_boot() @@ -428,4 +430,35 @@ class RFMessage(object): self.raw = data _, values = data.split(':') - self.serial_number, self.value = values.split(',') \ No newline at end of file + self.serial_number, self.value = values.split(',') + +class LRRMessage(object): + """ + Represent a message from a Long Range Radio. + """ + def __init__(self, data=None): + """ + Constructor + """ + self.raw = None + self._event_data = None + self._partition = None + self._event_type = None + + if data is not None: + self._parse_message(data) + + def __str__(self): + """ + String conversion operator. + """ + return 'lrr > {0} @ {1} -- {2}'.format() + + def _parse_message(self, data): + """ + Parses the raw message from the device. + """ + self.raw = data + + _, values = data.split(':') + self._event_data, self._partition, self._event_type = values.split(',') \ No newline at end of file From 6ee5232c80b6649f43a7ee5b98fe26866bf6fda0 Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Thu, 6 Jun 2013 21:58:49 -0700 Subject: [PATCH 09/30] Added config retrieval and F-key constants. --- pyad2usb/ad2usb.py | 32 ++++++++++++++++++++++++++++++++ test.py | 8 +++++++- 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/pyad2usb/ad2usb.py b/pyad2usb/ad2usb.py index 494de9e..6e2eb54 100644 --- a/pyad2usb/ad2usb.py +++ b/pyad2usb/ad2usb.py @@ -155,6 +155,7 @@ class AD2USB(object): on_alarm = event.Event('Called when the alarm is triggered.') on_bypass = event.Event('Called when a zone is bypassed.') on_boot = event.Event('Called when the device finishes bootings.') + on_config_received = event.Event('Called when the device receives its configuration.') # Mid-level Events on_message = event.Event('Called when a message has been received from the device.') @@ -165,6 +166,12 @@ class AD2USB(object): on_read = event.Event('Called when a line has been read from the device.') on_write = event.Event('Called when data has been written to the device.') + # Constants + F1 = str(1) + str(1) + str(1) + F2 = str(2) + str(2) + str(2) + F3 = str(3) + str(3) + str(3) + F4 = str(4) + str(4) + str(4) + def __init__(self, device): """ Constructor @@ -174,6 +181,8 @@ class AD2USB(object): self._alarm_status = None self._bypass_status = None + self._settings = {} + self._address_mask = 0xFF80 # TEMP def open(self, baudrate=None, interface=None, index=None, no_reader_thread=False): @@ -190,6 +199,18 @@ class AD2USB(object): self._device.close() self._device = None + def get_config(self): + """ + Retrieves the configuration from the device. + """ + self._device.write("C\r") + + def set_config(self, settings): + """ + + """ + pass + def reboot(self): """ Reboots the device. @@ -235,9 +256,20 @@ class AD2USB(object): msg = LRRMessage(data) elif data.startswith('!Ready'): self.on_boot() + elif data.startswith('!CONFIG'): + self._handle_config(data) return msg + def _handle_config(self, data): + _, config_string = data.split('>') + for setting in config_string.split('&'): + k, v = setting.split('=') + + self._settings[k] = v + + self.on_config_received(self._settings) + def _update_internal_states(self, message): if message.ac_power != self._power_status: self._power_status, old_status = message.ac_power, self._power_status diff --git a/test.py b/test.py index 66fcbde..29725d7 100755 --- a/test.py +++ b/test.py @@ -74,6 +74,9 @@ def handle_firmware(stage): def handle_boot(sender, args): print 'boot', args +def handle_config(sender, args): + print 'config', args + def upload_usb(): dev = pyad2usb.ad2usb.devices.USBDevice() @@ -215,9 +218,12 @@ def test_socket(): a2u.on_alarm += handle_alarm_bell a2u.on_bypass += handle_bypass a2u.on_boot += handle_boot + a2u.on_config_received += handle_config a2u.open() - a2u.reboot() + #a2u.reboot() + time.sleep(2) + a2u.get_config() print dev._id From 9ba4d6e9d76e41f898eefdde20d24ae184b152e6 Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Thu, 6 Jun 2013 22:04:19 -0700 Subject: [PATCH 10/30] Corrected F-keys, though its still untested. --- pyad2usb/ad2usb.py | 8 ++++---- test.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pyad2usb/ad2usb.py b/pyad2usb/ad2usb.py index 6e2eb54..c69c336 100644 --- a/pyad2usb/ad2usb.py +++ b/pyad2usb/ad2usb.py @@ -167,10 +167,10 @@ class AD2USB(object): on_write = event.Event('Called when data has been written to the device.') # Constants - F1 = str(1) + str(1) + str(1) - F2 = str(2) + str(2) + str(2) - F3 = str(3) + str(3) + str(3) - F4 = str(4) + str(4) + str(4) + F1 = unichr(1) + unichr(1) + unichr(1) + F2 = unichr(2) + unichr(2) + unichr(2) + F3 = unichr(3) + unichr(3) + unichr(3) + F4 = unichr(4) + unichr(4) + unichr(4) def __init__(self, device): """ diff --git a/test.py b/test.py index 29725d7..4a7ccd7 100755 --- a/test.py +++ b/test.py @@ -222,8 +222,8 @@ def test_socket(): a2u.open() #a2u.reboot() - time.sleep(2) a2u.get_config() + print pyad2usb.ad2usb.AD2USB.F1 print dev._id From effe9650ce5ba9be609981d534765572cc480d0a Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Sat, 8 Jun 2013 14:55:09 -0700 Subject: [PATCH 11/30] Fixed __all__. --- pyad2usb/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyad2usb/__init__.py b/pyad2usb/__init__.py index 08682c4..6937a83 100644 --- a/pyad2usb/__init__.py +++ b/pyad2usb/__init__.py @@ -2,4 +2,4 @@ The PyAD2USB module. """ -__all__ = ['Overseer', 'AD2USB', 'USBDevice', 'SerialDevice', 'Firmware'] +__all__ = ['ad2usb', 'devices', 'util'] From b35092546c9b314fe19eb5ae412682cc59f36680 Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Sat, 8 Jun 2013 14:55:38 -0700 Subject: [PATCH 12/30] First go at adding sphinx docs. --- docs/Makefile | 177 ++++ docs/_build/doctrees/environment.pickle | Bin 0 -> 63006 bytes docs/_build/doctrees/index.doctree | Bin 0 -> 5484 bytes docs/_build/doctrees/modules.doctree | Bin 0 -> 2798 bytes docs/_build/doctrees/pyad2usb.doctree | Bin 0 -> 149781 bytes docs/_build/doctrees/pyad2usb.event.doctree | Bin 0 -> 15916 bytes docs/_build/html/.buildinfo | 4 + docs/_build/html/_modules/index.html | 93 ++ .../_build/html/_modules/pyad2usb/ad2usb.html | 588 +++++++++++++ .../html/_modules/pyad2usb/devices.html | 652 ++++++++++++++ .../html/_modules/pyad2usb/event/event.html | 163 ++++ docs/_build/html/_modules/pyad2usb/util.html | 230 +++++ docs/_build/html/_sources/index.txt | 23 + docs/_build/html/_sources/modules.txt | 7 + docs/_build/html/_sources/pyad2usb.event.txt | 19 + docs/_build/html/_sources/pyad2usb.txt | 42 + docs/_build/html/_static/ajax-loader.gif | Bin 0 -> 673 bytes docs/_build/html/_static/basic.css | 540 ++++++++++++ docs/_build/html/_static/comment-bright.png | Bin 0 -> 3500 bytes docs/_build/html/_static/comment-close.png | Bin 0 -> 3578 bytes docs/_build/html/_static/comment.png | Bin 0 -> 3445 bytes docs/_build/html/_static/default.css | 256 ++++++ docs/_build/html/_static/doctools.js | 235 +++++ docs/_build/html/_static/down-pressed.png | Bin 0 -> 368 bytes docs/_build/html/_static/down.png | Bin 0 -> 363 bytes docs/_build/html/_static/file.png | Bin 0 -> 392 bytes docs/_build/html/_static/jquery.js | 4 + docs/_build/html/_static/minus.png | Bin 0 -> 199 bytes docs/_build/html/_static/plus.png | Bin 0 -> 199 bytes docs/_build/html/_static/pygments.css | 62 ++ docs/_build/html/_static/searchtools.js | 622 ++++++++++++++ docs/_build/html/_static/sidebar.js | 159 ++++ docs/_build/html/_static/underscore.js | 31 + docs/_build/html/_static/up-pressed.png | Bin 0 -> 372 bytes docs/_build/html/_static/up.png | Bin 0 -> 363 bytes docs/_build/html/_static/websupport.js | 808 ++++++++++++++++++ docs/_build/html/genindex.html | 683 +++++++++++++++ docs/_build/html/index.html | 142 +++ docs/_build/html/modules.html | 115 +++ docs/_build/html/objects.inv | Bin 0 -> 1022 bytes docs/_build/html/py-modindex.html | 139 +++ docs/_build/html/pyad2usb.event.html | 159 ++++ docs/_build/html/pyad2usb.html | 691 +++++++++++++++ docs/_build/html/search.html | 105 +++ docs/_build/html/searchindex.js | 1 + docs/conf.py | 306 +++++++ docs/index.rst | 23 + docs/make.bat | 242 ++++++ docs/modules.rst | 7 + docs/pyad2usb.event.rst | 19 + docs/pyad2usb.rst | 42 + 51 files changed, 7389 insertions(+) create mode 100644 docs/Makefile create mode 100644 docs/_build/doctrees/environment.pickle create mode 100644 docs/_build/doctrees/index.doctree create mode 100644 docs/_build/doctrees/modules.doctree create mode 100644 docs/_build/doctrees/pyad2usb.doctree create mode 100644 docs/_build/doctrees/pyad2usb.event.doctree create mode 100644 docs/_build/html/.buildinfo create mode 100644 docs/_build/html/_modules/index.html create mode 100644 docs/_build/html/_modules/pyad2usb/ad2usb.html create mode 100644 docs/_build/html/_modules/pyad2usb/devices.html create mode 100644 docs/_build/html/_modules/pyad2usb/event/event.html create mode 100644 docs/_build/html/_modules/pyad2usb/util.html create mode 100644 docs/_build/html/_sources/index.txt create mode 100644 docs/_build/html/_sources/modules.txt create mode 100644 docs/_build/html/_sources/pyad2usb.event.txt create mode 100644 docs/_build/html/_sources/pyad2usb.txt create mode 100644 docs/_build/html/_static/ajax-loader.gif create mode 100644 docs/_build/html/_static/basic.css create mode 100644 docs/_build/html/_static/comment-bright.png create mode 100644 docs/_build/html/_static/comment-close.png create mode 100644 docs/_build/html/_static/comment.png create mode 100644 docs/_build/html/_static/default.css create mode 100644 docs/_build/html/_static/doctools.js create mode 100644 docs/_build/html/_static/down-pressed.png create mode 100644 docs/_build/html/_static/down.png create mode 100644 docs/_build/html/_static/file.png create mode 100644 docs/_build/html/_static/jquery.js create mode 100644 docs/_build/html/_static/minus.png create mode 100644 docs/_build/html/_static/plus.png create mode 100644 docs/_build/html/_static/pygments.css create mode 100644 docs/_build/html/_static/searchtools.js create mode 100644 docs/_build/html/_static/sidebar.js create mode 100644 docs/_build/html/_static/underscore.js create mode 100644 docs/_build/html/_static/up-pressed.png create mode 100644 docs/_build/html/_static/up.png create mode 100644 docs/_build/html/_static/websupport.js create mode 100644 docs/_build/html/genindex.html create mode 100644 docs/_build/html/index.html create mode 100644 docs/_build/html/modules.html create mode 100644 docs/_build/html/objects.inv create mode 100644 docs/_build/html/py-modindex.html create mode 100644 docs/_build/html/pyad2usb.event.html create mode 100644 docs/_build/html/pyad2usb.html create mode 100644 docs/_build/html/search.html create mode 100644 docs/_build/html/searchindex.js create mode 100644 docs/conf.py create mode 100644 docs/index.rst create mode 100644 docs/make.bat create mode 100644 docs/modules.rst create mode 100644 docs/pyad2usb.event.rst create mode 100644 docs/pyad2usb.rst diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..b2cad44 --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,177 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = _build + +# User-friendly check for sphinx-build +ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) +$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) +endif + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext + +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " xml to make Docutils-native XML files" + @echo " pseudoxml to make pseudoxml-XML files for display purposes" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +clean: + rm -rf $(BUILDDIR)/* + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/pyad2usb.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/pyad2usb.qhc" + +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/pyad2usb" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/pyad2usb" + @echo "# devhelp" + +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +latexpdfja: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through platex and dvipdfmx..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." + +xml: + $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml + @echo + @echo "Build finished. The XML files are in $(BUILDDIR)/xml." + +pseudoxml: + $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml + @echo + @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." diff --git a/docs/_build/doctrees/environment.pickle b/docs/_build/doctrees/environment.pickle new file mode 100644 index 0000000000000000000000000000000000000000..b2d6160c75ca159e72ce1f34ce2dbc9913f7b0f1 GIT binary patch literal 63006 zcmeHw34C1FRkxMJc9g`~nx(DVj+e%x#2#C=v$=K~$C49g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doctree b/docs/_build/doctrees/index.doctree new file mode 100644 index 0000000000000000000000000000000000000000..60cc750d838f082cbb37d816a2de4d030ef4c82c GIT binary patch literal 5484 zcmds5d6*nU6;C#MPO`h%B?*KiqyvOZLS{D?7+3KEQCJ-hC|H!S(=%N=)uyL=URCuT zY72;9RuL5yPdrdj#9LH6P{jMd`@Zk{z7ITpRnxt@vswJ|x8JurUw8GZSHJgu@4c#5 zmv_|sxR&T3R3lOBb5$^}4Ib$Nt=xG9b)>Ya$oe9$!S!sDE9y+Ct2lA$iWMuSd02}Z z+|jYqob~*DiK^~UPCnh!K^$$P?()PiWP`{LYFs&9&KDn z^GQX$DfO{|rY9A58(b-`4%tG5R^(5H|KQkxGo5{V_U<1kToNZv&5In* z_nO+#B2ZSP17yvRYaY%T+GgQMCkze;QGK^lO|%neM~OHIeFvID4lIRQ9BD6zpo2RS zu5}LSxTYoNha5kUyrzRGKEk>|7^tC*qJwp3cAmJ@Es{575(PDcS%Ef96yb$Yfe0E^ zwOH#>Gd`NTWfWYfQFx!vj7X(v^Ho>SmXuDavL5Z#4WG1?^<<7FhZQ`nWdIuxE!$E$ z86KZ$gk!4dAyQ6Zy-mp#ms6ZhWvfgiY_G81s#iNKP0XE!7e8qlt%`P3pf~iC!gI00 zx>}<Kl=c+G32cSfC^jTj zFR3oIUzx~=qXO+k3hYa1e=go3P83@NxXUEyfB;`-6vd8;C|1O26|ucSXNn^Yg)@at+lZL^$0W%Z#OTA1q^w)5XV9obC(w`!YOTRuP?L(A=*L4S=*^ zxW6bJ`w|a;w;q_%gMdqz<;Irv7P7~yORp&kbT$k*C#44)L;8>*XCwcRS!#^VU4*u8 zeg-|nAb#j_i2HJ{od?A2y3Plz@su8BU>UvVEDOt2i#Un=0zDk4$|*ep@|N`6YrVM$ zJ<`Bn$GRafUwnzq-e%aIa_4itwDOi#7Y3zwS*Mo!*#joPdus?nDyL1 z^G1Q5ghkVoo@|^l2u))s^kawWJhEHLA-W9Mr?PnJo1aIQ8yHtC=gcB0ZgUEA_8Ta8J4rWppc zK+i3tK{tl6+tIVcr7iEnlxHuk_Po&)o(fcfo&zhcOX;~SD}eQRnM3ILMb>F7rR&AD z6FoqU#Y^V>1$G>zh#BcerF4t6=pZvLN?iHs@>;q}5Wa!X2YXh8rYZ_F8a zQ&C(mZf@h^&Fx&=WUP2g#zl^Z-U=?>meSjy(Q^ZBQ^Cu`zR zVX6Dyxr__v-TyA@{@YS|w^7!=R2jVo+HPG;$a|O3Hon1_@;*z*?J2$Ac*9J*Z80Gq zxFz0VS_S2Ut^kvqE(qfx6MPI4VS4|;jYx1tn z9LU(*R&7- zept~@0pmFIL$UPH$eNnXqnbHB{H)B@$jKT+(a|O{q@S}*LhI((=%|ikwA}&MlOwUL zj|$xgN9h-=4<4v-qndts1idhC8WV87iO@pRugYvd;bhWuv+hUHufZeEM2pb;hIN_a z%Pjqt^@mQg2YlIKUWfQhfSU<~ccNNOlB+NdKXs#no($@;)2g)8)wDYms6fY3 zcG=POwJ`P$yBr&H=;9!ZW){=%tXXo}I`O(l%1~YP<5yM2>&A8KnuZ3KXk?~$O&>o3$gAwdv7oH19$D8M#>>f#; zVBU(ydJ`cx8u3A#tu$JElY_Wo(DFo#;^2kz3demEh~0z%WU39n1($EOqia+HS5qz} zxTaEa3&zkvm{`kegggmjY-?5~rl+SznzLHOku4KGpBja*8kJj(6v{JhXl7gy)J2GY zEgdu58OBjvZZnUY+g;tBl=5VVh`ZT9PAGUjX=DY*lK6P;i% zTSL1rWU9P%W?rl1=@>01RknWVhGXx?OB|N8c1iwWwj814s>`T~i+vTI( z@Z_i!+=E}S72DIcRPMEt&=uPDFu&Zw6$UOV%%xCYz85ID526*hAHU3;nsLn}58x%0 KXW%!fj{FzFhI;S- literal 0 HcmV?d00001 diff --git a/docs/_build/doctrees/modules.doctree b/docs/_build/doctrees/modules.doctree new file mode 100644 index 0000000000000000000000000000000000000000..00ae235d42b462b892c44c24222f619f48e5bad4 GIT binary patch literal 2798 zcmb7G_j@Eq5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WLyKDJYUOUCw z+HMlGjrSbcZ0p@bHrsixVC$^H_TK9x+QD0aEOzw1Mls1bw?|Iw8{=; zB;C!Ple4>5!xA3vZA==2CgIIxyV%3qn4I_Yj%9gG@E)cN6YXmIy}bKT3f@n_G_3tC zRQp@TwQq|+qlQrf809p8T0D!xV%xyp-Z`xGeZ0vOXp*-*3w2+6Ox$Gqfqy@{_1OO2 zp{$Q7-i^%CAiFv0RIib_o@N&{9N>M(j7;|~VwoT44Pd#=@V;hi$$8V!y$T0;eHk3= z?ZW!6^KRkWA>L`^d8qd-nH}cMVf`O&&myh23m=d0uA+bq-iaib>21uG(&%l=^k#WQ zCe-A83jw=wLt(t&&2-}TDYS_FaWPsYI0knN?48PfIW{gX4w{w?5_RSJh3;X=Yz5SM Xvo-G8+?>BZx4{d(0O8&>tM>l^97bT* literal 0 HcmV?d00001 diff --git a/docs/_build/doctrees/pyad2usb.event.doctree b/docs/_build/doctrees/pyad2usb.event.doctree new file mode 100644 index 0000000000000000000000000000000000000000..2233ef512d8ff166fd4e02d28d7dfa809dc9def5 GIT binary patch literal 15916 zcmc&*2Yehy)pt`nOLB>nYLm0U@hP#SG(zMQa7e{OXl4#nqMe+Bjrlo^%8tLUw&a(H*JuhDD1O zRcEvL6Kme&h`S5q!Sx*eeSWr_FS#_5&F6LJT)Gd$LX)g!b33!suI?I7A9GL~rV8Zh z?zwbt#A2qBua#WgGoD^|FdTGZE`8*JgnId0I<+80Xb!nEm0hmxovS&kyxOGa7koIb zQqJVvDNpwq-S6~Qv*fv%8Q1e*r>9p;=#{Bv4|}to@6Loo3B3w_UTyRt@H1t1dzBjH zTs`0{ayr2c?$m?xIJh|$oY04&>tRM8o>EMoAa}||kDQy=M{HfJ1{Jp-Y4lOju58^B zr!$bTrkO9fRjQQ>IRrvNuT7r-w~VUFj63S(D!xC;^`qgik0MaK=q?z3@_hY>>-OrS zjZRKFU4C|&BS)`ux;(40UhgEbzE6e8nh*ax(&$H}obG(B%5h6$CLP(u^y*a-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H){Tn)XAX`R(!Xl3}Q z5j)AFx1$B&e+cAND33#5e98oet#I;y-hsApr*QFsLi?wV7%rn#>-38ueJ0khc`d zQA+})*VhKcI8eLrs)g9QpOy?y{q6A@U@G+D7AyRQYE`Hq6Ym(;*hf-;mlBO(RC%M77gV z^QVSSrEl@?M8JwC(YGz9LODLj^c^PakuJkHSVG_B`xTjd!OKo!00Jl8DSdme&{UyC zVGn(e$#}+PCo{VXd0)}@QM0w%>2C~D`T-MmINQ#JNNWK;G|o%zT*50bQ26wJ1;5Z=~w)t9}bBJ%YCTa=Nx4h z3%BITVur!+RYta0!Lnb21XC{>d_zY+t43zMRp_mQ;IuqQ@jcn)onkO zZ7E)fJ0S6&P#F3%t^p9r!ACqp6epM*sp4Ox%|5yOmFu<~=;1{2cqF%Hf!8LSFI|q~ zLcR9QVM0Avb5=K;LAFWK-@w_>- + + + + + + + Overview: module code — pyad2usb documentation + + + + + + + + + + + +

+ +
+
+
+
+ +

All modules for which code is available

+ + +
+
+
+
+
+ + +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/_modules/pyad2usb/ad2usb.html b/docs/_build/html/_modules/pyad2usb/ad2usb.html new file mode 100644 index 0000000..98428a2 --- /dev/null +++ b/docs/_build/html/_modules/pyad2usb/ad2usb.html @@ -0,0 +1,588 @@ + + + + + + + + pyad2usb.ad2usb — pyad2usb documentation + + + + + + + + + + + + + + +
+
+
+
+ +

Source code for pyad2usb.ad2usb

+"""
+Provides the full AD2USB class and factory.
+"""
+
+import time
+import threading
+import re
+from .event import event
+from . import devices
+from . import util
+
+
[docs]class Overseer(object): + """ + Factory for creation of AD2USB devices as well as provide4s attach/detach events." + """ + + # Factory events + on_attached = event.Event('Called when an AD2USB device has been detected.') + on_detached = event.Event('Called when an AD2USB device has been removed.') + + __devices = [] + + @classmethod +
[docs] def find_all(cls): + """ + Returns all AD2USB devices located on the system. + """ + cls.__devices = devices.USBDevice.find_all() + + return cls.__devices +
+ @classmethod +
[docs] def devices(cls): + """ + Returns a cached list of AD2USB devices located on the system. + """ + return cls.__devices +
+ @classmethod +
[docs] def create(cls, device=None): + """ + Factory method that returns the requested AD2USB device, or the first device. + """ + cls.find_all() + + if len(cls.__devices) == 0: + raise util.NoDeviceError('No AD2USB devices present.') + + if device is None: + device = cls.__devices[0] + + vendor, product, sernum, ifcount, description = device + device = devices.USBDevice(serial=sernum, description=description) + + return AD2USB(device) +
+ def __init__(self, attached_event=None, detached_event=None): + """ + Constructor + """ + self._detect_thread = Overseer.DetectThread(self) + + if attached_event: + self.on_attached += attached_event + + if detached_event: + self.on_detached += detached_event + + Overseer.find_all() + + self.start() + +
[docs] def close(self): + """ + Clean up and shut down. + """ + self.stop() +
+
[docs] def start(self): + """ + Starts the detection thread, if not already running. + """ + if not self._detect_thread.is_alive(): + self._detect_thread.start() +
+
[docs] def stop(self): + """ + Stops the detection thread. + """ + self._detect_thread.stop() +
+
[docs] def get_device(self, device=None): + """ + Factory method that returns the requested AD2USB device, or the first device. + """ + return Overseer.create(device) + +
+
[docs] class DetectThread(threading.Thread): + """ + Thread that handles detection of added/removed devices. + """ + def __init__(self, overseer): + """ + Constructor + """ + threading.Thread.__init__(self) + + self._overseer = overseer + self._running = False + +
[docs] def stop(self): + """ + Stops the thread. + """ + self._running = False +
+
[docs] def run(self): + """ + The actual detection process. + """ + self._running = True + + last_devices = set() + + while self._running: + try: + Overseer.find_all() + + current_devices = set(Overseer.devices()) + new_devices = [d for d in current_devices if d not in last_devices] + removed_devices = [d for d in last_devices if d not in current_devices] + last_devices = current_devices + + for d in new_devices: + self._overseer.on_attached(d) + + for d in removed_devices: + self._overseer.on_detached(d) + + except util.CommError, err: + pass + + time.sleep(0.25) + +
+
[docs]class AD2USB(object): + """ + High-level wrapper around AD2USB/AD2SERIAL devices. + """ + + # High-level Events + on_status_changed = event.Event('Called when the panel status changes.') + on_power_changed = event.Event('Called when panel power switches between AC and DC.') + on_alarm = event.Event('Called when the alarm is triggered.') + on_bypass = event.Event('Called when a zone is bypassed.') + on_boot = event.Event('Called when the device finishes bootings.') + on_config_received = event.Event('Called when the device receives its configuration.') + + # Mid-level Events + on_message = event.Event('Called when a message has been received from the device.') + + # Low-level Events + on_open = event.Event('Called when the device has been opened.') + on_close = event.Event('Called when the device has been closed.') + on_read = event.Event('Called when a line has been read from the device.') + on_write = event.Event('Called when data has been written to the device.') + + # Constants + F1 = unichr(1) + unichr(1) + unichr(1) + F2 = unichr(2) + unichr(2) + unichr(2) + F3 = unichr(3) + unichr(3) + unichr(3) + F4 = unichr(4) + unichr(4) + unichr(4) + + def __init__(self, device): + """ + Constructor + """ + self._device = device + self._power_status = None + self._alarm_status = None + self._bypass_status = None + + self._settings = {} + + self._address_mask = 0xFF80 # TEMP + +
[docs] def open(self, baudrate=None, interface=None, index=None, no_reader_thread=False): + """ + Opens the device. + """ + self._wire_events() + self._device.open(baudrate=baudrate, interface=interface, index=index, no_reader_thread=no_reader_thread) +
+
[docs] def close(self): + """ + Closes the device. + """ + self._device.close() + self._device = None +
+
[docs] def get_config(self): + """ + Retrieves the configuration from the device. + """ + self._device.write("C\r") +
+
[docs] def set_config(self, settings): + """ + Sets configuration entries on the device. + """ + pass +
+
[docs] def reboot(self): + """ + Reboots the device. + """ + self._device.write('=') +
+ @property +
[docs] def id(self): + return self._device.id +
+ def _wire_events(self): + """ + Wires up the internal device events. + """ + self._device.on_open += self._on_open + self._device.on_close += self._on_close + self._device.on_read += self._on_read + self._device.on_write += self._on_write + + def _handle_message(self, data): + """ + Parses messages from the panel. + """ + if data is None: + return None + + msg = None + + if data[0] != '!': + msg = Message(data) + + if self._address_mask & msg.mask > 0: + self._update_internal_states(msg) + + else: # specialty messages + header = data[0:4] + + if header == '!EXP' or header == '!REL': + msg = ExpanderMessage(data) + elif header == '!RFX': + msg = RFMessage(data) + elif header == '!LRR': + msg = LRRMessage(data) + elif data.startswith('!Ready'): + self.on_boot() + elif data.startswith('!CONFIG'): + self._handle_config(data) + + return msg + + def _handle_config(self, data): + _, config_string = data.split('>') + for setting in config_string.split('&'): + k, v = setting.split('=') + + self._settings[k] = v + + self.on_config_received(self._settings) + + def _update_internal_states(self, message): + if message.ac_power != self._power_status: + self._power_status, old_status = message.ac_power, self._power_status + + if old_status is not None: + self.on_power_changed(self._power_status) + + if message.alarm_sounding != self._alarm_status: + self._alarm_status, old_status = message.alarm_sounding, self._alarm_status + + if old_status is not None: + self.on_alarm(self._alarm_status) + + if message.zone_bypassed != self._bypass_status: + self._bypass_status, old_status = message.zone_bypassed, self._bypass_status + + if old_status is not None: + self.on_bypass(self._bypass_status) + + def _on_open(self, sender, args): + """ + Internal handler for opening the device. + """ + self.on_open(args) + + def _on_close(self, sender, args): + """ + Internal handler for closing the device. + """ + self.on_close(args) + + def _on_read(self, sender, args): + """ + Internal handler for reading from the device. + """ + self.on_read(args) + + msg = self._handle_message(args) + if msg: + self.on_message(msg) + + def _on_write(self, sender, args): + """ + Internal handler for writing to the device. + """ + self.on_write(args) +
+
[docs]class Message(object): + """ + Represents a message from the alarm panel. + """ + + def __init__(self, data=None): + """ + Constructor + """ + self.ready = False + self.armed_away = False + self.armed_home = False + self.backlight_on = False + self.programming_mode = False + self.beeps = -1 + self.zone_bypassed = False + self.ac_power = False + self.chime_on = False + self.alarm_event_occurred = False + self.alarm_sounding = False + self.numeric_code = "" + self.text = "" + self.cursor_location = -1 + self.data = "" + self.mask = "" + self.bitfield = "" + self.panel_data = "" + + self._regex = re.compile('("(?:[^"]|"")*"|[^,]*),("(?:[^"]|"")*"|[^,]*),("(?:[^"]|"")*"|[^,]*),("(?:[^"]|"")*"|[^,]*)') + + if data is not None: + self._parse_message(data) + + def _parse_message(self, data): + """ + Parse the message from the device. + """ + m = self._regex.match(data) + + if m is None: + raise util.InvalidMessageError('Received invalid message: {0}'.format(data)) + + self.bitfield, self.numeric_code, self.panel_data, alpha = m.group(1, 2, 3, 4) + self.mask = int(self.panel_data[3:3+8], 16) + + self.data = data + self.ready = not self.bitfield[1:2] == "0" + self.armed_away = not self.bitfield[2:3] == "0" + self.armed_home = not self.bitfield[3:4] == "0" + self.backlight_on = not self.bitfield[4:5] == "0" + self.programming_mode = not self.bitfield[5:6] == "0" + self.beeps = int(self.bitfield[6:7], 16) + self.zone_bypassed = not self.bitfield[7:8] == "0" + self.ac_power = not self.bitfield[8:9] == "0" + self.chime_on = not self.bitfield[9:10] == "0" + self.alarm_event_occurred = not self.bitfield[10:11] == "0" + self.alarm_sounding = not self.bitfield[11:12] == "0" + self.text = alpha.strip('"') + + if int(self.panel_data[19:21], 16) & 0x01 > 0: + self.cursor_location = int(self.bitfield[21:23], 16) # Alpha character index that the cursor is on. + + def __str__(self): + """ + String conversion operator. + """ + return 'msg > {0:0<9} [{1}{2}{3}] -- ({4}) {5}'.format(hex(self.mask), 1 if self.ready else 0, 1 if self.armed_away else 0, 1 if self.armed_home else 0, self.numeric_code, self.text) +
+
[docs]class ExpanderMessage(object): + """ + Represents a message from a zone or relay expansion module. + """ + ZONE = 0 + RELAY = 1 + + def __init__(self, data=None): + """ + Constructor + """ + self.type = None + self.address = None + self.channel = None + self.value = None + self.raw = None + + if data is not None: + self._parse_message(data) + + def __str__(self): + """ + String conversion operator. + """ + expander_type = 'UNKWN' + if self.type == ExpanderMessage.ZONE: + expander_type = 'ZONE' + elif self.type == ExpanderMessage.RELAY: + expander_type = 'RELAY' + + return 'exp > [{0: <5}] {1}/{2} -- {3}'.format(expander_type, self.address, self.channel, self.value) + + def _parse_message(self, data): + """ + Parse the raw message from the device. + """ + header, values = data.split(':') + address, channel, value = values.split(',') + + self.raw = data + self.address = address + self.channel = channel + self.value = value + + if header == '!EXP': + self.type = ExpanderMessage.ZONE + elif header == '!REL': + self.type = ExpanderMessage.RELAY +
+
[docs]class RFMessage(object): + """ + Represents a message from an RF receiver. + """ + def __init__(self, data=None): + """ + Constructor + """ + self.raw = None + self.serial_number = None + self.value = None + + if data is not None: + self._parse_message(data) + + def __str__(self): + """ + String conversion operator. + """ + return 'rf > {0}: {1}'.format(self.serial_number, self.value) + + def _parse_message(self, data): + """ + Parses the raw message from the device. + """ + self.raw = data + + _, values = data.split(':') + self.serial_number, self.value = values.split(',') +
+
[docs]class LRRMessage(object): + """ + Represent a message from a Long Range Radio. + """ + def __init__(self, data=None): + """ + Constructor + """ + self.raw = None + self._event_data = None + self._partition = None + self._event_type = None + + if data is not None: + self._parse_message(data) + + def __str__(self): + """ + String conversion operator. + """ + return 'lrr > {0} @ {1} -- {2}'.format() + + def _parse_message(self, data): + """ + Parses the raw message from the device. + """ + self.raw = data + + _, values = data.split(':') + self._event_data, self._partition, self._event_type = values.split(',')
+
+ +
+
+
+
+
+ + +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/_modules/pyad2usb/devices.html b/docs/_build/html/_modules/pyad2usb/devices.html new file mode 100644 index 0000000..e7d8b00 --- /dev/null +++ b/docs/_build/html/_modules/pyad2usb/devices.html @@ -0,0 +1,652 @@ + + + + + + + + pyad2usb.devices — pyad2usb documentation + + + + + + + + + + + + + + +
+
+
+
+ +

Source code for pyad2usb.devices

+"""
+Contains different types of devices belonging to the AD2USB family.
+"""
+
+import usb.core
+import usb.util
+import time
+import threading
+import serial
+import serial.tools.list_ports
+import socket
+from pyftdi.pyftdi.ftdi import *
+from pyftdi.pyftdi.usbtools import *
+from . import util
+from .event import event
+
+
[docs]class Device(object): + """ + Generic parent device to all AD2USB products. + """ + + # Generic device events + on_open = event.Event('Called when the device has been opened') + on_close = event.Event('Called when the device has been closed') + on_read = event.Event('Called when a line has been read from the device') + on_write = event.Event('Called when data has been written to the device') + + def __init__(self): + self._id = '' + self._buffer = '' + self._interface = None + self._device = None + self._running = False + self._read_thread = Device.ReadThread(self) # NOTE: not sure this is going to work.. + + def __del__(self): + pass + + @property + def id(self): + return self._id + + @id.setter +
[docs] def id(self, value): + self._id = value +
+
[docs] def is_reader_alive(self): + """ + Indicates whether or not the reader thread is alive. + """ + return self._read_thread.is_alive() +
+
[docs] def stop_reader(self): + """ + Stops the reader thread. + """ + self._read_thread.stop() +
+
[docs] class ReadThread(threading.Thread): + """ + Reader thread which processes messages from the device. + """ + + READ_TIMEOUT = 10 + + def __init__(self, device): + """ + Constructor + """ + threading.Thread.__init__(self) + self._device = device + self._running = False + +
[docs] def stop(self): + """ + Stops the running thread. + """ + self._running = False +
+
[docs] def run(self): + """ + The actual read process. + """ + self._running = True + + while self._running: + try: + self._device.read_line(timeout=self.READ_TIMEOUT) + except util.TimeoutError, err: + pass + + time.sleep(0.01) +
+
[docs]class USBDevice(Device): + """ + AD2USB device exposed with PyFTDI's interface. + """ + + # Constants + FTDI_VENDOR_ID = 0x0403 + FTDI_PRODUCT_ID = 0x6001 + BAUDRATE = 115200 + + @staticmethod +
[docs] def find_all(): + """ + Returns all FTDI devices matching our vendor and product IDs. + """ + devices = [] + + try: + devices = Ftdi.find_all([(USBDevice.FTDI_VENDOR_ID, USBDevice.FTDI_PRODUCT_ID)], nocache=True) + except (usb.core.USBError, FtdiError), err: + raise util.CommError('Error enumerating AD2USB devices: {0}'.format(str(err))) + + return devices +
+ def __init__(self, vid=FTDI_VENDOR_ID, pid=FTDI_PRODUCT_ID, serial=None, description=None, interface=0): + """ + Constructor + """ + Device.__init__(self) + + self._device = Ftdi() + self._interface = interface + self._vendor_id = vid + self._product_id = pid + self._serial_number = serial + self._description = description + +
[docs] def open(self, baudrate=BAUDRATE, interface=None, index=0, no_reader_thread=False): + """ + Opens the device. + """ + # Set up defaults + if baudrate is None: + baudrate = USBDevice.BAUDRATE + + if self._interface is None and interface is None: + self._interface = 0 + + if interface is not None: + self._interface = interface + + if index is None: + index = 0 + + # Open the device and start up the thread. + try: + self._device.open(self._vendor_id, + self._product_id, + self._interface, + index, + self._serial_number, + self._description) + + self._device.set_baudrate(baudrate) + + self._id = 'USB {0}:{1}'.format(self._device.usb_dev.bus, self._device.usb_dev.address) + except (usb.core.USBError, FtdiError), err: + self.on_close() + + raise util.NoDeviceError('Error opening AD2USB device: {0}'.format(str(err))) + else: + self._running = True + if not no_reader_thread: + self._read_thread.start() + + self.on_open((self._serial_number, self._description)) +
+
[docs] def close(self): + """ + Closes the device. + """ + try: + self._running = False + self._read_thread.stop() + + self._device.close() + + # HACK: Probably should fork pyftdi and make this call in .close(). + self._device.usb_dev.attach_kernel_driver(self._interface) + except (FtdiError, usb.core.USBError): + pass + + self.on_close() +
+
[docs] def write(self, data): + """ + Writes data to the device. + """ + try: + self._device.write_data(data) + + self.on_write(data) + except FtdiError, err: + raise util.CommError('Error writing to AD2USB device.') +
+
[docs] def read(self): + """ + Reads a single character from the device. + """ + return self._device.read_data(1) +
+
[docs] def read_line(self, timeout=0.0): + """ + Reads a line from the device. + """ + def timeout_event(): + timeout_event.reading = False + + timeout_event.reading = True + + got_line = False + ret = None + + timer = None + if timeout > 0: + timer = threading.Timer(timeout, timeout_event) + timer.start() + + try: + while timeout_event.reading: + buf = self._device.read_data(1) + + if buf != '': + self._buffer += buf + + if buf == "\n": + if len(self._buffer) > 1: + if self._buffer[-2] == "\r": + self._buffer = self._buffer[:-2] + + # ignore if we just got \r\n with nothing else in the buffer. + if len(self._buffer) != 0: + got_line = True + break + else: + self._buffer = self._buffer[:-1] + + time.sleep(0.001) + + except (usb.core.USBError, FtdiError), err: + timer.cancel() + + raise util.CommError('Error reading from AD2USB device: {0}'.format(str(err))) + else: + if got_line: + ret = self._buffer + self._buffer = '' + + self.on_read(ret) + + if timer: + if timer.is_alive(): + timer.cancel() + else: + raise util.TimeoutError('Timeout while waiting for line terminator.') + + return ret + +
+
[docs]class SerialDevice(Device): + """ + AD2USB or AD2SERIAL device exposed with the pyserial interface. + """ + + # Constants + BAUDRATE = 19200 + + @staticmethod +
[docs] def find_all(pattern=None): + """ + Returns all serial ports present. + """ + devices = [] + + try: + if pattern: + devices = serial.tools.list_ports.grep(pattern) + else: + devices = serial.tools.list_ports.comports() + except Exception, err: + raise util.CommError('Error enumerating AD2SERIAL devices: {0}'.format(str(err))) + + return devices +
+ def __init__(self, interface=None): + """ + Constructor + """ + Device.__init__(self) + + self._interface = interface + self._id = interface + self._device = serial.Serial(timeout=0, writeTimeout=0) # Timeout = non-blocking to match pyftdi. + +
[docs] def open(self, baudrate=BAUDRATE, interface=None, index=None, no_reader_thread=False): + """ + Opens the device. + """ + # Set up the defaults + if baudrate is None: + baudrate = SerialDevice.BAUDRATE + + if self._interface is None and interface is None: + raise util.NoDeviceError('No AD2SERIAL device interface specified.') + + if interface is not None: + self._interface = interface + + self._device.port = self._interface + + # Open the device and start up the reader thread. + try: + self._device.open() + self._device.baudrate = baudrate # NOTE: Setting the baudrate before opening the + # port caused issues with Moschip 7840/7820 + # USB Serial Driver converter. (mos7840) + # + # Moving it to this point seems to resolve + # all issues with it. + + except (serial.SerialException, ValueError), err: + self.on_close() + + raise util.NoDeviceError('Error opening AD2SERIAL device on port {0}.'.format(interface)) + else: + self._running = True + self.on_open(('N/A', "AD2SERIAL")) + + if not no_reader_thread: + self._read_thread.start() +
+
[docs] def close(self): + """ + Closes the device. + """ + try: + self._running = False + self._read_thread.stop() + + self._device.close() + except Exception, err: + pass + + self.on_close() +
+
[docs] def write(self, data): + """ + Writes data to the device. + """ + try: + self._device.write(data) + except serial.SerialTimeoutException, err: + pass + except serial.SerialException, err: + raise util.CommError('Error writing to serial device.') + else: + self.on_write(data) +
+
[docs] def read(self): + """ + Reads a single character from the device. + """ + return self._device.read(1) +
+
[docs] def read_line(self, timeout=0.0): + """ + Reads a line from the device. + """ + def timeout_event(): + timeout_event.reading = False + + timeout_event.reading = True + + got_line = False + ret = None + + timer = None + if timeout > 0: + timer = threading.Timer(timeout, timeout_event) + timer.start() + + try: + while timeout_event.reading: + buf = self._device.read(1) + + if buf != '' and buf != "\xff": # AD2SERIAL specifically apparently sends down \xFF on boot. + self._buffer += buf + + if buf == "\n": + if len(self._buffer) > 1: + if self._buffer[-2] == "\r": + self._buffer = self._buffer[:-2] + + # ignore if we just got \r\n with nothing else in the buffer. + if len(self._buffer) != 0: + got_line = True + break + else: + self._buffer = self._buffer[:-1] + + time.sleep(0.001) + + except (OSError, serial.SerialException), err: + timer.cancel() + + raise util.CommError('Error reading from AD2SERIAL device: {0}'.format(str(err))) + else: + if got_line: + ret = self._buffer + self._buffer = '' + + self.on_read(ret) + + if timer: + if timer.is_alive(): + timer.cancel() + else: + raise util.TimeoutError('Timeout while waiting for line terminator.') + + return ret +
+
[docs]class SocketDevice(Device): + """ + Device that supports communication with an AD2USB that is exposed via ser2sock or another + Serial to IP interface. + """ + + def __init__(self, interface=("localhost", 10000)): + """ + Constructor + """ + Device.__init__(self) + + self._interface = interface + self._host, self._port = interface + +
[docs] def open(self, baudrate=None, interface=None, index=0, no_reader_thread=False): + """ + Opens the device. + """ + if interface is not None: + self._interface = interface + self._host, self._port = interface + + try: + self._device = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + self._device.connect((self._host, self._port)) + + self._id = '{0}:{1}'.format(self._host, self._port) + + except socket.error, err: + self.on_close() + + raise util.NoDeviceError('Error opening AD2SOCKET device at {0}:{1}'.format(self._host, self._port)) + else: + self._running = True + + self.on_open(('N/A', "AD2SOCKET")) + + if not no_reader_thread: + self._read_thread.start() +
+
[docs] def close(self): + """ + Closes the device. + """ + self._running = False + + try: + self._read_thread.stop() + self._device.shutdown(socket.SHUT_RDWR) # Make sure that it closes immediately. + self._device.close() + except: + pass + + self.on_close() +
+
[docs] def write(self, data): + """ + Writes data to the device. + """ + data_sent = self._device.send(data) + + if data_sent == 0: + raise util.CommError('Error while sending data.') + else: + self.on_write(data) + + return data_sent +
+
[docs] def read(self): + """ + Reads a single character from the device. + """ + try: + data = self._device.recv(1) + except socket.error, err: + raise util.CommError('Error while reading from device: {0}'.format(str(err))) + + return data +
+
[docs] def read_line(self, timeout=0.0): + """ + Reads a line from the device. + """ + def timeout_event(): + timeout_event.reading = False + + timeout_event.reading = True + + got_line = False + ret = None + + timer = None + if timeout > 0: + timer = threading.Timer(timeout, timeout_event) + timer.start() + + try: + while timeout_event.reading: + buf = self._device.recv(1) + + if buf != '': + self._buffer += buf + + if buf == "\n": + if len(self._buffer) > 1: + if self._buffer[-2] == "\r": + self._buffer = self._buffer[:-2] + + # ignore if we just got \r\n with nothing else in the buffer. + if len(self._buffer) != 0: + got_line = True + break + else: + self._buffer = self._buffer[:-1] + + time.sleep(0.001) + + except socket.error, err: + timer.cancel() + + raise util.CommError('Error reading from Socket device: {0}'.format(str(err))) + else: + if got_line: + ret = self._buffer + self._buffer = '' + + self.on_read(ret) + + if timer: + if timer.is_alive(): + timer.cancel() + else: + raise util.TimeoutError('Timeout while waiting for line terminator.') + + return ret
+
+ +
+
+
+
+
+ + +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/_modules/pyad2usb/event/event.html b/docs/_build/html/_modules/pyad2usb/event/event.html new file mode 100644 index 0000000..a106fe7 --- /dev/null +++ b/docs/_build/html/_modules/pyad2usb/event/event.html @@ -0,0 +1,163 @@ + + + + + + + + pyad2usb.event.event — pyad2usb documentation + + + + + + + + + + + + + + +
+
+
+
+ +

Source code for pyad2usb.event.event

+# event.py (improved)
+
+
[docs]class Event(object): + + def __init__(self, doc=None): + self.__doc__ = doc + + def __get__(self, obj, objtype=None): + if obj is None: + return self + return EventHandler(self, obj) + + def __set__(self, obj, value): + pass + +
+
[docs]class EventHandler(object): + + def __init__(self, event, obj): + + self.event = event + self.obj = obj + + def _getfunctionlist(self): + + """(internal use) """ + + try: + eventhandler = self.obj.__eventhandler__ + except AttributeError: + eventhandler = self.obj.__eventhandler__ = {} + return eventhandler.setdefault(self.event, []) + +
[docs] def add(self, func): + + """Add new event handler function. + + Event handler function must be defined like func(sender, earg). + You can add handler also by using '+=' operator. + """ + + self._getfunctionlist().append(func) + return self +
+
[docs] def remove(self, func): + + """Remove existing event handler function. + + You can remove handler also by using '-=' operator. + """ + + self._getfunctionlist().remove(func) + return self +
+
[docs] def fire(self, earg=None): + + """Fire event and call all handler functions + + You can call EventHandler object itself like e(earg) instead of + e.fire(earg). + """ + + for func in self._getfunctionlist(): + if type(func) == EventHandler: + func.fire(earg) + else: + func(self.obj, earg) +
+ __iadd__ = add + __isub__ = remove + __call__ = fire
+
+ +
+
+
+
+
+ + +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/_modules/pyad2usb/util.html b/docs/_build/html/_modules/pyad2usb/util.html new file mode 100644 index 0000000..9afc543 --- /dev/null +++ b/docs/_build/html/_modules/pyad2usb/util.html @@ -0,0 +1,230 @@ + + + + + + + + pyad2usb.util — pyad2usb documentation + + + + + + + + + + + + + + +
+
+
+
+ +

Source code for pyad2usb.util

+"""
+Provides utility classes for the AD2USB devices.
+"""
+
+import ad2usb
+import time
+import traceback
+import threading
+
+
[docs]class NoDeviceError(Exception): + """ + No devices found. + """ + pass +
+
[docs]class CommError(Exception): + """ + There was an error communicating with the device. + """ + pass +
+
[docs]class TimeoutError(Exception): + """ + There was a timeout while trying to communicate with the device. + """ + pass +
+
[docs]class InvalidMessageError(Exception): + """ + The format of the panel message was invalid. + """ + pass +
+
[docs]class Firmware(object): + """ + Represents firmware for the AD2USB/AD2SERIAL devices. + """ + + # Constants + STAGE_START = 0 + STAGE_WAITING = 1 + STAGE_BOOT = 2 + STAGE_LOAD = 3 + STAGE_UPLOADING = 4 + STAGE_DONE = 5 + + @staticmethod +
[docs] def upload(dev, filename, progress_callback=None): + """ + Uploads firmware to an AD2USB/AD2SERIAL device. + """ + + def do_upload(): + """ + Perform the actual firmware upload to the device. + """ + with open(filename) as f: + for line in f: + line = line.rstrip() + + if line[0] == ':': + dev.write(line + "\r") + res = dev.read_line(timeout=10.0) + + if progress_callback is not None: + progress_callback(Firmware.STAGE_UPLOADING) + + time.sleep(0.05) + + def read_until(pattern, timeout=0.0): + """ + Read characters until a specific pattern is found or the timeout is hit. + """ + def timeout_event(): + timeout_event.reading = False + + timeout_event.reading = True + + timer = None + if timeout > 0: + timer = threading.Timer(timeout, timeout_event) + timer.start() + + buf = '' + position = 0 + + while timeout_event.reading: + try: + char = dev.read() + + if char is not None and char != '': + if char == pattern[position]: + position = position + 1 + if position == len(pattern): + break + else: + position = 0 + + except Exception, err: + pass + + if timer: + if timer.is_alive(): + timer.cancel() + else: + raise TimeoutError('Timeout while waiting for line terminator.') + + def stage_callback(stage): + if progress_callback is not None: + progress_callback(stage) + + if dev is None: + raise NoDeviceError('No device specified for firmware upload.') + + stage_callback(Firmware.STAGE_START) + + if dev.is_reader_alive(): + # Close the reader thread and wait for it to die, otherwise + # it interferes with our reading. + dev.stop_reader() + while dev._read_thread.is_alive(): + stage_callback(Firmware.STAGE_WAITING) + time.sleep(1) + + # Reboot the device and wait for the boot loader. + stage_callback(Firmware.STAGE_BOOT) + dev.write("=") + read_until('!boot', timeout=15.0) + + # Get ourselves into the boot loader and wait for indication + # that it's ready for the firmware upload. + stage_callback(Firmware.STAGE_LOAD) + dev.write("=") + read_until('!load', timeout=15.0) + + # And finally do the upload. + do_upload() + stage_callback(Firmware.STAGE_DONE)
+
+ +
+
+
+
+
+ + +
+
+
+
+ + + + \ No newline at end of file diff --git a/docs/_build/html/_sources/index.txt b/docs/_build/html/_sources/index.txt new file mode 100644 index 0000000..6085464 --- /dev/null +++ b/docs/_build/html/_sources/index.txt @@ -0,0 +1,23 @@ +.. pyad2usb documentation master file, created by + sphinx-quickstart on Sat Jun 8 14:38:46 2013. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to pyad2usb's documentation! +==================================== + +Contents: + +.. toctree:: + :maxdepth: 4 + + pyad2usb + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + diff --git a/docs/_build/html/_sources/modules.txt b/docs/_build/html/_sources/modules.txt new file mode 100644 index 0000000..34e82c9 --- /dev/null +++ b/docs/_build/html/_sources/modules.txt @@ -0,0 +1,7 @@ +pyad2usb +======== + +.. toctree:: + :maxdepth: 4 + + pyad2usb diff --git a/docs/_build/html/_sources/pyad2usb.event.txt b/docs/_build/html/_sources/pyad2usb.event.txt new file mode 100644 index 0000000..565d5a3 --- /dev/null +++ b/docs/_build/html/_sources/pyad2usb.event.txt @@ -0,0 +1,19 @@ +event Package +============= + +:mod:`event` Package +-------------------- + +.. automodule:: pyad2usb.event + :members: + :undoc-members: + :show-inheritance: + +:mod:`event` Module +------------------- + +.. automodule:: pyad2usb.event.event + :members: + :undoc-members: + :show-inheritance: + diff --git a/docs/_build/html/_sources/pyad2usb.txt b/docs/_build/html/_sources/pyad2usb.txt new file mode 100644 index 0000000..08dfd6b --- /dev/null +++ b/docs/_build/html/_sources/pyad2usb.txt @@ -0,0 +1,42 @@ +pyad2usb Package +================ + +:mod:`pyad2usb` Package +----------------------- + +.. automodule:: pyad2usb.__init__ + :members: + :undoc-members: + :show-inheritance: + +:mod:`ad2usb` Module +-------------------- + +.. automodule:: pyad2usb.ad2usb + :members: + :undoc-members: + :show-inheritance: + +:mod:`devices` Module +--------------------- + +.. automodule:: pyad2usb.devices + :members: + :undoc-members: + :show-inheritance: + +:mod:`util` Module +------------------ + +.. automodule:: pyad2usb.util + :members: + :undoc-members: + :show-inheritance: + +Subpackages +----------- + +.. toctree:: + + pyad2usb.event + diff --git a/docs/_build/html/_static/ajax-loader.gif b/docs/_build/html/_static/ajax-loader.gif new file mode 100644 index 0000000000000000000000000000000000000000..61faf8cab23993bd3e1560bff0668bd628642330 GIT binary patch literal 673 zcmZ?wbhEHb6krfw_{6~Q|Nno%(3)e{?)x>&1u}A`t?OF7Z|1gRivOgXi&7IyQd1Pl zGfOfQ60;I3a`F>X^fL3(@);C=vM_KlFfb_o=k{|A33hf2a5d61U}gjg=>Rd%XaNQW zW@Cw{|b%Y*pl8F?4B9 zlo4Fz*0kZGJabY|>}Okf0}CCg{u4`zEPY^pV?j2@h+|igy0+Kz6p;@SpM4s6)XEMg z#3Y4GX>Hjlml5ftdH$4x0JGdn8~MX(U~_^d!Hi)=HU{V%g+mi8#UGbE-*ao8f#h+S z2a0-5+vc7MU$e-NhmBjLIC1v|)9+Im8x1yacJ7{^tLX(ZhYi^rpmXm0`@ku9b53aN zEXH@Y3JaztblgpxbJt{AtE1ad1Ca>{v$rwwvK(>{m~Gf_=-Ro7Fk{#;i~+{{>QtvI yb2P8Zac~?~=sRA>$6{!(^3;ZP0TPFR(G_-UDU(8Jl0?(IXu$~#4A!880|o%~Al1tN literal 0 HcmV?d00001 diff --git a/docs/_build/html/_static/basic.css b/docs/_build/html/_static/basic.css new file mode 100644 index 0000000..a04c8e1 --- /dev/null +++ b/docs/_build/html/_static/basic.css @@ -0,0 +1,540 @@ +/* + * basic.css + * ~~~~~~~~~ + * + * Sphinx stylesheet -- basic theme. + * + * :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + +/* -- main layout ----------------------------------------------------------- */ + +div.clearer { + clear: both; +} + +/* -- relbar ---------------------------------------------------------------- */ + +div.related { + width: 100%; + font-size: 90%; +} + +div.related h3 { + display: none; +} + +div.related ul { + margin: 0; + padding: 0 0 0 10px; + list-style: none; +} + +div.related li { + display: inline; +} + +div.related li.right { + float: right; + margin-right: 5px; +} + +/* -- sidebar --------------------------------------------------------------- */ + +div.sphinxsidebarwrapper { + padding: 10px 5px 0 10px; +} + +div.sphinxsidebar { + float: left; + width: 230px; + margin-left: -100%; + font-size: 90%; +} + +div.sphinxsidebar ul { + list-style: none; +} + +div.sphinxsidebar ul ul, +div.sphinxsidebar ul.want-points { + margin-left: 20px; + list-style: square; +} + +div.sphinxsidebar ul ul { + margin-top: 0; + margin-bottom: 0; +} + +div.sphinxsidebar form { + margin-top: 10px; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +div.sphinxsidebar #searchbox input[type="text"] { + width: 170px; +} + +div.sphinxsidebar #searchbox input[type="submit"] { + width: 30px; +} + +img { + border: 0; +} + +/* -- search page ----------------------------------------------------------- */ + +ul.search { + margin: 10px 0 0 20px; + padding: 0; +} + +ul.search li { + padding: 5px 0 5px 20px; + background-image: url(file.png); + background-repeat: no-repeat; + background-position: 0 7px; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li div.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} + +/* -- index page ------------------------------------------------------------ */ + +table.contentstable { + width: 90%; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +/* -- general index --------------------------------------------------------- */ + +table.indextable { + width: 100%; +} + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable dl, table.indextable dd { + margin-top: 0; + margin-bottom: 0; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +div.modindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +div.genindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +/* -- general body styles --------------------------------------------------- */ + +a.headerlink { + visibility: hidden; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.field-list ul { + padding-left: 1em; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +img.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; +} + +img.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; +} + +img.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-right { + text-align: right; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px 7px 0 7px; + background-color: #ffe; + width: 40%; + float: right; +} + +p.sidebar-title { + font-weight: bold; +} + +/* -- topics ---------------------------------------------------------------- */ + +div.topic { + border: 1px solid #ccc; + padding: 7px 7px 0 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +div.admonition dl { + margin-bottom: 0; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + border: 0; + border-collapse: collapse; +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 5px; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +table.field-list td, table.field-list th { + border: 0 !important; +} + +table.footnote td, table.footnote th { + border: 0 !important; +} + +th { + text-align: left; + padding-right: 5px; +} + +table.citation { + border-left: solid 1px gray; + margin-left: 1px; +} + +table.citation td { + border-bottom: none; +} + +/* -- other body styles ----------------------------------------------------- */ + +ol.arabic { + list-style: decimal; +} + +ol.loweralpha { + list-style: lower-alpha; +} + +ol.upperalpha { + list-style: upper-alpha; +} + +ol.lowerroman { + list-style: lower-roman; +} + +ol.upperroman { + list-style: upper-roman; +} + +dl { + margin-bottom: 15px; +} + +dd p { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +dt:target, .highlighted { + background-color: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.refcount { + color: #060; +} + +.optional { + font-size: 1.3em; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa; +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +.guilabel, .menuselection { + font-family: sans-serif; +} + +.accelerator { + text-decoration: underline; +} + +.classifier { + font-style: oblique; +} + +abbr, acronym { + border-bottom: dotted 1px; + cursor: help; +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; + overflow-y: hidden; /* fixes display issues on Chrome browsers */ +} + +td.linenos pre { + padding: 5px 0px; + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + margin-left: 0.5em; +} + +table.highlighttable td { + padding: 0 0.5em 0 0.5em; +} + +tt.descname { + background-color: transparent; + font-weight: bold; + font-size: 1.2em; +} + +tt.descclassname { + background-color: transparent; +} + +tt.xref, a tt { + background-color: transparent; + font-weight: bold; +} + +h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt { + background-color: transparent; +} + +.viewcode-link { + float: right; +} + +.viewcode-back { + float: right; + font-family: sans-serif; +} + +div.viewcode-block:target { + margin: -1px -10px; + padding: 0 10px; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +} \ No newline at end of file diff --git a/docs/_build/html/_static/comment-bright.png b/docs/_build/html/_static/comment-bright.png new file mode 100644 index 0000000000000000000000000000000000000000..551517b8c83b76f734ff791f847829a760ad1903 GIT binary patch literal 3500 zcmV;d4O8-oP)Oz@Z0f2-7z;ux~O9+4z06=<WDR*FRcSTFz- zW=q650N5=6FiBTtNC2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d(}07*qoM6N<$g1Ha7 A2LJ#7 literal 0 HcmV?d00001 diff --git a/docs/_build/html/_static/comment.png b/docs/_build/html/_static/comment.png new file mode 100644 index 0000000000000000000000000000000000000000..92feb52b8824c6b0f59b658b1196c61de9162a95 GIT binary patch literal 3445 zcmV-*4T|!KP)Oz@Z0f2-7z;ux~O9+4z06=<WDR*FRcSTFz- zW=q650N5=6FiBTtNC2?60Km==3$g$R3;-}uh=nNt1bYBr$Ri_o0EC$U6h`t_Jn<{8 z5a%iY0C<_QJh>z}MS)ugEpZ1|S1ukX&Pf+56gFW3VVXcL!g-k)GJ!M?;PcD?0HBc- z5#WRK{dmp}uFlRjj{U%*%WZ25jX z{P*?XzTzZ-GF^d31o+^>%=Ap99M6&ogks$0k4OBs3;+Bb(;~!4V!2o<6ys46agIcq zjPo+3B8fthDa9qy|77CdEc*jK-!%ZRYCZvbku9iQV*~a}ClFY4z~c7+0P?$U!PF=S z1Au6Q;m>#f??3%Vpd|o+W=WE9003S@Bra6Svp>fO002awfhw>;8}z{#EWidF!3EsG z3;bXU&9EIRU@z1_9W=mEXoiz;4lcq~xDGvV5BgyU zp1~-*fe8db$Osc*A=-!mVv1NJjtCc-h4>-CNCXm#Bp}I%6j35eku^v$Qi@a{RY)E3 zJ#qp$hg?Rwkvqr$GJ^buyhkyVfwECO)C{#lxu`c9ghrwZ&}4KmnvWKso6vH!8a<3Q zq36)6Xb;+tK10Vaz~~qUGsJ8#F2=(`u{bOVlVi)VBCHIn#u~6ztOL7=^<&SmcLWlF zMZgI*1b0FpVIDz9SWH+>*hr`#93(Um+6gxa1B6k+CnA%mOSC4s5&6UzVlpv@SV$}* z))J2sFA#f(L&P^E5{W}HC%KRUNwK6<(h|}}(r!{C=`5+6G)NjFlgZj-YqAG9lq?`C z$c5yc>d>VnA`E_*3F2Qp##d8RZb=H01_mm@+|Cqnc9PsG(F5HIG_C zt)aG3uTh7n6Et<2In9F>NlT@zqLtGcXcuVrX|L#Xx)I%#9!{6gSJKPr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Spm-3gBzioV_{p!H$8L!*M!p0uH$#^p{Ui4P` z?ZJ24cOCDe-w#jZd?0@)|7iKK^;6KN`;!@ylm7$*nDhK&GcDTy000JJOGiWi{{a60 z|De66lK=n!32;bRa{vGf6951U69E94oEQKA00(qQO+^RV2nzr)JMUJvzW@LNr%6OX zR5;6Zk;`k`RTRfR-*ac2G}PGmXsUu>6ce?Lsn$m^3Q`48f|TwQ+_-Qh=t8Ra7nE)y zf@08(pjZ@22^EVjG*%30TJRMkBUC$WqZ73uoiv&J=APqX;!v%AH}`Vx`999MVjXwy z{f1-vh8P<=plv&cZ>p5jjX~Vt&W0e)wpw1RFRuRdDkwlKb01tp5 zP=trFN0gH^|L4jJkB{6sCV;Q!ewpg-D&4cza%GQ*b>R*=34#dW;ek`FEiB(vnw+U# zpOX5UMJBhIN&;D1!yQoIAySC!9zqJmmfoJqmQp}p&h*HTfMh~u9rKic2oz3sNM^#F zBIq*MRLbsMt%y{EHj8}LeqUUvoxf0=kqji62>ne+U`d#%J)abyK&Y`=eD%oA!36<)baZyK zXJh5im6umkS|_CSGXips$nI)oBHXojzBzyY_M5K*uvb0_9viuBVyV%5VtJ*Am1ag# zczbv4B?u8j68iOz<+)nDu^oWnL+$_G{PZOCcOGQ?!1VCefves~rfpaEZs-PdVYMiV z98ElaJ2}7f;htSXFY#Zv?__sQeckE^HV{ItO=)2hMQs=(_ Xn!ZpXD%P(H00000NkvXXu0mjf= 0 && !jQuery(node.parentNode).hasClass(className)) { + var span = document.createElement("span"); + span.className = className; + span.appendChild(document.createTextNode(val.substr(pos, text.length))); + node.parentNode.insertBefore(span, node.parentNode.insertBefore( + document.createTextNode(val.substr(pos + text.length)), + node.nextSibling)); + node.nodeValue = val.substr(0, pos); + } + } + else if (!jQuery(node).is("button, select, textarea")) { + jQuery.each(node.childNodes, function() { + highlight(this); + }); + } + } + return this.each(function() { + highlight(this); + }); +}; + +/** + * Small JavaScript module for the documentation. + */ +var Documentation = { + + init : function() { + this.fixFirefoxAnchorBug(); + this.highlightSearchWords(); + this.initIndexTable(); + }, + + /** + * i18n support + */ + TRANSLATIONS : {}, + PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; }, + LOCALE : 'unknown', + + // gettext and ngettext don't access this so that the functions + // can safely bound to a different name (_ = Documentation.gettext) + gettext : function(string) { + var translated = Documentation.TRANSLATIONS[string]; + if (typeof translated == 'undefined') + return string; + return (typeof translated == 'string') ? translated : translated[0]; + }, + + ngettext : function(singular, plural, n) { + var translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated == 'undefined') + return (n == 1) ? singular : plural; + return translated[Documentation.PLURALEXPR(n)]; + }, + + addTranslations : function(catalog) { + for (var key in catalog.messages) + this.TRANSLATIONS[key] = catalog.messages[key]; + this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); + this.LOCALE = catalog.locale; + }, + + /** + * add context elements like header anchor links + */ + addContextElements : function() { + $('div[id] > :header:first').each(function() { + $('\u00B6'). + attr('href', '#' + this.id). + attr('title', _('Permalink to this headline')). + appendTo(this); + }); + $('dt[id]').each(function() { + $('\u00B6'). + attr('href', '#' + this.id). + attr('title', _('Permalink to this definition')). + appendTo(this); + }); + }, + + /** + * workaround a firefox stupidity + */ + fixFirefoxAnchorBug : function() { + if (document.location.hash && $.browser.mozilla) + window.setTimeout(function() { + document.location.href += ''; + }, 10); + }, + + /** + * highlight the search words provided in the url in the text + */ + highlightSearchWords : function() { + var params = $.getQueryParameters(); + var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; + if (terms.length) { + var body = $('div.body'); + window.setTimeout(function() { + $.each(terms, function() { + body.highlightText(this.toLowerCase(), 'highlighted'); + }); + }, 10); + $('') + .appendTo($('#searchbox')); + } + }, + + /** + * init the domain index toggle buttons + */ + initIndexTable : function() { + var togglers = $('img.toggler').click(function() { + var src = $(this).attr('src'); + var idnum = $(this).attr('id').substr(7); + $('tr.cg-' + idnum).toggle(); + if (src.substr(-9) == 'minus.png') + $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); + else + $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); + }).css('display', ''); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { + togglers.click(); + } + }, + + /** + * helper function to hide the search marks again + */ + hideSearchWords : function() { + $('#searchbox .highlight-link').fadeOut(300); + $('span.highlighted').removeClass('highlighted'); + }, + + /** + * make the url absolute + */ + makeURL : function(relativeURL) { + return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; + }, + + /** + * get the current relative url + */ + getCurrentURL : function() { + var path = document.location.pathname; + var parts = path.split(/\//); + $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { + if (this == '..') + parts.pop(); + }); + var url = parts.join('/'); + return path.substring(url.lastIndexOf('/') + 1, path.length - 1); + } +}; + +// quick alias for translations +_ = Documentation.gettext; + +$(document).ready(function() { + Documentation.init(); +}); diff --git a/docs/_build/html/_static/down-pressed.png b/docs/_build/html/_static/down-pressed.png new file mode 100644 index 0000000000000000000000000000000000000000..6f7ad782782e4f8e39b0c6e15c7344700cdd2527 GIT binary patch literal 368 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6U4S$Y z{B+)352QE?JR*yM+OLB!qm#z$3ZNi+iKnkC`z>}Z23@f-Ava~9&<9T!#}JFtXD=!G zGdl{fK6ro2OGiOl+hKvH6i=D3%%Y^j`yIkRn!8O>@bG)IQR0{Kf+mxNd=_WScA8u_ z3;8(7x2){m9`nt+U(Nab&1G)!{`SPVpDX$w8McLTzAJ39wprG3p4XLq$06M`%}2Yk zRPPsbES*dnYm1wkGL;iioAUB*Or2kz6(-M_r_#Me-`{mj$Z%( literal 0 HcmV?d00001 diff --git a/docs/_build/html/_static/down.png b/docs/_build/html/_static/down.png new file mode 100644 index 0000000000000000000000000000000000000000..3003a88770de3977d47a2ba69893436a2860f9e7 GIT binary patch literal 363 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|*pj^6U4S$Y z{B+)352QE?JR*yM+OLB!qm#z$3ZNi+iKnkC`z>}xaV3tUZ$qnrLa#kt978NlpS`ru z&)HFc^}^>{UOEce+71h5nn>6&w6A!ieNbu1wh)UGh{8~et^#oZ1# z>T7oM=FZ~xXWnTo{qnXm$ZLOlqGswI_m2{XwVK)IJmBjW{J3-B3x@C=M{ShWt#fYS9M?R;8K$~YwlIqwf>VA7q=YKcwf2DS4Zj5inDKXXB1zl=(YO3ST6~rDq)&z z*o>z)=hxrfG-cDBW0G$!?6{M<$@{_4{m1o%Ub!naEtn|@^frU1tDnm{r-UW|!^@B8 literal 0 HcmV?d00001 diff --git a/docs/_build/html/_static/file.png b/docs/_build/html/_static/file.png new file mode 100644 index 0000000000000000000000000000000000000000..d18082e397e7e54f20721af768c4c2983258f1b4 GIT binary patch literal 392 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmP$HyOL$D9)yc9|lc|nKf<9@eUiWd>3GuTC!a5vdfWYEazjncPj5ZQX%+1 zt8B*4=d)!cdDz4wr^#OMYfqGz$1LDFF>|#>*O?AGil(WEs?wLLy{Gj2J_@opDm%`dlax3yA*@*N$G&*ukFv>P8+2CBWO(qz zD0k1@kN>hhb1_6`&wrCswzINE(evt-5C1B^STi2@PmdKI;Vst0PQB6!2kdN literal 0 HcmV?d00001 diff --git a/docs/_build/html/_static/jquery.js b/docs/_build/html/_static/jquery.js new file mode 100644 index 0000000..198b3ff --- /dev/null +++ b/docs/_build/html/_static/jquery.js @@ -0,0 +1,4 @@ +/*! jQuery v1.7.1 jquery.com | jquery.org/license */ +(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"":"")+""),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;g=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
a",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="
"+""+"
",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="
t
",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="
",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; +f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() +{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file diff --git a/docs/_build/html/_static/minus.png b/docs/_build/html/_static/minus.png new file mode 100644 index 0000000000000000000000000000000000000000..da1c5620d10c047525a467a425abe9ff5269cfc2 GIT binary patch literal 199 zcmeAS@N?(olHy`uVBq!ia0vp^+#t-s1SHkYJtzcHoCO|{#XvD(5N2eUHAey{$X?>< z>&kweokM_|(Po{+Q=kw>iEBiObAE1aYF-J$w=>iB1I2R$WLpMkF=>bh=@O1TaS?83{1OVknK< z>&kweokM`jkU7Va11Q8%;u=xnoS&PUnpeW`?aZ|OK(QcC7sn8Z%gHvy&v=;Q4jejg zV8NnAO`-4Z@2~&zopr02WF_WB>pF literal 0 HcmV?d00001 diff --git a/docs/_build/html/_static/pygments.css b/docs/_build/html/_static/pygments.css new file mode 100644 index 0000000..d79caa1 --- /dev/null +++ b/docs/_build/html/_static/pygments.css @@ -0,0 +1,62 @@ +.highlight .hll { background-color: #ffffcc } +.highlight { background: #eeffcc; } +.highlight .c { color: #408090; font-style: italic } /* Comment */ +.highlight .err { border: 1px solid #FF0000 } /* Error */ +.highlight .k { color: #007020; font-weight: bold } /* Keyword */ +.highlight .o { color: #666666 } /* Operator */ +.highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */ +.highlight .cp { color: #007020 } /* Comment.Preproc */ +.highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */ +.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ +.highlight .gd { color: #A00000 } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gr { color: #FF0000 } /* Generic.Error */ +.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ +.highlight .gi { color: #00A000 } /* Generic.Inserted */ +.highlight .go { color: #333333 } /* Generic.Output */ +.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ +.highlight .gt { color: #0044DD } /* Generic.Traceback */ +.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ +.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ +.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ +.highlight .kp { color: #007020 } /* Keyword.Pseudo */ +.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ +.highlight .kt { color: #902000 } /* Keyword.Type */ +.highlight .m { color: #208050 } /* Literal.Number */ +.highlight .s { color: #4070a0 } /* Literal.String */ +.highlight .na { color: #4070a0 } /* Name.Attribute */ +.highlight .nb { color: #007020 } /* Name.Builtin */ +.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ +.highlight .no { color: #60add5 } /* Name.Constant */ +.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ +.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ +.highlight .ne { color: #007020 } /* Name.Exception */ +.highlight .nf { color: #06287e } /* Name.Function */ +.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ +.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ +.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ +.highlight .nv { color: #bb60d5 } /* Name.Variable */ +.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ +.highlight .w { color: #bbbbbb } /* Text.Whitespace */ +.highlight .mf { color: #208050 } /* Literal.Number.Float */ +.highlight .mh { color: #208050 } /* Literal.Number.Hex */ +.highlight .mi { color: #208050 } /* Literal.Number.Integer */ +.highlight .mo { color: #208050 } /* Literal.Number.Oct */ +.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ +.highlight .sc { color: #4070a0 } /* Literal.String.Char */ +.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ +.highlight .s2 { color: #4070a0 } /* Literal.String.Double */ +.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ +.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */ +.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ +.highlight .sx { color: #c65d09 } /* Literal.String.Other */ +.highlight .sr { color: #235388 } /* Literal.String.Regex */ +.highlight .s1 { color: #4070a0 } /* Literal.String.Single */ +.highlight .ss { color: #517918 } /* Literal.String.Symbol */ +.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ +.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ +.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ +.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ +.highlight .il { color: #208050 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/docs/_build/html/_static/searchtools.js b/docs/_build/html/_static/searchtools.js new file mode 100644 index 0000000..56676b2 --- /dev/null +++ b/docs/_build/html/_static/searchtools.js @@ -0,0 +1,622 @@ +/* + * searchtools.js_t + * ~~~~~~~~~~~~~~~~ + * + * Sphinx JavaScript utilties for the full-text search. + * + * :copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS. + * :license: BSD, see LICENSE for details. + * + */ + + +/** + * Porter Stemmer + */ +var Stemmer = function() { + + var step2list = { + ational: 'ate', + tional: 'tion', + enci: 'ence', + anci: 'ance', + izer: 'ize', + bli: 'ble', + alli: 'al', + entli: 'ent', + eli: 'e', + ousli: 'ous', + ization: 'ize', + ation: 'ate', + ator: 'ate', + alism: 'al', + iveness: 'ive', + fulness: 'ful', + ousness: 'ous', + aliti: 'al', + iviti: 'ive', + biliti: 'ble', + logi: 'log' + }; + + var step3list = { + icate: 'ic', + ative: '', + alize: 'al', + iciti: 'ic', + ical: 'ic', + ful: '', + ness: '' + }; + + var c = "[^aeiou]"; // consonant + var v = "[aeiouy]"; // vowel + var C = c + "[^aeiouy]*"; // consonant sequence + var V = v + "[aeiou]*"; // vowel sequence + + var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0 + var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 + var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 + var s_v = "^(" + C + ")?" + v; // vowel in stem + + this.stemWord = function (w) { + var stem; + var suffix; + var firstch; + var origword = w; + + if (w.length < 3) + return w; + + var re; + var re2; + var re3; + var re4; + + firstch = w.substr(0,1); + if (firstch == "y") + w = firstch.toUpperCase() + w.substr(1); + + // Step 1a + re = /^(.+?)(ss|i)es$/; + re2 = /^(.+?)([^s])s$/; + + if (re.test(w)) + w = w.replace(re,"$1$2"); + else if (re2.test(w)) + w = w.replace(re2,"$1$2"); + + // Step 1b + re = /^(.+?)eed$/; + re2 = /^(.+?)(ed|ing)$/; + if (re.test(w)) { + var fp = re.exec(w); + re = new RegExp(mgr0); + if (re.test(fp[1])) { + re = /.$/; + w = w.replace(re,""); + } + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1]; + re2 = new RegExp(s_v); + if (re2.test(stem)) { + w = stem; + re2 = /(at|bl|iz)$/; + re3 = new RegExp("([^aeiouylsz])\\1$"); + re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re2.test(w)) + w = w + "e"; + else if (re3.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + else if (re4.test(w)) + w = w + "e"; + } + } + + // Step 1c + re = /^(.+?)y$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(s_v); + if (re.test(stem)) + w = stem + "i"; + } + + // Step 2 + re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step2list[suffix]; + } + + // Step 3 + re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step3list[suffix]; + } + + // Step 4 + re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; + re2 = /^(.+?)(s|t)(ion)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + if (re.test(stem)) + w = stem; + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1] + fp[2]; + re2 = new RegExp(mgr1); + if (re2.test(stem)) + w = stem; + } + + // Step 5 + re = /^(.+?)e$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + re2 = new RegExp(meq1); + re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) + w = stem; + } + re = /ll$/; + re2 = new RegExp(mgr1); + if (re.test(w) && re2.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + + // and turn initial Y back to y + if (firstch == "y") + w = firstch.toLowerCase() + w.substr(1); + return w; + } +} + + + +/** + * Simple result scoring code. + */ +var Scorer = { + // Implement the following function to further tweak the score for each result + // The function takes a result array [filename, title, anchor, descr, score] + // and returns the new score. + /* + score: function(result) { + return result[4]; + }, + */ + + // query matches the full name of an object + objNameMatch: 11, + // or matches in the last dotted part of the object name + objPartialMatch: 6, + // Additive scores depending on the priority of the object + objPrio: {0: 15, // used to be importantResults + 1: 5, // used to be objectResults + 2: -5}, // used to be unimportantResults + // Used when the priority is not in the mapping. + objPrioDefault: 0, + + // query found in title + title: 15, + // query found in terms + term: 5 +}; + + +/** + * Search Module + */ +var Search = { + + _index : null, + _queued_query : null, + _pulse_status : -1, + + init : function() { + var params = $.getQueryParameters(); + if (params.q) { + var query = params.q[0]; + $('input[name="q"]')[0].value = query; + this.performSearch(query); + } + }, + + loadIndex : function(url) { + $.ajax({type: "GET", url: url, data: null, + dataType: "script", cache: true, + complete: function(jqxhr, textstatus) { + if (textstatus != "success") { + document.getElementById("searchindexloader").src = url; + } + }}); + }, + + setIndex : function(index) { + var q; + this._index = index; + if ((q = this._queued_query) !== null) { + this._queued_query = null; + Search.query(q); + } + }, + + hasIndex : function() { + return this._index !== null; + }, + + deferQuery : function(query) { + this._queued_query = query; + }, + + stopPulse : function() { + this._pulse_status = 0; + }, + + startPulse : function() { + if (this._pulse_status >= 0) + return; + function pulse() { + var i; + Search._pulse_status = (Search._pulse_status + 1) % 4; + var dotString = ''; + for (i = 0; i < Search._pulse_status; i++) + dotString += '.'; + Search.dots.text(dotString); + if (Search._pulse_status > -1) + window.setTimeout(pulse, 500); + } + pulse(); + }, + + /** + * perform a search for something (or wait until index is loaded) + */ + performSearch : function(query) { + // create the required interface elements + this.out = $('#search-results'); + this.title = $('

' + _('Searching') + '

').appendTo(this.out); + this.dots = $('').appendTo(this.title); + this.status = $('

').appendTo(this.out); + this.output = $('
'); + } + // Prettify the comment rating. + comment.pretty_rating = comment.rating + ' point' + + (comment.rating == 1 ? '' : 's'); + // Make a class (for displaying not yet moderated comments differently) + comment.css_class = comment.displayed ? '' : ' moderate'; + // Create a div for this comment. + var context = $.extend({}, opts, comment); + var div = $(renderTemplate(commentTemplate, context)); + + // If the user has voted on this comment, highlight the correct arrow. + if (comment.vote) { + var direction = (comment.vote == 1) ? 'u' : 'd'; + div.find('#' + direction + 'v' + comment.id).hide(); + div.find('#' + direction + 'u' + comment.id).show(); + } + + if (opts.moderator || comment.text != '[deleted]') { + div.find('a.reply').show(); + if (comment.proposal_diff) + div.find('#sp' + comment.id).show(); + if (opts.moderator && !comment.displayed) + div.find('#cm' + comment.id).show(); + if (opts.moderator || (opts.username == comment.username)) + div.find('#dc' + comment.id).show(); + } + return div; + } + + /** + * A simple template renderer. Placeholders such as <%id%> are replaced + * by context['id'] with items being escaped. Placeholders such as <#id#> + * are not escaped. + */ + function renderTemplate(template, context) { + var esc = $(document.createElement('div')); + + function handle(ph, escape) { + var cur = context; + $.each(ph.split('.'), function() { + cur = cur[this]; + }); + return escape ? esc.text(cur || "").html() : cur; + } + + return template.replace(/<([%#])([\w\.]*)\1>/g, function() { + return handle(arguments[2], arguments[1] == '%' ? true : false); + }); + } + + /** Flash an error message briefly. */ + function showError(message) { + $(document.createElement('div')).attr({'class': 'popup-error'}) + .append($(document.createElement('div')) + .attr({'class': 'error-message'}).text(message)) + .appendTo('body') + .fadeIn("slow") + .delay(2000) + .fadeOut("slow"); + } + + /** Add a link the user uses to open the comments popup. */ + $.fn.comment = function() { + return this.each(function() { + var id = $(this).attr('id').substring(1); + var count = COMMENT_METADATA[id]; + var title = count + ' comment' + (count == 1 ? '' : 's'); + var image = count > 0 ? opts.commentBrightImage : opts.commentImage; + var addcls = count == 0 ? ' nocomment' : ''; + $(this) + .append( + $(document.createElement('a')).attr({ + href: '#', + 'class': 'sphinx-comment-open' + addcls, + id: 'ao' + id + }) + .append($(document.createElement('img')).attr({ + src: image, + alt: 'comment', + title: title + })) + .click(function(event) { + event.preventDefault(); + show($(this).attr('id').substring(2)); + }) + ) + .append( + $(document.createElement('a')).attr({ + href: '#', + 'class': 'sphinx-comment-close hidden', + id: 'ah' + id + }) + .append($(document.createElement('img')).attr({ + src: opts.closeCommentImage, + alt: 'close', + title: 'close' + })) + .click(function(event) { + event.preventDefault(); + hide($(this).attr('id').substring(2)); + }) + ); + }); + }; + + var opts = { + processVoteURL: '/_process_vote', + addCommentURL: '/_add_comment', + getCommentsURL: '/_get_comments', + acceptCommentURL: '/_accept_comment', + deleteCommentURL: '/_delete_comment', + commentImage: '/static/_static/comment.png', + closeCommentImage: '/static/_static/comment-close.png', + loadingImage: '/static/_static/ajax-loader.gif', + commentBrightImage: '/static/_static/comment-bright.png', + upArrow: '/static/_static/up.png', + downArrow: '/static/_static/down.png', + upArrowPressed: '/static/_static/up-pressed.png', + downArrowPressed: '/static/_static/down-pressed.png', + voting: false, + moderator: false + }; + + if (typeof COMMENT_OPTIONS != "undefined") { + opts = jQuery.extend(opts, COMMENT_OPTIONS); + } + + var popupTemplate = '\ +
\ +

\ + Sort by:\ + best rated\ + newest\ + oldest\ +

\ +
Comments
\ +
\ + loading comments...
\ +
    \ +
    \ +

    Add a comment\ + (markup):

    \ +
    \ + reStructured text markup: *emph*, **strong**, \ + ``code``, \ + code blocks: :: and an indented block after blank line
    \ +
    \ + \ +

    \ + \ + Propose a change ▹\ + \ + \ + Propose a change ▿\ + \ +

    \ + \ + \ + \ + \ + \ +
    \ +
    '; + + var commentTemplate = '\ +
    \ +
    \ +
    \ + \ + \ + \ + \ + \ + \ +
    \ +
    \ + \ + \ + \ + \ + \ + \ +
    \ +
    \ +
    \ +

    \ + <%username%>\ + <%pretty_rating%>\ + <%time.delta%>\ +

    \ +
    <#text#>
    \ +

    \ + \ + reply ▿\ + proposal ▹\ + proposal ▿\ + \ + \ +

    \ +
    \
    +<#proposal_diff#>\
    +        
    \ +
      \ +
      \ +
      \ +
      \ + '; + + var replyTemplate = '\ +
    • \ +
      \ +
      \ + \ + \ + \ + \ + \ + \ +
      \ +
    • '; + + $(document).ready(function() { + init(); + }); +})(jQuery); + +$(document).ready(function() { + // add comment anchors for all paragraphs that are commentable + $('.sphinx-has-comment').comment(); + + // highlight search words in search results + $("div.context").each(function() { + var params = $.getQueryParameters(); + var terms = (params.q) ? params.q[0].split(/\s+/) : []; + var result = $(this); + $.each(terms, function() { + result.highlightText(this.toLowerCase(), 'highlighted'); + }); + }); + + // directly open comment window if requested + var anchor = document.location.hash; + if (anchor.substring(0, 9) == '#comment-') { + $('#ao' + anchor.substring(9)).click(); + document.location.hash = '#s' + anchor.substring(9); + } +}); diff --git a/docs/_build/html/genindex.html b/docs/_build/html/genindex.html new file mode 100644 index 0000000..e28beaf --- /dev/null +++ b/docs/_build/html/genindex.html @@ -0,0 +1,683 @@ + + + + + + + + + Index — pyad2usb documentation + + + + + + + + + + + + + +
      +
      +
      +
      + + +

      Index

      + +
      + A + | B + | C + | D + | E + | F + | G + | I + | L + | M + | N + | O + | P + | R + | S + | T + | U + | W + | Z + +
      +

      A

      +
      + + +
      + +
      AD2USB (class in pyad2usb.ad2usb) +
      + +
      + +
      add() (pyad2usb.event.event.EventHandler method) +
      + +
      + +

      B

      + + +
      + +
      BAUDRATE (pyad2usb.devices.SerialDevice attribute) +
      + +
      + +
      (pyad2usb.devices.USBDevice attribute) +
      + +
      +
      + +

      C

      + + + +
      + +
      close() (pyad2usb.ad2usb.AD2USB method) +
      + +
      + +
      (pyad2usb.ad2usb.Overseer method) +
      + + +
      (pyad2usb.devices.SerialDevice method) +
      + + +
      (pyad2usb.devices.SocketDevice method) +
      + + +
      (pyad2usb.devices.USBDevice method) +
      + +
      + +
      CommError +
      + +
      + +
      create() (pyad2usb.ad2usb.Overseer class method) +
      + +
      + +

      D

      + + + +
      + +
      Device (class in pyad2usb.devices) +
      + + +
      Device.ReadThread (class in pyad2usb.devices) +
      + +
      + +
      devices() (pyad2usb.ad2usb.Overseer class method) +
      + +
      + +

      E

      + + + +
      + +
      Event (class in pyad2usb.event.event) +
      + + +
      EventHandler (class in pyad2usb.event.event) +
      + +
      + +
      ExpanderMessage (class in pyad2usb.ad2usb) +
      + +
      + +

      F

      + + + +
      + +
      F1 (pyad2usb.ad2usb.AD2USB attribute) +
      + + +
      F2 (pyad2usb.ad2usb.AD2USB attribute) +
      + + +
      F3 (pyad2usb.ad2usb.AD2USB attribute) +
      + + +
      F4 (pyad2usb.ad2usb.AD2USB attribute) +
      + + +
      find_all() (pyad2usb.ad2usb.Overseer class method) +
      + +
      + +
      (pyad2usb.devices.SerialDevice static method) +
      + + +
      (pyad2usb.devices.USBDevice static method) +
      + +
      +
      + +
      fire() (pyad2usb.event.event.EventHandler method) +
      + + +
      Firmware (class in pyad2usb.util) +
      + + +
      FTDI_PRODUCT_ID (pyad2usb.devices.USBDevice attribute) +
      + + +
      FTDI_VENDOR_ID (pyad2usb.devices.USBDevice attribute) +
      + +
      + +

      G

      + + + +
      + +
      get_config() (pyad2usb.ad2usb.AD2USB method) +
      + +
      + +
      get_device() (pyad2usb.ad2usb.Overseer method) +
      + +
      + +

      I

      + + + +
      + +
      id (pyad2usb.ad2usb.AD2USB attribute) +
      + +
      + +
      (pyad2usb.devices.Device attribute) +
      + +
      + +
      InvalidMessageError +
      + +
      + +
      is_reader_alive() (pyad2usb.devices.Device method) +
      + +
      + +

      L

      + + +
      + +
      LRRMessage (class in pyad2usb.ad2usb) +
      + +
      + +

      M

      + + +
      + +
      Message (class in pyad2usb.ad2usb) +
      + +
      + +

      N

      + + +
      + +
      NoDeviceError +
      + +
      + +

      O

      + + + +
      + +
      on_alarm (pyad2usb.ad2usb.AD2USB attribute) +
      + + +
      on_attached (pyad2usb.ad2usb.Overseer attribute) +
      + + +
      on_boot (pyad2usb.ad2usb.AD2USB attribute) +
      + + +
      on_bypass (pyad2usb.ad2usb.AD2USB attribute) +
      + + +
      on_close (pyad2usb.ad2usb.AD2USB attribute) +
      + +
      + +
      (pyad2usb.devices.Device attribute) +
      + +
      + +
      on_config_received (pyad2usb.ad2usb.AD2USB attribute) +
      + + +
      on_detached (pyad2usb.ad2usb.Overseer attribute) +
      + + +
      on_message (pyad2usb.ad2usb.AD2USB attribute) +
      + +
      + +
      on_open (pyad2usb.ad2usb.AD2USB attribute) +
      + +
      + +
      (pyad2usb.devices.Device attribute) +
      + +
      + +
      on_power_changed (pyad2usb.ad2usb.AD2USB attribute) +
      + + +
      on_read (pyad2usb.ad2usb.AD2USB attribute) +
      + +
      + +
      (pyad2usb.devices.Device attribute) +
      + +
      + +
      on_status_changed (pyad2usb.ad2usb.AD2USB attribute) +
      + + +
      on_write (pyad2usb.ad2usb.AD2USB attribute) +
      + +
      + +
      (pyad2usb.devices.Device attribute) +
      + +
      + +
      open() (pyad2usb.ad2usb.AD2USB method) +
      + +
      + +
      (pyad2usb.devices.SerialDevice method) +
      + + +
      (pyad2usb.devices.SocketDevice method) +
      + + +
      (pyad2usb.devices.USBDevice method) +
      + +
      + +
      Overseer (class in pyad2usb.ad2usb) +
      + + +
      Overseer.DetectThread (class in pyad2usb.ad2usb) +
      + +
      + +

      P

      + + + +
      + +
      pyad2usb.__init__ (module) +
      + + +
      pyad2usb.ad2usb (module) +
      + + +
      pyad2usb.devices (module) +
      + +
      + +
      pyad2usb.event (module) +
      + + +
      pyad2usb.event.event (module) +
      + + +
      pyad2usb.util (module) +
      + +
      + +

      R

      + + + +
      + +
      read() (pyad2usb.devices.SerialDevice method) +
      + +
      + +
      (pyad2usb.devices.SocketDevice method) +
      + + +
      (pyad2usb.devices.USBDevice method) +
      + +
      + +
      read_line() (pyad2usb.devices.SerialDevice method) +
      + +
      + +
      (pyad2usb.devices.SocketDevice method) +
      + + +
      (pyad2usb.devices.USBDevice method) +
      + +
      + +
      READ_TIMEOUT (pyad2usb.devices.Device.ReadThread attribute) +
      + + +
      reboot() (pyad2usb.ad2usb.AD2USB method) +
      + +
      + +
      RELAY (pyad2usb.ad2usb.ExpanderMessage attribute) +
      + + +
      remove() (pyad2usb.event.event.EventHandler method) +
      + + +
      RFMessage (class in pyad2usb.ad2usb) +
      + + +
      run() (pyad2usb.ad2usb.Overseer.DetectThread method) +
      + +
      + +
      (pyad2usb.devices.Device.ReadThread method) +
      + +
      +
      + +

      S

      + + + +
      + +
      SerialDevice (class in pyad2usb.devices) +
      + + +
      set_config() (pyad2usb.ad2usb.AD2USB method) +
      + + +
      SocketDevice (class in pyad2usb.devices) +
      + + +
      STAGE_BOOT (pyad2usb.util.Firmware attribute) +
      + + +
      STAGE_DONE (pyad2usb.util.Firmware attribute) +
      + + +
      STAGE_LOAD (pyad2usb.util.Firmware attribute) +
      + +
      + +
      STAGE_START (pyad2usb.util.Firmware attribute) +
      + + +
      STAGE_UPLOADING (pyad2usb.util.Firmware attribute) +
      + + +
      STAGE_WAITING (pyad2usb.util.Firmware attribute) +
      + + +
      start() (pyad2usb.ad2usb.Overseer method) +
      + + +
      stop() (pyad2usb.ad2usb.Overseer method) +
      + +
      + +
      (pyad2usb.ad2usb.Overseer.DetectThread method) +
      + + +
      (pyad2usb.devices.Device.ReadThread method) +
      + +
      + +
      stop_reader() (pyad2usb.devices.Device method) +
      + +
      + +

      T

      + + +
      + +
      TimeoutError +
      + +
      + +

      U

      + + + +
      + +
      upload() (pyad2usb.util.Firmware static method) +
      + +
      + +
      USBDevice (class in pyad2usb.devices) +
      + +
      + +

      W

      + + +
      + +
      write() (pyad2usb.devices.SerialDevice method) +
      + +
      + +
      (pyad2usb.devices.SocketDevice method) +
      + + +
      (pyad2usb.devices.USBDevice method) +
      + +
      +
      + +

      Z

      + + +
      + +
      ZONE (pyad2usb.ad2usb.ExpanderMessage attribute) +
      + +
      + + + + + + +
      +
      + + + + + +
      +
      +
      + + + + + \ No newline at end of file diff --git a/docs/_build/html/index.html b/docs/_build/html/index.html new file mode 100644 index 0000000..ffdf6a7 --- /dev/null +++ b/docs/_build/html/index.html @@ -0,0 +1,142 @@ + + + + + + + + Welcome to pyad2usb’s documentation! — pyad2usb documentation + + + + + + + + + + + + + + +
      +
      +
      +
      + +
      +

      Welcome to pyad2usb’s documentation!¶

      +

      Contents:

      + +
      +
      +

      Indices and tables¶

      + +
      + + +
      +
      +
      +
      +
      +

      Table Of Contents

      + + +

      Next topic

      +

      pyad2usb Package

      +

      This Page

      + + + +
      +
      +
      +
      + + + + \ No newline at end of file diff --git a/docs/_build/html/modules.html b/docs/_build/html/modules.html new file mode 100644 index 0000000..7855c9a --- /dev/null +++ b/docs/_build/html/modules.html @@ -0,0 +1,115 @@ + + + + + + + + pyad2usb — pyad2usb documentation + + + + + + + + + + + + + +
      + +
      +
      +

      This Page

      + + + +
      +
      +
      +
      + + + + \ No newline at end of file diff --git a/docs/_build/html/objects.inv b/docs/_build/html/objects.inv new file mode 100644 index 0000000000000000000000000000000000000000..324d2e48bd849909cec5c1994f0bb08806c50ed9 GIT binary patch literal 1022 zcmVNERX>N99Zgg*Qc_4OWa&u{KZXhxWBOp+6Z)#;@bUGk#d0}KS zb#r10BOq2~a&u{KZaN?eBOp|0Wgv28ZDDC{WMy(7Z)PBLXlZjGW@&6?AZc?TV{dJ6 za%FRKWn>_Ab7^j8AbM ztw)hmDOj`m)~7Y(14g^Mokja<2~5VD(-+%&-D`{Xg(tR#PsJNcuB&ooC$Qx)lzJUE zSsVDPwSU;ywYMiPj6Mdxtxnvkr8-w2?3~81)iJcCov_HCUq>@*u~? zAF3MU#=GEwjvH?3=%}JO1>N+DjMwQmy6H9D^g9yTW9#`O4CzFWMhlRfr345MIzSWe z8JaZv)GiRo?bqQnbZ5~|Z|?d*G&3T?Sme)qtydHS-$G*Iilt0ugl+ZO8aA=}ypVbA zSx-KC{SAam#T1Xn#BaEHE?OU+l%nA#c#WY@T;#ZRd^9sPTcA>$9jBrMBZQMY9FmDL zKT89Rpt%ul3-JOniZ?7@1EnncT_W%tHwtHup1%y~4)J5kd0NV@Wol^it-*;lbn_JW z?(!}q@y#CPE+~i`jC`WPMcdwP+gOt z3JpU#xpkIq;DjEfvmCP;!B0<-j@frG#ZB4$mb}Z?$W>kxXU|+BrP;Z(#SiKS$dQ}z zi{uL1KfKpMZyF>`;2a2dADddRSO + + + + + + + Python Module Index — pyad2usb documentation + + + + + + + + + + + + + + + + +
      +
      +
      +
      + + +

      Python Module Index

      + +
      + p +
      + + + + + + + + + + + + + + + + + + + + + + + + + +
       
      + p
      + pyad2usb +
          + pyad2usb.__init__ +
          + pyad2usb.ad2usb +
          + pyad2usb.devices +
          + pyad2usb.event +
          + pyad2usb.event.event +
          + pyad2usb.util +
      + + +
      +
      +
      +
      +
      + + +
      +
      +
      +
      + + + + \ No newline at end of file diff --git a/docs/_build/html/pyad2usb.event.html b/docs/_build/html/pyad2usb.event.html new file mode 100644 index 0000000..a4ede97 --- /dev/null +++ b/docs/_build/html/pyad2usb.event.html @@ -0,0 +1,159 @@ + + + + + + + + event Package — pyad2usb documentation + + + + + + + + + + + + + + + +
      +
      +
      +
      + +
      +

      event Package¶

      +
      +

      event Package¶

      +
      +
      +

      event Module¶

      +
      +
      +class pyad2usb.event.event.Event(doc=None)[source]¶
      +

      Bases: object

      +
      + +
      +
      +class pyad2usb.event.event.EventHandler(event, obj)[source]¶
      +

      Bases: object

      +
      +
      +add(func)[source]¶
      +

      Add new event handler function.

      +

      Event handler function must be defined like func(sender, earg). +You can add handler also by using ‘+=’ operator.

      +
      + +
      +
      +fire(earg=None)[source]¶
      +

      Fire event and call all handler functions

      +

      You can call EventHandler object itself like e(earg) instead of +e.fire(earg).

      +
      + +
      +
      +remove(func)[source]¶
      +

      Remove existing event handler function.

      +

      You can remove handler also by using ‘-=’ operator.

      +
      + +
      + +
      +
      + + +
      +
      +
      +
      +
      +

      Table Of Contents

      + + +

      Previous topic

      +

      pyad2usb Package

      +

      This Page

      + + + +
      +
      +
      +
      + + + + \ No newline at end of file diff --git a/docs/_build/html/pyad2usb.html b/docs/_build/html/pyad2usb.html new file mode 100644 index 0000000..2989540 --- /dev/null +++ b/docs/_build/html/pyad2usb.html @@ -0,0 +1,691 @@ + + + + + + + + pyad2usb Package — pyad2usb documentation + + + + + + + + + + + + + + + +
      +
      +
      +
      + +
      +

      pyad2usb Package¶

      +
      +

      pyad2usb Package¶

      +

      The PyAD2USB module.

      +
      +
      +

      ad2usb Module¶

      +

      Provides the full AD2USB class and factory.

      +
      +
      +class pyad2usb.ad2usb.AD2USB(device)[source]¶
      +

      Bases: object

      +

      High-level wrapper around AD2USB/AD2SERIAL devices.

      +
      +
      +F1 = u'\x01\x01\x01'¶
      +
      + +
      +
      +F2 = u'\x02\x02\x02'¶
      +
      + +
      +
      +F3 = u'\x03\x03\x03'¶
      +
      + +
      +
      +F4 = u'\x04\x04\x04'¶
      +
      + +
      +
      +close()[source]¶
      +

      Closes the device.

      +
      + +
      +
      +get_config()[source]¶
      +

      Retrieves the configuration from the device.

      +
      + +
      +
      +id[source]¶
      +
      + +
      +
      +on_alarm¶
      +

      Called when the alarm is triggered.

      +
      + +
      +
      +on_boot¶
      +

      Called when the device finishes bootings.

      +
      + +
      +
      +on_bypass¶
      +

      Called when a zone is bypassed.

      +
      + +
      +
      +on_close¶
      +

      Called when the device has been closed.

      +
      + +
      +
      +on_config_received¶
      +

      Called when the device receives its configuration.

      +
      + +
      +
      +on_message¶
      +

      Called when a message has been received from the device.

      +
      + +
      +
      +on_open¶
      +

      Called when the device has been opened.

      +
      + +
      +
      +on_power_changed¶
      +

      Called when panel power switches between AC and DC.

      +
      + +
      +
      +on_read¶
      +

      Called when a line has been read from the device.

      +
      + +
      +
      +on_status_changed¶
      +

      Called when the panel status changes.

      +
      + +
      +
      +on_write¶
      +

      Called when data has been written to the device.

      +
      + +
      +
      +open(baudrate=None, interface=None, index=None, no_reader_thread=False)[source]¶
      +

      Opens the device.

      +
      + +
      +
      +reboot()[source]¶
      +

      Reboots the device.

      +
      + +
      +
      +set_config(settings)[source]¶
      +

      Sets configuration entries on the device.

      +
      + +
      + +
      +
      +class pyad2usb.ad2usb.ExpanderMessage(data=None)[source]¶
      +

      Bases: object

      +

      Represents a message from a zone or relay expansion module.

      +
      +
      +RELAY = 1¶
      +
      + +
      +
      +ZONE = 0¶
      +
      + +
      + +
      +
      +class pyad2usb.ad2usb.LRRMessage(data=None)[source]¶
      +

      Bases: object

      +

      Represent a message from a Long Range Radio.

      +
      + +
      +
      +class pyad2usb.ad2usb.Message(data=None)[source]¶
      +

      Bases: object

      +

      Represents a message from the alarm panel.

      +
      + +
      +
      +class pyad2usb.ad2usb.Overseer(attached_event=None, detached_event=None)[source]¶
      +

      Bases: object

      +

      Factory for creation of AD2USB devices as well as provide4s attach/detach events.”

      +
      +
      +class DetectThread(overseer)[source]¶
      +

      Bases: threading.Thread

      +

      Thread that handles detection of added/removed devices.

      +
      +
      +run()[source]¶
      +

      The actual detection process.

      +
      + +
      +
      +stop()[source]¶
      +

      Stops the thread.

      +
      + +
      + +
      +
      +Overseer.close()[source]¶
      +

      Clean up and shut down.

      +
      + +
      +
      +classmethod Overseer.create(device=None)[source]¶
      +

      Factory method that returns the requested AD2USB device, or the first device.

      +
      + +
      +
      +classmethod Overseer.devices()[source]¶
      +

      Returns a cached list of AD2USB devices located on the system.

      +
      + +
      +
      +classmethod Overseer.find_all()[source]¶
      +

      Returns all AD2USB devices located on the system.

      +
      + +
      +
      +Overseer.get_device(device=None)[source]¶
      +

      Factory method that returns the requested AD2USB device, or the first device.

      +
      + +
      +
      +Overseer.on_attached¶
      +

      Called when an AD2USB device has been detected.

      +
      + +
      +
      +Overseer.on_detached¶
      +

      Called when an AD2USB device has been removed.

      +
      + +
      +
      +Overseer.start()[source]¶
      +

      Starts the detection thread, if not already running.

      +
      + +
      +
      +Overseer.stop()[source]¶
      +

      Stops the detection thread.

      +
      + +
      + +
      +
      +class pyad2usb.ad2usb.RFMessage(data=None)[source]¶
      +

      Bases: object

      +

      Represents a message from an RF receiver.

      +
      + +
      +
      +

      devices Module¶

      +

      Contains different types of devices belonging to the AD2USB family.

      +
      +
      +class pyad2usb.devices.Device[source]¶
      +

      Bases: object

      +

      Generic parent device to all AD2USB products.

      +
      +
      +class ReadThread(device)[source]¶
      +

      Bases: threading.Thread

      +

      Reader thread which processes messages from the device.

      +
      +
      +READ_TIMEOUT = 10¶
      +
      + +
      +
      +run()[source]¶
      +

      The actual read process.

      +
      + +
      +
      +stop()[source]¶
      +

      Stops the running thread.

      +
      + +
      + +
      +
      +Device.id[source]¶
      +
      + +
      +
      +Device.is_reader_alive()[source]¶
      +

      Indicates whether or not the reader thread is alive.

      +
      + +
      +
      +Device.on_close¶
      +

      Called when the device has been closed

      +
      + +
      +
      +Device.on_open¶
      +

      Called when the device has been opened

      +
      + +
      +
      +Device.on_read¶
      +

      Called when a line has been read from the device

      +
      + +
      +
      +Device.on_write¶
      +

      Called when data has been written to the device

      +
      + +
      +
      +Device.stop_reader()[source]¶
      +

      Stops the reader thread.

      +
      + +
      + +
      +
      +class pyad2usb.devices.SerialDevice(interface=None)[source]¶
      +

      Bases: pyad2usb.devices.Device

      +

      AD2USB or AD2SERIAL device exposed with the pyserial interface.

      +
      +
      +BAUDRATE = 19200¶
      +
      + +
      +
      +close()[source]¶
      +

      Closes the device.

      +
      + +
      +
      +static find_all(pattern=None)[source]¶
      +

      Returns all serial ports present.

      +
      + +
      +
      +open(baudrate=19200, interface=None, index=None, no_reader_thread=False)[source]¶
      +

      Opens the device.

      +
      + +
      +
      +read()[source]¶
      +

      Reads a single character from the device.

      +
      + +
      +
      +read_line(timeout=0.0)[source]¶
      +

      Reads a line from the device.

      +
      + +
      +
      +write(data)[source]¶
      +

      Writes data to the device.

      +
      + +
      + +
      +
      +class pyad2usb.devices.SocketDevice(interface=('localhost', 10000))[source]¶
      +

      Bases: pyad2usb.devices.Device

      +

      Device that supports communication with an AD2USB that is exposed via ser2sock or another +Serial to IP interface.

      +
      +
      +close()[source]¶
      +

      Closes the device.

      +
      + +
      +
      +open(baudrate=None, interface=None, index=0, no_reader_thread=False)[source]¶
      +

      Opens the device.

      +
      + +
      +
      +read()[source]¶
      +

      Reads a single character from the device.

      +
      + +
      +
      +read_line(timeout=0.0)[source]¶
      +

      Reads a line from the device.

      +
      + +
      +
      +write(data)[source]¶
      +

      Writes data to the device.

      +
      + +
      + +
      +
      +class pyad2usb.devices.USBDevice(vid=1027, pid=24577, serial=None, description=None, interface=0)[source]¶
      +

      Bases: pyad2usb.devices.Device

      +

      AD2USB device exposed with PyFTDI’s interface.

      +
      +
      +BAUDRATE = 115200¶
      +
      + +
      +
      +FTDI_PRODUCT_ID = 24577¶
      +
      + +
      +
      +FTDI_VENDOR_ID = 1027¶
      +
      + +
      +
      +close()[source]¶
      +

      Closes the device.

      +
      + +
      +
      +static find_all()[source]¶
      +

      Returns all FTDI devices matching our vendor and product IDs.

      +
      + +
      +
      +open(baudrate=115200, interface=None, index=0, no_reader_thread=False)[source]¶
      +

      Opens the device.

      +
      + +
      +
      +read()[source]¶
      +

      Reads a single character from the device.

      +
      + +
      +
      +read_line(timeout=0.0)[source]¶
      +

      Reads a line from the device.

      +
      + +
      +
      +write(data)[source]¶
      +

      Writes data to the device.

      +
      + +
      + +
      +
      +

      util Module¶

      +

      Provides utility classes for the AD2USB devices.

      +
      +
      +exception pyad2usb.util.CommError[source]¶
      +

      Bases: exceptions.Exception

      +

      There was an error communicating with the device.

      +
      + +
      +
      +class pyad2usb.util.Firmware[source]¶
      +

      Bases: object

      +

      Represents firmware for the AD2USB/AD2SERIAL devices.

      +
      +
      +STAGE_BOOT = 2¶
      +
      + +
      +
      +STAGE_DONE = 5¶
      +
      + +
      +
      +STAGE_LOAD = 3¶
      +
      + +
      +
      +STAGE_START = 0¶
      +
      + +
      +
      +STAGE_UPLOADING = 4¶
      +
      + +
      +
      +STAGE_WAITING = 1¶
      +
      + +
      +
      +static upload(dev, filename, progress_callback=None)[source]¶
      +

      Uploads firmware to an AD2USB/AD2SERIAL device.

      +
      + +
      + +
      +
      +exception pyad2usb.util.InvalidMessageError[source]¶
      +

      Bases: exceptions.Exception

      +

      The format of the panel message was invalid.

      +
      + +
      +
      +exception pyad2usb.util.NoDeviceError[source]¶
      +

      Bases: exceptions.Exception

      +

      No devices found.

      +
      + +
      +
      +exception pyad2usb.util.TimeoutError[source]¶
      +

      Bases: exceptions.Exception

      +

      There was a timeout while trying to communicate with the device.

      +
      + +
      +
      +

      Subpackages¶

      + +
      +
      + + +
      +
      +
      +
      +
      +

      Table Of Contents

      + + +

      Previous topic

      +

      Welcome to pyad2usb’s documentation!

      +

      Next topic

      +

      event Package

      +

      This Page

      + + + +
      +
      +
      +
      + + + + \ No newline at end of file diff --git a/docs/_build/html/search.html b/docs/_build/html/search.html new file mode 100644 index 0000000..6723ea9 --- /dev/null +++ b/docs/_build/html/search.html @@ -0,0 +1,105 @@ + + + + + + + + Search — pyad2usb documentation + + + + + + + + + + + + + + + + + + + +
      +
      +
      +
      + +

      Search

      +
      + +

      + Please activate JavaScript to enable the search + functionality. +

      +
      +

      + From here you can search these documents. Enter your search + words into the box below and click "search". Note that the search + function will automatically search for all of the words. Pages + containing fewer words won't appear in the result list. +

      +
      + + + +
      + +
      + +
      + +
      +
      +
      +
      +
      +
      +
      +
      +
      + + + + \ No newline at end of file diff --git a/docs/_build/html/searchindex.js b/docs/_build/html/searchindex.js new file mode 100644 index 0000000..07d020d --- /dev/null +++ b/docs/_build/html/searchindex.js @@ -0,0 +1 @@ +Search.setIndex({envversion:42,terms:{all:[1,3],socketdevic:1,func:3,boot:1,radio:1,on_boot:1,stage_don:1,baudrat:1,locat:1,zone:1,also:3,configur:1,except:1,on_attach:1,add:3,present:1,bypass:1,x03:1,on_read:1,x01:1,match:1,x04:1,sourc:[1,3],"return":1,around:1,format:1,fals:1,on_messag:1,stop:1,util:[],on_bypass:1,detach:1,like:3,level:1,earg:3,list:1,upload:1,method:1,"try":1,whether:1,stage_wait:1,timeout:1,contain:1,found:1,expandermessag:1,page:0,set:1,nodeviceerror:1,on_open:1,creation:1,"static":1,close:1,read_lin:1,event:[],stop_read:1,pyseri:1,index:[0,1],statu:1,detect:1,parent:1,pattern:1,ad2seri:1,reboot:1,content:0,written:1,between:1,"new":3,factori:1,localhost:1,can:3,ser2sock:1,shut:1,full:1,run:1,timeouterror:1,power:1,detached_ev:1,gener:1,usbdevic:1,on_clos:1,base:[1,3],on_config_receiv:1,on_status_chang:1,on_detach:1,panel:1,search:0,actual:1,expos:1,thread:1,readthread:1,set_config:1,stage_start:1,provide4:1,descript:1,chang:1,find_al:1,ad2usb:[],first:1,oper:3,rang:1,via:1,vid:1,attached_ev:1,modul:[],down:1,filenam:1,alreadi:1,messag:1,famili:1,on_writ:1,open:1,on_power_chang:1,differ:1,"long":1,from:1,commun:1,detectthread:1,support:1,devic:[],system:1,been:1,get_devic:1,trigger:1,call:[1,3],interfac:1,type:1,start:1,"function":3,wrapper:1,no_reader_thread:1,stage_load:1,fire:3,handler:3,commerror:1,stage_boot:1,rfmessag:1,relai:1,x02:1,obj:3,line:1,cach:1,serialdevic:1,must:3,none:[1,3],sender:3,retriev:1,provid:1,remov:[1,3],on_alarm:1,dev:1,charact:1,defin:3,"while":1,doc:3,stage_upload:1,error:1,aliv:1,creat:1,process:1,request:1,pid:1,reader:1,repres:1,high:1,packag:[],itself:3,exist:3,ftdi_vendor_id:1,our:1,read_timeout:1,vendor:1,ftdi_product_id:1,attach:1,progress_callback:1,receiv:1,anoth:1,belong:1,when:1,invalid:1,port:1,write:1,handl:1,read:1,which:1,instead:3,you:3,singl:1,product:1,finish:1,firmwar:1,pyftdi:1,expans:1,object:[1,3],ftdi:1,get_config:1,eventhandl:3,data:1,"class":[1,3],serial:1,subpackag:[],classmethod:1,entri:1,alarm:1,well:1,lrrmessag:1,"switch":1,is_reader_al:1,clean:1,invalidmessageerror:1,overs:1},objtypes:{"0":"py:module","1":"py:method","2":"py:attribute","3":"py:class","4":"py:staticmethod","5":"py:exception","6":"py:classmethod"},objnames:{"0":["py","module","Python module"],"1":["py","method","Python method"],"2":["py","attribute","Python attribute"],"3":["py","class","Python class"],"4":["py","staticmethod","Python static method"],"5":["py","exception","Python exception"],"6":["py","classmethod","Python class method"]},filenames:["index","pyad2usb","modules","pyad2usb.event"],titles:["Welcome to pyad2usb’s documentation!","pyad2usb Package","pyad2usb","event Package"],objects:{"pyad2usb.devices":{Device:[1,3,1,""],SocketDevice:[1,3,1,""],USBDevice:[1,3,1,""],SerialDevice:[1,3,1,""]},"pyad2usb.util.Firmware":{STAGE_LOAD:[1,2,1,""],upload:[1,4,1,""],STAGE_BOOT:[1,2,1,""],STAGE_START:[1,2,1,""],STAGE_UPLOADING:[1,2,1,""],STAGE_WAITING:[1,2,1,""],STAGE_DONE:[1,2,1,""]},"pyad2usb.devices.SerialDevice":{write:[1,1,1,""],BAUDRATE:[1,2,1,""],read:[1,1,1,""],read_line:[1,1,1,""],find_all:[1,4,1,""],close:[1,1,1,""],open:[1,1,1,""]},"pyad2usb.ad2usb.Overseer.DetectThread":{run:[1,1,1,""],stop:[1,1,1,""]},"pyad2usb.devices.Device":{on_open:[1,2,1,""],on_write:[1,2,1,""],ReadThread:[1,3,1,""],on_close:[1,2,1,""],on_read:[1,2,1,""],stop_reader:[1,1,1,""],is_reader_alive:[1,1,1,""],id:[1,2,1,""]},pyad2usb:{util:[1,0,1,""],"__init__":[1,0,1,""],ad2usb:[1,0,1,""],devices:[1,0,1,""],event:[3,0,1,""]},"pyad2usb.ad2usb":{RFMessage:[1,3,1,""],LRRMessage:[1,3,1,""],ExpanderMessage:[1,3,1,""],Overseer:[1,3,1,""],Message:[1,3,1,""],AD2USB:[1,3,1,""]},"pyad2usb.event":{event:[3,0,1,""]},"pyad2usb.devices.Device.ReadThread":{READ_TIMEOUT:[1,2,1,""],run:[1,1,1,""],stop:[1,1,1,""]},"pyad2usb.util":{CommError:[1,5,1,""],Firmware:[1,3,1,""],TimeoutError:[1,5,1,""],NoDeviceError:[1,5,1,""],InvalidMessageError:[1,5,1,""]},"pyad2usb.ad2usb.AD2USB":{on_power_changed:[1,2,1,""],F1:[1,2,1,""],F2:[1,2,1,""],F3:[1,2,1,""],F4:[1,2,1,""],on_message:[1,2,1,""],on_config_received:[1,2,1,""],on_open:[1,2,1,""],on_status_changed:[1,2,1,""],on_alarm:[1,2,1,""],get_config:[1,1,1,""],set_config:[1,1,1,""],on_close:[1,2,1,""],on_bypass:[1,2,1,""],reboot:[1,1,1,""],on_boot:[1,2,1,""],on_write:[1,2,1,""],close:[1,1,1,""],on_read:[1,2,1,""],open:[1,1,1,""],id:[1,2,1,""]},"pyad2usb.ad2usb.ExpanderMessage":{RELAY:[1,2,1,""],ZONE:[1,2,1,""]},"pyad2usb.event.event.EventHandler":{fire:[3,1,1,""],add:[3,1,1,""],remove:[3,1,1,""]},"pyad2usb.event.event":{EventHandler:[3,3,1,""],Event:[3,3,1,""]},"pyad2usb.ad2usb.Overseer":{on_attached:[1,2,1,""],get_device:[1,1,1,""],DetectThread:[1,3,1,""],create:[1,6,1,""],stop:[1,1,1,""],devices:[1,6,1,""],on_detached:[1,2,1,""],start:[1,1,1,""],find_all:[1,6,1,""],close:[1,1,1,""]},"pyad2usb.devices.SocketDevice":{read_line:[1,1,1,""],read:[1,1,1,""],write:[1,1,1,""],open:[1,1,1,""],close:[1,1,1,""]},"pyad2usb.devices.USBDevice":{read_line:[1,1,1,""],BAUDRATE:[1,2,1,""],read:[1,1,1,""],write:[1,1,1,""],find_all:[1,4,1,""],FTDI_VENDOR_ID:[1,2,1,""],close:[1,1,1,""],FTDI_PRODUCT_ID:[1,2,1,""],open:[1,1,1,""]}},titleterms:{subpackag:1,welcom:0,pyad2usb:[0,1,2],devic:1,indic:0,event:3,util:1,packag:[1,3],tabl:0,modul:[1,3],document:0,ad2usb:1}}) \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 0000000..5bfd805 --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,306 @@ +# -*- coding: utf-8 -*- +# +# pyad2usb documentation build configuration file, created by +# sphinx-quickstart on Sat Jun 8 14:38:46 2013. +# +# This file is execfile()d with the current directory set to its containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys, os + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +sys.path.insert(0, os.path.abspath('..')) + +# -- General configuration ----------------------------------------------------- + +# If your documentation needs a minimal Sphinx version, state it here. +#needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be extensions +# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. +extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode'] + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +#source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'pyad2usb' +copyright = u'2013, Author' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. +version = '' +# The full version, including alpha/beta/rc tags. +release = '' + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +#language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +#today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ['_build'] + +# The reST default role (used for this markup: `text`) to use for all documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +#show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +#modindex_common_prefix = [] + +# If true, keep warnings as "system message" paragraphs in the built documents. +#keep_warnings = False + + +# -- Options for HTML output --------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'default' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +#html_theme_path = [] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +#html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +#html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +#html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +#html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +#html_domain_indices = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +#html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +#html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +#html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = None + +# Output file base name for HTML help builder. +htmlhelp_basename = 'pyad2usbdoc' + + +# -- Options for LaTeX output -------------------------------------------------- + +latex_elements = { +# The paper size ('letterpaper' or 'a4paper'). +#'papersize': 'letterpaper', + +# The font size ('10pt', '11pt' or '12pt'). +#'pointsize': '10pt', + +# Additional stuff for the LaTeX preamble. +#'preamble': '', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass [howto/manual]). +latex_documents = [ + ('index', 'pyad2usb.tex', u'pyad2usb Documentation', + u'Author', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# If true, show page references after internal links. +#latex_show_pagerefs = False + +# If true, show URL addresses after external links. +#latex_show_urls = False + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_domain_indices = True + + +# -- Options for manual page output -------------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + ('index', 'pyad2usb', u'pyad2usb Documentation', + [u'Author'], 1) +] + +# If true, show URL addresses after external links. +#man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------------ + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + ('index', 'pyad2usb', u'pyad2usb Documentation', + u'Author', 'pyad2usb', 'One line description of project.', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +#texinfo_appendices = [] + +# If false, no module index is generated. +#texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +#texinfo_show_urls = 'footnote' + +# If true, do not generate a @detailmenu in the "Top" node's menu. +#texinfo_no_detailmenu = False + + +# -- Options for Epub output --------------------------------------------------- + +# Bibliographic Dublin Core info. +epub_title = u'pyad2usb' +epub_author = u'Author' +epub_publisher = u'Author' +epub_copyright = u'2013, Author' + +# The language of the text. It defaults to the language option +# or en if the language is not set. +#epub_language = '' + +# The scheme of the identifier. Typical schemes are ISBN or URL. +#epub_scheme = '' + +# The unique identifier of the text. This can be a ISBN number +# or the project homepage. +#epub_identifier = '' + +# A unique identification for the text. +#epub_uid = '' + +# A tuple containing the cover image and cover page html template filenames. +#epub_cover = () + +# A sequence of (type, uri, title) tuples for the guide element of content.opf. +#epub_guide = () + +# HTML files that should be inserted before the pages created by sphinx. +# The format is a list of tuples containing the path and title. +#epub_pre_files = [] + +# HTML files shat should be inserted after the pages created by sphinx. +# The format is a list of tuples containing the path and title. +#epub_post_files = [] + +# A list of files that should not be packed into the epub file. +#epub_exclude_files = [] + +# The depth of the table of contents in toc.ncx. +#epub_tocdepth = 3 + +# Allow duplicate toc entries. +#epub_tocdup = True + +# Fix unsupported image types using the PIL. +#epub_fix_images = False + +# Scale large images. +#epub_max_image_width = 0 + +# If 'no', URL addresses will not be shown. +#epub_show_urls = 'inline' + +# If false, no index is generated. +#epub_use_index = True diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 0000000..6085464 --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,23 @@ +.. pyad2usb documentation master file, created by + sphinx-quickstart on Sat Jun 8 14:38:46 2013. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to pyad2usb's documentation! +==================================== + +Contents: + +.. toctree:: + :maxdepth: 4 + + pyad2usb + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + diff --git a/docs/make.bat b/docs/make.bat new file mode 100644 index 0000000..6ded9e3 --- /dev/null +++ b/docs/make.bat @@ -0,0 +1,242 @@ +@ECHO OFF + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set BUILDDIR=_build +set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% . +set I18NSPHINXOPTS=%SPHINXOPTS% . +if NOT "%PAPER%" == "" ( + set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS% + set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS% +) + +if "%1" == "" goto help + +if "%1" == "help" ( + :help + echo.Please use `make ^` where ^ is one of + echo. html to make standalone HTML files + echo. dirhtml to make HTML files named index.html in directories + echo. singlehtml to make a single large HTML file + echo. pickle to make pickle files + echo. json to make JSON files + echo. htmlhelp to make HTML files and a HTML help project + echo. qthelp to make HTML files and a qthelp project + echo. devhelp to make HTML files and a Devhelp project + echo. epub to make an epub + echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter + echo. text to make text files + echo. man to make manual pages + echo. texinfo to make Texinfo files + echo. gettext to make PO message catalogs + echo. changes to make an overview over all changed/added/deprecated items + echo. xml to make Docutils-native XML files + echo. pseudoxml to make pseudoxml-XML files for display purposes + echo. linkcheck to check all external links for integrity + echo. doctest to run all doctests embedded in the documentation if enabled + goto end +) + +if "%1" == "clean" ( + for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i + del /q /s %BUILDDIR%\* + goto end +) + + +%SPHINXBUILD% 2> nul +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +if "%1" == "html" ( + %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/html. + goto end +) + +if "%1" == "dirhtml" ( + %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml. + goto end +) + +if "%1" == "singlehtml" ( + %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml. + goto end +) + +if "%1" == "pickle" ( + %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can process the pickle files. + goto end +) + +if "%1" == "json" ( + %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can process the JSON files. + goto end +) + +if "%1" == "htmlhelp" ( + %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can run HTML Help Workshop with the ^ +.hhp project file in %BUILDDIR%/htmlhelp. + goto end +) + +if "%1" == "qthelp" ( + %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; now you can run "qcollectiongenerator" with the ^ +.qhcp project file in %BUILDDIR%/qthelp, like this: + echo.^> qcollectiongenerator %BUILDDIR%\qthelp\pyad2usb.qhcp + echo.To view the help file: + echo.^> assistant -collectionFile %BUILDDIR%\qthelp\pyad2usb.ghc + goto end +) + +if "%1" == "devhelp" ( + %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. + goto end +) + +if "%1" == "epub" ( + %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The epub file is in %BUILDDIR%/epub. + goto end +) + +if "%1" == "latex" ( + %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex + if errorlevel 1 exit /b 1 + echo. + echo.Build finished; the LaTeX files are in %BUILDDIR%/latex. + goto end +) + +if "%1" == "latexpdf" ( + %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex + cd %BUILDDIR%/latex + make all-pdf + cd %BUILDDIR%/.. + echo. + echo.Build finished; the PDF files are in %BUILDDIR%/latex. + goto end +) + +if "%1" == "latexpdfja" ( + %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex + cd %BUILDDIR%/latex + make all-pdf-ja + cd %BUILDDIR%/.. + echo. + echo.Build finished; the PDF files are in %BUILDDIR%/latex. + goto end +) + +if "%1" == "text" ( + %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The text files are in %BUILDDIR%/text. + goto end +) + +if "%1" == "man" ( + %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The manual pages are in %BUILDDIR%/man. + goto end +) + +if "%1" == "texinfo" ( + %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo. + goto end +) + +if "%1" == "gettext" ( + %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The message catalogs are in %BUILDDIR%/locale. + goto end +) + +if "%1" == "changes" ( + %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes + if errorlevel 1 exit /b 1 + echo. + echo.The overview file is in %BUILDDIR%/changes. + goto end +) + +if "%1" == "linkcheck" ( + %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck + if errorlevel 1 exit /b 1 + echo. + echo.Link check complete; look for any errors in the above output ^ +or in %BUILDDIR%/linkcheck/output.txt. + goto end +) + +if "%1" == "doctest" ( + %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest + if errorlevel 1 exit /b 1 + echo. + echo.Testing of doctests in the sources finished, look at the ^ +results in %BUILDDIR%/doctest/output.txt. + goto end +) + +if "%1" == "xml" ( + %SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The XML files are in %BUILDDIR%/xml. + goto end +) + +if "%1" == "pseudoxml" ( + %SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml + if errorlevel 1 exit /b 1 + echo. + echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml. + goto end +) + +:end diff --git a/docs/modules.rst b/docs/modules.rst new file mode 100644 index 0000000..34e82c9 --- /dev/null +++ b/docs/modules.rst @@ -0,0 +1,7 @@ +pyad2usb +======== + +.. toctree:: + :maxdepth: 4 + + pyad2usb diff --git a/docs/pyad2usb.event.rst b/docs/pyad2usb.event.rst new file mode 100644 index 0000000..565d5a3 --- /dev/null +++ b/docs/pyad2usb.event.rst @@ -0,0 +1,19 @@ +event Package +============= + +:mod:`event` Package +-------------------- + +.. automodule:: pyad2usb.event + :members: + :undoc-members: + :show-inheritance: + +:mod:`event` Module +------------------- + +.. automodule:: pyad2usb.event.event + :members: + :undoc-members: + :show-inheritance: + diff --git a/docs/pyad2usb.rst b/docs/pyad2usb.rst new file mode 100644 index 0000000..08dfd6b --- /dev/null +++ b/docs/pyad2usb.rst @@ -0,0 +1,42 @@ +pyad2usb Package +================ + +:mod:`pyad2usb` Package +----------------------- + +.. automodule:: pyad2usb.__init__ + :members: + :undoc-members: + :show-inheritance: + +:mod:`ad2usb` Module +-------------------- + +.. automodule:: pyad2usb.ad2usb + :members: + :undoc-members: + :show-inheritance: + +:mod:`devices` Module +--------------------- + +.. automodule:: pyad2usb.devices + :members: + :undoc-members: + :show-inheritance: + +:mod:`util` Module +------------------ + +.. automodule:: pyad2usb.util + :members: + :undoc-members: + :show-inheritance: + +Subpackages +----------- + +.. toctree:: + + pyad2usb.event + From 7a5966b46d45da2fc0f3acc79af9e60a43f4a279 Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Sun, 9 Jun 2013 16:56:00 -0700 Subject: [PATCH 13/30] Config support added. --- pyad2usb/ad2usb.py | 63 ++++++++++++++++++++++++++++++++++++++-------- test.py | 6 ++--- 2 files changed, 56 insertions(+), 13 deletions(-) diff --git a/pyad2usb/ad2usb.py b/pyad2usb/ad2usb.py index c69c336..4ae7225 100644 --- a/pyad2usb/ad2usb.py +++ b/pyad2usb/ad2usb.py @@ -5,6 +5,7 @@ Provides the full AD2USB class and factory. import time import threading import re +import logging from .event import event from . import devices from . import util @@ -181,9 +182,13 @@ class AD2USB(object): self._alarm_status = None self._bypass_status = None - self._settings = {} - - self._address_mask = 0xFF80 # TEMP + self.address = 18 + self.configbits = 0xFF00 + self.address_mask = 0x00000000 + self.emulate_zone = [False for x in range(5)] + self.emulate_relay = [False for x in range(4)] + self.emulate_lrr = False + self.deduplicate = False def open(self, baudrate=None, interface=None, index=None, no_reader_thread=False): """ @@ -205,11 +210,34 @@ class AD2USB(object): """ self._device.write("C\r") - def set_config(self, settings): + def save_config(self): """ - + Sets configuration entries on the device. """ - pass + config_string = '' + + # HACK: Both of these methods are ugly.. but I can't think of an elegant way of doing it. + + #config_string += 'ADDRESS={0}&'.format(self.address) + #config_string += 'CONFIGBITS={0:x}&'.format(self.configbits) + #config_string += 'MASK={0:x}&'.format(self.address_mask) + #config_string += 'EXP={0}&'.format(''.join(['Y' if z else 'N' for z in self.emulate_zone])) + #config_string += 'REL={0}&'.format(''.join(['Y' if r else 'N' for r in self.emulate_relay])) + #config_string += 'LRR={0}&'.format('Y' if self.emulate_lrr else 'N') + #config_string += 'DEDUPLICATE={0}'.format('Y' if self.deduplicate else 'N') + + config_entries = [] + config_entries.append(('ADDRESS', '{0}'.format(self.address))) + config_entries.append(('CONFIGBITS', '{0:x}'.format(self.configbits))) + config_entries.append(('MASK', '{0:x}'.format(self.address_mask))) + config_entries.append(('EXP', ''.join(['Y' if z else 'N' for z in self.emulate_zone]))) + config_entries.append(('REL', ''.join(['Y' if r else 'N' for r in self.emulate_relay]))) + config_entries.append(('LRR', 'Y' if self.emulate_lrr else 'N')) + config_entries.append(('DEDUPLICATE', 'Y' if self.deduplicate else 'N')) + + config_string = '&'.join(['='.join(t) for t in config_entries]) + + self._device.write("C{0}\r".format(config_string)) def reboot(self): """ @@ -242,7 +270,7 @@ class AD2USB(object): if data[0] != '!': msg = Message(data) - if self._address_mask & msg.mask > 0: + if self.address_mask & msg.mask > 0: self._update_internal_states(msg) else: # specialty messages @@ -266,9 +294,24 @@ class AD2USB(object): for setting in config_string.split('&'): k, v = setting.split('=') - self._settings[k] = v - - self.on_config_received(self._settings) + if k == 'ADDRESS': + self.address = int(v) + elif k == 'CONFIGBITS': + self.configbits = int(v, 16) + elif k == 'MASK': + self.address_mask = int(v, 16) + elif k == 'EXP': + for z in range(5): + self.emulate_zone[z] = True if v[z] == 'Y' else False + elif k == 'REL': + for r in range(4): + self.emulate_relay[r] = True if v[r] == 'Y' else False + elif k == 'LRR': + self.emulate_lrr = True if v == 'Y' else False + elif k == 'DEDUPLICATE': + self.deduplicate = True if v == 'Y' else False + + self.on_config_received() def _update_internal_states(self, message): if message.ac_power != self._power_status: diff --git a/test.py b/test.py index 4a7ccd7..02e70df 100755 --- a/test.py +++ b/test.py @@ -5,6 +5,7 @@ import time import signal import traceback import sys +import logging running = True @@ -221,11 +222,9 @@ def test_socket(): a2u.on_config_received += handle_config a2u.open() + #a2u.save_config() #a2u.reboot() a2u.get_config() - print pyad2usb.ad2usb.AD2USB.F1 - - print dev._id while running: time.sleep(0.1) @@ -289,6 +288,7 @@ def test_double_panel_write(): dev2.close() try: + logging.basicConfig(level=logging.DEBUG) signal.signal(signal.SIGINT, signal_handler) #test_serial() From ee9803e6e2d9b2fa4ba8a7fa93f89f38dc31c98e Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Sun, 9 Jun 2013 17:31:52 -0700 Subject: [PATCH 14/30] Added support for clearing and faulting zones. --- pyad2usb/ad2usb.py | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/pyad2usb/ad2usb.py b/pyad2usb/ad2usb.py index 4ae7225..760c00d 100644 --- a/pyad2usb/ad2usb.py +++ b/pyad2usb/ad2usb.py @@ -190,6 +190,10 @@ class AD2USB(object): self.emulate_lrr = False self.deduplicate = False + @property + def id(self): + return self._device.id + def open(self, baudrate=None, interface=None, index=None, no_reader_thread=False): """ Opens the device. @@ -245,9 +249,19 @@ class AD2USB(object): """ self._device.write('=') - @property - def id(self): - return self._device.id + def fault_zone(self, zone, simulate_wire_problem=False): + """ + Faults a zone if we are emulating a zone expander. + """ + status = 2 if simulate_wire_problem else 1 + + self._device.write("L{0:02}{1}".format(zone, status)) + + def clear_zone(self, zone): + """ + Clears a zone if we are emulating a zone expander. + """ + self._device.write("L{0:02}0".format(zone)) def _wire_events(self): """ From 679080e5ef3181cd8fffde52263fb02db99c9274 Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Sun, 9 Jun 2013 18:14:49 -0700 Subject: [PATCH 15/30] Added arm/disarm events. --- pyad2usb/ad2usb.py | 11 +++++++++++ test.py | 8 ++++++++ 2 files changed, 19 insertions(+) diff --git a/pyad2usb/ad2usb.py b/pyad2usb/ad2usb.py index 760c00d..b568d54 100644 --- a/pyad2usb/ad2usb.py +++ b/pyad2usb/ad2usb.py @@ -151,6 +151,8 @@ class AD2USB(object): """ # High-level Events + on_arm = event.Event('Called when the panel is armed.') + on_disarm = event.Event('Called when the panel is disarmed.') on_status_changed = event.Event('Called when the panel status changes.') on_power_changed = event.Event('Called when panel power switches between AC and DC.') on_alarm = event.Event('Called when the alarm is triggered.') @@ -346,6 +348,15 @@ class AD2USB(object): if old_status is not None: self.on_bypass(self._bypass_status) + if (message.armed_away | message.armed_home) != self._armed_status: + self._armed_status, old_status = message.armed_away | message.armed_home, self._armed_status + + if old_status is not None: + if self._armed_status: + self.on_arm() + else: + self.on_disarm() + def _on_open(self, sender, args): """ Internal handler for opening the device. diff --git a/test.py b/test.py index 02e70df..fff0bfb 100755 --- a/test.py +++ b/test.py @@ -44,6 +44,12 @@ def handle_bypass(sender, args): def handle_message(sender, args): print args +def handle_arm(sender, args): + print 'armed', args + +def handle_disarm(sender, args): + print 'disarmed', args + def handle_firmware(stage): if stage == pyad2usb.ad2usb.util.Firmware.STAGE_START: handle_firmware.wait_tick = 0 @@ -220,6 +226,8 @@ def test_socket(): a2u.on_bypass += handle_bypass a2u.on_boot += handle_boot a2u.on_config_received += handle_config + a2u.on_arm += handle_arm + a2u.on_disarm += handle_disarm a2u.open() #a2u.save_config() From efa712efe05838f9cf5d87067074e6d2008ae545 Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Sun, 9 Jun 2013 18:37:22 -0700 Subject: [PATCH 16/30] Added fire alarm event. --- pyad2usb/ad2usb.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pyad2usb/ad2usb.py b/pyad2usb/ad2usb.py index b568d54..bfa3193 100644 --- a/pyad2usb/ad2usb.py +++ b/pyad2usb/ad2usb.py @@ -153,9 +153,9 @@ class AD2USB(object): # High-level Events on_arm = event.Event('Called when the panel is armed.') on_disarm = event.Event('Called when the panel is disarmed.') - on_status_changed = event.Event('Called when the panel status changes.') on_power_changed = event.Event('Called when panel power switches between AC and DC.') on_alarm = event.Event('Called when the alarm is triggered.') + on_fire = event.Event('Called when a fire is detected.') on_bypass = event.Event('Called when a zone is bypassed.') on_boot = event.Event('Called when the device finishes bootings.') on_config_received = event.Event('Called when the device receives its configuration.') @@ -357,6 +357,12 @@ class AD2USB(object): else: self.on_disarm() + if message.fire_alarm != self._fire_status: + self._fire_status, old_status = message.fire_alarm, self._fire_status + + if old_status is not None: + self.on_fire(self._fire_status) + def _on_open(self, sender, args): """ Internal handler for opening the device. @@ -405,6 +411,7 @@ class Message(object): self.chime_on = False self.alarm_event_occurred = False self.alarm_sounding = False + self.fire_alarm = False self.numeric_code = "" self.text = "" self.cursor_location = -1 @@ -442,6 +449,7 @@ class Message(object): self.chime_on = not self.bitfield[9:10] == "0" self.alarm_event_occurred = not self.bitfield[10:11] == "0" self.alarm_sounding = not self.bitfield[11:12] == "0" + self.fire_alarm = not self.bitfield[13:14] == "0" self.text = alpha.strip('"') if int(self.panel_data[19:21], 16) & 0x01 > 0: From f5d6f22b8a9cbbd826d0c4731dbe29d309312c70 Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Sun, 9 Jun 2013 18:39:11 -0700 Subject: [PATCH 17/30] Missing fields. --- pyad2usb/ad2usb.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyad2usb/ad2usb.py b/pyad2usb/ad2usb.py index bfa3193..d9b46f7 100644 --- a/pyad2usb/ad2usb.py +++ b/pyad2usb/ad2usb.py @@ -183,6 +183,8 @@ class AD2USB(object): self._power_status = None self._alarm_status = None self._bypass_status = None + self._armed_status = None + self._fire_status = None self.address = 18 self.configbits = 0xFF00 From ed11af8e309380f147b4af6f121f397dcb78d5f5 Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Mon, 10 Jun 2013 19:44:11 -0700 Subject: [PATCH 18/30] Cleanup --- pyad2usb/ad2usb.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pyad2usb/ad2usb.py b/pyad2usb/ad2usb.py index d9b46f7..2e2f8d4 100644 --- a/pyad2usb/ad2usb.py +++ b/pyad2usb/ad2usb.py @@ -96,7 +96,6 @@ class Overseer(object): """ return Overseer.create(device) - class DetectThread(threading.Thread): """ Thread that handles detection of added/removed devices. @@ -196,6 +195,9 @@ class AD2USB(object): @property def id(self): + """ + The ID of the AD2USB device. + """ return self._device.id def open(self, baudrate=None, interface=None, index=None, no_reader_thread=False): @@ -308,6 +310,9 @@ class AD2USB(object): return msg def _handle_config(self, data): + """ + Handles received configuration data. + """ _, config_string = data.split('>') for setting in config_string.split('&'): k, v = setting.split('=') @@ -332,6 +337,9 @@ class AD2USB(object): self.on_config_received() def _update_internal_states(self, message): + """ + Updates internal device states. + """ if message.ac_power != self._power_status: self._power_status, old_status = message.ac_power, self._power_status @@ -467,6 +475,7 @@ class ExpanderMessage(object): """ Represents a message from a zone or relay expansion module. """ + ZONE = 0 RELAY = 1 @@ -516,6 +525,7 @@ class RFMessage(object): """ Represents a message from an RF receiver. """ + def __init__(self, data=None): """ Constructor @@ -546,6 +556,7 @@ class LRRMessage(object): """ Represent a message from a Long Range Radio. """ + def __init__(self, data=None): """ Constructor From d30d657cf0a7987f58309b01d4911ee89b1af646 Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Mon, 10 Jun 2013 20:24:01 -0700 Subject: [PATCH 19/30] Exception handling. Consistency changes. Docs. --- pyad2usb/devices.py | 78 +++++++++++++++++++++++++++++---------------- 1 file changed, 51 insertions(+), 27 deletions(-) diff --git a/pyad2usb/devices.py b/pyad2usb/devices.py index 119ae1b..8a60ff0 100644 --- a/pyad2usb/devices.py +++ b/pyad2usb/devices.py @@ -26,22 +26,28 @@ class Device(object): on_write = event.Event('Called when data has been written to the device') def __init__(self): + """ + Constructor + """ self._id = '' self._buffer = '' self._interface = None self._device = None self._running = False - self._read_thread = Device.ReadThread(self) # NOTE: not sure this is going to work.. - - def __del__(self): - pass + self._read_thread = Device.ReadThread(self) @property def id(self): + """ + Retrieve the device ID. + """ return self._id @id.setter def id(self, value): + """ + Sets the device ID. + """ self._id = value def is_reader_alive(self): @@ -158,9 +164,7 @@ class USBDevice(Device): self._id = 'USB {0}:{1}'.format(self._device.usb_dev.bus, self._device.usb_dev.address) except (usb.core.USBError, FtdiError), err: - self.on_close() - - raise util.NoDeviceError('Error opening AD2USB device: {0}'.format(str(err))) + raise util.NoDeviceError('Error opening device: {0}'.format(str(err))) else: self._running = True if not no_reader_thread: @@ -194,13 +198,21 @@ class USBDevice(Device): self.on_write(data) except FtdiError, err: - raise util.CommError('Error writing to AD2USB device.') + raise util.CommError('Error writing to device: {0}'.format(str(err))) def read(self): """ Reads a single character from the device. """ - return self._device.read_data(1) + ret = None + + try: + ret = self._device.read_data(1) + + except (usb.core.USBError, FtdiError), err: + raise util.CommError('Error reading from device: {0}'.format(str(err))) + + return ret def read_line(self, timeout=0.0): """ @@ -243,7 +255,7 @@ class USBDevice(Device): except (usb.core.USBError, FtdiError), err: timer.cancel() - raise util.CommError('Error reading from AD2USB device: {0}'.format(str(err))) + raise util.CommError('Error reading from device: {0}'.format(str(err))) else: if got_line: ret = self._buffer @@ -280,8 +292,8 @@ class SerialDevice(Device): devices = serial.tools.list_ports.grep(pattern) else: devices = serial.tools.list_ports.comports() - except Exception, err: - raise util.CommError('Error enumerating AD2SERIAL devices: {0}'.format(str(err))) + except SerialException, err: + raise util.CommError('Error enumerating serial devices: {0}'.format(str(err))) return devices @@ -304,7 +316,7 @@ class SerialDevice(Device): baudrate = SerialDevice.BAUDRATE if self._interface is None and interface is None: - raise util.NoDeviceError('No AD2SERIAL device interface specified.') + raise util.NoDeviceError('No device interface specified.') if interface is not None: self._interface = interface @@ -322,9 +334,7 @@ class SerialDevice(Device): # all issues with it. except (serial.SerialException, ValueError), err: - self.on_close() - - raise util.NoDeviceError('Error opening AD2SERIAL device on port {0}.'.format(interface)) + raise util.NoDeviceError('Error opening device on port {0}.'.format(interface)) else: self._running = True self.on_open(('N/A', "AD2SERIAL")) @@ -355,7 +365,7 @@ class SerialDevice(Device): except serial.SerialTimeoutException, err: pass except serial.SerialException, err: - raise util.CommError('Error writing to serial device.') + raise util.CommError('Error writing to device.') else: self.on_write(data) @@ -363,7 +373,15 @@ class SerialDevice(Device): """ Reads a single character from the device. """ - return self._device.read(1) + ret = None + + try: + ret = self._device.read(1) + + except serial.SerialException, err: + raise util.CommError('Error reading from device: {0}'.format(str(err))) + + return ret def read_line(self, timeout=0.0): """ @@ -406,7 +424,7 @@ class SerialDevice(Device): except (OSError, serial.SerialException), err: timer.cancel() - raise util.CommError('Error reading from AD2SERIAL device: {0}'.format(str(err))) + raise util.CommError('Error reading from device: {0}'.format(str(err))) else: if got_line: ret = self._buffer @@ -452,9 +470,7 @@ class SocketDevice(Device): self._id = '{0}:{1}'.format(self._host, self._port) except socket.error, err: - self.on_close() - - raise util.NoDeviceError('Error opening AD2SOCKET device at {0}:{1}'.format(self._host, self._port)) + raise util.NoDeviceError('Error opening device at {0}:{1}'.format(self._host, self._port)) else: self._running = True @@ -482,19 +498,27 @@ class SocketDevice(Device): """ Writes data to the device. """ - data_sent = self._device.send(data) + data_sent = None + + try: + data_sent = self._device.send(data) + + if data_sent == 0: + raise util.CommError('Error writing to device.') - if data_sent == 0: - raise util.CommError('Error while sending data.') - else: self.on_write(data) + except socket.error, err: + raise util.CommError('Error writing to device: {0}'.format(str(err))) + return data_sent def read(self): """ Reads a single character from the device. """ + data = None + try: data = self._device.recv(1) except socket.error, err: @@ -543,7 +567,7 @@ class SocketDevice(Device): except socket.error, err: timer.cancel() - raise util.CommError('Error reading from Socket device: {0}'.format(str(err))) + raise util.CommError('Error reading from device: {0}'.format(str(err))) else: if got_line: ret = self._buffer From e0b29e363553975c89d0695741381a1b80a8dc37 Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Mon, 10 Jun 2013 20:32:03 -0700 Subject: [PATCH 20/30] Consistency changes. --- pyad2usb/devices.py | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/pyad2usb/devices.py b/pyad2usb/devices.py index 8a60ff0..909eefc 100644 --- a/pyad2usb/devices.py +++ b/pyad2usb/devices.py @@ -92,6 +92,7 @@ class Device(object): while self._running: try: self._device.read_line(timeout=self.READ_TIMEOUT) + except util.TimeoutError, err: pass @@ -116,6 +117,7 @@ class USBDevice(Device): try: devices = Ftdi.find_all([(USBDevice.FTDI_VENDOR_ID, USBDevice.FTDI_PRODUCT_ID)], nocache=True) + except (usb.core.USBError, FtdiError), err: raise util.CommError('Error enumerating AD2USB devices: {0}'.format(str(err))) @@ -163,8 +165,10 @@ class USBDevice(Device): self._device.set_baudrate(baudrate) self._id = 'USB {0}:{1}'.format(self._device.usb_dev.bus, self._device.usb_dev.address) + except (usb.core.USBError, FtdiError), err: raise util.NoDeviceError('Error opening device: {0}'.format(str(err))) + else: self._running = True if not no_reader_thread: @@ -184,7 +188,8 @@ class USBDevice(Device): # HACK: Probably should fork pyftdi and make this call in .close(). self._device.usb_dev.attach_kernel_driver(self._interface) - except (FtdiError, usb.core.USBError): + + except: pass self.on_close() @@ -256,6 +261,7 @@ class USBDevice(Device): timer.cancel() raise util.CommError('Error reading from device: {0}'.format(str(err))) + else: if got_line: ret = self._buffer @@ -292,6 +298,7 @@ class SerialDevice(Device): devices = serial.tools.list_ports.grep(pattern) else: devices = serial.tools.list_ports.comports() + except SerialException, err: raise util.CommError('Error enumerating serial devices: {0}'.format(str(err))) @@ -335,6 +342,7 @@ class SerialDevice(Device): except (serial.SerialException, ValueError), err: raise util.NoDeviceError('Error opening device on port {0}.'.format(interface)) + else: self._running = True self.on_open(('N/A', "AD2SERIAL")) @@ -351,7 +359,8 @@ class SerialDevice(Device): self._read_thread.stop() self._device.close() - except Exception, err: + + except: pass self.on_close() @@ -362,10 +371,13 @@ class SerialDevice(Device): """ try: self._device.write(data) + except serial.SerialTimeoutException, err: pass + except serial.SerialException, err: raise util.CommError('Error writing to device.') + else: self.on_write(data) @@ -425,6 +437,7 @@ class SerialDevice(Device): timer.cancel() raise util.CommError('Error reading from device: {0}'.format(str(err))) + else: if got_line: ret = self._buffer @@ -471,6 +484,7 @@ class SocketDevice(Device): except socket.error, err: raise util.NoDeviceError('Error opening device at {0}:{1}'.format(self._host, self._port)) + else: self._running = True @@ -489,6 +503,7 @@ class SocketDevice(Device): self._read_thread.stop() self._device.shutdown(socket.SHUT_RDWR) # Make sure that it closes immediately. self._device.close() + except: pass @@ -521,6 +536,7 @@ class SocketDevice(Device): try: data = self._device.recv(1) + except socket.error, err: raise util.CommError('Error while reading from device: {0}'.format(str(err))) @@ -568,6 +584,7 @@ class SocketDevice(Device): timer.cancel() raise util.CommError('Error reading from device: {0}'.format(str(err))) + else: if got_line: ret = self._buffer From 8a9900f501e463d1efce451b5cbf12e4019ca45a Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Mon, 10 Jun 2013 20:35:04 -0700 Subject: [PATCH 21/30] Deleting device on close. --- pyad2usb/ad2usb.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pyad2usb/ad2usb.py b/pyad2usb/ad2usb.py index 2e2f8d4..38c96d3 100644 --- a/pyad2usb/ad2usb.py +++ b/pyad2usb/ad2usb.py @@ -212,6 +212,7 @@ class AD2USB(object): Closes the device. """ self._device.close() + del self._device self._device = None def get_config(self): From efe0fe9f142498add0f86f45b4c0b7b6923055a4 Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Thu, 13 Jun 2013 13:26:23 -0700 Subject: [PATCH 22/30] Fixed expander zone faults. Fixed message fields and added additional ones. --- pyad2usb/ad2usb.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/pyad2usb/ad2usb.py b/pyad2usb/ad2usb.py index 38c96d3..04706e5 100644 --- a/pyad2usb/ad2usb.py +++ b/pyad2usb/ad2usb.py @@ -262,13 +262,13 @@ class AD2USB(object): """ status = 2 if simulate_wire_problem else 1 - self._device.write("L{0:02}{1}".format(zone, status)) + self._device.write("L{0:02}{1}\r".format(zone, status)) def clear_zone(self, zone): """ Clears a zone if we are emulating a zone expander. """ - self._device.write("L{0:02}0".format(zone)) + self._device.write("L{0:02}0\r".format(zone)) def _wire_events(self): """ @@ -422,7 +422,11 @@ class Message(object): self.chime_on = False self.alarm_event_occurred = False self.alarm_sounding = False + self.battery_low = False + self.entry_delay_off = False self.fire_alarm = False + self.check_zone = False + self.perimeter_only = False self.numeric_code = "" self.text = "" self.cursor_location = -1 @@ -460,7 +464,12 @@ class Message(object): self.chime_on = not self.bitfield[9:10] == "0" self.alarm_event_occurred = not self.bitfield[10:11] == "0" self.alarm_sounding = not self.bitfield[11:12] == "0" - self.fire_alarm = not self.bitfield[13:14] == "0" + self.battery_low = not self.bitfield[12:13] == "0" + self.entry_delay_off = not self.bitfield[13:14] == "0" + self.fire_alarm = not self.bitfield[14:15] == "0" + self.check_zone = not self.bitfield[15:16] == "0" + self.perimeter_only = not self.bitfield[16:17] == "0" + # bits 17-20 unused. self.text = alpha.strip('"') if int(self.panel_data[19:21], 16) & 0x01 > 0: @@ -583,4 +592,4 @@ class LRRMessage(object): self.raw = data _, values = data.split(':') - self._event_data, self._partition, self._event_type = values.split(',') \ No newline at end of file + self._event_data, self._partition, self._event_type = values.split(',') From bf73c6821f6a41772e08117eebc4a84454f3f2b4 Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Thu, 13 Jun 2013 13:28:09 -0700 Subject: [PATCH 23/30] Working timeout version of the tracker. --- pyad2usb/ad2usb.py | 37 +++++++++++++++++++++++++++++++++++++ test.py | 26 ++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) diff --git a/pyad2usb/ad2usb.py b/pyad2usb/ad2usb.py index 04706e5..5798ee8 100644 --- a/pyad2usb/ad2usb.py +++ b/pyad2usb/ad2usb.py @@ -6,6 +6,7 @@ import time import threading import re import logging +from collections import OrderedDict from .event import event from . import devices from . import util @@ -158,6 +159,8 @@ class AD2USB(object): on_bypass = event.Event('Called when a zone is bypassed.') on_boot = event.Event('Called when the device finishes bootings.') on_config_received = event.Event('Called when the device receives its configuration.') + on_fault = event.Event('Called when the device detects a zone fault.') + on_restore = event.Event('Called when the device detects that a fault is restored.') # Mid-level Events on_message = event.Event('Called when a message has been received from the device.') @@ -174,6 +177,8 @@ class AD2USB(object): F3 = unichr(3) + unichr(3) + unichr(3) F4 = unichr(4) + unichr(4) + unichr(4) + ZONE_EXPIRE = 30 + def __init__(self, device): """ Constructor @@ -184,6 +189,7 @@ class AD2USB(object): self._bypass_status = None self._armed_status = None self._fire_status = None + self._zone_status = OrderedDict() self.address = 18 self.configbits = 0xFF00 @@ -374,6 +380,37 @@ class AD2USB(object): if old_status is not None: self.on_fire(self._fire_status) + if message.check_zone or (not message.ready and "FAULT" in message.text): + self._update_zone_status(message) + + self._clear_expired_zones(message) + + def _update_zone_status(self, message): + zone = -1 + + try: + zone = int(message.numeric_code) + except ValueError: + zone = int(message.numeric_code, 16) + + if zone not in self._zone_status: + self.on_fault(zone) + + self._last_zone_fault = zone + self._zone_status[zone] = (True, time.time()) + + def _clear_expired_zones(self, message): + clear_time = time.time() + cleared_zones = [] + + for z, status in self._zone_status.iteritems(): + if message.ready or (status[0] and clear_time - status[1] >= self.ZONE_EXPIRE): + cleared_zones.append(z) + + for z in cleared_zones: + del self._zone_status[z] + self.on_restore(z) + def _on_open(self, sender, args): """ Internal handler for opening the device. diff --git a/test.py b/test.py index fff0bfb..48c50ad 100755 --- a/test.py +++ b/test.py @@ -84,6 +84,12 @@ def handle_boot(sender, args): def handle_config(sender, args): print 'config', args +def handle_fault(sender, args): + print 'zone fault', args + +def handle_restore(sender, args): + print 'zone restored', args + def upload_usb(): dev = pyad2usb.ad2usb.devices.USBDevice() @@ -228,12 +234,32 @@ def test_socket(): a2u.on_config_received += handle_config a2u.on_arm += handle_arm a2u.on_disarm += handle_disarm + a2u.on_fault += handle_fault + a2u.on_restore += handle_restore a2u.open() #a2u.save_config() #a2u.reboot() a2u.get_config() + #a2u.address = 18 + #a2u.configbits = 0xff00 + #a2u.address_mask = 0xFFFFFFFF + #a2u.emulate_zone[0] = False + #a2u.emulate_relay[0] = False + #a2u.emulate_lrr = False + #a2u.deduplicate = False + + #time.sleep(3) + #a2u.emulate_zone[1] = True + #a2u.save_config() + + #time.sleep(1) + #a2u.fault_zone(17, True) + + #time.sleep(15) + #a2u.clear_zone(17) + while running: time.sleep(0.1) From 9251e192bd0a4920b6f0a6d98cfc07a5dcfb6f09 Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Fri, 14 Jun 2013 10:29:35 -0700 Subject: [PATCH 24/30] It's a mess, but I think this works. --- pyad2usb/ad2usb.py | 209 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 188 insertions(+), 21 deletions(-) diff --git a/pyad2usb/ad2usb.py b/pyad2usb/ad2usb.py index 5798ee8..0c7b9cd 100644 --- a/pyad2usb/ad2usb.py +++ b/pyad2usb/ad2usb.py @@ -189,7 +189,9 @@ class AD2USB(object): self._bypass_status = None self._armed_status = None self._fire_status = None - self._zone_status = OrderedDict() + self._zones_faulted = [] + self._last_zone_fault = 0 + self._last_wait = False self.address = 18 self.configbits = 0xFF00 @@ -380,37 +382,202 @@ class AD2USB(object): if old_status is not None: self.on_fire(self._fire_status) - if message.check_zone or (not message.ready and "FAULT" in message.text): - self._update_zone_status(message) + self._update_zone_status(message) - self._clear_expired_zones(message) + #self._clear_expired_zones(message) def _update_zone_status(self, message): - zone = -1 + #if message.check_zone or (not message.ready and "FAULT" in message.text): - try: - zone = int(message.numeric_code) - except ValueError: - zone = int(message.numeric_code, 16) + if "Hit * for faults" in message.text: + self._device.send('*') + return - if zone not in self._zone_status: - self.on_fault(zone) + if message.ready: + cleared_zones = [] - self._last_zone_fault = zone - self._zone_status[zone] = (True, time.time()) + for z in self._zones_faulted: + cleared_zones.append(z) - def _clear_expired_zones(self, message): - clear_time = time.time() - cleared_zones = [] + for idx, status in enumerate(cleared_zones): + del self._zones_faulted[idx] + self.on_restore(z) - for z, status in self._zone_status.iteritems(): - if message.ready or (status[0] and clear_time - status[1] >= self.ZONE_EXPIRE): - cleared_zones.append(z) + elif "FAULT" in message.text: + zone = -1 + + try: + zone = int(message.numeric_code) + except ValueError: + zone = int(message.numeric_code, 16) + + if zone not in self._zones_faulted: + # if self._last_zone_fault == 0: + # idx = 0 + # else: + # idx = self._zones_faulted.index(self._last_zone_fault) + 1 - for z in cleared_zones: - del self._zone_status[z] + self._last_zone_fault = zone + self._last_wait = True + self._zones_faulted.append(zone) + self._zones_faulted.sort() + self.on_fault(zone) + + self._clear_expired_zones(zone) + self._last_zone_fault = zone + + def _clear_expired_zones(self, zone): + cleared_zones = [] + + found_last = False + found_end = False + + print '_clear_expired_zones: ', repr(self._zones_faulted) + + # ---------- + #for idx in range(len(self._zones_faulted)): + # idx = 0 + # while idx < len(self._zones_faulted): + # z = self._zones_faulted[idx] + + # if not found_last: + # if z == self._last_zone_fault: + # print ' found start point', z + # found_last = True + + # if found_last: + # if z == zone and self._last_zone_fault != zone and not break_loop: + # print ' found end point', z + # found_end = True + # break + # elif z != self._last_zone_fault and len(self._zones_faulted) > 1: + # print ' clearing', z + # cleared_zones.append(z) + + # if idx == len(self._zones_faulted) - 1 and not found_end: + # print ' rolling back to front of the list.' + # idx = 0 + # break_loop = True + # else: + # idx += 1 + + # ---------- + # idx = 0 + # while not found_end and idx < len(self._zones_faulted): + # z = self._zones_faulted[idx] + + # if z == zone and found_last: + # print ' found end point, exiting', z + # found_end = True + # break + + # if not found_last and z == self._last_zone_fault: + # print ' found start point', z + # found_last = True + + # if found_last: + # print 'removing', z + # self._zones_faulted.remove(z) + + # #print ' idx', idx + # #print ' end', found_end + # #print ' start', found_last + # if idx >= len(self._zones_faulted) - 1 and not found_end and found_last: + # print ' roll' + # idx = 0 + # else: + # idx += 1 + + # ----- + # idx = 0 + # start_pos = -1 + # end_pos = -1 + + # while idx < len(self._zones_faulted): + # z = self._zones_faulted[idx] + + # if z == self._last_zone_fault or self._last_zone_fault == 0: + # print 'start', idx + # start_pos = idx + + # if z == zone: + # print 'end', idx + # end_pos = idx + + # if idx >= len(self._zones_faulted) - 1 and end_pos == -1 and start_pos != -1: + # print 'roll' + # idx = 0 + # else: + # idx += 1 + + # if start_pos < end_pos: + # diff = end_pos - start_pos + + # if diff > 1 and not self._last_wait: + # print 'deleting', start_pos + 1, end_pos + # del self._zones_faulted[start_pos + 1:end_pos] + # elif end_pos < start_pos: + # diff = len(self._zones_faulted) - start_pos + end_pos + # if diff > 1 and not self._last_wait: + # print 'deleting', start_pos + 1, ' -> end' + # del self._zones_faulted[start_pos + 1:] + + # print 'deleting', 'start -> ', end_pos + # del self._zones_faulted[:end_pos] + + # if self._last_wait == True: + # self._last_wait = False + + # for idx, z in enumerate(cleared_zones): + # print ' !remove it', z + # #del self._zones_faulted[idx] + # self._zones_faulted.remove(z) + # self.on_restore(z) + + # ----- + idx = 0 + start_pos = -1 + end_pos = -1 + + while idx < len(self._zones_faulted): + z = self._zones_faulted[idx] + + if z == self._last_zone_fault or self._last_zone_fault == 0: + print 'start', idx + start_pos = idx + + if z == zone: + print 'end', idx + end_pos = idx + + if idx >= len(self._zones_faulted) - 1 and end_pos == -1 and start_pos != -1: + print 'roll' + idx = 0 + else: + idx += 1 + + if start_pos < end_pos: + diff = end_pos - start_pos + + if diff > 1: + print 'deleting', start_pos + 1, end_pos + del self._zones_faulted[start_pos + 1:end_pos] + elif end_pos <= start_pos: + diff = len(self._zones_faulted) - start_pos + end_pos + if diff > 1: + print 'deleting', start_pos + 1, ' -> end' + del self._zones_faulted[start_pos + 1:] + + print 'deleting', 'start -> ', end_pos + del self._zones_faulted[:end_pos] + + for idx, z in enumerate(cleared_zones): + print ' !remove it', z + #del self._zones_faulted[idx] + self._zones_faulted.remove(z) self.on_restore(z) + def _on_open(self, sender, args): """ Internal handler for opening the device. From 49966e34ce12e7e8b78732aeb3a1b530b6eefc05 Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Fri, 14 Jun 2013 14:59:07 -0700 Subject: [PATCH 25/30] With with Sean's implementation. --- pyad2usb/ad2usb.py | 209 ++++++++++----------------------------------- 1 file changed, 46 insertions(+), 163 deletions(-) diff --git a/pyad2usb/ad2usb.py b/pyad2usb/ad2usb.py index 0c7b9cd..1a00177 100644 --- a/pyad2usb/ad2usb.py +++ b/pyad2usb/ad2usb.py @@ -191,7 +191,6 @@ class AD2USB(object): self._fire_status = None self._zones_faulted = [] self._last_zone_fault = 0 - self._last_wait = False self.address = 18 self.configbits = 0xFF00 @@ -384,25 +383,18 @@ class AD2USB(object): self._update_zone_status(message) - #self._clear_expired_zones(message) - def _update_zone_status(self, message): - #if message.check_zone or (not message.ready and "FAULT" in message.text): - if "Hit * for faults" in message.text: - self._device.send('*') + self._device.write('*') return if message.ready: - cleared_zones = [] - - for z in self._zones_faulted: - cleared_zones.append(z) - - for idx, status in enumerate(cleared_zones): - del self._zones_faulted[idx] + for idx, z in enumerate(self._zones_faulted): self.on_restore(z) + del self._zones_faulted[:] + self._last_zone_fault = 0 + elif "FAULT" in message.text: zone = -1 @@ -411,173 +403,64 @@ class AD2USB(object): except ValueError: zone = int(message.numeric_code, 16) - if zone not in self._zones_faulted: - # if self._last_zone_fault == 0: - # idx = 0 - # else: - # idx = self._zones_faulted.index(self._last_zone_fault) + 1 - - self._last_zone_fault = zone - self._last_wait = True + if zone in self._zones_faulted: + self._clear_expired_zones(zone) + else: self._zones_faulted.append(zone) self._zones_faulted.sort() self.on_fault(zone) - self._clear_expired_zones(zone) self._last_zone_fault = zone def _clear_expired_zones(self, zone): cleared_zones = [] + found_last, found_new, at_end = False, False, False - found_last = False - found_end = False - - print '_clear_expired_zones: ', repr(self._zones_faulted) - - # ---------- - #for idx in range(len(self._zones_faulted)): - # idx = 0 - # while idx < len(self._zones_faulted): - # z = self._zones_faulted[idx] - - # if not found_last: - # if z == self._last_zone_fault: - # print ' found start point', z - # found_last = True - - # if found_last: - # if z == zone and self._last_zone_fault != zone and not break_loop: - # print ' found end point', z - # found_end = True - # break - # elif z != self._last_zone_fault and len(self._zones_faulted) > 1: - # print ' clearing', z - # cleared_zones.append(z) - - # if idx == len(self._zones_faulted) - 1 and not found_end: - # print ' rolling back to front of the list.' - # idx = 0 - # break_loop = True - # else: - # idx += 1 - - # ---------- - # idx = 0 - # while not found_end and idx < len(self._zones_faulted): - # z = self._zones_faulted[idx] - - # if z == zone and found_last: - # print ' found end point, exiting', z - # found_end = True - # break - - # if not found_last and z == self._last_zone_fault: - # print ' found start point', z - # found_last = True - - # if found_last: - # print 'removing', z - # self._zones_faulted.remove(z) - - # #print ' idx', idx - # #print ' end', found_end - # #print ' start', found_last - # if idx >= len(self._zones_faulted) - 1 and not found_end and found_last: - # print ' roll' - # idx = 0 - # else: - # idx += 1 - - # ----- - # idx = 0 - # start_pos = -1 - # end_pos = -1 - - # while idx < len(self._zones_faulted): - # z = self._zones_faulted[idx] - - # if z == self._last_zone_fault or self._last_zone_fault == 0: - # print 'start', idx - # start_pos = idx - - # if z == zone: - # print 'end', idx - # end_pos = idx - - # if idx >= len(self._zones_faulted) - 1 and end_pos == -1 and start_pos != -1: - # print 'roll' - # idx = 0 - # else: - # idx += 1 - - # if start_pos < end_pos: - # diff = end_pos - start_pos - - # if diff > 1 and not self._last_wait: - # print 'deleting', start_pos + 1, end_pos - # del self._zones_faulted[start_pos + 1:end_pos] - # elif end_pos < start_pos: - # diff = len(self._zones_faulted) - start_pos + end_pos - # if diff > 1 and not self._last_wait: - # print 'deleting', start_pos + 1, ' -> end' - # del self._zones_faulted[start_pos + 1:] - - # print 'deleting', 'start -> ', end_pos - # del self._zones_faulted[:end_pos] - - # if self._last_wait == True: - # self._last_wait = False - - # for idx, z in enumerate(cleared_zones): - # print ' !remove it', z - # #del self._zones_faulted[idx] - # self._zones_faulted.remove(z) - # self.on_restore(z) - - # ----- - idx = 0 - start_pos = -1 - end_pos = -1 - - while idx < len(self._zones_faulted): - z = self._zones_faulted[idx] - - if z == self._last_zone_fault or self._last_zone_fault == 0: - print 'start', idx - start_pos = idx - - if z == zone: - print 'end', idx - end_pos = idx - - if idx >= len(self._zones_faulted) - 1 and end_pos == -1 and start_pos != -1: - print 'roll' - idx = 0 - else: - idx += 1 + it = iter(self._zones_faulted) + try: + while not found_last: + z = it.next() - if start_pos < end_pos: - diff = end_pos - start_pos + if z == self._last_zone_fault: + found_last = True + break - if diff > 1: - print 'deleting', start_pos + 1, end_pos - del self._zones_faulted[start_pos + 1:end_pos] - elif end_pos <= start_pos: - diff = len(self._zones_faulted) - start_pos + end_pos - if diff > 1: - print 'deleting', start_pos + 1, ' -> end' - del self._zones_faulted[start_pos + 1:] + except StopIteration: + at_end = True - print 'deleting', 'start -> ', end_pos - del self._zones_faulted[:end_pos] + try: + while not at_end and not found_new: + z = it.next() + + if z == zone: + found_new = True + break + else: + cleared_zones += [z] + + except StopIteration: + pass + + if not found_new: + it = iter(self._zones_faulted) + + try: + while not found_new: + z = it.next() + + if z == zone: + found_new = True + break + else: + cleared_zones += [z] + + except StopIteration: + pass for idx, z in enumerate(cleared_zones): - print ' !remove it', z - #del self._zones_faulted[idx] self._zones_faulted.remove(z) self.on_restore(z) - def _on_open(self, sender, args): """ Internal handler for opening the device. From 93f94fdb635ed8fe391b8692139d27670bd6ef3a Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Fri, 14 Jun 2013 15:00:07 -0700 Subject: [PATCH 26/30] Forgot format parameters for LRRs str conversion. --- pyad2usb/ad2usb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyad2usb/ad2usb.py b/pyad2usb/ad2usb.py index 04706e5..73d974f 100644 --- a/pyad2usb/ad2usb.py +++ b/pyad2usb/ad2usb.py @@ -583,7 +583,7 @@ class LRRMessage(object): """ String conversion operator. """ - return 'lrr > {0} @ {1} -- {2}'.format() + return 'lrr > {0} @ {1} -- {2}'.format(self._event_type, self._partition, self._event_data) def _parse_message(self, data): """ From 286635ea85a61061ff84a6deb5b039aaef0848f9 Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Mon, 17 Jun 2013 11:08:43 -0700 Subject: [PATCH 27/30] Commenting. --- pyad2usb/ad2usb.py | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/pyad2usb/ad2usb.py b/pyad2usb/ad2usb.py index 1a00177..f934653 100644 --- a/pyad2usb/ad2usb.py +++ b/pyad2usb/ad2usb.py @@ -384,10 +384,16 @@ class AD2USB(object): self._update_zone_status(message) def _update_zone_status(self, message): + """ + Update zone statuses based on the current message. + """ + # Retrieve a list of faults. + # NOTE: This only happens on first boot or after exiting programming mode. if "Hit * for faults" in message.text: self._device.write('*') return + # Panel is ready, restore all zones. if message.ready: for idx, z in enumerate(self._zones_faulted): self.on_restore(z) @@ -395,14 +401,19 @@ class AD2USB(object): del self._zones_faulted[:] self._last_zone_fault = 0 + # Process fault elif "FAULT" in message.text: zone = -1 + # Apparently this representation can be both base 10 + # or base 16, depending on where the message came + # from. try: zone = int(message.numeric_code) except ValueError: zone = int(message.numeric_code, 16) + # Add new zones and clear expired ones. if zone in self._zones_faulted: self._clear_expired_zones(zone) else: @@ -410,12 +421,17 @@ class AD2USB(object): self._zones_faulted.sort() self.on_fault(zone) + # Save our spot for the next message. self._last_zone_fault = zone def _clear_expired_zones(self, zone): + """ + Clear all expired zones from our status list. + """ cleared_zones = [] found_last, found_new, at_end = False, False, False + # First pass: Find our start spot. it = iter(self._zones_faulted) try: while not found_last: @@ -428,6 +444,8 @@ class AD2USB(object): except StopIteration: at_end = True + # Continue until we find our end point and add zones in + # between to our clear list. try: while not at_end and not found_new: z = it.next() @@ -441,6 +459,8 @@ class AD2USB(object): except StopIteration: pass + # Second pass: roll through the list again if we didn't find + # our end point and remove everything until we do. if not found_new: it = iter(self._zones_faulted) @@ -457,6 +477,7 @@ class AD2USB(object): except StopIteration: pass + # Actually remove the zones and trigger the restores. for idx, z in enumerate(cleared_zones): self._zones_faulted.remove(z) self.on_restore(z) From 2fe77a2571d745146e79dd445c6e798ca141874c Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Mon, 17 Jun 2013 16:57:24 -0700 Subject: [PATCH 28/30] Moved to its own class. ADded support for timeouts and check zones. --- pyad2usb/ad2usb.py | 123 +++++---------------------- pyad2usb/zonetracking.py | 176 +++++++++++++++++++++++++++++++++++++++ test.py | 4 +- 3 files changed, 201 insertions(+), 102 deletions(-) create mode 100644 pyad2usb/zonetracking.py diff --git a/pyad2usb/ad2usb.py b/pyad2usb/ad2usb.py index f934653..69bff97 100644 --- a/pyad2usb/ad2usb.py +++ b/pyad2usb/ad2usb.py @@ -10,6 +10,7 @@ from collections import OrderedDict from .event import event from . import devices from . import util +from . import zonetracking class Overseer(object): """ @@ -159,8 +160,8 @@ class AD2USB(object): on_bypass = event.Event('Called when a zone is bypassed.') on_boot = event.Event('Called when the device finishes bootings.') on_config_received = event.Event('Called when the device receives its configuration.') - on_fault = event.Event('Called when the device detects a zone fault.') - on_restore = event.Event('Called when the device detects that a fault is restored.') + on_zone_fault = event.Event('Called when the device detects a zone fault.') + on_zone_restore = event.Event('Called when the device detects that a fault is restored.') # Mid-level Events on_message = event.Event('Called when a message has been received from the device.') @@ -177,20 +178,18 @@ class AD2USB(object): F3 = unichr(3) + unichr(3) + unichr(3) F4 = unichr(4) + unichr(4) + unichr(4) - ZONE_EXPIRE = 30 - def __init__(self, device): """ Constructor """ self._device = device + self._zonetracker = zonetracking.Zonetracker() + self._power_status = None self._alarm_status = None self._bypass_status = None self._armed_status = None self._fire_status = None - self._zones_faulted = [] - self._last_zone_fault = 0 self.address = 18 self.configbits = 0xFF00 @@ -285,6 +284,8 @@ class AD2USB(object): self._device.on_close += self._on_close self._device.on_read += self._on_read self._device.on_write += self._on_write + self._zonetracker.on_fault += self._on_zone_fault + self._zonetracker.on_restore += self._on_zone_restore def _handle_message(self, data): """ @@ -381,106 +382,16 @@ class AD2USB(object): if old_status is not None: self.on_fire(self._fire_status) - self._update_zone_status(message) + self._update_zone_tracker(message) - def _update_zone_status(self, message): - """ - Update zone statuses based on the current message. - """ + def _update_zone_tracker(self, message): # Retrieve a list of faults. # NOTE: This only happens on first boot or after exiting programming mode. - if "Hit * for faults" in message.text: + if not message.ready and "Hit * for faults" in message.text: self._device.write('*') return - # Panel is ready, restore all zones. - if message.ready: - for idx, z in enumerate(self._zones_faulted): - self.on_restore(z) - - del self._zones_faulted[:] - self._last_zone_fault = 0 - - # Process fault - elif "FAULT" in message.text: - zone = -1 - - # Apparently this representation can be both base 10 - # or base 16, depending on where the message came - # from. - try: - zone = int(message.numeric_code) - except ValueError: - zone = int(message.numeric_code, 16) - - # Add new zones and clear expired ones. - if zone in self._zones_faulted: - self._clear_expired_zones(zone) - else: - self._zones_faulted.append(zone) - self._zones_faulted.sort() - self.on_fault(zone) - - # Save our spot for the next message. - self._last_zone_fault = zone - - def _clear_expired_zones(self, zone): - """ - Clear all expired zones from our status list. - """ - cleared_zones = [] - found_last, found_new, at_end = False, False, False - - # First pass: Find our start spot. - it = iter(self._zones_faulted) - try: - while not found_last: - z = it.next() - - if z == self._last_zone_fault: - found_last = True - break - - except StopIteration: - at_end = True - - # Continue until we find our end point and add zones in - # between to our clear list. - try: - while not at_end and not found_new: - z = it.next() - - if z == zone: - found_new = True - break - else: - cleared_zones += [z] - - except StopIteration: - pass - - # Second pass: roll through the list again if we didn't find - # our end point and remove everything until we do. - if not found_new: - it = iter(self._zones_faulted) - - try: - while not found_new: - z = it.next() - - if z == zone: - found_new = True - break - else: - cleared_zones += [z] - - except StopIteration: - pass - - # Actually remove the zones and trigger the restores. - for idx, z in enumerate(cleared_zones): - self._zones_faulted.remove(z) - self.on_restore(z) + self._zonetracker.update(message) def _on_open(self, sender, args): """ @@ -510,6 +421,18 @@ class AD2USB(object): """ self.on_write(args) + def _on_zone_fault(self, sender, args): + """ + Internal handler for zone faults. + """ + self.on_zone_fault(args) + + def _on_zone_restore(self, sender, args): + """ + Internal handler for zone restoration. + """ + self.on_zone_restore(args) + class Message(object): """ Represents a message from the alarm panel. diff --git a/pyad2usb/zonetracking.py b/pyad2usb/zonetracking.py new file mode 100644 index 0000000..47d3755 --- /dev/null +++ b/pyad2usb/zonetracking.py @@ -0,0 +1,176 @@ +""" +Provides zone tracking functionality for the AD2USB device family. +""" + +import time +from .event import event + +class Zone(object): + """ + Representation of a panel zone. + """ + + CLEAR = 0 + FAULT = 1 + WIRE_FAULT = 2 + + def __init__(self, zone=0, name='', status=CLEAR): + self.zone = zone + self.name = name + self.status = status + self.timestamp = time.time() + + def __str__(self): + return '[{0}] {1} - ts {2}'.format(self.zone, self.status, self.timestamp) + +class Zonetracker(object): + """ + Handles tracking of zone and their statuses. + """ + + on_fault = event.Event('Called when the device detects a zone fault.') + on_restore = event.Event('Called when the device detects that a fault is restored.') + + EXPIRE = 30 + + def __init__(self): + """ + Constructor + """ + self._zones = {} + self._zones_faulted = [] + self._last_zone_fault = 0 + + def update(self, message): + """ + Update zone statuses based on the current message. + """ + # Panel is ready, restore all zones. + if message.ready: + for idx, z in enumerate(self._zones_faulted): + self._update_zone(z, Zone.CLEAR) + + self._last_zone_fault = 0 + + # Process fault + elif "FAULT" in message.text or message.check_zone: + zone = -1 + + # Apparently this representation can be both base 10 + # or base 16, depending on where the message came + # from. + try: + zone = int(message.numeric_code) + except ValueError: + zone = int(message.numeric_code, 16) + + # Add new zones and clear expired ones. + if zone in self._zones_faulted: + self._update_zone(zone, Zone.FAULT) + self._clear_zones(zone) + else: + self._add_zone(zone, status=Zone.FAULT) + + # Save our spot for the next message. + self._last_zone_fault = zone + + self._clear_expired_zones() + + def _clear_zones(self, zone): + """ + Clear all expired zones from our status list. + """ + cleared_zones = [] + found_last = found_new = at_end = False + + # First pass: Find our start spot. + it = iter(self._zones_faulted) + try: + while not found_last: + z = it.next() + + if z == self._last_zone_fault: + found_last = True + break + + except StopIteration: + at_end = True + + # Continue until we find our end point and add zones in + # between to our clear list. + try: + while not at_end and not found_new: + z = it.next() + + if z == zone: + found_new = True + break + else: + cleared_zones += [z] + + except StopIteration: + pass + + # Second pass: roll through the list again if we didn't find + # our end point and remove everything until we do. + if not found_new: + it = iter(self._zones_faulted) + + try: + while not found_new: + z = it.next() + + if z == zone: + found_new = True + break + else: + cleared_zones += [z] + + except StopIteration: + pass + + # Actually remove the zones and trigger the restores. + for idx, z in enumerate(cleared_zones): + self._update_zone(z, Zone.CLEAR) + + def _clear_expired_zones(self): + cleared_zones = [] + + for z in self._zones_faulted: + cleared_zones += [z] + + for z in cleared_zones: + if self._zone_expired(z): + self._update_zone(z, Zone.CLEAR) + + def _add_zone(self, zone, name='', status=Zone.CLEAR): + """ + Adds a zone to the internal zone list. + """ + if not zone in self._zones: + self._zones[zone] = Zone(zone=zone, name=name, status=status) + + if status != Zone.CLEAR: + self._zones_faulted.append(zone) + self._zones_faulted.sort() + self.on_fault(zone) + + def _update_zone(self, zone, status): + """ + Updates a zones status. + """ + if not zone in self._zones: + raise IndexError('Zone does not exist and cannot be updated: %d', zone) + + self._zones[zone].status = status + self._zones[zone].timestamp = time.time() + + if status == Zone.CLEAR: + self._zones_faulted.remove(zone) + self.on_restore(zone) + + def _zone_expired(self, zone): + if time.time() > self._zones[zone].timestamp + Zonetracker.EXPIRE: + return True + + return False diff --git a/test.py b/test.py index 48c50ad..21a9059 100755 --- a/test.py +++ b/test.py @@ -234,8 +234,8 @@ def test_socket(): a2u.on_config_received += handle_config a2u.on_arm += handle_arm a2u.on_disarm += handle_disarm - a2u.on_fault += handle_fault - a2u.on_restore += handle_restore + a2u.on_zone_fault += handle_fault + a2u.on_zone_restore += handle_restore a2u.open() #a2u.save_config() From 1ffbb4a22b87fd9c76e77fcf50e284ad0bd5059f Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Mon, 17 Jun 2013 17:21:08 -0700 Subject: [PATCH 29/30] Added support for wire faults and fixed up repr for zone. --- pyad2usb/zonetracking.py | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/pyad2usb/zonetracking.py b/pyad2usb/zonetracking.py index 47d3755..32d475d 100644 --- a/pyad2usb/zonetracking.py +++ b/pyad2usb/zonetracking.py @@ -12,7 +12,9 @@ class Zone(object): CLEAR = 0 FAULT = 1 - WIRE_FAULT = 2 + CHECK = 2 # Wire fault + + STATUS = { CLEAR: 'CLEAR', FAULT: 'FAULT', CHECK: 'CHECK' } def __init__(self, zone=0, name='', status=CLEAR): self.zone = zone @@ -21,7 +23,10 @@ class Zone(object): self.timestamp = time.time() def __str__(self): - return '[{0}] {1} - ts {2}'.format(self.zone, self.status, self.timestamp) + return 'Zone {0} {1}'.format(self.zone, self.name) + + def __repr__(self): + return 'Zone({0}, {1}, ts {2})'.format(self.zone, Zone.STATUS[self.status], self.timestamp) class Zonetracker(object): """ @@ -66,10 +71,14 @@ class Zonetracker(object): # Add new zones and clear expired ones. if zone in self._zones_faulted: - self._update_zone(zone, Zone.FAULT) + self._update_zone(zone) self._clear_zones(zone) else: - self._add_zone(zone, status=Zone.FAULT) + status = Zone.FAULT + if message.check_zone: + status = Zone.CHECK + + self._add_zone(zone, status=status) # Save our spot for the next message. self._last_zone_fault = zone @@ -83,6 +92,8 @@ class Zonetracker(object): cleared_zones = [] found_last = found_new = at_end = False + #print 'zones', self._zones + # First pass: Find our start spot. it = iter(self._zones_faulted) try: @@ -155,14 +166,16 @@ class Zonetracker(object): self._zones_faulted.sort() self.on_fault(zone) - def _update_zone(self, zone, status): + def _update_zone(self, zone, status=None): """ Updates a zones status. """ if not zone in self._zones: raise IndexError('Zone does not exist and cannot be updated: %d', zone) - self._zones[zone].status = status + if status is not None: + self._zones[zone].status = status + self._zones[zone].timestamp = time.time() if status == Zone.CLEAR: From 7e2ad594cafea946beaa24c51ae5f589d44ab399 Mon Sep 17 00:00:00 2001 From: Scott Petersen Date: Tue, 18 Jun 2013 11:57:33 -0700 Subject: [PATCH 30/30] Added support for Expander messages. API changes to support address/channel targeting of faults. Moved messages into their own namespace. Bugfixes. --- pyad2usb/ad2usb.py | 263 ++++++--------------------------------- pyad2usb/messages.py | 197 +++++++++++++++++++++++++++++ pyad2usb/zonetracking.py | 90 ++++++++------ test.py | 10 +- 4 files changed, 300 insertions(+), 260 deletions(-) create mode 100644 pyad2usb/messages.py diff --git a/pyad2usb/ad2usb.py b/pyad2usb/ad2usb.py index 69bff97..a034004 100644 --- a/pyad2usb/ad2usb.py +++ b/pyad2usb/ad2usb.py @@ -10,6 +10,7 @@ from collections import OrderedDict from .event import event from . import devices from . import util +from . import messages from . import zonetracking class Overseer(object): @@ -266,6 +267,13 @@ class AD2USB(object): """ Faults a zone if we are emulating a zone expander. """ + # Allow ourselves to also be passed an address/channel combination + # for zone expanders. + # + # Format (expander index, channel) + if isinstance(zone, tuple): + zone = self._zonetracker._expander_to_zone(*zone) + status = 2 if simulate_wire_problem else 1 self._device.write("L{0:02}{1}\r".format(zone, status)) @@ -297,7 +305,7 @@ class AD2USB(object): msg = None if data[0] != '!': - msg = Message(data) + msg = messages.Message(data) if self.address_mask & msg.mask > 0: self._update_internal_states(msg) @@ -306,11 +314,12 @@ class AD2USB(object): header = data[0:4] if header == '!EXP' or header == '!REL': - msg = ExpanderMessage(data) + msg = messages.ExpanderMessage(data) + self._update_internal_states(msg) elif header == '!RFX': - msg = RFMessage(data) + msg = messages.RFMessage(data) elif header == '!LRR': - msg = LRRMessage(data) + msg = messages.LRRMessage(data) elif data.startswith('!Ready'): self.on_boot() elif data.startswith('!CONFIG'): @@ -349,47 +358,49 @@ class AD2USB(object): """ Updates internal device states. """ - if message.ac_power != self._power_status: - self._power_status, old_status = message.ac_power, self._power_status + if isinstance(message, messages.Message): + if message.ac_power != self._power_status: + self._power_status, old_status = message.ac_power, self._power_status - if old_status is not None: - self.on_power_changed(self._power_status) + if old_status is not None: + self.on_power_changed(self._power_status) - if message.alarm_sounding != self._alarm_status: - self._alarm_status, old_status = message.alarm_sounding, self._alarm_status + if message.alarm_sounding != self._alarm_status: + self._alarm_status, old_status = message.alarm_sounding, self._alarm_status - if old_status is not None: - self.on_alarm(self._alarm_status) + if old_status is not None: + self.on_alarm(self._alarm_status) - if message.zone_bypassed != self._bypass_status: - self._bypass_status, old_status = message.zone_bypassed, self._bypass_status + if message.zone_bypassed != self._bypass_status: + self._bypass_status, old_status = message.zone_bypassed, self._bypass_status - if old_status is not None: - self.on_bypass(self._bypass_status) + if old_status is not None: + self.on_bypass(self._bypass_status) - if (message.armed_away | message.armed_home) != self._armed_status: - self._armed_status, old_status = message.armed_away | message.armed_home, self._armed_status + if (message.armed_away | message.armed_home) != self._armed_status: + self._armed_status, old_status = message.armed_away | message.armed_home, self._armed_status - if old_status is not None: - if self._armed_status: - self.on_arm() - else: - self.on_disarm() + if old_status is not None: + if self._armed_status: + self.on_arm() + else: + self.on_disarm() - if message.fire_alarm != self._fire_status: - self._fire_status, old_status = message.fire_alarm, self._fire_status + if message.fire_alarm != self._fire_status: + self._fire_status, old_status = message.fire_alarm, self._fire_status - if old_status is not None: - self.on_fire(self._fire_status) + if old_status is not None: + self.on_fire(self._fire_status) self._update_zone_tracker(message) def _update_zone_tracker(self, message): # Retrieve a list of faults. # NOTE: This only happens on first boot or after exiting programming mode. - if not message.ready and "Hit * for faults" in message.text: - self._device.write('*') - return + if isinstance(message, messages.Message): + if not message.ready and "Hit * for faults" in message.text: + self._device.write('*') + return self._zonetracker.update(message) @@ -432,195 +443,3 @@ class AD2USB(object): Internal handler for zone restoration. """ self.on_zone_restore(args) - -class Message(object): - """ - Represents a message from the alarm panel. - """ - - def __init__(self, data=None): - """ - Constructor - """ - self.ready = False - self.armed_away = False - self.armed_home = False - self.backlight_on = False - self.programming_mode = False - self.beeps = -1 - self.zone_bypassed = False - self.ac_power = False - self.chime_on = False - self.alarm_event_occurred = False - self.alarm_sounding = False - self.battery_low = False - self.entry_delay_off = False - self.fire_alarm = False - self.check_zone = False - self.perimeter_only = False - self.numeric_code = "" - self.text = "" - self.cursor_location = -1 - self.data = "" - self.mask = "" - self.bitfield = "" - self.panel_data = "" - - self._regex = re.compile('("(?:[^"]|"")*"|[^,]*),("(?:[^"]|"")*"|[^,]*),("(?:[^"]|"")*"|[^,]*),("(?:[^"]|"")*"|[^,]*)') - - if data is not None: - self._parse_message(data) - - def _parse_message(self, data): - """ - Parse the message from the device. - """ - m = self._regex.match(data) - - if m is None: - raise util.InvalidMessageError('Received invalid message: {0}'.format(data)) - - self.bitfield, self.numeric_code, self.panel_data, alpha = m.group(1, 2, 3, 4) - self.mask = int(self.panel_data[3:3+8], 16) - - self.data = data - self.ready = not self.bitfield[1:2] == "0" - self.armed_away = not self.bitfield[2:3] == "0" - self.armed_home = not self.bitfield[3:4] == "0" - self.backlight_on = not self.bitfield[4:5] == "0" - self.programming_mode = not self.bitfield[5:6] == "0" - self.beeps = int(self.bitfield[6:7], 16) - self.zone_bypassed = not self.bitfield[7:8] == "0" - self.ac_power = not self.bitfield[8:9] == "0" - self.chime_on = not self.bitfield[9:10] == "0" - self.alarm_event_occurred = not self.bitfield[10:11] == "0" - self.alarm_sounding = not self.bitfield[11:12] == "0" - self.battery_low = not self.bitfield[12:13] == "0" - self.entry_delay_off = not self.bitfield[13:14] == "0" - self.fire_alarm = not self.bitfield[14:15] == "0" - self.check_zone = not self.bitfield[15:16] == "0" - self.perimeter_only = not self.bitfield[16:17] == "0" - # bits 17-20 unused. - self.text = alpha.strip('"') - - if int(self.panel_data[19:21], 16) & 0x01 > 0: - self.cursor_location = int(self.bitfield[21:23], 16) # Alpha character index that the cursor is on. - - def __str__(self): - """ - String conversion operator. - """ - return 'msg > {0:0<9} [{1}{2}{3}] -- ({4}) {5}'.format(hex(self.mask), 1 if self.ready else 0, 1 if self.armed_away else 0, 1 if self.armed_home else 0, self.numeric_code, self.text) - -class ExpanderMessage(object): - """ - Represents a message from a zone or relay expansion module. - """ - - ZONE = 0 - RELAY = 1 - - def __init__(self, data=None): - """ - Constructor - """ - self.type = None - self.address = None - self.channel = None - self.value = None - self.raw = None - - if data is not None: - self._parse_message(data) - - def __str__(self): - """ - String conversion operator. - """ - expander_type = 'UNKWN' - if self.type == ExpanderMessage.ZONE: - expander_type = 'ZONE' - elif self.type == ExpanderMessage.RELAY: - expander_type = 'RELAY' - - return 'exp > [{0: <5}] {1}/{2} -- {3}'.format(expander_type, self.address, self.channel, self.value) - - def _parse_message(self, data): - """ - Parse the raw message from the device. - """ - header, values = data.split(':') - address, channel, value = values.split(',') - - self.raw = data - self.address = address - self.channel = channel - self.value = value - - if header == '!EXP': - self.type = ExpanderMessage.ZONE - elif header == '!REL': - self.type = ExpanderMessage.RELAY - -class RFMessage(object): - """ - Represents a message from an RF receiver. - """ - - def __init__(self, data=None): - """ - Constructor - """ - self.raw = None - self.serial_number = None - self.value = None - - if data is not None: - self._parse_message(data) - - def __str__(self): - """ - String conversion operator. - """ - return 'rf > {0}: {1}'.format(self.serial_number, self.value) - - def _parse_message(self, data): - """ - Parses the raw message from the device. - """ - self.raw = data - - _, values = data.split(':') - self.serial_number, self.value = values.split(',') - -class LRRMessage(object): - """ - Represent a message from a Long Range Radio. - """ - - def __init__(self, data=None): - """ - Constructor - """ - self.raw = None - self._event_data = None - self._partition = None - self._event_type = None - - if data is not None: - self._parse_message(data) - - def __str__(self): - """ - String conversion operator. - """ - return 'lrr > {0} @ {1} -- {2}'.format() - - def _parse_message(self, data): - """ - Parses the raw message from the device. - """ - self.raw = data - - _, values = data.split(':') - self._event_data, self._partition, self._event_type = values.split(',') diff --git a/pyad2usb/messages.py b/pyad2usb/messages.py new file mode 100644 index 0000000..86e6e54 --- /dev/null +++ b/pyad2usb/messages.py @@ -0,0 +1,197 @@ +""" +Message representations received from the panel through the AD2USB. +""" + +import re + +class Message(object): + """ + Represents a message from the alarm panel. + """ + + def __init__(self, data=None): + """ + Constructor + """ + self.ready = False + self.armed_away = False + self.armed_home = False + self.backlight_on = False + self.programming_mode = False + self.beeps = -1 + self.zone_bypassed = False + self.ac_power = False + self.chime_on = False + self.alarm_event_occurred = False + self.alarm_sounding = False + self.battery_low = False + self.entry_delay_off = False + self.fire_alarm = False + self.check_zone = False + self.perimeter_only = False + self.numeric_code = "" + self.text = "" + self.cursor_location = -1 + self.data = "" + self.mask = "" + self.bitfield = "" + self.panel_data = "" + + self._regex = re.compile('("(?:[^"]|"")*"|[^,]*),("(?:[^"]|"")*"|[^,]*),("(?:[^"]|"")*"|[^,]*),("(?:[^"]|"")*"|[^,]*)') + + if data is not None: + self._parse_message(data) + + def _parse_message(self, data): + """ + Parse the message from the device. + """ + m = self._regex.match(data) + + if m is None: + raise util.InvalidMessageError('Received invalid message: {0}'.format(data)) + + self.bitfield, self.numeric_code, self.panel_data, alpha = m.group(1, 2, 3, 4) + self.mask = int(self.panel_data[3:3+8], 16) + + self.data = data + self.ready = not self.bitfield[1:2] == "0" + self.armed_away = not self.bitfield[2:3] == "0" + self.armed_home = not self.bitfield[3:4] == "0" + self.backlight_on = not self.bitfield[4:5] == "0" + self.programming_mode = not self.bitfield[5:6] == "0" + self.beeps = int(self.bitfield[6:7], 16) + self.zone_bypassed = not self.bitfield[7:8] == "0" + self.ac_power = not self.bitfield[8:9] == "0" + self.chime_on = not self.bitfield[9:10] == "0" + self.alarm_event_occurred = not self.bitfield[10:11] == "0" + self.alarm_sounding = not self.bitfield[11:12] == "0" + self.battery_low = not self.bitfield[12:13] == "0" + self.entry_delay_off = not self.bitfield[13:14] == "0" + self.fire_alarm = not self.bitfield[14:15] == "0" + self.check_zone = not self.bitfield[15:16] == "0" + self.perimeter_only = not self.bitfield[16:17] == "0" + # bits 17-20 unused. + self.text = alpha.strip('"') + + if int(self.panel_data[19:21], 16) & 0x01 > 0: + self.cursor_location = int(self.bitfield[21:23], 16) # Alpha character index that the cursor is on. + + def __str__(self): + """ + String conversion operator. + """ + return 'msg > {0:0<9} [{1}{2}{3}] -- ({4}) {5}'.format(hex(self.mask), 1 if self.ready else 0, 1 if self.armed_away else 0, 1 if self.armed_home else 0, self.numeric_code, self.text) + +class ExpanderMessage(object): + """ + Represents a message from a zone or relay expansion module. + """ + + ZONE = 0 + RELAY = 1 + + def __init__(self, data=None): + """ + Constructor + """ + self.type = None + self.address = None + self.channel = None + self.value = None + self.raw = None + + if data is not None: + self._parse_message(data) + + def __str__(self): + """ + String conversion operator. + """ + expander_type = 'UNKWN' + if self.type == ExpanderMessage.ZONE: + expander_type = 'ZONE' + elif self.type == ExpanderMessage.RELAY: + expander_type = 'RELAY' + + return 'exp > [{0: <5}] {1}/{2} -- {3}'.format(expander_type, self.address, self.channel, self.value) + + def _parse_message(self, data): + """ + Parse the raw message from the device. + """ + header, values = data.split(':') + address, channel, value = values.split(',') + + self.raw = data + self.address = address + self.channel = channel + self.value = value + + if header == '!EXP': + self.type = ExpanderMessage.ZONE + elif header == '!REL': + self.type = ExpanderMessage.RELAY + +class RFMessage(object): + """ + Represents a message from an RF receiver. + """ + + def __init__(self, data=None): + """ + Constructor + """ + self.raw = None + self.serial_number = None + self.value = None + + if data is not None: + self._parse_message(data) + + def __str__(self): + """ + String conversion operator. + """ + return 'rf > {0}: {1}'.format(self.serial_number, self.value) + + def _parse_message(self, data): + """ + Parses the raw message from the device. + """ + self.raw = data + + _, values = data.split(':') + self.serial_number, self.value = values.split(',') + +class LRRMessage(object): + """ + Represent a message from a Long Range Radio. + """ + + def __init__(self, data=None): + """ + Constructor + """ + self.raw = None + self._event_data = None + self._partition = None + self._event_type = None + + if data is not None: + self._parse_message(data) + + def __str__(self): + """ + String conversion operator. + """ + return 'lrr > {0} @ {1} -- {2}'.format() + + def _parse_message(self, data): + """ + Parses the raw message from the device. + """ + self.raw = data + + _, values = data.split(':') + self._event_data, self._partition, self._event_type = values.split(',') diff --git a/pyad2usb/zonetracking.py b/pyad2usb/zonetracking.py index 32d475d..db312a3 100644 --- a/pyad2usb/zonetracking.py +++ b/pyad2usb/zonetracking.py @@ -4,6 +4,7 @@ Provides zone tracking functionality for the AD2USB device family. import time from .event import event +from . import messages class Zone(object): """ @@ -50,40 +51,56 @@ class Zonetracker(object): """ Update zone statuses based on the current message. """ - # Panel is ready, restore all zones. - if message.ready: - for idx, z in enumerate(self._zones_faulted): - self._update_zone(z, Zone.CLEAR) + zone = -1 - self._last_zone_fault = 0 + if isinstance(message, messages.ExpanderMessage): + zone = self._expander_to_zone(int(message.address), int(message.channel)) - # Process fault - elif "FAULT" in message.text or message.check_zone: - zone = -1 + status = Zone.CLEAR + if int(message.value) == 1: + status = Zone.FAULT + elif int(message.value) == 2: + status = Zone.CHECK - # Apparently this representation can be both base 10 - # or base 16, depending on where the message came - # from. try: - zone = int(message.numeric_code) - except ValueError: - zone = int(message.numeric_code, 16) + self._update_zone(zone, status=status) + except IndexError: + self._add_zone(zone, status=status) - # Add new zones and clear expired ones. - if zone in self._zones_faulted: - self._update_zone(zone) - self._clear_zones(zone) - else: - status = Zone.FAULT - if message.check_zone: - status = Zone.CHECK + else: + # Panel is ready, restore all zones. + if message.ready: + for idx, z in enumerate(self._zones_faulted): + self._update_zone(z, Zone.CLEAR) + + self._last_zone_fault = 0 + + # Process fault + elif "FAULT" in message.text or message.check_zone: + # Apparently this representation can be both base 10 + # or base 16, depending on where the message came + # from. + try: + zone = int(message.numeric_code) + except ValueError: + zone = int(message.numeric_code, 16) + + # Add new zones and clear expired ones. + if zone in self._zones_faulted: + self._update_zone(zone) + self._clear_zones(zone) + else: + status = Zone.FAULT + if message.check_zone: + status = Zone.CHECK - self._add_zone(zone, status=status) + self._add_zone(zone, status=status) + self._zones_faulted.append(zone) + self._zones_faulted.sort() # Save our spot for the next message. self._last_zone_fault = zone - - self._clear_expired_zones() + self._clear_expired_zones() def _clear_zones(self, zone): """ @@ -92,8 +109,6 @@ class Zonetracker(object): cleared_zones = [] found_last = found_new = at_end = False - #print 'zones', self._zones - # First pass: Find our start spot. it = iter(self._zones_faulted) try: @@ -145,13 +160,13 @@ class Zonetracker(object): self._update_zone(z, Zone.CLEAR) def _clear_expired_zones(self): - cleared_zones = [] + zones = [] - for z in self._zones_faulted: - cleared_zones += [z] + for z in self._zones.keys(): + zones += [z] - for z in cleared_zones: - if self._zone_expired(z): + for z in zones: + if self._zones[z].status != Zone.CLEAR and self._zone_expired(z): self._update_zone(z, Zone.CLEAR) def _add_zone(self, zone, name='', status=Zone.CLEAR): @@ -162,8 +177,6 @@ class Zonetracker(object): self._zones[zone] = Zone(zone=zone, name=name, status=status) if status != Zone.CLEAR: - self._zones_faulted.append(zone) - self._zones_faulted.sort() self.on_fault(zone) def _update_zone(self, zone, status=None): @@ -179,7 +192,9 @@ class Zonetracker(object): self._zones[zone].timestamp = time.time() if status == Zone.CLEAR: - self._zones_faulted.remove(zone) + if zone in self._zones_faulted: + self._zones_faulted.remove(zone) + self.on_restore(zone) def _zone_expired(self, zone): @@ -187,3 +202,8 @@ class Zonetracker(object): return True return False + + def _expander_to_zone(self, address, channel): + idx = address - 7 # Expanders start at address 7. + + return address + channel + (idx * 7) + 1 diff --git a/test.py b/test.py index 21a9059..acdfa27 100755 --- a/test.py +++ b/test.py @@ -254,11 +254,15 @@ def test_socket(): #a2u.emulate_zone[1] = True #a2u.save_config() + time.sleep(1) + a2u.fault_zone(17, True) + + time.sleep(15) + a2u.clear_zone(17) + #time.sleep(1) - #a2u.fault_zone(17, True) + #a2u.fault_zone((2, 2), True) - #time.sleep(15) - #a2u.clear_zone(17) while running: time.sleep(0.1)