Menu

C# error "Index was outside the bounds of the array" while using a relay

Yolan
2013-02-14
2013-02-15
  • Yolan

    Yolan - 2013-02-14

    Hi,

    I'm running into trouble while using a relay. It works fine in C++ but here is the error in C# :

    12/02/2013 - 09:27:46: process send request: start
    09:27: generic exception: System.IndexOutOfRangeException: Index was outside the bounds of the array.
    at Com.Coronis.Sdk.Domain.Helper.ProtocolHelper.NativeToRadioExchangeCommand( >sRadioExchangeCommand cReceiveCommand)
    at Com.Coronis.Sdk.Domain.Helper.ProtocolHelper.NativeToRequestResponse(sRequestResponse >c_response)
    at Com.Coronis.Sdk.Protocol.Waveport.Waveport.SendApplicationRequest(RadioExchangeCommand command)
    at Com.Coronis.Sdk.Protocol.Waveport.Example.Program.ProcessSendRequest(IProtocolService protocol) in Program.cs:line 144
    at Com.Coronis.Sdk.Protocol.Waveport.Example.Program.Main(String[] args) in Program.cs:line 51
    

    Here is my code :

    RadioExchangeCommand request = new RadioExchangeCommand(
             new Payload("01"),
             new DynamicStandardParams(   destinationAddress, 
                                          new IRadioAddress[] { relayAddress1 }  )   )  ;
    RequestResponse response = protocol.SendApplicationRequest(request);
    

    The exception is thrown by "protocol.SendApplicationRequest(request)".

    I'm using Com.Coronis.Sdk.Protocol.Api.dll which is posted in the thread https://sourceforge.net/p/coronissdk/discussion/pkg_comm/thread/4585dff2/

    Thanks for reading !

     
  • Thierry CHOMAUD

    Thierry CHOMAUD - 2013-02-14

    Hello,
    As said in the upper indicated post, the C# implementation has not been fully tested.
    The problem has been reproduced and will check today.

    Thanks for using Coronis SDK
    Thierry

     
  • Thierry CHOMAUD

    Thierry CHOMAUD - 2013-02-14

    Hello Yolan,
    With Veaceslav (the other developer), we have succeed to indentified the problem. We have implemented a correction that works with our first test. The pb was coming from the wrapping from C to C# layer for routerPath parameter.
    Here is the C# libs that correct this point. We will integrate this fix in an official release later (when we will have found the time or some people interested to help us to write complete unit test for C# Waveport implementation).
    We wait for your feed back.
    Thierry

     

    Last edit: Thierry CHOMAUD 2013-02-14
  • Yolan

    Yolan - 2013-02-15

    Great; it works fine !

    Thank you very much

     

Log in to post a comment.

MongoDB Logo MongoDB