C# example PreviousNext
Data Distribution Service (DDS) Forum > DDS Technical Forum >
Next message Emanuel  posted on Thursday, March 04, 2010 - 10:10 am
I was digging around for the last few day searching for an example on how to use DDS over C#. I saw it was available in the latest builds of DDS but i failed to find any sample project of this type.

If someone could help by pointing me in a right direction I would be very grateful.
Next message Erik Hendriks  posted on Tuesday, March 09, 2010 - 05:25 pm
Hi Emanuel,

May I suggest you to download the source code bundle for OpenSplice DDS? In that source code bundle you will find a small test app called api_quick_test (see the src/api/dcps/sacs/api_quick_test directory). This gives you some clues on how to write applications in C#.
The upcoming V5 version will also come with the PingPong and Tutorial examples.

Basically the C# API is very similar to the other language API's, with the following exceptions:

- The C# API uses the PascalCase notation for operations and attributes instead of the notation that uses the underscore as word-separator.

- The C# API uses operation overloading instead of convenience macro's for passing default values. If you want to use a default value in a function, use a function that does not pass any parameter for that value. It will use the default value in that case.

- Functions that only return the value of an attribute are implemented as attributes in C#. (Instead of as 'getter' functions like in the other languages).

- Some returncode's and masks are implemented as enums instead of as longs.

Also keep in mind that the library holding the C# API implementation is not copied into the GAC yet. You either need to do this manually, or copy the .dll file into the same directory as your executable.

Hope this helps you on your way.

Next message Emanuel  posted on Friday, March 12, 2010 - 01:40 pm
Thank you very much.
Back to top
Add Your Message Here
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Options: Post as "Anonymous"
Enable HTML code in message
Automatically activate URLs in message