Being a novice in Python and C#, and having reached a point with no significant progress, I'd like to ask for some suggestions.
Here is the issue I find:
I am trying to read the data from a Digital Multimeter through its C# library and targeting to export it into Python (being the only supported language of the target application).
The meter and communication interface libraries come from Lcrrsearch.
Referring to the instructions provided, I have run the C# project file and have succeeded in getting the readings (through FTD2XX_NET.dll, LCR_CIL.dll).
However, separately, when trying to use the .dll files in Python, I have failed to do so.
The solution paths I sought after were:
Calling the LCR_CIL.dll in Python via Ctypes
Trying IronPython via Visual Studio for .NET
Using FTDI library to read the data from memory
Therefore, I would like to have some hints or ideas as to which path is the most straightforward one to import the data in Python and/or any similar example you could propose I would gladly welcome.
Related
I am trying to merge an audio stream and a video stream into a single file, on the Uno Platform, particularly for WebAssembly.
I already know that the normal, desktop-only way is by calling ffmpeg, and I also found a C# only way for UWP here.
However, the code used Windows.Media.Editing which is not implemented in Uno.
I know there is a ffmpeg library port for WASM here, but I don't know how to call it from my Uno web application.
So are there any ways to merge an audio stream and a video stream to a single file, on the Uno platform for WASM?
Unfortunately, this API is not yet implemented in Uno Platform, so in this case you need to write platform-specific implementation.
If you have a JavaScript library available, which can provide the functionality you need, you can still call it from the C# code. There is a three-part tutorial in the Uno Platform docs on implementing C# - JS interop, so that may be helpful to get started.
Alternatively, in case you find an alternative implementation in C# on NuGet, you can install it for the supported platforms and use it in your code as well. To write platform-specific code, you can use #if conditionals like #if __WASM__ etc. - for full information see this documentation page.
I'm receiving an H264 stream over UDP. I'd like to decode the stream so I can send frames to OpenCV or whatever. I came across Cisco's open sourced H264 decoder here: https://github.com/cisco/openh264
With a little effort I got the decoder solution to build in Visual Studio 2019 and tested it from the command line with a file I created from the raw UDP datagrams. It works.
Now I want to figure out how to use the decoder DLL (welsdec.dll) in a C# project. The last time I did anything serious with C++ in Windows was back in the DirectShow and Delphi 5 days, so I'm completely lost.
Nothing in the H264 project is explicitly exported with __declspec(dllexport). Is that normal? Adding the DLL as a project reference to the C# project doesn't work ("the reference is invalid or unsupported").
I'm guessing the DLL is unmanaged. Can I consume that directly in C#? Am I going to have to rewrite the DLL as, or maybe or wrap it, in a C++ CX library to get this working?
You can consume an unmanaged DLL in C# explicitly using PInvoke.
You can also write an intermediary DLL in C++/CLI to ease the invocations between your managed C# application and the native DLL. This is the approach taken by secile/OpenH264Lib.NET per stuartd's comment.
It looks like the H264 project uses module definition files (.def) in lieu of decorating exports with declspec. You should still be able to access these publicly exported functions using the above methods.
I am developping a mobile app using Unity3D framework which is a C#/Javscript 3D engine, working on desktop and mobile plateform.
I need to recover the content of an XLS file on a cloud-based storage (Dropbox or GoogleDrive), then process it on the mobile plateform to transform it into a local SQLite database.
The mobile app will regulary check for modification on the remote xls file, and push it locally if needed to process it.
The framework I use (Unity3D) allow me to work with both C# and Javascript technologies.
What would be the best strategy to implement such a fonctionnality.
I'm totally newbie with web API, and I've seen in Dropbox documentation that there is several possibilities to interact with a cloud folder.
Is there a possiblity to fetch the content of an xls document into the mobile device memory (with writing to its local drive)? What would be the easiest/more elegant way to achieve it?
Thanx in advance
Unity3D supports using managed DLLs in your project. So you can look at using one of the following libraries:
http://sergeytihon.wordpress.com/2013/09/29/dropbox-for-net-developers/
https://developers.google.com/drive/web/quickstart/quickstart-cs
and choose one.
There's also code for reading excel files from Unity3D on the wiki: http://wiki.unity3d.com/index.php?title=Load_Data_from_Excel_2003
And code for using SQLite: http://wiki.unity3d.com/index.php/SQLite.
From there putting it together is up to you, the documentation from each link should be more than enough to implement what you want. I'd recommend abstracting the differences in platforms here (Google Drive vs Dropbox) from your main game (It doesn't sound like you've made up your mind on one), in case you want to change them later on. In my experience, operations between the two are similar enough to make changing over reasonably straight forward down the road as long as you're using the proper abstraction techniques.
We have to work on .sor files for a research project. This type of files contains graphical information of distance(m) to loss(dB). I think that .sor files should contain the values of each loss against distance. Is there a way to access these values?
You can buy the SR-4731 document, which describes the Optical Time Domain Reflectometer (OTDR) Data Format, which is used in .sor files, for $ 750 here. Gotta love proprietary formats.
Someone made a library and ported it to multiple languages: Python, Perl, Clojure, Nodejs and Ruby.
Here I will link the Python version.
https://github.com/sid5432/pyOTDR
as for C#, I do not know any existing port yet.
Where is the best place to find VirtualBox's C# samples?
The VirtualBox SDK comes with samples in Java, Python, Perl. Since the WSDL files are also there, writing C# samples shouldn't be a big problem.