i2c  1.4.2
RoadNarrows Robotics I2C Package
i2ccore.py
Go to the documentation of this file.
1 # This file was automatically generated by SWIG (http://www.swig.org).
2 # Version 3.0.8
3 #
4 # Do not make changes to this file unless you know what you are doing--modify
5 # the SWIG interface file instead.
6 
7 
8 
9 
10 
11 from sys import version_info
12 if version_info >= (2, 6, 0):
13  def swig_import_helper():
14  from os.path import dirname
15  import imp
16  fp = None
17  try:
18  fp, pathname, description = imp.find_module('_i2ccore', [dirname(__file__)])
19  except ImportError:
20  import _i2ccore
21  return _i2ccore
22  if fp is not None:
23  try:
24  _mod = imp.load_module('_i2ccore', fp, pathname, description)
25  finally:
26  fp.close()
27  return _mod
28  _i2ccore = swig_import_helper()
29  del swig_import_helper
30 else:
31  import _i2ccore
32 del version_info
33 try:
34  _swig_property = property
35 except NameError:
36  pass # Python < 2.2 doesn't have 'property'.
37 
38 
39 def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
40  if (name == "thisown"):
41  return self.this.own(value)
42  if (name == "this"):
43  if type(value).__name__ == 'SwigPyObject':
44  self.__dict__[name] = value
45  return
46  method = class_type.__swig_setmethods__.get(name, None)
47  if method:
48  return method(self, value)
49  if (not static):
50  if _newclass:
51  object.__setattr__(self, name, value)
52  else:
53  self.__dict__[name] = value
54  else:
55  raise AttributeError("You cannot add attributes to %s" % self)
56 
57 
58 def _swig_setattr(self, class_type, name, value):
59  return _swig_setattr_nondynamic(self, class_type, name, value, 0)
60 
61 
62 def _swig_getattr_nondynamic(self, class_type, name, static=1):
63  if (name == "thisown"):
64  return self.this.own()
65  method = class_type.__swig_getmethods__.get(name, None)
66  if method:
67  return method(self)
68  if (not static):
69  return object.__getattr__(self, name)
70  else:
71  raise AttributeError(name)
72 
73 def _swig_getattr(self, class_type, name):
74  return _swig_getattr_nondynamic(self, class_type, name, 0)
75 
76 
77 def _swig_repr(self):
78  try:
79  strthis = "proxy of " + self.this.__repr__()
80  except Exception:
81  strthis = ""
82  return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
83 
84 try:
85  _object = object
86  _newclass = 1
87 except AttributeError:
88  class _object:
89  pass
90  _newclass = 0
91 
92 
93 
94 def new_byteArray(nelements):
95  return _i2ccore.new_byteArray(nelements)
96 new_byteArray = _i2ccore.new_byteArray
97 
98 def delete_byteArray(ary):
99  return _i2ccore.delete_byteArray(ary)
100 delete_byteArray = _i2ccore.delete_byteArray
101 
102 def byteArray_getitem(ary, index):
103  return _i2ccore.byteArray_getitem(ary, index)
104 byteArray_getitem = _i2ccore.byteArray_getitem
105 
106 def byteArray_setitem(ary, index, value):
107  return _i2ccore.byteArray_setitem(ary, index, value)
108 byteArray_setitem = _i2ccore.byteArray_setitem
109 
110 def new_uintp():
111  return _i2ccore.new_uintp()
112 new_uintp = _i2ccore.new_uintp
113 
114 def copy_uintp(value):
115  return _i2ccore.copy_uintp(value)
116 copy_uintp = _i2ccore.copy_uintp
117 
118 def delete_uintp(obj):
119  return _i2ccore.delete_uintp(obj)
120 delete_uintp = _i2ccore.delete_uintp
121 
122 def uintp_assign(obj, value):
123  return _i2ccore.uintp_assign(obj, value)
124 uintp_assign = _i2ccore.uintp_assign
125 
126 def uintp_value(obj):
127  return _i2ccore.uintp_value(obj)
128 uintp_value = _i2ccore.uintp_value
129 
130 def i2ccore_open(device):
131  return _i2ccore.i2ccore_open(device)
132 i2ccore_open = _i2ccore.i2ccore_open
133 
134 def i2ccore_close(fd):
135  return _i2ccore.i2ccore_close(fd)
136 i2ccore_close = _i2ccore.i2ccore_close
137 
138 def i2ccore_read(fd, cur_addr, addr, buf, count):
139  return _i2ccore.i2ccore_read(fd, cur_addr, addr, buf, count)
140 i2ccore_read = _i2ccore.i2ccore_read
141 
142 def i2ccore_write(fd, cur_addr, addr, buf, count):
143  return _i2ccore.i2ccore_write(fd, cur_addr, addr, buf, count)
144 i2ccore_write = _i2ccore.i2ccore_write
145 
146 def i2ccore_transfer(fd, cur_addr, addr, wbuf, wcount, rbuf, rcount):
147  return _i2ccore.i2ccore_transfer(fd, cur_addr, addr, wbuf, wcount, rbuf, rcount)
148 i2ccore_transfer = _i2ccore.i2ccore_transfer
149 
150 def i2ccore_check(fd, cur_addr, addr):
151  return _i2ccore.i2ccore_check(fd, cur_addr, addr)
152 i2ccore_check = _i2ccore.i2ccore_check
153 
154 
155 """
156 RoadNarrows Robotics i2ccore Python Inline Extensions and Wrappers.
157 """
158 
159 ## \file
160 ## \package rnr.i2ccore
161 ##
162 ## \brief RoadNarrows Robotics Swigged Core Python Interface Module.
163 ##
164 ## \author Robin Knight (robin.knight@roadnarrows.com)
165 ##
166 ## \par Copyright:
167 ## (C) 2016. RoadNarrows LLC.\n
168 ## (http://www.roadnarrows.com)\n
169 ## All Rights Reserved
170 ##
171 
172 
173 # This file is compatible with both classic and new-style classes.
174 
175