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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rodos-0.1.1-py3-none-any.whl.
File metadata
- Download URL: rodos-0.1.1-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58af21e632a2eb9765e5aa3782fadf63fa44e7f0bac6800d42c06cff8a558edc
|
|
| MD5 |
5b93143111961361d0867f09ec34f0bb
|
|
| BLAKE2b-256 |
140ea46c3a0e0321e94fd2c4289cc42868597f3de03985f920f700b618c2e220
|