internal void onPositionUpdate( object sender,WebMessageArgs<WebHIDReport> args){ WebHIDReport hidReport=args.RawMessage; //TODO add syncro lock if(hidReport.index==this.index) __lastHIDReport=hidReport; }
/// <summary> /// Devices the connected event handler. /// </summary> /// <param name="sender">Sender.</param> /// <param name="args">Arguments.</param> public void DeviceConnectedEventHandler(object sender,WebMessageArgs<GenericHIDDevice> args) { // UnityEngine.Debug.Log(args.Message); GenericHIDDevice info = args.RawMessage; if(!__Generics.ContainsKey(info.ID)) { info.hidInterface = this; ResolveDevice(info); } }
/// <summary> /// Devices the disconnected event handler. /// </summary> /// <param name="sender">Sender.</param> /// <param name="args">Arguments.</param> public void DeviceDisconnectedEventHandler(object sender, WebMessageArgs<string> args) { if (__Generics.ContainsKey (args.RawMessage)) { string ID=args.RawMessage; string Name=__Generics[ID].Name; int PID=__Generics[ID].PID; this.webHIDBehaviour.Log ("Device " + Name + " PID:" + PID + " Removed"); this.__Generics.Remove (ID); } }
public void GamePadEventsSupportHandler(object sender, WebMessageArgs<bool> args) { }