internal void onPositionUpdate(object sender, WebMessageArgs <WebHIDReport> args)
        {
            WebHIDReport hidReport = args.RawMessage;

            //TODO add syncro lock
            if (hidReport.index == this.index)
            {
                __lastHIDReport = hidReport;
            }
        }
예제 #2
0
 /// <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);
     }
 }
예제 #3
0
        /// <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);
            }
        }
예제 #4
0
 public void GamePadEventsSupportHandler(object sender, WebMessageArgs <bool> args)
 {
 }