internal static void Initialize(IntPtr library, ILibraryLoader loader) { Base.HALCompressor.InitializeCompressor = (Base.HALCompressor.InitializeCompressorDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "initializeCompressor"), typeof(Base.HALCompressor.InitializeCompressorDelegate)); Base.HALCompressor.CheckCompressorModule = (Base.HALCompressor.CheckCompressorModuleDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "checkCompressorModule"), typeof(Base.HALCompressor.CheckCompressorModuleDelegate)); Base.HALCompressor.GetCompressor = (Base.HALCompressor.GetCompressorDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getCompressor"), typeof(Base.HALCompressor.GetCompressorDelegate)); Base.HALCompressor.SetClosedLoopControl = (Base.HALCompressor.SetClosedLoopControlDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "setClosedLoopControl"), typeof(Base.HALCompressor.SetClosedLoopControlDelegate)); Base.HALCompressor.GetClosedLoopControl = (Base.HALCompressor.GetClosedLoopControlDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getClosedLoopControl"), typeof(Base.HALCompressor.GetClosedLoopControlDelegate)); Base.HALCompressor.GetPressureSwitch = (Base.HALCompressor.GetPressureSwitchDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getPressureSwitch"), typeof(Base.HALCompressor.GetPressureSwitchDelegate)); Base.HALCompressor.GetCompressorCurrent = (Base.HALCompressor.GetCompressorCurrentDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getCompressorCurrent"), typeof(Base.HALCompressor.GetCompressorCurrentDelegate)); Base.HALCompressor.GetCompressorCurrentTooHighFault = (Base.HALCompressor.GetCompressorCurrentTooHighFaultDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getCompressorCurrentTooHighFault"), typeof(Base.HALCompressor.GetCompressorCurrentTooHighFaultDelegate)); Base.HALCompressor.GetCompressorCurrentTooHighStickyFault = (Base.HALCompressor.GetCompressorCurrentTooHighStickyFaultDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getCompressorCurrentTooHighStickyFault"), typeof(Base.HALCompressor.GetCompressorCurrentTooHighStickyFaultDelegate)); Base.HALCompressor.GetCompressorShortedStickyFault = (Base.HALCompressor.GetCompressorShortedStickyFaultDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getCompressorShortedStickyFault"), typeof(Base.HALCompressor.GetCompressorShortedStickyFaultDelegate)); Base.HALCompressor.GetCompressorShortedFault = (Base.HALCompressor.GetCompressorShortedFaultDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getCompressorShortedFault"), typeof(Base.HALCompressor.GetCompressorShortedFaultDelegate)); Base.HALCompressor.GetCompressorNotConnectedStickyFault = (Base.HALCompressor.GetCompressorNotConnectedStickyFaultDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getCompressorNotConnectedStickyFault"), typeof(Base.HALCompressor.GetCompressorNotConnectedStickyFaultDelegate)); Base.HALCompressor.GetCompressorNotConnectedFault = (Base.HALCompressor.GetCompressorNotConnectedFaultDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getCompressorNotConnectedFault"), typeof(Base.HALCompressor.GetCompressorNotConnectedFaultDelegate)); Base.HALCompressor.ClearAllPCMStickyFaults = (Base.HALCompressor.ClearAllPCMStickyFaultsDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "clearAllPCMStickyFaults"), typeof(Base.HALCompressor.ClearAllPCMStickyFaultsDelegate)); }
static SharedLibrary() { WindowsLoader windowsLoader = new WindowsLoader(); if (windowsLoader.Supported) { Loader = windowsLoader; return; } LibDlLoader libDlLoader = new LibDlLoader(); if (libDlLoader.Supported) { Loader = libDlLoader; return; } NativeLibraryLoader nativeLibraryLoader = new NativeLibraryLoader(); if (nativeLibraryLoader.Supported) { Loader = nativeLibraryLoader; return; } throw new PlatformNotSupportedException(); }
internal static IntPtr LoadLibrary(string dllLoc, OsType type, out ILibraryLoader loader) { switch (type) { case OsType.Windows32: case OsType.Windows64: loader = new WindowsLibraryLoader(); return(loader.LoadLibrary(dllLoc)); case OsType.Linux32: case OsType.Linux64: case OsType.Armv6HardFloat: case OsType.Armv7HardFloat: loader = new LinuxLibraryLoader(); return(loader.LoadLibrary(dllLoc)); case OsType.MacOs32: case OsType.MacOs64: loader = new MacOsLibraryLoader(); return(loader.LoadLibrary(dllLoc)); case OsType.RoboRio: loader = new RoboRioLibraryLoader(); return(loader.LoadLibrary(dllLoc)); case OsType.Android: loader = new AndroidLibraryLoader(); return(loader.LoadLibrary(dllLoc)); default: loader = null; return(IntPtr.Zero); } }
internal static void Initialize(IntPtr library, ILibraryLoader loader) { Base.HALPower.GetVinVoltage = (Base.HALPower.GetVinVoltageDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getVinVoltage"), typeof(Base.HALPower.GetVinVoltageDelegate)); Base.HALPower.GetVinCurrent = (Base.HALPower.GetVinCurrentDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getVinCurrent"), typeof(Base.HALPower.GetVinCurrentDelegate)); Base.HALPower.GetUserVoltage6V = (Base.HALPower.GetUserVoltage6VDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getUserVoltage6V"), typeof(Base.HALPower.GetUserVoltage6VDelegate)); Base.HALPower.GetUserCurrent6V = (Base.HALPower.GetUserCurrent6VDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getUserCurrent6V"), typeof(Base.HALPower.GetUserCurrent6VDelegate)); Base.HALPower.GetUserActive6V = (Base.HALPower.GetUserActive6VDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getUserActive6V"), typeof(Base.HALPower.GetUserActive6VDelegate)); Base.HALPower.GetUserCurrentFaults6V = (Base.HALPower.GetUserCurrentFaults6VDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getUserCurrentFaults6V"), typeof(Base.HALPower.GetUserCurrentFaults6VDelegate)); Base.HALPower.GetUserVoltage5V = (Base.HALPower.GetUserVoltage5VDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getUserVoltage5V"), typeof(Base.HALPower.GetUserVoltage5VDelegate)); Base.HALPower.GetUserCurrent5V = (Base.HALPower.GetUserCurrent5VDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getUserCurrent5V"), typeof(Base.HALPower.GetUserCurrent5VDelegate)); Base.HALPower.GetUserActive5V = (Base.HALPower.GetUserActive5VDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getUserActive5V"), typeof(Base.HALPower.GetUserActive5VDelegate)); Base.HALPower.GetUserCurrentFaults5V = (Base.HALPower.GetUserCurrentFaults5VDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getUserCurrentFaults5V"), typeof(Base.HALPower.GetUserCurrentFaults5VDelegate)); Base.HALPower.GetUserVoltage3V3 = (Base.HALPower.GetUserVoltage3V3Delegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getUserVoltage3V3"), typeof(Base.HALPower.GetUserVoltage3V3Delegate)); Base.HALPower.GetUserCurrent3V3 = (Base.HALPower.GetUserCurrent3V3Delegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getUserCurrent3V3"), typeof(Base.HALPower.GetUserCurrent3V3Delegate)); Base.HALPower.GetUserActive3V3 = (Base.HALPower.GetUserActive3V3Delegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getUserActive3V3"), typeof(Base.HALPower.GetUserActive3V3Delegate)); Base.HALPower.GetUserCurrentFaults3V3 = (Base.HALPower.GetUserCurrentFaults3V3Delegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getUserCurrentFaults3V3"), typeof(Base.HALPower.GetUserCurrentFaults3V3Delegate)); }
public NativeProcessorArchitecture(IServiceProvider services, string archID, string libPath, ILibraryLoader ldr, Dictionary <string, object> options) : base(services, archID, options) { loader = ldr; handle = ldr.LoadLibrary(libPath); prv = (NativeProcessorArchitectureProvider)Marshal.PtrToStructure(ldr.GetSymbol(handle, SYM_NAME), typeof(NativeProcessorArchitectureProvider)); }
internal static void Initialize(IntPtr library, ILibraryLoader loader) { Base.HALAccelerometer.SetAccelerometerActive = setAccelerometerActive; Base.HALAccelerometer.SetAccelerometerRange = setAccelerometerRange; Base.HALAccelerometer.GetAccelerometerX = getAccelerometerX; Base.HALAccelerometer.GetAccelerometerY = getAccelerometerY; Base.HALAccelerometer.GetAccelerometerZ = getAccelerometerZ; }
internal static void Initialize(IntPtr library, ILibraryLoader loader) { Base.HALCAN.FRC_NetworkCommunication_CANSessionMux_sendMessage = FRC_NetworkCommunication_CANSessionMux_sendMessage; Base.HALCAN.FRC_NetworkCommunication_CANSessionMux_receiveMessage = FRC_NetworkCommunication_CANSessionMux_receiveMessage; Base.HALCAN.FRC_NetworkCommunication_CANSessionMux_openStreamSession = FRC_NetworkCommunication_CANSessionMux_openStreamSession; Base.HALCAN.FRC_NetworkCommunication_CANSessionMux_closeStreamSession = FRC_NetworkCommunication_CANSessionMux_closeStreamSession; Base.HALCAN.FRC_NetworkCommunication_CANSessionMux_readStreamSession = FRC_NetworkCommunication_CANSessionMux_readStreamSession; }
public StartupParams(IAuthProvider provider, IPathManager pathManager, ILibraryLoader libraryLoader, ICustomNodeManager customNodeManager) { this.authProvider = provider; this.pathManager = pathManager; this.libraryLoader = libraryLoader; this.customNodeManager = customNodeManager; }
internal static void Initialize(IntPtr library, ILibraryLoader loader) { Base.HALNotifier.InitializeNotifier = initializeNotifier; Base.HALNotifier.GetNotifierParam = getNotifierParam; Base.HALNotifier.CleanNotifier = cleanNotifier; Base.HALNotifier.UpdateNotifierAlarm = updateNotifierAlarm; Base.HALNotifier.StopNotifierAlarm = stopNotifierAlarm; }
internal static void Initialize(IntPtr library, ILibraryLoader loader) { Base.HALUtilities.DelayTicks = (Base.HALUtilities.DelayTicksDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "delayTicks"), typeof(Base.HALUtilities.DelayTicksDelegate)); Base.HALUtilities.DelayMillis = (Base.HALUtilities.DelayMillisDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "delayMillis"), typeof(Base.HALUtilities.DelayMillisDelegate)); Base.HALUtilities.DelaySeconds = (Base.HALUtilities.DelaySecondsDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "delaySeconds"), typeof(Base.HALUtilities.DelaySecondsDelegate)); }
internal static void Initialize(IntPtr library, ILibraryLoader loader) { Base.HALNotifier.InitializeNotifier = (Base.HALNotifier.InitializeNotifierDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "initializeNotifierShim"), typeof(Base.HALNotifier.InitializeNotifierDelegate)); Base.HALNotifier.GetNotifierParam = (Base.HALNotifier.GetNotifierParamDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getNotifierParam"), typeof(Base.HALNotifier.GetNotifierParamDelegate)); Base.HALNotifier.CleanNotifier = (Base.HALNotifier.CleanNotifierDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "cleanNotifierShim"), typeof(Base.HALNotifier.CleanNotifierDelegate)); Base.HALNotifier.StopNotifierAlarm = (Base.HALNotifier.StopNotifierAlarmDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "stopNotifierAlarm"), typeof(Base.HALNotifier.StopNotifierAlarmDelegate)); Base.HALNotifier.UpdateNotifierAlarm = (Base.HALNotifier.UpdateNotifierAlarmDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "updateNotifierAlarm"), typeof(Base.HALNotifier.UpdateNotifierAlarmDelegate)); }
public NativeSymbolSource(string libPath, ILibraryLoader ldr) { loader = ldr; handle = loader.LoadLibrary(libPath); IntPtr gSymProvider = loader.GetSymbol(handle, SYM_NAME); prv = (NativeSymbolSourceProvider)Marshal.PtrToStructure(gSymProvider, typeof(NativeSymbolSourceProvider)); }
public NativeSymbolSource(IProcessorArchitecture arch, string libPath, ILibraryLoader ldr) { this.arch = arch; loader = ldr; handle = loader.LoadLibrary(libPath); IntPtr gSymProvider = loader.GetSymbol(handle, SYM_NAME); prv = (NativeSymbolSourceProvider)Marshal.PtrToStructure(gSymProvider, typeof(NativeSymbolSourceProvider)); }
public StartupParams(IAuthProvider provider, IPathManager pathManager, ILibraryLoader libraryLoader, ICustomNodeManager customNodeManager, Version dynamoVersion) { this.authProvider = provider; this.pathManager = pathManager; this.libraryLoader = libraryLoader; this.customNodeManager = customNodeManager; this.dynamoVersion = dynamoVersion; }
/// <summary> /// Initializes a new instance of the <see cref="StartupParams"/> class. /// </summary> /// <param name="provider"><see cref="IAuthProvider"/> for DynamoModel</param> /// <param name="pathManager"><see cref="IPathManager"/> for DynamoModel</param> /// <param name="libraryLoader"><see cref="ILibraryLoader"/> for DynamoModel</param> /// <param name="customNodeManager"><see cref="ICustomNodeManager"/> for DynamoModel</param> /// <param name="dynamoVersion"><see cref="Version"/> for DynamoModel</param> /// <param name="preferences"><see cref="IPreferences"/> for DynamoModel</param> public StartupParams(IPathManager pathManager, ILibraryLoader libraryLoader, ICustomNodeManager customNodeManager, Version dynamoVersion, IPreferences preferences) { this.pathManager = pathManager; this.libraryLoader = libraryLoader; this.customNodeManager = customNodeManager; this.dynamoVersion = dynamoVersion; this.preferences = preferences; }
/// <inheritdoc /> protected NativeAPI ( string path, ImplementationOptions options, ILibraryLoader libLoader = null, ISymbolLoader symLoader = null ) : base(path, options, libLoader, symLoader) { }
internal static void Initialize(IntPtr library, ILibraryLoader loader) { Base.HALPDP.InitializePDP = initializePDP; Base.HALPDP.GetPDPTemperature = getPDPTemperature; Base.HALPDP.GetPDPVoltage = getPDPVoltage; Base.HALPDP.GetPDPChannelCurrent = getPDPChannelCurrent; Base.HALPDP.GetPDPTotalCurrent = getPDPTotalCurrent; Base.HALPDP.GetPDPTotalPower = getPDPTotalPower; Base.HALPDP.GetPDPTotalEnergy = getPDPTotalEnergy; Base.HALPDP.ResetPDPTotalEnergy = resetPDPTotalEnergy; Base.HALPDP.ClearPDPStickyFaults = clearPDPStickyFaults; }
internal static void Initialize(IntPtr library, ILibraryLoader loader) { Base.HALSemaphore.InitializeMutexNormal = initializeMutexNormal; Base.HALSemaphore.DeleteMutex = deleteMutex; Base.HALSemaphore.TakeMutex = takeMutex; Base.HALSemaphore.TryTakeMutex = tryTakeMutex; Base.HALSemaphore.GiveMutex = giveMutex; Base.HALSemaphore.InitializeMultiWait = initializeMultiWait; Base.HALSemaphore.DeleteMultiWait = deleteMultiWait; Base.HALSemaphore.TakeMultiWait = takeMultiWait; Base.HALSemaphore.GiveMultiWait = giveMultiWait; }
/// <summary> /// Initializes a new instance of the <see cref="StartupParams"/> class. /// </summary> /// <param name="provider"><see cref="IAuthProvider"/> for DynamoModel</param> /// <param name="pathManager"><see cref="IPathManager"/> for DynamoModel</param> /// <param name="libraryLoader"><see cref="ILibraryLoader"/> for DynamoModel</param> /// <param name="customNodeManager"><see cref="ICustomNodeManager"/> for DynamoModel</param> /// <param name="dynamoVersion"><see cref="Version"/> for DynamoModel</param> /// <param name="preferences"><see cref="IPreferences"/> for DynamoModel</param> /// <param name="linterManager"><see cref="LinterManager"/> for DynamoModel></param> public StartupParams(IAuthProvider provider, IPathManager pathManager, ILibraryLoader libraryLoader, ICustomNodeManager customNodeManager, Version dynamoVersion, IPreferences preferences, LinterManager linterManager) { this.authProvider = provider; this.pathManager = pathManager; this.libraryLoader = libraryLoader; this.customNodeManager = customNodeManager; this.dynamoVersion = dynamoVersion; this.preferences = preferences; this.linterManager = linterManager; }
internal static void Initialize(IntPtr library, ILibraryLoader loader) { Base.HALAccelerometer.SetAccelerometerActive = (Base.HALAccelerometer.SetAccelerometerActiveDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "setAccelerometerActive"), typeof(Base.HALAccelerometer.SetAccelerometerActiveDelegate)); Base.HALAccelerometer.SetAccelerometerRange = (Base.HALAccelerometer.SetAccelerometerRangeDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "setAccelerometerRange"), typeof(Base.HALAccelerometer.SetAccelerometerRangeDelegate)); Base.HALAccelerometer.GetAccelerometerX = (Base.HALAccelerometer.GetAccelerometerXDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getAccelerometerX"), typeof(Base.HALAccelerometer.GetAccelerometerXDelegate)); Base.HALAccelerometer.GetAccelerometerY = (Base.HALAccelerometer.GetAccelerometerYDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getAccelerometerY"), typeof(Base.HALAccelerometer.GetAccelerometerYDelegate)); Base.HALAccelerometer.GetAccelerometerZ = (Base.HALAccelerometer.GetAccelerometerZDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getAccelerometerZ"), typeof(Base.HALAccelerometer.GetAccelerometerZDelegate)); }
internal static void Initialize(IntPtr library, ILibraryLoader loader) { Base.HALSolenoid.InitializeSolenoidPort = initializeSolenoidPort; Base.HALSolenoid.FreeSolenoidPort = freeSolenoidPort; Base.HALSolenoid.CheckSolenoidModule = checkSolenoidModule; Base.HALSolenoid.GetSolenoid = getSolenoid; Base.HALSolenoid.GetAllSolenoids = getAllSolenoids; Base.HALSolenoid.SetSolenoid = setSolenoid; Base.HALSolenoid.GetPCMSolenoidBlackList = getPCMSolenoidBlackList; Base.HALSolenoid.GetPCMSolenoidVoltageStickyFault = getPCMSolenoidVoltageStickyFault; Base.HALSolenoid.GetPCMSolenoidVoltageFault = getPCMSolenoidVoltageFault; Base.HALSolenoid.ClearAllPCMStickyFaults_sol = clearAllPCMStickyFaults_sol; }
internal static void Initialize(IntPtr library, ILibraryLoader loader) { Base.HALCAN.FRC_NetworkCommunication_CANSessionMux_sendMessage = (Base.HALCAN.FRC_NetworkCommunication_CANSessionMux_sendMessageDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "FRC_NetworkCommunication_CANSessionMux_sendMessage"), typeof(Base.HALCAN.FRC_NetworkCommunication_CANSessionMux_sendMessageDelegate)); Base.HALCAN.FRC_NetworkCommunication_CANSessionMux_receiveMessage = (Base.HALCAN.FRC_NetworkCommunication_CANSessionMux_receiveMessageDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "FRC_NetworkCommunication_CANSessionMux_receiveMessage"), typeof(Base.HALCAN.FRC_NetworkCommunication_CANSessionMux_receiveMessageDelegate)); Base.HALCAN.FRC_NetworkCommunication_CANSessionMux_openStreamSession = (Base.HALCAN.FRC_NetworkCommunication_CANSessionMux_openStreamSessionDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "FRC_NetworkCommunication_CANSessionMux_openStreamSession"), typeof(Base.HALCAN.FRC_NetworkCommunication_CANSessionMux_openStreamSessionDelegate)); Base.HALCAN.FRC_NetworkCommunication_CANSessionMux_closeStreamSession = (Base.HALCAN.FRC_NetworkCommunication_CANSessionMux_closeStreamSessionDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "FRC_NetworkCommunication_CANSessionMux_closeStreamSession"), typeof(Base.HALCAN.FRC_NetworkCommunication_CANSessionMux_closeStreamSessionDelegate)); Base.HALCAN.FRC_NetworkCommunication_CANSessionMux_readStreamSession = (Base.HALCAN.FRC_NetworkCommunication_CANSessionMux_readStreamSessionDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "FRC_NetworkCommunication_CANSessionMux_readStreamSession"), typeof(Base.HALCAN.FRC_NetworkCommunication_CANSessionMux_readStreamSessionDelegate)); }
public ConfigurationLoader(IFileLoader fileLoader, ILibraryLoader libraryLoader, string env) { m_ConfigSerializer = new MetadataSerializer(); m_FileLoader = fileLoader; m_Environment = env; m_LibraryLoader = libraryLoader; if (!string.IsNullOrEmpty(m_Environment)) { m_EnvConfFileName = Path.GetFileNameWithoutExtension(CONF_FILE_NAME) + "." + m_Environment.ToString() + Path.GetExtension(CONF_FILE_NAME); } }
internal static void Initialize(IntPtr library, ILibraryLoader loader) { Base.HALInterrupts.InitializeInterrupts = initializeInterrupts; Base.HALInterrupts.CleanInterrupts = cleanInterrupts; Base.HALInterrupts.WaitForInterrupt = waitForInterrupt; Base.HALInterrupts.EnableInterrupts = enableInterrupts; Base.HALInterrupts.DisableInterrupts = disableInterrupts; Base.HALInterrupts.ReadRisingTimestamp = readRisingTimestamp; Base.HALInterrupts.ReadFallingTimestamp = readFallingTimestamp; Base.HALInterrupts.RequestInterrupts = requestInterrupts; Base.HALInterrupts.AttachInterruptHandler = attachInterruptHandler; Base.HALInterrupts.SetInterruptUpSourceEdge = setInterruptUpSourceEdge; }
protected NativeLibraryBase ( [CanBeNull] string path, ImplementationOptions options, [CanBeNull] ILibraryLoader libLoader = null, [CanBeNull] ISymbolLoader symLoader = null ) { _libraryLoader = libLoader ?? PlatformLoaderBase.PlatformLoader; _symbolLoader = symLoader ?? PlatformLoaderBase.PlatformLoader; Options = options; _libraryHandle = _libraryLoader.LoadLibrary(path); }
public ProjectLoader(IFileLoader fileLoader, ILibraryLoader libraryLoader, IPluginsManager pluginsMgr, IConfiguration conf, ILoaderExtension ext, ILogger logger) { m_FileLoader = fileLoader; m_LibraryLoader = libraryLoader; m_Config = conf; m_PluginsManager = pluginsMgr; m_Ext = ext; m_Logger = logger; m_Filter = GetFilesFilter(); }
static UnversalLibraryLoader() { if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { CurrentPlatformLibraryLoader = new Win32LibraryLoader(); } else if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) { CurrentPlatformLibraryLoader = new LinuxLibraryLoader(); } else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) { CurrentPlatformLibraryLoader = new MacLibraryLoader(); } }
internal static void Initialize(IntPtr library, ILibraryLoader loader) { Base.HALCompressor.InitializeCompressor = initializeCompressor; Base.HALCompressor.CheckCompressorModule = checkCompressorModule; Base.HALCompressor.GetCompressor = getCompressor; Base.HALCompressor.SetClosedLoopControl = setClosedLoopControl; Base.HALCompressor.GetClosedLoopControl = getClosedLoopControl; Base.HALCompressor.GetPressureSwitch = getPressureSwitch; Base.HALCompressor.GetCompressorCurrent = getCompressorCurrent; Base.HALCompressor.GetCompressorCurrentTooHighFault = getCompressorCurrentTooHighFault; Base.HALCompressor.GetCompressorCurrentTooHighStickyFault = getCompressorCurrentTooHighStickyFault; Base.HALCompressor.GetCompressorShortedStickyFault = getCompressorShortedStickyFault; Base.HALCompressor.GetCompressorShortedFault = getCompressorShortedFault; Base.HALCompressor.GetCompressorNotConnectedStickyFault = getCompressorNotConnectedStickyFault; Base.HALCompressor.GetCompressorNotConnectedFault = getCompressorNotConnectedFault; Base.HALCompressor.ClearAllPCMStickyFaults = clearAllPCMStickyFaults; }
internal static void Initialize(IntPtr library, ILibraryLoader loader) { Base.HALPower.GetVinVoltage = getVinVoltage; Base.HALPower.GetVinCurrent = getVinCurrent; Base.HALPower.GetUserVoltage6V = getUserVoltage6V; Base.HALPower.GetUserCurrent6V = getUserCurrent6V; Base.HALPower.GetUserActive6V = getUserActive6V; Base.HALPower.GetUserCurrentFaults6V = getUserCurrentFaults6V; Base.HALPower.GetUserVoltage5V = getUserVoltage5V; Base.HALPower.GetUserCurrent5V = getUserCurrent5V; Base.HALPower.GetUserActive5V = getUserActive5V; Base.HALPower.GetUserCurrentFaults5V = getUserCurrentFaults5V; Base.HALPower.GetUserVoltage3V3 = getUserVoltage3V3; Base.HALPower.GetUserCurrent3V3 = getUserCurrent3V3; Base.HALPower.GetUserActive3V3 = getUserActive3V3; Base.HALPower.GetUserCurrentFaults3V3 = getUserCurrentFaults3V3; }
/// <summary> /// The callback which loads the mapped library in place of the original. /// </summary> /// <param name="libraryName">The name of the library to search for.</param> /// <param name="assembly">The assembly which initiated the load request.</param> /// <param name="libraryLoader">The library loader.</param> /// <returns>The handle for the loaded library.</returns> private static ILibrary?MapAndLoad(string libraryName, Assembly assembly, ILibraryLoader libraryLoader) { (bool success, ILibrary?result) TryLoadLibrary(string testLibraryName) { var library = libraryLoader.Load(testLibraryName); return(library != null, library); } var result = NaiveDllMap.MapAndLoad(libraryName, assembly.Location + ".config", TryLoadLibrary); if (result.success) { return(result.result); } return(null); }
private object CreateAnonymousImplementationInstance ( [NotNull] Type finalType, [CanBeNull] string library, ImplementationOptions options, ILibraryLoader libLoader = null, ISymbolLoader symLoader = null ) { return(Activator.CreateInstance ( finalType, library, options, libLoader, symLoader )); }
internal static void Initialize(IntPtr library, ILibraryLoader loader) { Base.HALAnalog.InitializeAnalogOutputPort = initializeAnalogOutputPort; Base.HALAnalog.FreeAnalogOutputPort = freeAnalogOutputPort; Base.HALAnalog.FreeAnalogInputPort = freeAnalogInputPort; Base.HALAnalog.SetAnalogOutput = setAnalogOutput; Base.HALAnalog.GetAnalogOutput = getAnalogOutput; Base.HALAnalog.CheckAnalogOutputChannel = checkAnalogOutputChannel; Base.HALAnalog.InitializeAnalogInputPort = initializeAnalogInputPort; Base.HALAnalog.CheckAnalogModule = checkAnalogModule; Base.HALAnalog.CheckAnalogInputChannel = checkAnalogInputChannel; Base.HALAnalog.SetAnalogSampleRate = setAnalogSampleRate; Base.HALAnalog.GetAnalogSampleRate = getAnalogSampleRate; Base.HALAnalog.SetAnalogAverageBits = setAnalogAverageBits; Base.HALAnalog.GetAnalogAverageBits = getAnalogAverageBits; Base.HALAnalog.SetAnalogOversampleBits = setAnalogOversampleBits; Base.HALAnalog.GetAnalogOversampleBits = getAnalogOversampleBits; Base.HALAnalog.GetAnalogValue = getAnalogValue; Base.HALAnalog.GetAnalogAverageValue = getAnalogAverageValue; Base.HALAnalog.GetAnalogVoltsToValue = getAnalogVoltsToValue; Base.HALAnalog.GetAnalogVoltage = getAnalogVoltage; Base.HALAnalog.GetAnalogAverageVoltage = getAnalogAverageVoltage; Base.HALAnalog.GetAnalogLSBWeight = getAnalogLSBWeight; Base.HALAnalog.GetAnalogOffset = getAnalogOffset; Base.HALAnalog.IsAccumulatorChannel = isAccumulatorChannel; Base.HALAnalog.InitAccumulator = initAccumulator; Base.HALAnalog.ResetAccumulator = resetAccumulator; Base.HALAnalog.SetAccumulatorCenter = setAccumulatorCenter; Base.HALAnalog.SetAccumulatorDeadband = setAccumulatorDeadband; Base.HALAnalog.GetAccumulatorValue = getAccumulatorValue; Base.HALAnalog.GetAccumulatorCount = getAccumulatorCount; Base.HALAnalog.GetAccumulatorOutput = getAccumulatorOutput; Base.HALAnalog.InitializeAnalogTrigger = initializeAnalogTrigger; Base.HALAnalog.CleanAnalogTrigger = cleanAnalogTrigger; Base.HALAnalog.SetAnalogTriggerLimitsRaw = setAnalogTriggerLimitsRaw; Base.HALAnalog.SetAnalogTriggerLimitsVoltage = setAnalogTriggerLimitsVoltage; Base.HALAnalog.SetAnalogTriggerAveraged = setAnalogTriggerAveraged; Base.HALAnalog.SetAnalogTriggerFiltered = setAnalogTriggerFiltered; Base.HALAnalog.GetAnalogTriggerInWindow = getAnalogTriggerInWindow; Base.HALAnalog.GetAnalogTriggerTriggerState = getAnalogTriggerTriggerState; Base.HALAnalog.GetAnalogTriggerOutput = getAnalogTriggerOutput; }
internal static void Initialize(IntPtr library, ILibraryLoader loader) { Base.HALSemaphore.InitializeMutexNormal = (Base.HALSemaphore.InitializeMutexNormalDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "initializeMutexNormal"), typeof(Base.HALSemaphore.InitializeMutexNormalDelegate)); Base.HALSemaphore.DeleteMutex = (Base.HALSemaphore.DeleteMutexDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "deleteMutex"), typeof(Base.HALSemaphore.DeleteMutexDelegate)); Base.HALSemaphore.TakeMutex = (Base.HALSemaphore.TakeMutexDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "takeMutex"), typeof(Base.HALSemaphore.TakeMutexDelegate)); Base.HALSemaphore.TryTakeMutex = (Base.HALSemaphore.TryTakeMutexDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "tryTakeMutex"), typeof(Base.HALSemaphore.TryTakeMutexDelegate)); Base.HALSemaphore.GiveMutex = (Base.HALSemaphore.GiveMutexDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "giveMutex"), typeof(Base.HALSemaphore.GiveMutexDelegate)); Base.HALSemaphore.InitializeMultiWait = (Base.HALSemaphore.InitializeMultiWaitDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "initializeMultiWait"), typeof(Base.HALSemaphore.InitializeMultiWaitDelegate)); Base.HALSemaphore.DeleteMultiWait = (Base.HALSemaphore.DeleteMultiWaitDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "deleteMultiWait"), typeof(Base.HALSemaphore.DeleteMultiWaitDelegate)); Base.HALSemaphore.TakeMultiWait = (Base.HALSemaphore.TakeMultiWaitDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "takeMultiWait"), typeof(Base.HALSemaphore.TakeMultiWaitDelegate)); Base.HALSemaphore.GiveMultiWait = (Base.HALSemaphore.GiveMultiWaitDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "giveMultiWait"), typeof(Base.HALSemaphore.GiveMultiWaitDelegate)); }
internal static void Initialize(IntPtr library, ILibraryLoader loader) { Base.HALSerialPort.SerialInitializePort = serialInitializePort; Base.HALSerialPort.SerialSetBaudRate = serialSetBaudRate; Base.HALSerialPort.SerialSetDataBits = serialSetDataBits; Base.HALSerialPort.SerialSetParity = serialSetParity; Base.HALSerialPort.SerialSetStopBits = serialSetStopBits; Base.HALSerialPort.SerialSetWriteMode = serialSetWriteMode; Base.HALSerialPort.SerialSetFlowControl = serialSetFlowControl; Base.HALSerialPort.SerialSetTimeout = serialSetTimeout; Base.HALSerialPort.SerialEnableTermination = serialEnableTermination; Base.HALSerialPort.SerialDisableTermination = serialDisableTermination; Base.HALSerialPort.SerialSetReadBufferSize = serialSetReadBufferSize; Base.HALSerialPort.SerialSetWriteBufferSize = serialSetWriteBufferSize; Base.HALSerialPort.SerialGetBytesReceived = serialGetBytesReceived; Base.HALSerialPort.SerialRead = serialRead; Base.HALSerialPort.SerialWrite = serialWrite; Base.HALSerialPort.SerialFlush = serialFlush; Base.HALSerialPort.SerialClear = serialClear; Base.HALSerialPort.SerialClose = serialClose; }
internal static void Initialize(IntPtr library, ILibraryLoader loader) { Base.HALPDP.InitializePDP = (Base.HALPDP.InitializePDPDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "initializePDP"), typeof(Base.HALPDP.InitializePDPDelegate)); Base.HALPDP.GetPDPTemperature = (Base.HALPDP.GetPDPTemperatureDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getPDPTemperature"), typeof(Base.HALPDP.GetPDPTemperatureDelegate)); Base.HALPDP.GetPDPVoltage = (Base.HALPDP.GetPDPVoltageDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getPDPVoltage"), typeof(Base.HALPDP.GetPDPVoltageDelegate)); Base.HALPDP.GetPDPChannelCurrent = (Base.HALPDP.GetPDPChannelCurrentDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getPDPChannelCurrent"), typeof(Base.HALPDP.GetPDPChannelCurrentDelegate)); Base.HALPDP.GetPDPTotalCurrent = (Base.HALPDP.GetPDPTotalCurrentDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getPDPTotalCurrent"), typeof(Base.HALPDP.GetPDPTotalCurrentDelegate)); Base.HALPDP.GetPDPTotalPower = (Base.HALPDP.GetPDPTotalPowerDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getPDPTotalPower"), typeof(Base.HALPDP.GetPDPTotalPowerDelegate)); Base.HALPDP.GetPDPTotalEnergy = (Base.HALPDP.GetPDPTotalEnergyDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getPDPTotalEnergy"), typeof(Base.HALPDP.GetPDPTotalEnergyDelegate)); Base.HALPDP.ResetPDPTotalEnergy = (Base.HALPDP.ResetPDPTotalEnergyDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "resetPDPTotalEnergy"), typeof(Base.HALPDP.ResetPDPTotalEnergyDelegate)); Base.HALPDP.ClearPDPStickyFaults = (Base.HALPDP.ClearPDPStickyFaultsDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "clearPDPStickyFaults"), typeof(Base.HALPDP.ClearPDPStickyFaultsDelegate)); }
internal static void Initialize(IntPtr library, ILibraryLoader loader) { Base.HALSerialPort.SerialInitializePort = (Base.HALSerialPort.SerialInitializePortDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "serialInitializePort"), typeof(Base.HALSerialPort.SerialInitializePortDelegate)); Base.HALSerialPort.SerialSetBaudRate = (Base.HALSerialPort.SerialSetBaudRateDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "serialSetBaudRate"), typeof(Base.HALSerialPort.SerialSetBaudRateDelegate)); Base.HALSerialPort.SerialSetDataBits = (Base.HALSerialPort.SerialSetDataBitsDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "serialSetDataBits"), typeof(Base.HALSerialPort.SerialSetDataBitsDelegate)); Base.HALSerialPort.SerialSetParity = (Base.HALSerialPort.SerialSetParityDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "serialSetParity"), typeof(Base.HALSerialPort.SerialSetParityDelegate)); Base.HALSerialPort.SerialSetStopBits = (Base.HALSerialPort.SerialSetStopBitsDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "serialSetStopBits"), typeof(Base.HALSerialPort.SerialSetStopBitsDelegate)); Base.HALSerialPort.SerialSetWriteMode = (Base.HALSerialPort.SerialSetWriteModeDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "serialSetWriteMode"), typeof(Base.HALSerialPort.SerialSetWriteModeDelegate)); Base.HALSerialPort.SerialSetFlowControl = (Base.HALSerialPort.SerialSetFlowControlDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "serialSetFlowControl"), typeof(Base.HALSerialPort.SerialSetFlowControlDelegate)); Base.HALSerialPort.SerialSetTimeout = (Base.HALSerialPort.SerialSetTimeoutDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "serialSetTimeout"), typeof(Base.HALSerialPort.SerialSetTimeoutDelegate)); Base.HALSerialPort.SerialEnableTermination = (Base.HALSerialPort.SerialEnableTerminationDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "serialEnableTermination"), typeof(Base.HALSerialPort.SerialEnableTerminationDelegate)); Base.HALSerialPort.SerialDisableTermination = (Base.HALSerialPort.SerialDisableTerminationDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "serialDisableTermination"), typeof(Base.HALSerialPort.SerialDisableTerminationDelegate)); Base.HALSerialPort.SerialSetReadBufferSize = (Base.HALSerialPort.SerialSetReadBufferSizeDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "serialSetReadBufferSize"), typeof(Base.HALSerialPort.SerialSetReadBufferSizeDelegate)); Base.HALSerialPort.SerialSetWriteBufferSize = (Base.HALSerialPort.SerialSetWriteBufferSizeDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "serialSetWriteBufferSize"), typeof(Base.HALSerialPort.SerialSetWriteBufferSizeDelegate)); Base.HALSerialPort.SerialGetBytesReceived = (Base.HALSerialPort.SerialGetBytesReceivedDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "serialGetBytesReceived"), typeof(Base.HALSerialPort.SerialGetBytesReceivedDelegate)); Base.HALSerialPort.SerialRead = (Base.HALSerialPort.SerialReadDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "serialRead"), typeof(Base.HALSerialPort.SerialReadDelegate)); Base.HALSerialPort.SerialWrite = (Base.HALSerialPort.SerialWriteDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "serialWrite"), typeof(Base.HALSerialPort.SerialWriteDelegate)); Base.HALSerialPort.SerialFlush = (Base.HALSerialPort.SerialFlushDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "serialFlush"), typeof(Base.HALSerialPort.SerialFlushDelegate)); Base.HALSerialPort.SerialClear = (Base.HALSerialPort.SerialClearDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "serialClear"), typeof(Base.HALSerialPort.SerialClearDelegate)); Base.HALSerialPort.SerialClose = (Base.HALSerialPort.SerialCloseDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "serialClose"), typeof(Base.HALSerialPort.SerialCloseDelegate)); }
internal static void Initialize(IntPtr library, ILibraryLoader loader) { Base.HALInterrupts.InitializeInterrupts = (Base.HALInterrupts.InitializeInterruptsDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "initializeInterrupts"), typeof(Base.HALInterrupts.InitializeInterruptsDelegate)); Base.HALInterrupts.CleanInterrupts = (Base.HALInterrupts.CleanInterruptsDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "cleanInterrupts"), typeof(Base.HALInterrupts.CleanInterruptsDelegate)); Base.HALInterrupts.WaitForInterrupt = (Base.HALInterrupts.WaitForInterruptDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "waitForInterrupt"), typeof(Base.HALInterrupts.WaitForInterruptDelegate)); Base.HALInterrupts.EnableInterrupts = (Base.HALInterrupts.EnableInterruptsDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "enableInterrupts"), typeof(Base.HALInterrupts.EnableInterruptsDelegate)); Base.HALInterrupts.DisableInterrupts = (Base.HALInterrupts.DisableInterruptsDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "disableInterrupts"), typeof(Base.HALInterrupts.DisableInterruptsDelegate)); Base.HALInterrupts.ReadRisingTimestamp = (Base.HALInterrupts.ReadRisingTimestampDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "readRisingTimestamp"), typeof(Base.HALInterrupts.ReadRisingTimestampDelegate)); Base.HALInterrupts.ReadFallingTimestamp = (Base.HALInterrupts.ReadFallingTimestampDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "readFallingTimestamp"), typeof(Base.HALInterrupts.ReadFallingTimestampDelegate)); Base.HALInterrupts.RequestInterrupts = (Base.HALInterrupts.RequestInterruptsDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "requestInterrupts"), typeof(Base.HALInterrupts.RequestInterruptsDelegate)); Base.HALInterrupts.AttachInterruptHandler = (Base.HALInterrupts.AttachInterruptHandlerDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "attachInterruptHandlerShim"), typeof(Base.HALInterrupts.AttachInterruptHandlerDelegate)); Base.HALInterrupts.SetInterruptUpSourceEdge = (Base.HALInterrupts.SetInterruptUpSourceEdgeDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "setInterruptUpSourceEdge"), typeof(Base.HALInterrupts.SetInterruptUpSourceEdgeDelegate)); }
internal static void Initialize(IntPtr library, ILibraryLoader loader) { Base.HALSolenoid.InitializeSolenoidPort = (Base.HALSolenoid.InitializeSolenoidPortDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "initializeSolenoidPort"), typeof(Base.HALSolenoid.InitializeSolenoidPortDelegate)); Base.HALSolenoid.FreeSolenoidPort = (Base.HALSolenoid.FreeSolenoidPortDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "freeSolenoidPort"), typeof(Base.HALSolenoid.FreeSolenoidPortDelegate)); Base.HALSolenoid.CheckSolenoidModule = (Base.HALSolenoid.CheckSolenoidModuleDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "checkSolenoidModule"), typeof(Base.HALSolenoid.CheckSolenoidModuleDelegate)); Base.HALSolenoid.GetSolenoid = (Base.HALSolenoid.GetSolenoidDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getSolenoid"), typeof(Base.HALSolenoid.GetSolenoidDelegate)); Base.HALSolenoid.GetAllSolenoids = (Base.HALSolenoid.GetAllSolenoidsDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getAllSolenoids"), typeof(Base.HALSolenoid.GetAllSolenoidsDelegate)); Base.HALSolenoid.SetSolenoid = (Base.HALSolenoid.SetSolenoidDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "setSolenoid"), typeof(Base.HALSolenoid.SetSolenoidDelegate)); Base.HALSolenoid.GetPCMSolenoidBlackList = (Base.HALSolenoid.GetPCMSolenoidBlackListDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getPCMSolenoidBlackList"), typeof(Base.HALSolenoid.GetPCMSolenoidBlackListDelegate)); Base.HALSolenoid.GetPCMSolenoidVoltageStickyFault = (Base.HALSolenoid.GetPCMSolenoidVoltageStickyFaultDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getPCMSolenoidVoltageStickyFault"), typeof(Base.HALSolenoid.GetPCMSolenoidVoltageStickyFaultDelegate)); Base.HALSolenoid.GetPCMSolenoidVoltageFault = (Base.HALSolenoid.GetPCMSolenoidVoltageFaultDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getPCMSolenoidVoltageFault"), typeof(Base.HALSolenoid.GetPCMSolenoidVoltageFaultDelegate)); Base.HALSolenoid.ClearAllPCMStickyFaults_sol = (Base.HALSolenoid.ClearAllPCMStickyFaults_solDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "clearAllPCMStickyFaults_sol"), typeof(Base.HALSolenoid.ClearAllPCMStickyFaults_solDelegate)); }
public NativeProcessorArchitecture(string archID, string libPath, ILibraryLoader ldr) : base(archID) { loader = ldr; handle = ldr.LoadLibrary(libPath); prv = (NativeProcessorArchitectureProvider)Marshal.PtrToStructure(ldr.GetSymbol(handle, SYM_NAME), typeof(NativeProcessorArchitectureProvider)); }
internal static void Initialize(IntPtr library, ILibraryLoader loader) { Base.HALUtilities.DelayTicks = delayTicks; Base.HALUtilities.DelayMillis = delayMillis; Base.HALUtilities.DelaySeconds = delaySeconds; }
public Compiler(ILibraryLoader libraryLoader) { _libraryLoader = libraryLoader; }
private static void InitializeDelegates(IntPtr library, ILibraryLoader loader) { NT_SetEntryFlags = (NT_SetEntryFlagsDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_SetEntryFlags"), typeof(NT_SetEntryFlagsDelegate)); NT_GetEntryFlags = (NT_GetEntryFlagsDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetEntryFlags"), typeof(NT_GetEntryFlagsDelegate)); NT_DeleteEntry = (NT_DeleteEntryDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_DeleteEntry"), typeof(NT_DeleteEntryDelegate)); NT_DeleteAllEntries = (NT_DeleteAllEntriesDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_DeleteAllEntries"), typeof(NT_DeleteAllEntriesDelegate)); NT_GetEntryInfo = (NT_GetEntryInfoDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetEntryInfo"), typeof(NT_GetEntryInfoDelegate)); NT_Flush = (NT_FlushDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_Flush"), typeof(NT_FlushDelegate)); NT_AddEntryListener = (NT_AddEntryListenerDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_AddEntryListener"), typeof(NT_AddEntryListenerDelegate)); NT_RemoveEntryListener = (NT_RemoveEntryListenerDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_RemoveEntryListener"), typeof(NT_RemoveEntryListenerDelegate)); NT_AddConnectionListener = (NT_AddConnectionListenerDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_AddConnectionListener"), typeof(NT_AddConnectionListenerDelegate)); NT_RemoveConnectionListener = (NT_RemoveConnectionListenerDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_RemoveConnectionListener"), typeof(NT_RemoveConnectionListenerDelegate)); NT_SetNetworkIdentity = (NT_SetNetworkIdentityDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_SetNetworkIdentity"), typeof(NT_SetNetworkIdentityDelegate)); NT_StartServer = (NT_StartServerDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_StartServer"), typeof(NT_StartServerDelegate)); NT_StopServer = (NT_StopServerDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_StopServer"), typeof(NT_StopServerDelegate)); NT_StartClient = (NT_StartClientDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_StartClient"), typeof(NT_StartClientDelegate)); NT_StopClient = (NT_StopClientDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_StopClient"), typeof(NT_StopClientDelegate)); NT_StopRpcServer = (NT_StopRpcServerDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_StopRpcServer"), typeof(NT_StopRpcServerDelegate)); NT_StopNotifier = (NT_StopNotifierDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_StopNotifier"), typeof(NT_StopNotifierDelegate)); NT_SetUpdateRate = (NT_SetUpdateRateDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_SetUpdateRate"), typeof(NT_SetUpdateRateDelegate)); NT_GetConnections = (NT_GetConnectionsDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetConnections"), typeof(NT_GetConnectionsDelegate)); NT_SavePersistent = (NT_SavePersistentDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_SavePersistent"), typeof(NT_SavePersistentDelegate)); NT_LoadPersistent = (NT_LoadPersistentDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_LoadPersistent"), typeof(NT_LoadPersistentDelegate)); NT_DisposeValue = (NT_DisposeValueDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_DisposeValue"), typeof(NT_DisposeValueDelegate)); NT_InitValue = (NT_InitValueDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_InitValue"), typeof(NT_InitValueDelegate)); NT_DisposeString = (NT_DisposeStringDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_DisposeString"), typeof(NT_DisposeStringDelegate)); NT_GetType = (NT_GetTypeDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetType"), typeof(NT_GetTypeDelegate)); NT_DisposeConnectionInfoArray = (NT_DisposeConnectionInfoArrayDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_DisposeConnectionInfoArray"), typeof(NT_DisposeConnectionInfoArrayDelegate)); NT_DisposeEntryInfoArray = (NT_DisposeEntryInfoArrayDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_DisposeEntryInfoArray"), typeof(NT_DisposeEntryInfoArrayDelegate)); NT_Now = (NT_NowDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_Now"), typeof(NT_NowDelegate)); NT_SetLogger = (NT_SetLoggerDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_SetLogger"), typeof(NT_SetLoggerDelegate)); NT_AllocateCharArray = (NT_AllocateCharArrayDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_AllocateCharArray"), typeof(NT_AllocateCharArrayDelegate)); NT_FreeBooleanArray = (NT_FreeBooleanArrayDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_FreeBooleanArray"), typeof(NT_FreeBooleanArrayDelegate)); NT_FreeDoubleArray = (NT_FreeDoubleArrayDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_FreeDoubleArray"), typeof(NT_FreeDoubleArrayDelegate)); NT_FreeCharArray = (NT_FreeCharArrayDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_FreeCharArray"), typeof(NT_FreeCharArrayDelegate)); NT_FreeStringArray = (NT_FreeStringArrayDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_FreeStringArray"), typeof(NT_FreeStringArrayDelegate)); NT_GetValueType = (NT_GetValueTypeDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetValueType"), typeof(NT_GetValueTypeDelegate)); NT_GetValueBoolean = (NT_GetValueBooleanDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetValueBoolean"), typeof(NT_GetValueBooleanDelegate)); NT_GetValueDouble = (NT_GetValueDoubleDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetValueDouble"), typeof(NT_GetValueDoubleDelegate)); NT_GetValueString = (NT_GetValueStringDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetValueString"), typeof(NT_GetValueStringDelegate)); NT_GetValueRaw = (NT_GetValueRawDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetValueRaw"), typeof(NT_GetValueRawDelegate)); NT_GetValueBooleanArray = (NT_GetValueBooleanArrayDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetValueBooleanArray"), typeof(NT_GetValueBooleanArrayDelegate)); NT_GetValueDoubleArray = (NT_GetValueDoubleArrayDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetValueDoubleArray"), typeof(NT_GetValueDoubleArrayDelegate)); NT_GetValueStringArray = (NT_GetValueStringArrayDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetValueStringArray"), typeof(NT_GetValueStringArrayDelegate)); NT_GetEntryBoolean = (NT_GetEntryBooleanDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetEntryBoolean"), typeof(NT_GetEntryBooleanDelegate)); NT_GetEntryDouble = (NT_GetEntryDoubleDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetEntryDouble"), typeof(NT_GetEntryDoubleDelegate)); NT_GetEntryString = (NT_GetEntryStringDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetEntryString"), typeof(NT_GetEntryStringDelegate)); NT_GetEntryRaw = (NT_GetEntryRawDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetEntryRaw"), typeof(NT_GetEntryRawDelegate)); NT_GetEntryBooleanArray = (NT_GetEntryBooleanArrayDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetEntryBooleanArray"), typeof(NT_GetEntryBooleanArrayDelegate)); NT_GetEntryDoubleArray = (NT_GetEntryDoubleArrayDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetEntryDoubleArray"), typeof(NT_GetEntryDoubleArrayDelegate)); NT_GetEntryStringArray = (NT_GetEntryStringArrayDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetEntryStringArray"), typeof(NT_GetEntryStringArrayDelegate)); NT_SetEntryBoolean = (NT_SetEntryBooleanDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_SetEntryBoolean"), typeof(NT_SetEntryBooleanDelegate)); NT_SetEntryDouble = (NT_SetEntryDoubleDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_SetEntryDouble"), typeof(NT_SetEntryDoubleDelegate)); NT_SetEntryString = (NT_SetEntryStringDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_SetEntryString"), typeof(NT_SetEntryStringDelegate)); NT_SetEntryRaw = (NT_SetEntryRawDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_SetEntryRaw"), typeof(NT_SetEntryRawDelegate)); NT_SetEntryBooleanArray = (NT_SetEntryBooleanArrayDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_SetEntryBooleanArray"), typeof(NT_SetEntryBooleanArrayDelegate)); NT_SetEntryDoubleArray = (NT_SetEntryDoubleArrayDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_SetEntryDoubleArray"), typeof(NT_SetEntryDoubleArrayDelegate)); NT_SetEntryStringArray = (NT_SetEntryStringArrayDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_SetEntryStringArray"), typeof(NT_SetEntryStringArrayDelegate)); NT_CreateRpc = (NT_CreateRpcDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_CreateRpc"), typeof(NT_CreateRpcDelegate)); NT_CreatePolledRpc = (NT_CreatePolledRpcDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_CreatePolledRpc"), typeof(NT_CreatePolledRpcDelegate)); NT_PollRpc = (NT_PollRpcDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_PollRpc"), typeof(NT_PollRpcDelegate)); NT_PostRpcResponse = (NT_PostRpcResponseDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_PostRpcResponse"), typeof(NT_PostRpcResponseDelegate)); NT_CallRpc = (NT_CallRpcDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_CallRpc"), typeof(NT_CallRpcDelegate)); NT_GetRpcResult = (NT_GetRpcResultDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetRpcResult"), typeof(NT_GetRpcResultDelegate)); }
private static void InitializeDelegates(IntPtr library, ILibraryLoader loader) { NT_SetEntryFlags = (NT_SetEntryFlagsDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_SetEntryFlags"), typeof(NT_SetEntryFlagsDelegate)); NT_GetEntryFlags = (NT_GetEntryFlagsDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetEntryFlags"), typeof(NT_GetEntryFlagsDelegate)); NT_DeleteEntry = (NT_DeleteEntryDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_DeleteEntry"), typeof(NT_DeleteEntryDelegate)); NT_DeleteAllEntries = (NT_DeleteAllEntriesDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_DeleteAllEntries"), typeof(NT_DeleteAllEntriesDelegate)); NT_GetEntryInfo = (NT_GetEntryInfoDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetEntryInfo"), typeof(NT_GetEntryInfoDelegate)); NT_Flush = (NT_FlushDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_Flush"), typeof(NT_FlushDelegate)); NT_AddEntryListener = (NT_AddEntryListenerDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_AddEntryListener"), typeof(NT_AddEntryListenerDelegate)); NT_RemoveEntryListener = (NT_RemoveEntryListenerDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_RemoveEntryListener"), typeof(NT_RemoveEntryListenerDelegate)); NT_AddConnectionListener = (NT_AddConnectionListenerDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_AddConnectionListener"), typeof(NT_AddConnectionListenerDelegate)); NT_RemoveConnectionListener = (NT_RemoveConnectionListenerDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_RemoveConnectionListener"), typeof(NT_RemoveConnectionListenerDelegate)); NT_SetNetworkIdentity = (NT_SetNetworkIdentityDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_SetNetworkIdentity"), typeof(NT_SetNetworkIdentityDelegate)); NT_StartServer = (NT_StartServerDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_StartServer"), typeof(NT_StartServerDelegate)); NT_StopServer = (NT_StopServerDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_StopServer"), typeof(NT_StopServerDelegate)); NT_StartClient = (NT_StartClientDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_StartClient"), typeof(NT_StartClientDelegate)); NT_StopClient = (NT_StopClientDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_StopClient"), typeof(NT_StopClientDelegate)); NT_SetUpdateRate = (NT_SetUpdateRateDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_SetUpdateRate"), typeof(NT_SetUpdateRateDelegate)); NT_GetConnections = (NT_GetConnectionsDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetConnections"), typeof(NT_GetConnectionsDelegate)); NT_SavePersistent = (NT_SavePersistentDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_SavePersistent"), typeof(NT_SavePersistentDelegate)); NT_LoadPersistent = (NT_LoadPersistentDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_LoadPersistent"), typeof(NT_LoadPersistentDelegate)); NT_DisposeValue = (NT_DisposeValueDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_DisposeValue"), typeof(NT_DisposeValueDelegate)); NT_InitValue = (NT_InitValueDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_InitValue"), typeof(NT_InitValueDelegate)); NT_DisposeString = (NT_DisposeStringDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_DisposeString"), typeof(NT_DisposeStringDelegate)); NT_GetType = (NT_GetTypeDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetType"), typeof(NT_GetTypeDelegate)); NT_DisposeConnectionInfoArray = (NT_DisposeConnectionInfoArrayDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_DisposeConnectionInfoArray"), typeof(NT_DisposeConnectionInfoArrayDelegate)); NT_DisposeEntryInfoArray = (NT_DisposeEntryInfoArrayDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_DisposeEntryInfoArray"), typeof(NT_DisposeEntryInfoArrayDelegate)); NT_Now = (NT_NowDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_Now"), typeof(NT_NowDelegate)); NT_SetLogger = (NT_SetLoggerDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_SetLogger"), typeof(NT_SetLoggerDelegate)); NT_AllocateCharArray = (NT_AllocateCharArrayDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_AllocateCharArray"), typeof(NT_AllocateCharArrayDelegate)); NT_FreeBooleanArray = (NT_FreeBooleanArrayDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_FreeBooleanArray"), typeof(NT_FreeBooleanArrayDelegate)); NT_FreeDoubleArray = (NT_FreeDoubleArrayDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_FreeDoubleArray"), typeof(NT_FreeDoubleArrayDelegate)); NT_FreeCharArray = (NT_FreeCharArrayDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_FreeCharArray"), typeof(NT_FreeCharArrayDelegate)); NT_FreeStringArray = (NT_FreeStringArrayDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_FreeStringArray"), typeof(NT_FreeStringArrayDelegate)); NT_GetValueType = (NT_GetValueTypeDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetValueType"), typeof(NT_GetValueTypeDelegate)); NT_GetValueBoolean = (NT_GetValueBooleanDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetValueBoolean"), typeof(NT_GetValueBooleanDelegate)); NT_GetValueDouble = (NT_GetValueDoubleDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetValueDouble"), typeof(NT_GetValueDoubleDelegate)); NT_GetValueString = (NT_GetValueStringDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetValueString"), typeof(NT_GetValueStringDelegate)); NT_GetValueRaw = (NT_GetValueRawDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetValueRaw"), typeof(NT_GetValueRawDelegate)); NT_GetValueBooleanArray = (NT_GetValueBooleanArrayDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetValueBooleanArray"), typeof(NT_GetValueBooleanArrayDelegate)); NT_GetValueDoubleArray = (NT_GetValueDoubleArrayDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetValueDoubleArray"), typeof(NT_GetValueDoubleArrayDelegate)); NT_GetValueStringArray = (NT_GetValueStringArrayDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetValueStringArray"), typeof(NT_GetValueStringArrayDelegate)); NT_GetEntryBoolean = (NT_GetEntryBooleanDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetEntryBoolean"), typeof(NT_GetEntryBooleanDelegate)); NT_GetEntryDouble = (NT_GetEntryDoubleDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetEntryDouble"), typeof(NT_GetEntryDoubleDelegate)); NT_GetEntryString = (NT_GetEntryStringDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetEntryString"), typeof(NT_GetEntryStringDelegate)); NT_GetEntryRaw = (NT_GetEntryRawDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetEntryRaw"), typeof(NT_GetEntryRawDelegate)); NT_GetEntryBooleanArray = (NT_GetEntryBooleanArrayDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetEntryBooleanArray"), typeof(NT_GetEntryBooleanArrayDelegate)); NT_GetEntryDoubleArray = (NT_GetEntryDoubleArrayDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetEntryDoubleArray"), typeof(NT_GetEntryDoubleArrayDelegate)); NT_GetEntryStringArray = (NT_GetEntryStringArrayDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetEntryStringArray"), typeof(NT_GetEntryStringArrayDelegate)); NT_SetEntryBoolean = (NT_SetEntryBooleanDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_SetEntryBoolean"), typeof(NT_SetEntryBooleanDelegate)); NT_SetEntryDouble = (NT_SetEntryDoubleDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_SetEntryDouble"), typeof(NT_SetEntryDoubleDelegate)); NT_SetEntryString = (NT_SetEntryStringDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_SetEntryString"), typeof(NT_SetEntryStringDelegate)); NT_SetEntryRaw = (NT_SetEntryRawDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_SetEntryRaw"), typeof(NT_SetEntryRawDelegate)); NT_SetEntryBooleanArray = (NT_SetEntryBooleanArrayDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_SetEntryBooleanArray"), typeof(NT_SetEntryBooleanArrayDelegate)); NT_SetEntryDoubleArray = (NT_SetEntryDoubleArrayDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_SetEntryDoubleArray"), typeof(NT_SetEntryDoubleArrayDelegate)); NT_SetEntryStringArray = (NT_SetEntryStringArrayDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_SetEntryStringArray"), typeof(NT_SetEntryStringArrayDelegate)); NT_CreateRpc = (NT_CreateRpcDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_CreateRpc"), typeof(NT_CreateRpcDelegate)); NT_CreatePolledRpc = (NT_CreatePolledRpcDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_CreatePolledRpc"), typeof(NT_CreatePolledRpcDelegate)); NT_PollRpc = (NT_PollRpcDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_PollRpc"), typeof(NT_PollRpcDelegate)); NT_PostRpcResponse = (NT_PostRpcResponseDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_PostRpcResponse"), typeof(NT_PostRpcResponseDelegate)); NT_CallRpc = (NT_CallRpcDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_CallRpc"), typeof(NT_CallRpcDelegate)); NT_GetRpcResult = (NT_GetRpcResultDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "NT_GetRpcResult"), typeof(NT_GetRpcResultDelegate)); }
internal static void Initialize(IntPtr library, ILibraryLoader loader) { Base.HALAnalog.InitializeAnalogOutputPort = (Base.HALAnalog.InitializeAnalogOutputPortDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "initializeAnalogOutputPort"), typeof(Base.HALAnalog.InitializeAnalogOutputPortDelegate)); Base.HALAnalog.FreeAnalogOutputPort = (Base.HALAnalog.FreeAnalogOutputPortDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "freeAnalogOutputPort"), typeof (Base.HALAnalog.FreeAnalogOutputPortDelegate)); Base.HALAnalog.FreeAnalogInputPort = (Base.HALAnalog.FreeAnalogInputPortDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "freeAnalogInputPort"), typeof (Base.HALAnalog.FreeAnalogInputPortDelegate)); Base.HALAnalog.SetAnalogOutput = (Base.HALAnalog.SetAnalogOutputDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "setAnalogOutput"), typeof(Base.HALAnalog.SetAnalogOutputDelegate)); Base.HALAnalog.GetAnalogOutput = (Base.HALAnalog.GetAnalogOutputDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getAnalogOutput"), typeof(Base.HALAnalog.GetAnalogOutputDelegate)); Base.HALAnalog.CheckAnalogOutputChannel = (Base.HALAnalog.CheckAnalogOutputChannelDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "checkAnalogOutputChannel"), typeof(Base.HALAnalog.CheckAnalogOutputChannelDelegate)); Base.HALAnalog.InitializeAnalogInputPort = (Base.HALAnalog.InitializeAnalogInputPortDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "initializeAnalogInputPort"), typeof(Base.HALAnalog.InitializeAnalogInputPortDelegate)); Base.HALAnalog.CheckAnalogModule = (Base.HALAnalog.CheckAnalogModuleDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "checkAnalogModule"), typeof(Base.HALAnalog.CheckAnalogModuleDelegate)); Base.HALAnalog.CheckAnalogInputChannel = (Base.HALAnalog.CheckAnalogInputChannelDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "checkAnalogInputChannel"), typeof(Base.HALAnalog.CheckAnalogInputChannelDelegate)); Base.HALAnalog.SetAnalogSampleRate = (Base.HALAnalog.SetAnalogSampleRateDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "setAnalogSampleRate"), typeof(Base.HALAnalog.SetAnalogSampleRateDelegate)); Base.HALAnalog.GetAnalogSampleRate = (Base.HALAnalog.GetAnalogSampleRateDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getAnalogSampleRate"), typeof(Base.HALAnalog.GetAnalogSampleRateDelegate)); Base.HALAnalog.SetAnalogAverageBits = (Base.HALAnalog.SetAnalogAverageBitsDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "setAnalogAverageBits"), typeof(Base.HALAnalog.SetAnalogAverageBitsDelegate)); Base.HALAnalog.GetAnalogAverageBits = (Base.HALAnalog.GetAnalogAverageBitsDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getAnalogAverageBits"), typeof(Base.HALAnalog.GetAnalogAverageBitsDelegate)); Base.HALAnalog.SetAnalogOversampleBits = (Base.HALAnalog.SetAnalogOversampleBitsDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "setAnalogOversampleBits"), typeof(Base.HALAnalog.SetAnalogOversampleBitsDelegate)); Base.HALAnalog.GetAnalogOversampleBits = (Base.HALAnalog.GetAnalogOversampleBitsDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getAnalogOversampleBits"), typeof(Base.HALAnalog.GetAnalogOversampleBitsDelegate)); Base.HALAnalog.GetAnalogValue = (Base.HALAnalog.GetAnalogValueDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getAnalogValue"), typeof(Base.HALAnalog.GetAnalogValueDelegate)); Base.HALAnalog.GetAnalogAverageValue = (Base.HALAnalog.GetAnalogAverageValueDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getAnalogAverageValue"), typeof(Base.HALAnalog.GetAnalogAverageValueDelegate)); Base.HALAnalog.GetAnalogVoltsToValue = (Base.HALAnalog.GetAnalogVoltsToValueDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getAnalogVoltsToValue"), typeof(Base.HALAnalog.GetAnalogVoltsToValueDelegate)); Base.HALAnalog.GetAnalogVoltage = (Base.HALAnalog.GetAnalogVoltageDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getAnalogVoltage"), typeof(Base.HALAnalog.GetAnalogVoltageDelegate)); Base.HALAnalog.GetAnalogAverageVoltage = (Base.HALAnalog.GetAnalogAverageVoltageDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getAnalogAverageVoltage"), typeof(Base.HALAnalog.GetAnalogAverageVoltageDelegate)); Base.HALAnalog.GetAnalogLSBWeight = (Base.HALAnalog.GetAnalogLSBWeightDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getAnalogLSBWeight"), typeof(Base.HALAnalog.GetAnalogLSBWeightDelegate)); Base.HALAnalog.GetAnalogOffset = (Base.HALAnalog.GetAnalogOffsetDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getAnalogOffset"), typeof(Base.HALAnalog.GetAnalogOffsetDelegate)); Base.HALAnalog.IsAccumulatorChannel = (Base.HALAnalog.IsAccumulatorChannelDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "isAccumulatorChannel"), typeof(Base.HALAnalog.IsAccumulatorChannelDelegate)); Base.HALAnalog.InitAccumulator = (Base.HALAnalog.InitAccumulatorDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "initAccumulator"), typeof(Base.HALAnalog.InitAccumulatorDelegate)); Base.HALAnalog.ResetAccumulator = (Base.HALAnalog.ResetAccumulatorDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "resetAccumulator"), typeof(Base.HALAnalog.ResetAccumulatorDelegate)); Base.HALAnalog.SetAccumulatorCenter = (Base.HALAnalog.SetAccumulatorCenterDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "setAccumulatorCenter"), typeof(Base.HALAnalog.SetAccumulatorCenterDelegate)); Base.HALAnalog.SetAccumulatorDeadband = (Base.HALAnalog.SetAccumulatorDeadbandDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "setAccumulatorDeadband"), typeof(Base.HALAnalog.SetAccumulatorDeadbandDelegate)); Base.HALAnalog.GetAccumulatorValue = (Base.HALAnalog.GetAccumulatorValueDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getAccumulatorValue"), typeof(Base.HALAnalog.GetAccumulatorValueDelegate)); Base.HALAnalog.GetAccumulatorCount = (Base.HALAnalog.GetAccumulatorCountDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getAccumulatorCount"), typeof(Base.HALAnalog.GetAccumulatorCountDelegate)); Base.HALAnalog.GetAccumulatorOutput = (Base.HALAnalog.GetAccumulatorOutputDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getAccumulatorOutput"), typeof(Base.HALAnalog.GetAccumulatorOutputDelegate)); Base.HALAnalog.InitializeAnalogTrigger = (Base.HALAnalog.InitializeAnalogTriggerDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "initializeAnalogTrigger"), typeof(Base.HALAnalog.InitializeAnalogTriggerDelegate)); Base.HALAnalog.CleanAnalogTrigger = (Base.HALAnalog.CleanAnalogTriggerDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "cleanAnalogTrigger"), typeof(Base.HALAnalog.CleanAnalogTriggerDelegate)); Base.HALAnalog.SetAnalogTriggerLimitsRaw = (Base.HALAnalog.SetAnalogTriggerLimitsRawDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "setAnalogTriggerLimitsRaw"), typeof(Base.HALAnalog.SetAnalogTriggerLimitsRawDelegate)); Base.HALAnalog.SetAnalogTriggerLimitsVoltage = (Base.HALAnalog.SetAnalogTriggerLimitsVoltageDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "setAnalogTriggerLimitsVoltage"), typeof(Base.HALAnalog.SetAnalogTriggerLimitsVoltageDelegate)); Base.HALAnalog.SetAnalogTriggerAveraged = (Base.HALAnalog.SetAnalogTriggerAveragedDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "setAnalogTriggerAveraged"), typeof(Base.HALAnalog.SetAnalogTriggerAveragedDelegate)); Base.HALAnalog.SetAnalogTriggerFiltered = (Base.HALAnalog.SetAnalogTriggerFilteredDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "setAnalogTriggerFiltered"), typeof(Base.HALAnalog.SetAnalogTriggerFilteredDelegate)); Base.HALAnalog.GetAnalogTriggerInWindow = (Base.HALAnalog.GetAnalogTriggerInWindowDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getAnalogTriggerInWindow"), typeof(Base.HALAnalog.GetAnalogTriggerInWindowDelegate)); Base.HALAnalog.GetAnalogTriggerTriggerState = (Base.HALAnalog.GetAnalogTriggerTriggerStateDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getAnalogTriggerTriggerState"), typeof(Base.HALAnalog.GetAnalogTriggerTriggerStateDelegate)); Base.HALAnalog.GetAnalogTriggerOutput = (Base.HALAnalog.GetAnalogTriggerOutputDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "getAnalogTriggerOutput"), typeof(Base.HALAnalog.GetAnalogTriggerOutputDelegate)); }
internal static void Initialize(IntPtr library, ILibraryLoader loader) { Base.HALCanTalonSRX.C_TalonSRX_Create3 = (Base.HALCanTalonSRX.C_TalonSRX_Create3Delegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_Create3"), typeof(Base.HALCanTalonSRX.C_TalonSRX_Create3Delegate)); Base.HALCanTalonSRX.C_TalonSRX_Destroy = (Base.HALCanTalonSRX.C_TalonSRX_DestroyDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_Destroy"), typeof(Base.HALCanTalonSRX.C_TalonSRX_DestroyDelegate)); Base.HALCanTalonSRX.C_TalonSRX_Set = (Base.HALCanTalonSRX.C_TalonSRX_SetDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_Set"), typeof(Base.HALCanTalonSRX.C_TalonSRX_SetDelegate)); Base.HALCanTalonSRX.C_TalonSRX_SetParam = (Base.HALCanTalonSRX.C_TalonSRX_SetParamDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_SetParam"), typeof(Base.HALCanTalonSRX.C_TalonSRX_SetParamDelegate)); Base.HALCanTalonSRX.C_TalonSRX_RequestParam = (Base.HALCanTalonSRX.C_TalonSRX_RequestParamDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_RequestParam"), typeof(Base.HALCanTalonSRX.C_TalonSRX_RequestParamDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetParamResponse = (Base.HALCanTalonSRX.C_TalonSRX_GetParamResponseDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetParamResponse"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetParamResponseDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetParamResponseInt32 = (Base.HALCanTalonSRX.C_TalonSRX_GetParamResponseInt32Delegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetParamResponseInt32"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetParamResponseInt32Delegate)); Base.HALCanTalonSRX.C_TalonSRX_SetPgain = (Base.HALCanTalonSRX.C_TalonSRX_SetPgainDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_SetPgain"), typeof(Base.HALCanTalonSRX.C_TalonSRX_SetPgainDelegate)); Base.HALCanTalonSRX.C_TalonSRX_SetIgain = (Base.HALCanTalonSRX.C_TalonSRX_SetIgainDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_SetIgain"), typeof(Base.HALCanTalonSRX.C_TalonSRX_SetIgainDelegate)); Base.HALCanTalonSRX.C_TalonSRX_SetDgain = (Base.HALCanTalonSRX.C_TalonSRX_SetDgainDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_SetDgain"), typeof(Base.HALCanTalonSRX.C_TalonSRX_SetDgainDelegate)); Base.HALCanTalonSRX.C_TalonSRX_SetFgain = (Base.HALCanTalonSRX.C_TalonSRX_SetFgainDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_SetFgain"), typeof(Base.HALCanTalonSRX.C_TalonSRX_SetFgainDelegate)); Base.HALCanTalonSRX.C_TalonSRX_SetIzone = (Base.HALCanTalonSRX.C_TalonSRX_SetIzoneDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_SetIzone"), typeof(Base.HALCanTalonSRX.C_TalonSRX_SetIzoneDelegate)); Base.HALCanTalonSRX.C_TalonSRX_SetCloseLoopRampRate = (Base.HALCanTalonSRX.C_TalonSRX_SetCloseLoopRampRateDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_SetCloseLoopRampRate"), typeof(Base.HALCanTalonSRX.C_TalonSRX_SetCloseLoopRampRateDelegate)); Base.HALCanTalonSRX.C_TalonSRX_SetVoltageCompensationRate = (Base.HALCanTalonSRX.C_TalonSRX_SetVoltageCompensationRateDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_SetVoltageCompensationRate"), typeof(Base.HALCanTalonSRX.C_TalonSRX_SetVoltageCompensationRateDelegate)); Base.HALCanTalonSRX.C_TalonSRX_SetSensorPosition = (Base.HALCanTalonSRX.C_TalonSRX_SetSensorPositionDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_SetSensorPosition"), typeof(Base.HALCanTalonSRX.C_TalonSRX_SetSensorPositionDelegate)); Base.HALCanTalonSRX.C_TalonSRX_SetForwardSoftLimit = (Base.HALCanTalonSRX.C_TalonSRX_SetForwardSoftLimitDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_SetForwardSoftLimit"), typeof(Base.HALCanTalonSRX.C_TalonSRX_SetForwardSoftLimitDelegate)); Base.HALCanTalonSRX.C_TalonSRX_SetReverseSoftLimit = (Base.HALCanTalonSRX.C_TalonSRX_SetReverseSoftLimitDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_SetReverseSoftLimit"), typeof(Base.HALCanTalonSRX.C_TalonSRX_SetReverseSoftLimitDelegate)); Base.HALCanTalonSRX.C_TalonSRX_SetForwardSoftEnable = (Base.HALCanTalonSRX.C_TalonSRX_SetForwardSoftEnableDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_SetForwardSoftEnable"), typeof(Base.HALCanTalonSRX.C_TalonSRX_SetForwardSoftEnableDelegate)); Base.HALCanTalonSRX.C_TalonSRX_SetReverseSoftEnable = (Base.HALCanTalonSRX.C_TalonSRX_SetReverseSoftEnableDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_SetReverseSoftEnable"), typeof(Base.HALCanTalonSRX.C_TalonSRX_SetReverseSoftEnableDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetPgain = (Base.HALCanTalonSRX.C_TalonSRX_GetPgainDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetPgain"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetPgainDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetIgain = (Base.HALCanTalonSRX.C_TalonSRX_GetIgainDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetIgain"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetIgainDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetDgain = (Base.HALCanTalonSRX.C_TalonSRX_GetDgainDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetDgain"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetDgainDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetFgain = (Base.HALCanTalonSRX.C_TalonSRX_GetFgainDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetFgain"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetFgainDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetIzone = (Base.HALCanTalonSRX.C_TalonSRX_GetIzoneDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetIzone"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetIzoneDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetCloseLoopRampRate = (Base.HALCanTalonSRX.C_TalonSRX_GetCloseLoopRampRateDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetCloseLoopRampRate"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetCloseLoopRampRateDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetVoltageCompensationRate = (Base.HALCanTalonSRX.C_TalonSRX_GetVoltageCompensationRateDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetVoltageCompensationRate"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetVoltageCompensationRateDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetForwardSoftLimit = (Base.HALCanTalonSRX.C_TalonSRX_GetForwardSoftLimitDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetForwardSoftLimit"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetForwardSoftLimitDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetReverseSoftLimit = (Base.HALCanTalonSRX.C_TalonSRX_GetReverseSoftLimitDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetReverseSoftLimit"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetReverseSoftLimitDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetForwardSoftEnable = (Base.HALCanTalonSRX.C_TalonSRX_GetForwardSoftEnableDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetForwardSoftEnable"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetForwardSoftEnableDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetReverseSoftEnable = (Base.HALCanTalonSRX.C_TalonSRX_GetReverseSoftEnableDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetReverseSoftEnable"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetReverseSoftEnableDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetPulseWidthRiseToFallUs = (Base.HALCanTalonSRX.C_TalonSRX_GetPulseWidthRiseToFallUsDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetPulseWidthRiseToFallUs"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetPulseWidthRiseToFallUsDelegate)); Base.HALCanTalonSRX.C_TalonSRX_IsPulseWidthSensorPresent = (Base.HALCanTalonSRX.C_TalonSRX_IsPulseWidthSensorPresentDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_IsPulseWidthSensorPresent"), typeof(Base.HALCanTalonSRX.C_TalonSRX_IsPulseWidthSensorPresentDelegate)); Base.HALCanTalonSRX.C_TalonSRX_SetModeSelect2 = (Base.HALCanTalonSRX.C_TalonSRX_SetModeSelect2Delegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_SetModeSelect2"), typeof(Base.HALCanTalonSRX.C_TalonSRX_SetModeSelect2Delegate)); Base.HALCanTalonSRX.C_TalonSRX_SetStatusFrameRate = (Base.HALCanTalonSRX.C_TalonSRX_SetStatusFrameRateDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_SetStatusFrameRate"), typeof(Base.HALCanTalonSRX.C_TalonSRX_SetStatusFrameRateDelegate)); Base.HALCanTalonSRX.C_TalonSRX_ClearStickyFaults = (Base.HALCanTalonSRX.C_TalonSRX_ClearStickyFaultsDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_ClearStickyFaults"), typeof(Base.HALCanTalonSRX.C_TalonSRX_ClearStickyFaultsDelegate)); Base.HALCanTalonSRX.C_TalonSRX_ChangeMotionControlFramePeriod = (Base.HALCanTalonSRX.C_TalonSRX_ChangeMotionControlFramePeriodDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_ChangeMotionControlFramePeriod"), typeof(Base.HALCanTalonSRX.C_TalonSRX_ChangeMotionControlFramePeriodDelegate)); Base.HALCanTalonSRX.C_TalonSRX_ClearMotionProfileTrajectories = (Base.HALCanTalonSRX.C_TalonSRX_ClearMotionProfileTrajectoriesDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_ClearMotionProfileTrajectories"), typeof(Base.HALCanTalonSRX.C_TalonSRX_ClearMotionProfileTrajectoriesDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetMotionProfileTopLevelBufferCount = (Base.HALCanTalonSRX.C_TalonSRX_GetMotionProfileTopLevelBufferCountDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetMotionProfileTopLevelBufferCount"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetMotionProfileTopLevelBufferCountDelegate)); Base.HALCanTalonSRX.C_TalonSRX_IsMotionProfileTopLevelBufferFull = (Base.HALCanTalonSRX.C_TalonSRX_IsMotionProfileTopLevelBufferFullDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_IsMotionProfileTopLevelBufferFull"), typeof(Base.HALCanTalonSRX.C_TalonSRX_IsMotionProfileTopLevelBufferFullDelegate)); Base.HALCanTalonSRX.C_TalonSRX_PushMotionProfileTrajectory = (Base.HALCanTalonSRX.C_TalonSRX_PushMotionProfileTrajectoryDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_PushMotionProfileTrajectory"), typeof(Base.HALCanTalonSRX.C_TalonSRX_PushMotionProfileTrajectoryDelegate)); Base.HALCanTalonSRX.C_TalonSRX_ProcessMotionProfileBuffer = (Base.HALCanTalonSRX.C_TalonSRX_ProcessMotionProfileBufferDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_ProcessMotionProfileBuffer"), typeof(Base.HALCanTalonSRX.C_TalonSRX_ProcessMotionProfileBufferDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetMotionProfileStatus = (Base.HALCanTalonSRX.C_TalonSRX_GetMotionProfileStatusDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetMotionProfileStatus"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetMotionProfileStatusDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetFault_OverTemp = (Base.HALCanTalonSRX.C_TalonSRX_GetFault_OverTempDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetFault_OverTemp"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetFault_OverTempDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetFault_UnderVoltage = (Base.HALCanTalonSRX.C_TalonSRX_GetFault_UnderVoltageDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetFault_UnderVoltage"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetFault_UnderVoltageDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetFault_ForLim = (Base.HALCanTalonSRX.C_TalonSRX_GetFault_ForLimDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetFault_ForLim"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetFault_ForLimDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetFault_RevLim = (Base.HALCanTalonSRX.C_TalonSRX_GetFault_RevLimDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetFault_RevLim"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetFault_RevLimDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetFault_HardwareFailure = (Base.HALCanTalonSRX.C_TalonSRX_GetFault_HardwareFailureDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetFault_HardwareFailure"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetFault_HardwareFailureDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetFault_ForSoftLim = (Base.HALCanTalonSRX.C_TalonSRX_GetFault_ForSoftLimDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetFault_ForSoftLim"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetFault_ForSoftLimDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetFault_RevSoftLim = (Base.HALCanTalonSRX.C_TalonSRX_GetFault_RevSoftLimDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetFault_RevSoftLim"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetFault_RevSoftLimDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetStckyFault_OverTemp = (Base.HALCanTalonSRX.C_TalonSRX_GetStckyFault_OverTempDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetStckyFault_OverTemp"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetStckyFault_OverTempDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetStckyFault_UnderVoltage = (Base.HALCanTalonSRX.C_TalonSRX_GetStckyFault_UnderVoltageDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetStckyFault_UnderVoltage"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetStckyFault_UnderVoltageDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetStckyFault_ForLim = (Base.HALCanTalonSRX.C_TalonSRX_GetStckyFault_ForLimDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetStckyFault_ForLim"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetStckyFault_ForLimDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetStckyFault_RevLim = (Base.HALCanTalonSRX.C_TalonSRX_GetStckyFault_RevLimDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetStckyFault_RevLim"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetStckyFault_RevLimDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetStckyFault_ForSoftLim = (Base.HALCanTalonSRX.C_TalonSRX_GetStckyFault_ForSoftLimDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetStckyFault_ForSoftLim"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetStckyFault_ForSoftLimDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetStckyFault_RevSoftLim = (Base.HALCanTalonSRX.C_TalonSRX_GetStckyFault_RevSoftLimDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetStckyFault_RevSoftLim"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetStckyFault_RevSoftLimDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetAppliedThrottle = (Base.HALCanTalonSRX.C_TalonSRX_GetAppliedThrottleDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetAppliedThrottle"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetAppliedThrottleDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetCloseLoopErr = (Base.HALCanTalonSRX.C_TalonSRX_GetCloseLoopErrDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetCloseLoopErr"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetCloseLoopErrDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetFeedbackDeviceSelect = (Base.HALCanTalonSRX.C_TalonSRX_GetFeedbackDeviceSelectDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetFeedbackDeviceSelect"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetFeedbackDeviceSelectDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetModeSelect = (Base.HALCanTalonSRX.C_TalonSRX_GetModeSelectDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetModeSelect"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetModeSelectDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetLimitSwitchEn = (Base.HALCanTalonSRX.C_TalonSRX_GetLimitSwitchEnDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetLimitSwitchEn"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetLimitSwitchEnDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetLimitSwitchClosedFor = (Base.HALCanTalonSRX.C_TalonSRX_GetLimitSwitchClosedForDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetLimitSwitchClosedFor"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetLimitSwitchClosedForDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetLimitSwitchClosedRev = (Base.HALCanTalonSRX.C_TalonSRX_GetLimitSwitchClosedRevDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetLimitSwitchClosedRev"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetLimitSwitchClosedRevDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetSensorPosition = (Base.HALCanTalonSRX.C_TalonSRX_GetSensorPositionDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetSensorPosition"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetSensorPositionDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetSensorVelocity = (Base.HALCanTalonSRX.C_TalonSRX_GetSensorVelocityDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetSensorVelocity"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetSensorVelocityDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetCurrent = (Base.HALCanTalonSRX.C_TalonSRX_GetCurrentDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetCurrent"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetCurrentDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetBrakeIsEnabled = (Base.HALCanTalonSRX.C_TalonSRX_GetBrakeIsEnabledDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetBrakeIsEnabled"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetBrakeIsEnabledDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetEncPosition = (Base.HALCanTalonSRX.C_TalonSRX_GetEncPositionDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetEncPosition"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetEncPositionDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetEncVel = (Base.HALCanTalonSRX.C_TalonSRX_GetEncVelDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetEncVel"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetEncVelDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetEncIndexRiseEvents = (Base.HALCanTalonSRX.C_TalonSRX_GetEncIndexRiseEventsDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetEncIndexRiseEvents"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetEncIndexRiseEventsDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetQuadApin = (Base.HALCanTalonSRX.C_TalonSRX_GetQuadApinDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetQuadApin"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetQuadApinDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetQuadBpin = (Base.HALCanTalonSRX.C_TalonSRX_GetQuadBpinDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetQuadBpin"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetQuadBpinDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetQuadIdxpin = (Base.HALCanTalonSRX.C_TalonSRX_GetQuadIdxpinDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetQuadIdxpin"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetQuadIdxpinDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetAnalogInWithOv = (Base.HALCanTalonSRX.C_TalonSRX_GetAnalogInWithOvDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetAnalogInWithOv"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetAnalogInWithOvDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetAnalogInVel = (Base.HALCanTalonSRX.C_TalonSRX_GetAnalogInVelDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetAnalogInVel"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetAnalogInVelDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetTemp = (Base.HALCanTalonSRX.C_TalonSRX_GetTempDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetTemp"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetTempDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetBatteryV = (Base.HALCanTalonSRX.C_TalonSRX_GetBatteryVDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetBatteryV"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetBatteryVDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetResetCount = (Base.HALCanTalonSRX.C_TalonSRX_GetResetCountDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetResetCount"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetResetCountDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetResetFlags = (Base.HALCanTalonSRX.C_TalonSRX_GetResetFlagsDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetResetFlags"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetResetFlagsDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetFirmVers = (Base.HALCanTalonSRX.C_TalonSRX_GetFirmVersDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetFirmVers"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetFirmVersDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetPulseWidthPosition = (Base.HALCanTalonSRX.C_TalonSRX_GetPulseWidthPositionDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetPulseWidthPosition"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetPulseWidthPositionDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetPulseWidthVelocity = (Base.HALCanTalonSRX.C_TalonSRX_GetPulseWidthVelocityDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetPulseWidthVelocity"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetPulseWidthVelocityDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetPulseWidthRiseToRiseUs = (Base.HALCanTalonSRX.C_TalonSRX_GetPulseWidthRiseToRiseUsDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetPulseWidthRiseToRiseUs"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetPulseWidthRiseToRiseUsDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetActTraj_IsValid = (Base.HALCanTalonSRX.C_TalonSRX_GetActTraj_IsValidDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetActTraj_IsValid"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetActTraj_IsValidDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetActTraj_ProfileSlotSelect = (Base.HALCanTalonSRX.C_TalonSRX_GetActTraj_ProfileSlotSelectDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetActTraj_ProfileSlotSelect"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetActTraj_ProfileSlotSelectDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetActTraj_VelOnly = (Base.HALCanTalonSRX.C_TalonSRX_GetActTraj_VelOnlyDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetActTraj_VelOnly"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetActTraj_VelOnlyDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetActTraj_IsLast = (Base.HALCanTalonSRX.C_TalonSRX_GetActTraj_IsLastDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetActTraj_IsLast"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetActTraj_IsLastDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetOutputType = (Base.HALCanTalonSRX.C_TalonSRX_GetOutputTypeDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetOutputType"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetOutputTypeDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetHasUnderrun = (Base.HALCanTalonSRX.C_TalonSRX_GetHasUnderrunDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetHasUnderrun"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetHasUnderrunDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetIsUnderrun = (Base.HALCanTalonSRX.C_TalonSRX_GetIsUnderrunDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetIsUnderrun"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetIsUnderrunDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetNextID = (Base.HALCanTalonSRX.C_TalonSRX_GetNextIDDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetNextID"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetNextIDDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetBufferIsFull = (Base.HALCanTalonSRX.C_TalonSRX_GetBufferIsFullDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetBufferIsFull"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetBufferIsFullDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetCount = (Base.HALCanTalonSRX.C_TalonSRX_GetCountDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetCount"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetCountDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetActTraj_Velocity = (Base.HALCanTalonSRX.C_TalonSRX_GetActTraj_VelocityDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetActTraj_Velocity"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetActTraj_VelocityDelegate)); Base.HALCanTalonSRX.C_TalonSRX_GetActTraj_Position = (Base.HALCanTalonSRX.C_TalonSRX_GetActTraj_PositionDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_GetActTraj_Position"), typeof(Base.HALCanTalonSRX.C_TalonSRX_GetActTraj_PositionDelegate)); Base.HALCanTalonSRX.C_TalonSRX_SetDemand = (Base.HALCanTalonSRX.C_TalonSRX_SetDemandDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_SetDemand"), typeof(Base.HALCanTalonSRX.C_TalonSRX_SetDemandDelegate)); Base.HALCanTalonSRX.C_TalonSRX_SetOverrideLimitSwitchEn = (Base.HALCanTalonSRX.C_TalonSRX_SetOverrideLimitSwitchEnDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_SetOverrideLimitSwitchEn"), typeof(Base.HALCanTalonSRX.C_TalonSRX_SetOverrideLimitSwitchEnDelegate)); Base.HALCanTalonSRX.C_TalonSRX_SetFeedbackDeviceSelect = (Base.HALCanTalonSRX.C_TalonSRX_SetFeedbackDeviceSelectDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_SetFeedbackDeviceSelect"), typeof(Base.HALCanTalonSRX.C_TalonSRX_SetFeedbackDeviceSelectDelegate)); Base.HALCanTalonSRX.C_TalonSRX_SetRevMotDuringCloseLoopEn = (Base.HALCanTalonSRX.C_TalonSRX_SetRevMotDuringCloseLoopEnDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_SetRevMotDuringCloseLoopEn"), typeof(Base.HALCanTalonSRX.C_TalonSRX_SetRevMotDuringCloseLoopEnDelegate)); Base.HALCanTalonSRX.C_TalonSRX_SetOverrideBrakeType = (Base.HALCanTalonSRX.C_TalonSRX_SetOverrideBrakeTypeDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_SetOverrideBrakeType"), typeof(Base.HALCanTalonSRX.C_TalonSRX_SetOverrideBrakeTypeDelegate)); Base.HALCanTalonSRX.C_TalonSRX_SetModeSelect = (Base.HALCanTalonSRX.C_TalonSRX_SetModeSelectDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_SetModeSelect"), typeof(Base.HALCanTalonSRX.C_TalonSRX_SetModeSelectDelegate)); Base.HALCanTalonSRX.C_TalonSRX_SetProfileSlotSelect = (Base.HALCanTalonSRX.C_TalonSRX_SetProfileSlotSelectDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_SetProfileSlotSelect"), typeof(Base.HALCanTalonSRX.C_TalonSRX_SetProfileSlotSelectDelegate)); Base.HALCanTalonSRX.C_TalonSRX_SetRampThrottle = (Base.HALCanTalonSRX.C_TalonSRX_SetRampThrottleDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_SetRampThrottle"), typeof(Base.HALCanTalonSRX.C_TalonSRX_SetRampThrottleDelegate)); Base.HALCanTalonSRX.C_TalonSRX_SetRevFeedbackSensor = (Base.HALCanTalonSRX.C_TalonSRX_SetRevFeedbackSensorDelegate)Marshal.GetDelegateForFunctionPointer(loader.GetProcAddress(library, "c_TalonSRX_SetRevFeedbackSensor"), typeof(Base.HALCanTalonSRX.C_TalonSRX_SetRevFeedbackSensorDelegate)); }
public LibraryLoadingOverride(ILibraryLoader @default) { _defaultLoader = @default; }
internal static void Initialize(IntPtr library, ILibraryLoader loader) { Base.HAL.GetPort = getPort; Base.HAL.GetPortWithModule = getPortWithModule; Base.HAL.FreePort = freePort; Base.HAL.GetHALErrorMessage = getHALErrorMessage; Base.HAL.GetFPGAVersion = getFPGAVersion; Base.HAL.GetFPGARevision = getFPGARevision; Base.HAL.GetFPGATime = getFPGATime; Base.HAL.GetFPGAButton = getFPGAButton; Base.HAL.HALSetErrorData = HALSetErrorData; Base.HAL.GetControlWord = HALGetControlWord; Base.HAL.HALGetAllianceStation = HALGetAllianceStation; Base.HAL.HALGetJoystickAxes = HALGetJoystickAxes; Base.HAL.HALGetJoystickPOVs = HALGetJoystickPOVs; Base.HAL.HALGetJoystickButtons = HALGetJoystickButtons; Base.HAL.HALGetJoystickDescriptor = HALGetJoystickDescriptor; Base.HAL.HALGetJoystickIsXbox = HALGetJoystickIsXbox; Base.HAL.HALGetJoystickType = HALGetJoystickType; Base.HAL.HALGetJoystickAxisType = HALGetJoystickAxisType; Base.HAL.HALSetJoystickOutputs = HALSetJoystickOutputs; Base.HAL.HALGetMatchTime = HALGetMatchTime; Base.HAL.HALSetNewDataSem = HALSetNewDataSem; Base.HAL.HALGetSystemActive = HALGetSystemActive; Base.HAL.HALGetBrownedOut = HALGetBrownedOut; Base.HAL.HALInitialize = HALInitialize; Base.HAL.HALNetworkCommunicationObserveUserProgramStarting = HALNetworkCommunicationObserveUserProgramStarting; Base.HAL.HALNetworkCommunicationObserveUserProgramDisabled = HALNetworkCommunicationObserveUserProgramDisabled; Base.HAL.HALNetworkCommunicationObserveUserProgramAutonomous = HALNetworkCommunicationObserveUserProgramAutonomous; Base.HAL.HALNetworkCommunicationObserveUserProgramTeleop = HALNetworkCommunicationObserveUserProgramTeleop; Base.HAL.HALNetworkCommunicationObserveUserProgramTest = HALNetworkCommunicationObserveUserProgramTest; Base.HAL.HALReport = HALReport; }
/// <summary> /// Overrides the default library loader for this instance of <see cref="NativeLibraryBuilder"/>. /// </summary> /// <param name="factory">Factory to create the overriding library loader.</param> /// <returns>This instance of <see cref="NativeLibraryBuilder"/>.</returns> public NativeLibraryBuilder WithLibraryLoader(Func <ILibraryLoader, ILibraryLoader> factory) { _customLibraryLoader = factory(PlatformLoaderBase.PlatformLoader); return(this); }
internal static void Initialize(IntPtr library, ILibraryLoader loader) { Base.HALDigital.InitializeDigitalPort = initializeDigitalPort; Base.HALDigital.FreeDigitalPort = freeDigitalPort; Base.HALDigital.CheckPWMChannel = checkPWMChannel; Base.HALDigital.CheckRelayChannel = checkRelayChannel; Base.HALDigital.SetPWM = setPWM; Base.HALDigital.AllocatePWMChannel = allocatePWMChannel; Base.HALDigital.FreePWMChannel = freePWMChannel; Base.HALDigital.GetPWM = getPWM; Base.HALDigital.LatchPWMZero = latchPWMZero; Base.HALDigital.SetPWMPeriodScale = setPWMPeriodScale; Base.HALDigital.AllocatePWM = allocatePWM; Base.HALDigital.FreePWM = freePWM; Base.HALDigital.SetPWMRate = setPWMRate; Base.HALDigital.SetPWMDutyCycle = setPWMDutyCycle; Base.HALDigital.SetPWMOutputChannel = setPWMOutputChannel; Base.HALDigital.SetRelayForward = setRelayForward; Base.HALDigital.SetRelayReverse = setRelayReverse; Base.HALDigital.GetRelayForward = getRelayForward; Base.HALDigital.GetRelayReverse = getRelayReverse; Base.HALDigital.AllocateDIO = allocateDIO; Base.HALDigital.FreeDIO = freeDIO; Base.HALDigital.SetDIO = setDIO; Base.HALDigital.GetDIO = getDIO; Base.HALDigital.GetDIODirection = getDIODirection; Base.HALDigital.Pulse = pulse; Base.HALDigital.IsPulsing = isPulsing; Base.HALDigital.IsAnyPulsing = isAnyPulsing; Base.HALDigital.SetFilterPeriod = setFilterPeriod; Base.HALDigital.GetFilterPeriod = getFilterPeriod; Base.HALDigital.SetFilterSelect = setFilterSelect; Base.HALDigital.GetFilterSelect = getFilterSelect; Base.HALDigital.InitializeCounter = initializeCounter; Base.HALDigital.FreeCounter = freeCounter; Base.HALDigital.SetCounterAverageSize = setCounterAverageSize; Base.HALDigital.SetCounterUpSource = setCounterUpSource; Base.HALDigital.SetCounterUpSourceEdge = setCounterUpSourceEdge; Base.HALDigital.ClearCounterUpSource = clearCounterUpSource; Base.HALDigital.SetCounterDownSource = setCounterDownSource; Base.HALDigital.SetCounterDownSourceEdge = setCounterDownSourceEdge; Base.HALDigital.ClearCounterDownSource = clearCounterDownSource; Base.HALDigital.SetCounterUpDownMode = setCounterUpDownMode; Base.HALDigital.SetCounterExternalDirectionMode = setCounterExternalDirectionMode; Base.HALDigital.SetCounterSemiPeriodMode = setCounterSemiPeriodMode; Base.HALDigital.SetCounterPulseLengthMode = setCounterPulseLengthMode; Base.HALDigital.GetCounterSamplesToAverage = getCounterSamplesToAverage; Base.HALDigital.SetCounterSamplesToAverage = setCounterSamplesToAverage; Base.HALDigital.ResetCounter = resetCounter; Base.HALDigital.GetCounter = getCounter; Base.HALDigital.GetCounterPeriod = getCounterPeriod; Base.HALDigital.SetCounterMaxPeriod = setCounterMaxPeriod; Base.HALDigital.SetCounterUpdateWhenEmpty = setCounterUpdateWhenEmpty; Base.HALDigital.GetCounterStopped = getCounterStopped; Base.HALDigital.GetCounterDirection = getCounterDirection; Base.HALDigital.SetCounterReverseDirection = setCounterReverseDirection; Base.HALDigital.InitializeEncoder = initializeEncoder; Base.HALDigital.ResetEncoder = resetEncoder; Base.HALDigital.FreeEncoder = freeEncoder; Base.HALDigital.GetEncoder = getEncoder; Base.HALDigital.GetEncoderPeriod = getEncoderPeriod; Base.HALDigital.SetEncoderMaxPeriod = setEncoderMaxPeriod; Base.HALDigital.GetEncoderStopped = getEncoderStopped; Base.HALDigital.GetEncoderDirection = getEncoderDirection; Base.HALDigital.SetEncoderReverseDirection = setEncoderReverseDirection; Base.HALDigital.SetEncoderSamplesToAverage = setEncoderSamplesToAverage; Base.HALDigital.GetEncoderSamplesToAverage = getEncoderSamplesToAverage; Base.HALDigital.SetEncoderIndexSource = setEncoderIndexSource; Base.HALDigital.GetLoopTiming = getLoopTiming; Base.HALDigital.SpiInitialize = spiInitialize; Base.HALDigital.SpiTransaction = spiTransaction; Base.HALDigital.SpiWrite = spiWrite; Base.HALDigital.SpiRead = spiRead; Base.HALDigital.SpiClose = spiClose; Base.HALDigital.SpiSetSpeed = spiSetSpeed; Base.HALDigital.SpiSetOpts = spiSetOpts; Base.HALDigital.SpiSetChipSelectActiveHigh = spiSetChipSelectActiveHigh; Base.HALDigital.SpiSetChipSelectActiveLow = spiSetChipSelectActiveLow; Base.HALDigital.SpiGetHandle = spiGetHandle; Base.HALDigital.SpiSetHandle = spiSetHandle; Base.HALDigital.SpiInitAccumulator = spiInitAccumulator; Base.HALDigital.SpiFreeAccumulator = spiFreeAccumulator; Base.HALDigital.SpiResetAccumulator = spiResetAccumulator; Base.HALDigital.SpiSetAccumulatorCenter = spiSetAccumulatorCenter; Base.HALDigital.SpiSetAccumulatorDeadband = spiSetAccumulatorDeadband; Base.HALDigital.SpiGetAccumulatorLastValue = spiGetAccumulatorLastValue; Base.HALDigital.SpiGetAccumulatorCount = spiGetAccumulatorCount; Base.HALDigital.SpiGetAccumulatorValue = spiGetAccumulatorValue; Base.HALDigital.SpiGetAccumulatorAverage = spiGetAccumulatorAverage; Base.HALDigital.SpiGetAccumulatorOutput = spiGetAccumulatorOutput; Base.HALDigital.I2CInitialize = i2CInitialize; Base.HALDigital.I2CTransaction = i2CTransaction; Base.HALDigital.I2CWrite = i2CWrite; Base.HALDigital.I2CRead = i2CRead; Base.HALDigital.I2CClose = i2CClose; }
public void SetUp() { _libraryRepository = Get <ILibraryRepository>(); _target = Get <ILibraryLoader>(); }