Skip to main content

A Python binding for https://gitlab.com/etherlab.org/rtipc

Project description

rtipc

A Python binding for https://gitlab.com/etherlab.org/rtipc

Note: importing rtipc raises ImportError if librtipc.so is not available. Users should handle the exception.

Example

import numpy
import ctypes
try:
    import rtipc
except ImportError:
    rtipc = None

rtipcObj = rtipc.RtIPC('simulator')
rtipcGroup = rtipcObj.CreateGroup(1.0)
receiveMemory = numpy.zeros(16, numpy.uint8)
sendMemory = numpy.zeros(16, numpy.uint8)
connected = ctypes.c_uint8(0)
rtipcGroup.AddReceivePdo(b'receive', rtipc.DataType.uint8_T, receiveMemory.ctypes.data_as(ctypes.POINTER(ctypes.c_uint8)), 16, ctypes.byref(connected))
rtipcGroup.AddSendPdo(b'send', rtipc.DataType.uint8_T, sendMemory.ctypes.data_as(ctypes.POINTER(ctypes.c_uint8)), 16)

with rtipcObj:
    rtipcGroup.Receive()
    rtipcGroup.Send()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rtipc-0.0.0.1.tar.gz (6.8 kB view details)

Uploaded Source

File details

Details for the file rtipc-0.0.0.1.tar.gz.

File metadata

  • Download URL: rtipc-0.0.0.1.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.2

File hashes

Hashes for rtipc-0.0.0.1.tar.gz
Algorithm Hash digest
SHA256 d699df2eeddb419075760b00c8de399aa4ee5490b0f4a1d79192a0e6e6a4cd23
MD5 fb6536e0ef46577e478cf635f1d59fcb
BLAKE2b-256 7fa8b9c2d474a35a508cd5bdc4d4c104a4e83b130cbcfa39c125e5060a9e2263

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page