Skip to main content

rodos middleware in python

Project description

This is a port of the rodos middleware to Python

RODOS is dependable real-time operating system used in satellites see rodos gitlab. The rodos middleware Python package was created to facilitate the development of PC software, that connects to a remote microcontroller. E.g. debugging embedded applications, displaying data, easier development in python instead of c++. It is writte in pure python dependent on pyserial and the operating system's UDP/rfcomm(bluetooth) stack

install the package with pip install rodos. Here is an example how to use in conjunction with the struct package, that comes handy for parsing data

#!/bin/python3
import time
import struct

import rodos

# from rodos import *

def topicHandler(data):
    try:
        unpacked = struct.unpack("qI4b", data)
        print("timeNow = ", unpacked[0])
        print("msgIndex = ", unpacked[1])
    except Exception as e:
        print(e)
        print(data)


luart = rodos.LinkinterfaceUART(path="/dev/rfcomm2")
gwUart = rodos.Gateway(luart)
gwUart.run()

linux2rodos = rodos.Topic(1002)
rodos2linux = rodos.Topic(1003)

rodos2linux.addSubscriber(topicHandler) # <<<<<< register callback

cnt = 0
while True:
    cnt += 1
    time.sleep(1)

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

rodos-0.1.1-py3-none-any.whl (11.0 kB view hashes)

Uploaded Python 3

Supported by

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