public void Apply(DecalSettingsDataContainer.DecalLayerData data)
 {
     Channel1.Apply(data.Channel1);
     Channel2.Apply(data.Channel2);
     Channel3.Apply(data.Channel3);
     Channel4.Apply(data.Channel4);
 }
        public override int GetHashCode()
        {
            var hashCode = -1058441243;

            hashCode = hashCode * -1521134295 + Channel1.GetHashCode();
            hashCode = hashCode * -1521134295 + Channel2.GetHashCode();
            hashCode = hashCode * -1521134295 + Channel3.GetHashCode();
            return(hashCode);
        }
        public void EvaluateOutputRange(out Vector4 start, out Vector4 end)
        {
            var r = Channel1.EvaluateOutputRange();
            var g = Channel2.EvaluateOutputRange();
            var b = Channel3.EvaluateOutputRange();
            var a = Channel4.EvaluateOutputRange();

            start = new Vector4(r.x, g.x, b.x, a.x);
            end   = new Vector4(r.y, g.y, b.y, a.y);
        }
Exemple #4
0
    /// <summary>
    /// Return Waveforms of Channel1 and Channel2
    public WaveForm GetWaveforms()
    {
        // TODO: Improve for 4 channel model
        WaveForm wave1 = Channel1.GetWaveform();
        WaveForm wave2 = Channel2.GetWaveform();

        return(new WaveForm(wave1.Times, new List <double[]>()
        {
            wave1.Values[0], wave2.Values[0]
        }));
    }
Exemple #5
0
    static void init()
    {
        c              = p.NondetChannel1();
        pas.Recipient  = p.NondetUri(); pas.ReturnTo = p.NondetUri(); pas.ClaimedIdentifier = p.NondetIdentifier();
        rp             = p.NondetOpenIdRelyingParty1();
        pas1.Recipient = p.NondetUri(); pas1.ReturnTo = p.NondetUri(); pas1.ClaimedIdentifier = p.NondetIdentifier();

        GlobalState.actualExt  = p.NondetClaimsResponse();
        GlobalState.claimedExt = p.NondetClaimsResponse();

        GlobalState.actualEndPoint  = p.NondetIdentifierDiscoveryResult();
        GlobalState.claimedEndPoint = p.NondetIdentifierDiscoveryResult();

        //Assume we are using email to authenticate
        identity = Identity.Email;
    }
Exemple #6
0
        public async void SetStation(Station _station)
        {
            Channel1.Clear();
            Channel2.Clear();
            Channel3.Clear();
            Channel4.Clear();

            await Task.Run(() => _dataSheet = ShowDB.Query(_station, _plotType));

            // Channel 1

            for (int i = 0; i < _dataSheet.Data[0].Count; i++)
            {
                Channel1.Add(new DataPoint(XFormat(i), _dataSheet.Data[0][i]));
            }

            // Channel 2

            if (_dataSheet.Data.Length >= 2)
            {
                for (int i = 0; i < _dataSheet.Data[1].Count; i++)
                {
                    Channel2.Add(new DataPoint(XFormat(i), _dataSheet.Data[1][i]));
                }
            }

            if (_station.DetectorConfiguration == DetectorConfiguration.MasterAndSlave)
            {
                // Channel 3

                for (int i = 0; i < _dataSheet.Data[2].Count; i++)
                {
                    Channel3.Add(new DataPoint(XFormat(i), _dataSheet.Data[2][i]));
                }

                // Channel 4

                for (int i = 0; i < _dataSheet.Data[3].Count; i++)
                {
                    Channel4.Add(new DataPoint(XFormat(i), _dataSheet.Data[3][i]));
                }
            }
        }
Exemple #7
0
    static void init()
    {
        c = p.NondetChannel1();
        Auth_resp.SessionID = auth_req_sessionID;
        Contract.Assume(Auth_resp.ReturnTo.Authority == auth_req_realm);  //This is an assignment, but a property cannot be assigned.
        Auth_resp.Recipient = p.NondetUri(); Auth_resp.ReturnTo = p.NondetUri(); Auth_resp.ClaimedIdentifier = p.NondetIdentifier();
        rp = p.NondetOpenIdRelyingParty1();
        SignIn_req.Recipient = p.NondetUri(); SignIn_req.ReturnTo = p.NondetUri(); SignIn_req.ClaimedIdentifier = p.NondetIdentifier();
        pas_nondet.Recipient = p.NondetUri(); pas_nondet.ReturnTo = p.NondetUri(); pas_nondet.ClaimedIdentifier = p.NondetIdentifier();


        GlobalState.actualExt  = p.NondetClaimsResponse();
        GlobalState.claimedExt = p.NondetClaimsResponse();

        GlobalState.actualEndPoint  = p.NondetIdentifierDiscoveryResult();
        GlobalState.claimedEndPoint = p.NondetIdentifierDiscoveryResult();

        //Assume we are using email to authenticate
        identity = Identity.Email;
    }
Exemple #8
0
        /// <summary>
        ///     Returns the priority categories that are allowed for a given channel.
        /// </summary>
        /// <param name="channel"></param>
        /// <returns></returns>
        public int[] GetPrioritiesForChannel(int channel)
        {
            switch (channel % 4)
            {
            case 0:
                return(Channel4.Split(',').Select(n => int.Parse(n.Trim())).ToArray());

            case 1:
                return(Channel1.Split(',').Select(n => int.Parse(n.Trim())).ToArray());

            case 2:
                return(Channel2.Split(',').Select(n => int.Parse(n.Trim())).ToArray());

            case 3:
                return(Channel3.Split(',').Select(n => int.Parse(n.Trim())).ToArray());

            default:
                return(new int[] { });
            }
        }
 public YCbCr GetPixelAt(int x, int y)
 {
     return(new YCbCr((int)Channel1.GetPixel(x, y),
                      (int)Channel2.GetPixel(x / SubSampling, y / SubSampling),
                      (int)Channel3.GetPixel(x / SubSampling, y / SubSampling)));
 }
 internal DecalSettingsDataContainer.DecalLayerData Get()
 {
     return(new DecalSettingsDataContainer.DecalLayerData(Channel1.Get(), Channel2.Get(), Channel3.Get(), Channel4.Get()));
 }