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.
posted on Friday, March 12, 2010 - 01:40 pm