コード例 #1
0
ファイル: Connection.cs プロジェクト: LABSIM/APOLLON
        public void ClearPolicy(Controller.PolicyFlag policy)
        {
            UInt64  clearFlags = (ulong)FlagForPolicy(policy);
            eLeapRS result     = LeapC.SetPolicyFlags(_leapConnection, 0, clearFlags);

            reportAbnormalResults("LeapC SetPolicyFlags call was ", result);
        }
コード例 #2
0
ファイル: Connection.cs プロジェクト: LABSIM/APOLLON
        public void SetAndClearPolicy(Controller.PolicyFlag set, Controller.PolicyFlag clear)
        {
            UInt64  setFlags   = (ulong)FlagForPolicy(set);
            UInt64  clearFlags = (ulong)FlagForPolicy(clear);
            eLeapRS result     = LeapC.SetPolicyFlags(_leapConnection, setFlags, clearFlags);

            reportAbnormalResults("LeapC SetAndClearPolicy call was ", result);
        }
コード例 #3
0
ファイル: Connection.cs プロジェクト: fsociety01010/IMPACT
        public void ClearPolicy(Controller.PolicyFlag policy)
        {
            UInt64 clearFlags = (ulong)flagForPolicy(policy);

            _requestedPolicies = _requestedPolicies & ~clearFlags;
            eLeapRS result = LeapC.SetPolicyFlags(_leapConnection, _requestedPolicies, ~_requestedPolicies);

            reportAbnormalResults("LeapC SetPolicyFlags call was ", result);
        }
コード例 #4
0
    public void SetPolicy(Controller.PolicyFlag policy) {
      UInt64 setFlags = (ulong)flagForPolicy(policy);
      _requestedPolicies = _requestedPolicies | setFlags;
      setFlags = _requestedPolicies;
      UInt64 clearFlags = ~_requestedPolicies; //inverse of desired policies

      eLeapRS result = LeapC.SetPolicyFlags(_leapConnection, setFlags, clearFlags);
      reportAbnormalResults("LeapC SetPolicyFlags call was ", result);
    }
コード例 #5
0
        public void ClearPolicy(Controller.PolicyFlag policy)
        {
            lock (_connLocker) {
                if (_leapConnection == IntPtr.Zero)
                {
                    return;
                }

                UInt64 clearFlags = (ulong)flagForPolicy(policy);
                _requestedPolicies = _requestedPolicies & ~clearFlags;
                eLeapRS result = eLeapRS.eLeapRS_UnknownError;
                result = LeapC.SetPolicyFlags(_leapConnection, 0, clearFlags);
                reportAbnormalResults("LeapC SetPolicyFlags call was ", result);
            }
        }
コード例 #6
0
        public void SetPolicy(Controller.PolicyFlag policy)
        {
            lock (_connLocker) {
                if (_leapConnection == IntPtr.Zero)
                {
                    return;
                }

                UInt64 setFlags = (ulong)flagForPolicy(policy);
                _requestedPolicies = _requestedPolicies | setFlags;
                setFlags           = _requestedPolicies;
                UInt64 clearFlags = ~_requestedPolicies; //inverse of desired policies

                eLeapRS result = eLeapRS.eLeapRS_UnknownError;
                result = LeapC.SetPolicyFlags(_leapConnection, setFlags, clearFlags);
                reportAbnormalResults("LeapC SetPolicyFlags call was ", result);
            }
        }