示例#1
0
 internal static extern uint AcceptSecurityContext(
     ref SspiHandle credentialHandle,
     ref SspiHandle inContextHandle,
     ref SecurityBufferDescriptor inputBuffer,
     SspiContextFlags requestedAttribs,
     DataRepresentation dataRepresentation,
     ref SspiHandle outContext,
     ref SecurityBufferDescriptor outputBuffer,
     out SspiContextFlags outputAttribs,
     out long timestamp);
示例#2
0
        public override void UpdateCanvas(Canvas canvas, IValueIterator iter)
        {
            DataRepresentation datapres = iter.DataRepresentation;

            if (datapres.IsAnalog == true)
            {
                RenderAnalog(canvas, iter);
            }
            else
            {
                RenderSimpleSignal(canvas, iter, DrawValue);
            }
        }
示例#3
0
 public static extern uint InitializeSecurityContext(
     ref SspiHandle credentialHandle,
     ref SspiHandle inContextHandle,
     string targetName,
     SspiContextFlags flags,
     int reserved1,
     DataRepresentation dataRepresentation,
     ref SecurityBufferDescriptor inputBuffer,
     int reserved2,
     ref SspiHandle outContext,
     ref SecurityBufferDescriptor outputBuffer,
     out SspiContextFlags outAttributes,
     out long timestamp);
 private DataRepresentationSection(
     long length,
     int section,
     long dataPointsNumber,
     int templateNumber,
     DataRepresentation dataRepresentation)
 {
     Section            = section;
     Length             = length;
     DataPointsNumber   = dataPointsNumber;
     TemplateNumber     = templateNumber;
     DataRepresentation = dataRepresentation;
 }
示例#5
0
        /// <summary>
        /// Decode
        /// </summary>
        public Address(DataRepresentation representation, string data)
        {
            if (!IsParsable(data))
            {
                throw new ArgumentException();
            }

            if (!((representation == DataRepresentation.Octet) || (representation == DataRepresentation.SemiOctet)))
            {
                throw new ArgumentException();
            }

            _Representation = representation;

            data = data.ToUpper();

            byte l = byte.Parse(data.Substring(0, 2), System.Globalization.NumberStyles.HexNumber);
            byte h = byte.Parse(data.Substring(2, 2), System.Globalization.NumberStyles.HexNumber);

            _NumberType    = (NumberType)((0x70) & h);
            _NumberingPlan = (NumberingPlan)((0x0f) & h);

            string number;

            if (_Representation == DataRepresentation.Octet)
            {
                number = data.Substring(4, (l - 1) * 2);
            }
            else
            {
                number = data.Substring(4, l);
            }

            for (int i = 0; i < number.Length; i += 2)
            {
                _Number += number.Substring(i + 1, 1) + number.Substring(i, 1);
            }

            if (_Number.EndsWith("F"))
            {
                _Number = _Number.Substring(0, _Number.Length - 1);
            }

            if (_NumberType == NumberType.InternationalNumber)
            {
                _Number = "+" + _Number;
            }
        }
示例#6
0
        /// <summary>
        /// Encode
        /// </summary>
        public Address(DataRepresentation representation, NumberType numberType, NumberingPlan numberingPlan, string number)
        {
            if (!IsNumber(number))
            {
                throw new ArgumentException();
            }

            if (!((representation == DataRepresentation.Octet) || (representation == DataRepresentation.SemiOctet)))
            {
                throw new ArgumentException();
            }

            _Representation = representation;
            _NumberType     = numberType;
            _NumberingPlan  = numberingPlan;
            _Number         = number;
        }
示例#7
0
        public My_Variable(string Name, string FullName, Signal signal)
        {
            this.name     = Name;
            this.fullname = FullName;
            this.signal   = signal;

            if (signal.Range[0].Length != 1)
            {
                DataRepresentation = new VectorDataRepresentation();
            }
            else
            {
                DataRepresentation = new DataRepresentation();
            }

            showTypeName = Visibility.Collapsed;
            showSize     = Visibility.Collapsed;
            height       = 20;

            CreateChildrens();
        }
示例#8
0
 public void Reset(DataRepresentation mt = DataRepresentation.Tpm)
 {
     Buffer        = new ByteBuf();
     SizesToFillIn = new Stack <SizePlaceholder>();
     Repr          = mt;
 }
