Skip to content

Commit

Permalink
distutils package for pyCANopen
Browse files Browse the repository at this point in the history
  • Loading branch information
rscada committed Jul 1, 2012
1 parent 4bd9ff2 commit 244d34b
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Install:

sudo python setup.py install
11 changes: 11 additions & 0 deletions python/pyCANopen.py → python/pycanopen/CANopen.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,15 @@ def SDOUploadExp(self, node, index, subindex):
return res.value


def SDODownloadExp(self, node, index, subindex, data):
"""
Expediated SDO upload
"""
data_len = len(data)
# data has to be made into a buffer string
libcanopen.canopen_sdo_download_exp(self.sock, c_unit8(node), c_uint16(index), c_uint8(subindex), data, data_len)





File renamed without changes.
File renamed without changes.
36 changes: 36 additions & 0 deletions python/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/usr/bin/env python
"""pyCANopen: Python bindings to the libCANopen library from rSCADA.
pyCANopen offers binding to the libCANopen C library, which is designed
to be used with the Linux SocketCAN driver.
"""

DOCLINES = __doc__.split('\n')

CLASSIFIERS = """\
Programming Language :: Python
Topic :: Engineering
Operating System :: POSIX
Operating System :: Unix
"""

from distutils.core import setup

MAJOR = 0
MINOR = 0
MICRO = 1

setup(
name = "pyCANopen",
version = "%d.%d.%d" % (MAJOR, MINOR, MICRO),
packages = ['pycanopen'],
scripts = ['pycanopen/canopen-node-info.py', 'pycanopen/canopen-dump.py'],
author = "Robert Johansson",
author_email = "rob@raditex.nu",
license = "BSD",
description = DOCLINES[0],
long_description = "\n".join(DOCLINES[2:]),
keywords = "CANopen library for python",
url = "http://www.rscada.se",
platforms = ["Linux", "Unix"],
)

0 comments on commit 244d34b

Please sign in to comment.