Giter VIP home page Giter VIP logo

pydds's Introduction

DDS Python API

Overview

pydds is a simple Python API for Vortex Lite and for OpenSplice.

This API supports:

  • IDL-based Topic Types. In this case the equivalent python type has to be defined using the appropriate ctype structure.

  • Python Objects. Python objects can be used as Topic types, in this case the wire representation is that of flexy-types, meaning a key/value pair.

Regardless of the kinds of type definition interoperability and instance management are maintained (see code examples).

Installation

pydds depends on:

  • jsonpikle, please refer to the project page for installation informations.

  • OpenSplice, refer to the installation instructions to see how to get it set up.

Once the dependencies are intalled simply do (assuming your are running on Linux):

$ cd dds-python
$ ./configure.linux
$ python3 setup.py install 

To test your installation do:

$ python test_reader.py &
$ python test_writer.py 

Equivalently you can test the flexy types by:

$ python test_flexy_writer.py 
$ python test_flexy_reader.py 

pydds's People

Contributors

gabrik avatar kydos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

pydds's Issues

test_reader.py not working

running:
python3 test_writer.py

writer>> (b'API', b'Python)
...

python3 test_reader.py

[nothing]

Am I doing something wrong? Running on ubuntu 18.04.

Origin of libdython.dll?

I am currently missing the libdython.dll file and I am unsure of it's intended origins. Could someone tell me where I could find it? That would be amazing!

Documentation for translating IDL files.

I have been looking into how to manually translate IDL files (or perhaps write a tool at some point to do so) to the required ctypes definitions used in this library, but I'm somewhat confused as to how sequences are handled. Are you supposed to represent something like this:

struct SomeElement
{
    string someData;
    // ... and some other fields
};

struct SomeKey
{
    unsigned long long low;   // first eight bytes
    unsigned long long high;  // last eight bytes
};

struct SomeSequence
{
    long id;
    unsigned long sequenceIndex;
    sequence<SomeElement> elements;
};
#pragma keylist SomeSequence id.low id.high sequenceIndex

Specifically I'm unsure of how to handle:

  1. Sequences. Do I have to use DDSSequence and manually serialize the elements to the _buffer member? (I don't really know how the low level API used by the generated files from idlpp works, I have previously only used the isocpp2 generator, I looked at the code now and it seems to treat everything as void* pointers and call C API functions to allocate for example arrays)
  2. Keys: Do I actually need to care about this at all? Looking at DDSKeyValue for example I don't see anything specific to mark what part is the key, like in the IDL file.

It would be great to either have some slightly non-trivial examples included, or perhaps some basic documentation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.