void OnInputReportReceived(IOReturn result, IOHIDReportType type, int id, byte[] data) { if (InputReportReceived != null) { InputReportReceived(this, new IOHIDReportEventArgs(result, type, id, data)); } }
public void SendReport(IOHIDReportType type, int id, byte[] data) { ThrowIfDisposed(); var result = IOHIDDeviceSetReport(Handle, type, (CFIndex)id, data, (CFIndex)data.Length); IOObject.ThrowIfError(result); }
void InputReportReceivedCallback(IntPtr context, IOReturn result, IntPtr senderRef, IOHIDReportType type, uint id, byte[] data, CFIndex length) { var device = GetCFObject <IOHIDDevice> (senderRef); device.OnInputReportReceived(result, type, (int)id, data); }
extern static IOReturn IOHIDDeviceGetReport( IOHIDDeviceRef device, IOHIDReportType reportType, CFIndex reportID, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 4)] uint8_t[] report, ref CFIndex pReportLength);
internal static extern IOReturn IOHIDDeviceSetReportWithCallback( IOHIDDeviceRef device, IOHIDReportType reportType, int reportID, IntPtr report, int reportLength, CFTimeInterval timeout, IOHIDReportCallback callback, IntPtr context); //AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
extern static IOReturn IOHIDDeviceGetReportWithCallback( IOHIDDeviceRef device, IOHIDReportType reportType, CFIndex reportID, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 4)] uint8_t[] report, ref CFIndex pReportLength, CFTimeInterval timeout, IOHIDReportCallback callback, IntPtr context);
public static extern IOReturn IOHIDDeviceSetReport(IntPtr device, IOHIDReportType type, IntPtr reportID, IntPtr report, IntPtr reportLength);
internal static extern IOReturn IOHIDDeviceSetReport( IOHIDDeviceRef device, IOHIDReportType reportType, int reportID, IntPtr report, CFIndex reportLength);// AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
public IOHIDReportEventArgs(IOReturn result, IOHIDReportType type, int id, byte[] data) : base(result) { Type = type; ID = id; Data = data; }
void OnInputReportReceived (IOReturn result, IOHIDReportType type, int id, byte[] data) { if (InputReportReceived != null) InputReportReceived (this, new IOHIDReportEventArgs (result, type, id, data)); }
internal static extern IOReturn IOHIDDeviceGetReport( IOHIDDeviceRef device, IOHIDReportType reportType, CFIndex reportID, IntPtr report, IntPtr pReportLength);
internal static extern IOReturn IOHIDDeviceSetReportWithCallback( IOHIDDeviceRef device, IOHIDReportType reportType, int reportID, IntPtr report, int reportLength, CFTimeInterval timeout, IOHIDReportCallback callback, IntPtr context);
internal static extern IOReturn IOHIDDeviceSetReport( IOHIDDeviceRef device, IOHIDReportType reportType, int reportID, IntPtr report, CFIndex reportLength); // AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
void InputReportReceivedCallback (IntPtr context, IOReturn result, IntPtr senderRef, IOHIDReportType type, uint id, byte[] data, CFIndex length) { var device = GetCFObject<IOHIDDevice> (senderRef); device.OnInputReportReceived (result, type, (int)id, data); }
internal static extern IOReturn IOHIDDeviceSetReportWithCallback( IOHIDDeviceRef device, IOHIDReportType reportType, int reportID, IntPtr report, int reportLength, CFTimeInterval timeout, IOHIDReportCallback callback, IntPtr context) ;//AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
public void SendReport (IOHIDReportType type, int id, byte[] data) { ThrowIfDisposed (); var result = IOHIDDeviceSetReport (Handle, type, (CFIndex)id, data, (CFIndex)data.Length); IOObject.ThrowIfError (result); }
extern static IOReturn IOHIDDeviceGetReport ( IOHIDDeviceRef device, IOHIDReportType reportType, CFIndex reportID, [MarshalAs (UnmanagedType.LPArray, SizeParamIndex = 4)] uint8_t[] report, ref CFIndex pReportLength);
extern static IOReturn IOHIDDeviceGetReportWithCallback ( IOHIDDeviceRef device, IOHIDReportType reportType, CFIndex reportID, [MarshalAs (UnmanagedType.LPArray, SizeParamIndex = 4)] uint8_t[] report, ref CFIndex pReportLength, CFTimeInterval timeout, IOHIDReportCallback callback, IntPtr context);
public IOHIDReportEventArgs (IOReturn result, IOHIDReportType type, int id, byte[] data) : base (result) { Type = type; ID = id; Data = data; }