示例#9
0
 public Marshaller(byte[] buf, DataRepresentation mt = DataRepresentation.Tpm)
 {
     Reset(mt);
     Buffer = new ByteBuf(buf);
 }
示例#10
0
 public Marshaller(DataRepresentation mt = DataRepresentation.Tpm)
 {
     Reset(mt);
 }
示例#11
0
        /// <summary>
        /// Отображение сигнала в аналоговом виде
        /// </summary>
        /// <param name="canvas"></param>
        /// <param name="iter"></param>
        /// <param name="DataPres"></param>
        /// <param name="GetValue"></param>
        protected void RenderAnalogSimpleSignal <T>(Canvas canvas, IValueIterator iter, DataRepresentation DataPres, GetValueDelegateFromTime <T> GetValueFromTime, GetValueDelegateFromIterator <T> GetValueFromIterator) where T : IConvertible
        {
            canvas.Children.Clear();

            Polyline polyLine = new Polyline();

            polyLine.Stroke          = Brushes.Black;
            polyLine.StrokeThickness = 1;


            if (scaleManager.VisibleTimeDiapasone < (scaleManager.Width * 5.0))
            {
                iter.SetCurrentIndexByKey(scaleManager.VisibleStartTime);

                double min   = GetValueFromTime(ScaleManager.VisibleStartTime, DataPres).ToDouble(CultureInfo.InvariantCulture);;
                double max   = min;
                double value = 0;

                double height = canvas.ActualHeight;


                iter.SetCurrentIndexByKey(scaleManager.VisibleStartTime);
                value = GetValueFromTime(ScaleManager.VisibleStartTime, DataPres).ToDouble(CultureInfo.InvariantCulture);;
                polyLine.Points.Add(new Point(0, (double)(value)));

                //Рисование начала диаграммы
                UInt64 x1 = 0, x2 = 0;

                x1 = scaleManager.VisibleStartTime;
                UInt64 MinimumVisibleChange = scaleManager.MinimumVisibleChange * 2;

                iter.SetCurrentIndexByKey(scaleManager.VisibleStartTime);
                x2 = iter.LastEvent;
                if (x2 > scaleManager.VisibleEndTime)
                {
                    x2 = scaleManager.VisibleEndTime;
                }
                if (x2 < scaleManager.VisibleStartTime)
                {
                    x2 = scaleManager.VisibleStartTime;
                }
                while (true)
                {
                    value = GetValueFromIterator(iter, DataPres).ToDouble(CultureInfo.InvariantCulture);;

                    if (min > value)
                    {
                        min = value;
                    }

                    if (max < value)
                    {
                        max = value;
                    }

                    polyLine.Points.Add(new Point(scaleManager.GetOffset(x1), (double)(value)));
                    polyLine.Points.Add(new Point(scaleManager.GetOffset(x2), (double)(value)));

                    iter.MoveNext();

                    x1 = x2;
                    x2 = iter.LastEvent;

                    if ((iter.LastEvent >= scaleManager.VisibleEndTime) || (iter.IsEndOfIteration == true))
                    {
                        value = GetValueFromTime(ScaleManager.VisibleEndTime, DataPres).ToDouble(CultureInfo.InvariantCulture);;
                        if (min > value)
                        {
                            min = value;
                        }

                        if (max < value)
                        {
                            max = value;
                        }
                        polyLine.Points.Add(new Point(scaleManager.GetOffset(x1), (double)(value)));
                        polyLine.Points.Add(new Point(scaleManager.GetOffset(x2), (double)(value)));
                        break;
                    }

                    if (x2 > scaleManager.VisibleEndTime)
                    {
                        x2 = scaleManager.VisibleEndTime;
                    }
                    if (x2 < scaleManager.VisibleStartTime)
                    {
                        x2 = scaleManager.VisibleStartTime;
                    }
                }
                double DeltaY = (max != min) ? (height / (double)(max - min)) : 1;
                for (int i = 0; i < polyLine.Points.Count; i++)
                {
                    Point point = polyLine.Points[i];
                    point.Y            = ((double)max - point.Y) * DeltaY;
                    polyLine.Points[i] = point;
                }
            }
            else
            {
                iter.SetCurrentIndexByKey(scaleManager.VisibleStartTime);

                double min   = GetValueFromTime(ScaleManager.VisibleStartTime, DataPres).ToDouble(CultureInfo.InvariantCulture);;
                double max   = min;
                double value = 0;

                double height = canvas.ActualHeight;

                for (double x = 0; x < scaleManager.Width; x++)
                {
                    UInt64 time = scaleManager.GetTime(x);
                    iter.SetCurrentIndexByKey(time);
                    value = GetValueFromIterator(iter, DataPres).ToDouble(CultureInfo.InvariantCulture);;
                    if (min > value)
                    {
                        min = value;
                    }

                    if (max < value)
                    {
                        max = value;
                    }
                    polyLine.Points.Add(new Point(x, (double)(value)));
                }
                double DeltaY = (max != min) ? (height / (double)(max - min)) : 1;
                for (int i = 0; i < polyLine.Points.Count; i++)
                {
                    Point point = polyLine.Points[i];
                    point.Y            = ((double)max - point.Y) * DeltaY;
                    polyLine.Points[i] = point;
                }
            }

            canvas.Children.Add(polyLine);
        }
