Skip to content
Discussion options

You must be logged in to vote

@ElliotHYLee We are currently working on memory layout compatible data types and the first implementation will come with a Rust <-> C++ string and vector. The python part will come later as soon as we have secured some funding for it.

So for now, you can use this:

Python

class GenericHeader(ctypes.Structure):
    _fields_ = [
        ("frame_id", ctypes.c_uint32),
        ("timestamp", ctypes.c_uint64),
    ]
    @staticmethod
    def type_name() -> str:
        return "GenericHeader"

class ImageData720p(ctypes.Structure):
    _fields_ = [
        ("WIDTH", ctypes.c_uint16),
        ...
        ("image_data", ctypes.c_uint8 * 1280 * 720 * 4), # Fixed-size RGBA image array
    ]
    @stat…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by ElliotHYLee
Comment options

You must be logged in to vote
1 reply
@elfenpiff
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants