Search the Community
Showing results for tags 'array'.
Found 1 result
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; 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.