public bool IsRoleValueMapped(int roleValue) { if (!m_info.IsValidRoleValue(roleValue)) { return(false); } return(IsRoleOffsetMapped(m_info.RoleValueToRoleOffset(roleValue))); }
public void OnConnectedDeviceChanged(uint deviceIndex, ETrackedDeviceClass deviceClass, string deviceSN, bool connected) { var boundRoleValue = GetBoundRoleValueByDevice(deviceSN); if (m_info.IsValidRoleValue(boundRoleValue)) // if device is bound { if (connected) { InternalMapping(boundRoleValue, deviceIndex); } else { InternalUnmapping(boundRoleValue, deviceIndex); } } if (m_handler != null) { m_handler.OnConnectedDeviceChanged(deviceIndex, deviceClass, deviceSN, connected); } }