internal override void Encode(Frame frame, ConnectionParameters parameters, bool isSequence)
        {
            base.Encode(frame, parameters, isSequence);

            frame.SetNextByte((byte)(tsc % 256));
            frame.SetNextByte((byte)(tsc / 256));

            frame.AppendBytes(time.GetEncodedValue());
        }
Ejemplo n.º 2
0
        internal override void Encode(Frame frame, ConnectionParameters parameters, bool isSequence)
        {
            base.Encode(frame, parameters, isSequence);

            frame.SetNextByte(singleEvent.EncodedValue);

            frame.AppendBytes(elapsedTime.GetEncodedValue());

            frame.AppendBytes(timestamp.GetEncodedValue());
        }
Ejemplo n.º 3
0
        internal override void Encode(Frame frame, ConnectionParameters parameters, bool isSequence)
        {
            base.Encode(frame, parameters, isSequence);

            frame.SetNextByte(oci.EncodedValue);

            frame.SetNextByte(qdp.EncodedValue);

            frame.AppendBytes(operatingTime.GetEncodedValue());

            frame.AppendBytes(timestamp.GetEncodedValue());
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 发送时钟同步命令(103)Sends a clock synchronization command (C_CS_NA_1 typeID: 103).
        /// <para>只用于站端没有GPS的情况</para>
        /// <para>使用104进行同步时,无须测量通道延时</para>
        /// </summary>
        /// 传送原因:
        ///     控制方向
        ///         6: 激活
        ///     监视方向
        ///         7: 激活确认
        ///         10  激活终止
        ///         44  未知的类型标识
        ///         45  未知的传送原因
        ///         46  未知的应用服务数据单元公共地址 cot
        ///         47  未知的信息对象地址
        /// <param name="ca">公共地址Common address</param>
        /// <param name="time">时间日期the new time to set</param>
        /// <exception cref="ConnectionException">description</exception>
        public void SendClockSyncCommand(int ca, CP56Time2a time)
        {
            Frame frame = new T104Frame();

            EncodeIdentificationField(frame, TypeID.C_CS_NA_1, 1, CauseOfTransmission.ACTIVATION, ca);

            EncodeIOA(frame, 0);

            frame.AppendBytes(time.GetEncodedValue());

            if (debugOutput)
            {
                Console.WriteLine("Encoded C_CS_NA_1 with " + frame.GetMsgSize() + " bytes.");
            }

            sendIMessage(frame);
        }
Ejemplo n.º 5
0
        internal override void Encode(Frame frame, ConnectionParameters parameters, bool isSequence)
        {
            base.Encode(frame, parameters, isSequence);

            frame.AppendBytes(timestamp.GetEncodedValue());
        }