示例#12
0
 public NewSortedDictionaryIterator(NewSortedDictionary <AbstractTimeStampInfo <T> > data, DataRepresentation dataRepresentation, AbstractValueConvertor <T> valueCovertor)
 {
     this.valueCovertor      = valueCovertor;
     this.data               = data;
     this.dataRepresentation = dataRepresentation;
     Reset();
 }
示例#13
0
 private Double GetValueFromItarotor(IValueIterator iter, DataRepresentation DataPres)
 {
     return((iter.CurrentValue.LastValue as RealValue).Value);
 }
 public static extern uint InitializeSecurityContext(
     ref SspiHandle credentialHandle,
     ref SspiHandle inContextHandle,
     string targetName,
     SspiContextFlags flags,
     int reserved1,
     DataRepresentation dataRepresentation,
     ref SecurityBufferDescriptor inputBuffer,
     int reserved2,
     ref SspiHandle outContext,
     ref SecurityBufferDescriptor outputBuffer,
     out SspiContextFlags outAttributes,
     out long timestamp);
示例#15
0
 private Double GetValueFromTime(UInt64 time, DataRepresentation DataPres)
 {
     return((double)(DataContainer.ValueDump.DataConvertorUtils.ToBigInteger((data.GetValue(time).LastValue as STD_ULOGIC_VECTOR_VALUE), DataPres as VectorDataRepresentation).GetValueOrDefault(0)));
 }
示例#16
0
 public ActionResult CustomColumnHeaders_Bind([C1JsonRequest] CollectionViewRequest <DataRepresentation> requestData)
 {
     return(this.C1Json(CollectionViewHelper.Read(requestData, DataRepresentation.GetData(100))));
 }
 public My_VariableConfiguration(My_Variable variable)
 {
     idx = variable.Signal.Idx;
     dataRepresentation = variable.DataRepresentation;
 }
示例#18
0
 private Double GetValueFromItarotor(IValueIterator iter, DataRepresentation DataPres)
 {
     return((double)(DataContainer.ValueDump.DataConvertorUtils.ToBigInteger((iter.CurrentValue.LastValue as STD_ULOGIC_VECTOR_VALUE), DataPres as VectorDataRepresentation).GetValueOrDefault(0)));
 }
示例#19
0
        public void RenderAnalog(Canvas canvas, IValueIterator iter)
        {
            DataRepresentation datapres = iter.DataRepresentation;

            RenderAnalogSimpleSignal(canvas, iter, datapres, GetValueFromTime, GetValueFromItarotor);
        }
示例#20
0
 private int GetValueFromTime(UInt64 time, DataRepresentation DataPres)
 {
     return((data.GetValue(time).LastValue as IntegerValue).Value);
 }
示例#21
0
 private int GetValueFromItarotor(IValueIterator iter, DataRepresentation DataPres)
 {
     return((iter.CurrentValue.LastValue as IntegerValue).Value);
 }
 internal static extern uint AcceptSecurityContext(
     ref SspiHandle credentialHandle,
     ref SspiHandle inContextHandle,
     ref SecurityBufferDescriptor inputBuffer,
     SspiContextFlags requestedAttribs,
     DataRepresentation dataRepresentation,
     ref SspiHandle outContext,
     ref SecurityBufferDescriptor outputBuffer,
     out SspiContextFlags outputAttribs,
     out long timestamp);
示例#23
0
 private Double GetValueFromTime(UInt64 time, DataRepresentation DataPres)
 {
     return((data.GetValue(time).LastValue as RealValue).Value);
 }