/// <summary> /// Create a new DriverInstance, this class provides a wrapper between the C# world and the C API dlls from canfestival that /// provide access to the CAN hardware devices. The exposed delegates represent the 5 defined entry points that all can festival /// drivers expose to form the common driver interface API. Usualy the DriverLoader class will directly call this constructor. /// </summary> /// <param name="canReceive">pInvoked delegate for canReceive function</param> /// <param name="canSend">pInvoked delegate for canSend function</param> /// <param name="canOpen">pInvoked delegate for canOpen function</param> /// <param name="canClose">pInvoked delegate for canClose function</param> /// <param name="canChangeBaudrate">pInvoked delegate for canChangeBaudrate functipn</param> public DriverInstance(canReceive_T canReceive, canSend_T canSend, canOpen_T canOpen, canClose_T canClose, canChangeBaudRate_T canChangeBaudrate) { this.canReceive = canReceive; this.canSend = canSend; this.canOpen = canOpen; this.canClose = canClose; this.canChangeBaudrate = canChangeBaudrate; handle = IntPtr.Zero; brdptr = IntPtr.Zero; }
/// <summary> /// Create a new DriverInstance, this class provides a wrapper between the C# world and the C API dlls from canfestival that /// provide access to the CAN hardware devices. The exposed delegates represent the 5 defined entry points that all can festival /// drivers expose to form the common driver interface API. Usualy the DriverLoader class will directly call this constructor. /// </summary> /// <param name="canReceive">pInvoked delegate for canReceive function</param> /// <param name="canSend">pInvoked delegate for canSend function</param> /// <param name="canOpen">pInvoked delegate for canOpen function</param> /// <param name="canClose">pInvoked delegate for canClose function</param> /// <param name="canChangeBaudrate">pInvoked delegate for canChangeBaudrate functipn</param> public DriverInstance(canReceive_T canReceive, canSend_T canSend, canOpen_T canOpen, canClose_T canClose, canChangeBaudRate_T canChangeBaudrate, canEnumerate_T canEnumerate) { this.canReceive = canReceive; this.canSend = canSend; this.canOpen = canOpen; this.canClose = canClose; this.canChangeBaudrate = canChangeBaudrate; this.canEnumerate = canEnumerate; StringBuilder[] b = new StringBuilder[2]; handle = IntPtr.Zero; brdptr = IntPtr.Zero; }