static HALDriverStation() { try { NativeDelegateInitializer.SetupNativeDelegates <HALDriverStation>(LibraryLoaderHolder.NativeLoader); } catch (Exception ex) { throw; } }
static HALI2C() { NativeDelegateInitializer.SetupNativeDelegates <HALI2C>(LibraryLoaderHolder.NativeLoader); }
static HALSimDigitalPWMData() { NativeDelegateInitializer.SetupNativeDelegates <HALSimDigitalPWMData>(LibraryLoaderHolder.NativeLoader); }
static HALSimAnalogInData() { NativeDelegateInitializer.SetupNativeDelegates <HALSimAnalogInData>(LibraryLoaderHolder.NativeLoader); }
static HALSimSPIAccelerometerData() { NativeDelegateInitializer.SetupNativeDelegates <HALSimSPIAccelerometerData>(LibraryLoaderHolder.NativeLoader); }
static HALSolenoid() { NativeDelegateInitializer.SetupNativeDelegates <HALSolenoid>(LibraryLoaderHolder.NativeLoader); }
static HALNotifier() { NativeDelegateInitializer.SetupNativeDelegates <HALNotifier>(LibraryLoaderHolder.NativeLoader); }
static InteropForTesting() { var nativeLoader = Interop.NativeLoader; NativeDelegateInitializer.SetupNativeDelegates <InteropForTesting>(nativeLoader); }
static Interop() { if (!s_libraryLoaded) { try { finalizeInterop.Ping(); string[] commandArgs = Environment.GetCommandLineArgs(); foreach (var commandArg in commandArgs) { //search for a line with the prefix "-ntcore:" if (commandArg.ToLower().Contains("-ntcore:")) { //Split line to get the library. int splitLoc = commandArg.IndexOf(':'); string file = commandArg.Substring(splitLoc + 1); //If the file exists, just return it so dlopen can load it. if (File.Exists(file)) { s_libraryLocation = file; s_useCommandLineFile = true; } } } const string resourceRoot = "FRC.NetworkTables.Core.DesktopLibraries.Libraries."; NativeLoader = new NativeLibraryLoader(); NativeLoader.AddLibraryLocation(OsType.Windows32, resourceRoot + "Windows.x86.ntcore.dll"); NativeLoader.AddLibraryLocation(OsType.Windows64, resourceRoot + "Windows.amd64.ntcore.dll"); NativeLoader.AddLibraryLocation(OsType.Linux32, resourceRoot + "Linux.x86.libntcore.so"); NativeLoader.AddLibraryLocation(OsType.Linux64, resourceRoot + "Linux.amd64.libntcore.so"); NativeLoader.AddLibraryLocation(OsType.MacOs32, resourceRoot + "Mac_OS_X.x86.libntcore.dylib"); NativeLoader.AddLibraryLocation(OsType.MacOs64, resourceRoot + "Mac_OS_X.x86_64.libntcore.dylib"); NativeLoader.AddLibraryLocation(OsType.roboRIO, "libntcore.so"); if (s_useCommandLineFile) { NativeLoader.LoadNativeLibrary <Interop>(s_libraryLocation, true); } else { NativeLoader.LoadNativeLibraryFromReflectedAssembly("FRC.NetworkTables.Core.DesktopLibraries"); s_libraryLocation = NativeLoader.LibraryLocation; } NativeDelegateInitializer.SetupNativeDelegates <Interop>(NativeLoader); } catch (Exception e) { Console.WriteLine(e.Message); Console.WriteLine(e.StackTrace); Environment.Exit(1); } s_runFinalizer = true; s_libraryLoaded = true; } }
static HALThreads() { NativeDelegateInitializer.SetupNativeDelegates <HALThreads>(LibraryLoaderHolder.NativeLoader); }
static HALAnalogInput() { NativeDelegateInitializer.SetupNativeDelegates <HALAnalogInput>(LibraryLoaderHolder.NativeLoader); }
static HALSerialPort() { NativeDelegateInitializer.SetupNativeDelegates <HALSerialPort>(LibraryLoaderHolder.NativeLoader); }
static HALAnalogTrigger() { NativeDelegateInitializer.SetupNativeDelegates <HALAnalogTrigger>(LibraryLoaderHolder.NativeLoader); }
static HALAccelerometer() { NativeDelegateInitializer.SetupNativeDelegates <HALAccelerometer>(LibraryLoaderHolder.NativeLoader); }
static HALCompressor() { NativeDelegateInitializer.SetupNativeDelegates <HALCompressor>(LibraryLoaderHolder.NativeLoader); }
static HALInterrupts() { NativeDelegateInitializer.SetupNativeDelegates <HALInterrupts>(LibraryLoaderHolder.NativeLoader); }
static HALAnalogAccumulator() { NativeDelegateInitializer.SetupNativeDelegates <HALAnalogAccumulator>(LibraryLoaderHolder.NativeLoader); }