Jump to content
OpenSplice DDS Forum

mdbk

Members
  • Content count

    5
  • Joined

  • Last visited

About mdbk

  • Rank
    Member

Profile Information

  • Company
    Mechdyne
  1. Thank you for the update, your post pointed us in the right direction for the work around. Cheers.
  2. Using: VortexOpenSplice-6.7.170912OSS-HDE-x86_64.win-vs2015 I've received some IDL that utilizes sequence<char> for passing strings (rather than char[] or string); it appears that in C# this doesn't actually pass the value through. (Note that this works fine in C++) This can be easily reproduced in the HelloWorld sample as follows: Change the HelloWorldData.idl: Replace: string message; With: sequence<char,16> message; Change the HellowWorldDataPublisher.cs: Replace: msgInstance.message = "Hello World"; With: string str = "Hello World"; char[] array = new char[16]; Array.Copy(str.ToCharArray(), array, str.Length); msgInstance.message = array; Run the HelloWorld sample app and you'll see that the received message in the HelloWorldDataSubscriber has no content (is of length 0) Note that in the IDL if you use a char<16> rather than a sequence<char,16> it works as expected and you get the "Hello World" in the subscriber. Can you please advise on whether this is a usage problem, code generation problem or something else? (and if there's a workaround short of changing the IDL) Thank you very much.
  3. Awesome, thank you very much James.
  4. Hi James, Thanks for the response, yes I'm able to make the change in the generated code that you mentioned. Please let me know if that's a legitimate workaround and I'll apply it to some other IDLs we've got that exhibit the same problem. Thanks much.
  5. Using: VortexOpenSplice-6.7.170912OSS-HDE-x86_64.win-vs2015 I've run across an error where it looks like idlpp is generating some non-compiling C# code if the IDL has a sequence of enum values in it. E.g if you tweak the HelloWorld.idl as seen below the generated C# source will no longer compile: module HelloWorldData { enum T_WorldType { L_WorldType_Flat, L_WorldType_Round, L_WorldType_Unknown }; typedef sequence <T_WorldType> T_ListOfWorldTypes; struct Msg { long userID; string message; T_ListOfWorldTypes A_supportedWorldTypes; }; #pragma keylist Msg userID }; To reproduce do the following: Swap out the IDL in the HelloWorld with the attached IDL Compile it using: idlpp -l cs -S HelloWorldData.idl Replace the generated .cs files in examples\dcps\HelloWorld\cs\standalone with the newly generated files Compile the the sacs_helloworld_pub project and you'll see the following error: CS7036 There is no argument given that corresponds to the required formal parameter 'offset' of 'BaseMarshaler.ReadInt32(IntPtr, int)' The generated code is missing the first argument to the ReadInt32 call: to.A_supportedWorldTypes[i0] = (HelloWorldData.T_WorldType) ReadInt32(attr2Seq0Buf); Note that the generated .cpp code compiles fine, it's just the C# that doesn't seem to be working correctly. Any ideas? Thank you very much. HelloWorldData.idl
×