Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

BMP5 SDK and C#


Jbird300 Jan 20, 2010 11:12 PM

I am attempting to use C# to write a small application that can connect to a CR3000 datalogger. I have been able to load the dll and use some of the functions. I can use OpenIPPort() and CloseIPPort() just fine. When I try to use a function with a 'return_data' parameter is where I start having problems. For Example GetStatus(pakbus_address, device_type, return_data, return_data_len).

Is there some example code somewhere or could someone explain to me how to access the data returned from functions that use return_data and return_data_len in C#?

Thanks


ChipsNSalsa Jan 22, 2010 06:05 PM

A GetStatus command and many other commands are used in the C++ and MSC++ project examples installed in C:\Campbellsci\BMP5DirectSDK\Examples


artmann Jan 22, 2010 08:33 PM

As return_data and return_data_len will hold the result on success you should try to pass the input arguments by reference.
In C# something like:
GetStatus(pakbus_address, device_type, ref return_data, ref return_data_len)


ivi May 25, 2011 06:55 PM

artmann

do you have an example in C#? Could you plese send me?

thanks

Log in or register to post/reply in the forum.