Skip to main content

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()

Retaining Memory

While rtipc.RtIPC is running, please retain receiveMemory, sendMemory and connected; otherwise rtipcGroup.Receive/Send will cause SEGV. Especially be careful about connected.

If you are an experienced C++ programmer, you can imagine like AddReceivePdo/AddSendPdo is passing shared_ptr<char[]>::get() (and without retaining variables the shared_ptr is gone).

License Note (also for contributors)

Licensed under LGPL/MIT so that if etherlab rtipc license is changed to more permissive one this binding can follow the change.

As long as etherlab rtipc is licensed under LGPL, the USER of this binding should consider it as LGPL-only.

(On the otherhand, if they unfortunately move to GPL, I will stop supporting this binding.)

Metadata

Release files for rtipc 0.0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rtipc 0.0.0.2
File Size Uploaded
rtipc-0.0.0.2.tar.gz 7.2 kB Details

Release files / rtipc-0.0.0.2.tar.gz

Download URL rtipc-0.0.0.2.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9756a720ab16ea05b4f88c5657e92c5ce5fcbd71af5539ea686ce7f37774578b
BLAKE2b-256 checksum
How to use checksums
06d1bdd7ad62e83fb656db19dea4f3ca204ace6dfb04e9598bce69c007bfce11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.5

Release history Release notifications | RSS feed

This release

0.0.0.2 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page