我正在尝试使用C# 代码将BNO055 USB_STICK连接到我的电脑。找了又找,终于找到了一本博世的手册,讲的是GENERIC API。伟大的。因此,我将 UserApplicationBoard.dll 添加到我的 Visual Studio 项目中,并尝试读取/写入我的 IMU 传感器。可悲的是,它在 C# 中不起作用。阅读手册,我可以在 IronPython 和 MatLab 中使用这些 API(我在 IronPython 中对其进行了测试,它工作正常)但是当我尝试在 C# 中从这个 .dll 调用方法时,我遇到了这个错误:
Non-invocable member UserApplicationBoard cannot be used like a method
虽然在 IronPython 中一切正常,但我可以读/写每个注册表。下面是我的简单代码:
using System;
using System.Collections.Generic;
using System.IO.Ports;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using BST; //DLL FOR GENERIC API FROM BOSCH
namespace BNO055UsbStick
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Start BNO055 BST API");
BST.UserApplicationBoard board = BST.UserApplicationBoard();
}
}
}
有谁知道如何解决这一问题?