Ejemplo n.º 1
0
        internal SetpointCommandShortWithCP56Time2a(ConnectionParameters parameters, byte[] msg, int startIndex) :
            base(parameters, msg, startIndex)
        {
            startIndex += parameters.SizeOfIOA + 5; /* skip IOA + float + QOS*/

            this.timestamp = new CP56Time2a(msg, startIndex);
        }
Ejemplo n.º 2
0
        internal Bitstring32CommandWithCP56Time2a(ConnectionParameters parameters, byte[] msg, int startIndex) :
            base(parameters, msg, startIndex)
        {
            startIndex += parameters.SizeOfIOA + 4; /* skip IOA + bitstring */

            this.timestamp = new CP56Time2a(msg, startIndex);
        }
Ejemplo n.º 3
0
 public EventOfProtectionEquipmentWithCP56Time2a(int ioa, SingleEvent singleEvent, CP16Time2a elapsedTime, CP56Time2a timestamp)
     : base(ioa)
 {
     this.singleEvent = singleEvent;
     this.elapsedTime = elapsedTime;
     this.timestamp   = timestamp;
 }
Ejemplo n.º 4
0
        internal SetpointCommandNormalizedWithCP56Time2a(ConnectionParameters parameters, byte[] msg, int startIndex) :
            base(parameters, msg, startIndex)
        {
            startIndex += parameters.SizeOfIOA + 3; /* skip IOA */

            this.timestamp = new CP56Time2a(msg, startIndex);
        }
Ejemplo n.º 5
0
        internal StepCommandWithCP56Time2a(ConnectionParameters parameters, byte[] msg, int startIndex) :
            base(parameters, msg, startIndex)
        {
            startIndex += parameters.SizeOfIOA + 1;             /* skip IOA + DCQ*/

            timestamp = new CP56Time2a(msg, startIndex);
        }
Ejemplo n.º 6
0
 public PackedStartEventsOfProtectionEquipmentWithCP56Time2a(int objectAddress, StartEvent spe, QualityDescriptorP qdp, CP16Time2a elapsedTime, CP56Time2a timestamp)
     : base(objectAddress)
 {
     this.spe         = spe;
     this.qdp         = qdp;
     this.elapsedTime = elapsedTime;
     this.timestamp   = timestamp;
 }
Ejemplo n.º 7
0
        /// <summary>
        /// Sends a test command with CP56Time2a time (C_TS_TA_1 typeID: 107).
        /// </summary>
        /// <param name="ca">Common address</param>
        /// <param name="tsc">test sequence number</param>
        /// <param name="time">test timestamp</param>
        /// <exception cref="ConnectionException">description</exception>
        public void SendTestCommandWithCP56Time2a(int ca, ushort tsc, CP56Time2a time)
        {
            ASDU asdu = new ASDU(parameters, CauseOfTransmission.ACTIVATION, false, false, (byte)parameters.OriginatorAddress, ca, false);

            asdu.AddInformationObject(new TestCommandWithCP56Time2a(tsc, time));

            SendASDUInternal(asdu);
        }
        internal ClockSynchronizationCommand(ConnectionParameters parameters, byte[] msg, int startIndex) :
            base(parameters, msg, startIndex, false)
        {
            startIndex += parameters.SizeOfIOA;             /* skip IOA */

            /* parse CP56Time2a (time stamp) */
            newTime = new CP56Time2a(msg, startIndex);
        }
Ejemplo n.º 9
0
 public PackedOutputCircuitInfoWithCP56Time2a(int objectAddress, OutputCircuitInfo oci, QualityDescriptorP qdp, CP16Time2a operatingTime, CP56Time2a timestamp)
     : base(objectAddress)
 {
     this.oci           = oci;
     this.qdp           = qdp;
     this.operatingTime = operatingTime;
     this.timestamp     = timestamp;
 }
Ejemplo n.º 10
0
        /// <summary>
        /// Sends a clock synchronization command (C_CS_NA_1 typeID: 103).
        /// </summary>
        /// <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)
        {
            ASDU asdu = new ASDU(parameters, CauseOfTransmission.ACTIVATION, false, false, (byte)parameters.OriginatorAddress, ca, false);

            asdu.AddInformationObject(new ClockSynchronizationCommand(0, time));

            SendASDUInternal(asdu);
        }
        internal TestCommandWithCP56Time2a(ConnectionParameters parameters, byte[] msg, int startIndex) :
            base(parameters, msg, startIndex, false)
        {
            startIndex += parameters.SizeOfIOA; /* skip IOA */

            tsc  = msg[startIndex++];
            tsc += (ushort)(msg[startIndex++] * 256);

            time = new CP56Time2a(msg, startIndex);
        }
Ejemplo n.º 12
0
        public IntegratedTotalsWithCP56Time2a(ConnectionParameters parameters, byte[] msg, int startIndex, bool isSequence) :
            base(parameters, msg, startIndex, isSequence)
        {
            if (!isSequence)
            {
                startIndex += parameters.SizeOfIOA; /* skip IOA */
            }
            startIndex += 5;                        /* BCR */

            timestamp = new CP56Time2a(msg, startIndex);
        }
Ejemplo n.º 13
0
        internal StepPositionWithCP56Time2a(ConnectionParameters parameters, byte[] msg, int startIndex, bool isSequence) :
            base(parameters, msg, startIndex, isSequence)
        {
            if (!isSequence)
            {
                startIndex += parameters.SizeOfIOA; /* skip IOA */
            }
            startIndex += 2;                        /* skip VTI + quality*/

            /* parse CP24Time2a (time stamp) */
            timestamp = new CP56Time2a(msg, startIndex);
        }
        internal Bitstring32WithCP56Time2a(ConnectionParameters parameters, byte[] msg, int startIndex, bool isSequence) :
            base(parameters, msg, startIndex, isSequence)
        {
            if (!isSequence)
            {
                startIndex += parameters.SizeOfIOA; /* skip IOA */
            }
            startIndex += 5;                        /* value + quality */

            /* parse CP56Time2a (time stamp) */
            timestamp = new CP56Time2a(msg, startIndex);
        }
Ejemplo n.º 15
0
        internal MeasuredValueScaledWithCP56Time2a(ConnectionParameters parameters, byte[] msg, int startIndex, bool isSequence) :
            base(parameters, msg, startIndex, isSequence)
        {
            if (!isSequence)
            {
                startIndex += parameters.SizeOfIOA; /* skip IOA */
            }
            startIndex += 3;                        /* scaledValue + QDS */

            /* parse CP56Time2a (time stamp) */
            timestamp = new CP56Time2a(msg, startIndex);
        }
Ejemplo n.º 16
0
        /// <summary>
        /// 解析
        /// </summary>
        /// <param name="parameters"></param>
        /// <param name="msg"></param>
        /// <param name="startIndex"></param>
        /// <param name="isSequence"></param>
        internal DoublePointWithCP56Time2a(ConnectionParameters parameters, byte[] msg, int startIndex, bool isSequence) :
            base(parameters, msg, startIndex, isSequence)
        {
            if (!isSequence)
            {
                startIndex += parameters.SizeOfIOA; /* skip IOA */
            }
            startIndex += 1;                        /* skip DIQ */

            /* parse CP56Time2a (time stamp) */
            timestamp = new CP56Time2a(msg, startIndex);
        }
Ejemplo n.º 17
0
        internal EventOfProtectionEquipmentWithCP56Time2a(ConnectionParameters parameters, byte[] msg, int startIndex, bool isSequence) :
            base(parameters, msg, startIndex, isSequence)
        {
            if (!isSequence)
            {
                startIndex += parameters.SizeOfIOA;                 /* skip IOA */
            }
            singleEvent = new SingleEvent(msg [startIndex++]);

            elapsedTime = new CP16Time2a(msg, startIndex);
            startIndex += 2;

            /* parse CP56Time2a (time stamp) */
            timestamp = new CP56Time2a(msg, startIndex);
        }
Ejemplo n.º 18
0
        internal PackedStartEventsOfProtectionEquipmentWithCP56Time2a(ConnectionParameters parameters, byte[] msg, int startIndex, bool isSequence) :
            base(parameters, msg, startIndex, isSequence)
        {
            if (!isSequence)
            {
                startIndex += parameters.SizeOfIOA;                 /* skip IOA */
            }
            spe = new StartEvent(msg [startIndex++]);
            qdp = new QualityDescriptorP(msg [startIndex++]);

            elapsedTime = new CP16Time2a(msg, startIndex);
            startIndex += 2;

            /* parse CP56Time2a (time stamp) */
            timestamp = new CP56Time2a(msg, startIndex);
        }
Ejemplo n.º 19
0
        internal PackedOutputCircuitInfoWithCP56Time2a(ConnectionParameters parameters, byte[] msg, int startIndex, bool isSequence) :
            base(parameters, msg, startIndex, isSequence)
        {
            if (!isSequence)
            {
                startIndex += parameters.SizeOfIOA; /* skip IOA */
            }
            oci = new OutputCircuitInfo(msg[startIndex++]);

            qdp = new QualityDescriptorP(msg[startIndex++]);

            operatingTime = new CP16Time2a(msg, startIndex);
            startIndex   += 2;

            /* parse CP56Time2a (time stamp) */
            timestamp = new CP56Time2a(msg, startIndex);
        }
Ejemplo n.º 20
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.º 21
0
 public MeasuredValueScaledWithCP56Time2a(int objectAddress, int value, QualityDescriptor quality, CP56Time2a timestamp)
     : base(objectAddress, value, quality)
 {
     this.timestamp = timestamp;
 }
Ejemplo n.º 22
0
 /// <summary>
 /// 创建
 /// </summary>
 /// <param name="ioa"></param>
 /// <param name="value"></param>
 /// <param name="quality"></param>
 /// <param name="timestamp"></param>
 public DoublePointWithCP56Time2a(int ioa, DoublePointValue value, QualityDescriptor quality, CP56Time2a timestamp)
     : base(ioa, value, quality)
 {
     this.timestamp = timestamp;
 }
Ejemplo n.º 23
0
 public Bitstring32CommandWithCP56Time2a(int objectAddress, UInt32 bitstring, CP56Time2a timestamp)
     : base(objectAddress, bitstring)
 {
     this.timestamp = timestamp;
 }
Ejemplo n.º 24
0
 public SetpointCommandScaledWithCP56Time2a(int objectAddress, ScaledValue value, SetpointCommandQualifier qos, CP56Time2a timestamp)
     : base(objectAddress, value, qos)
 {
     this.timestamp = timestamp;
 }
Ejemplo n.º 25
0
 public SetpointCommandShortWithCP56Time2a(int objectAddress, float value, SetpointCommandQualifier qos, CP56Time2a timestamp)
     : base(objectAddress, value, qos)
 {
     this.timestamp = timestamp;
 }
Ejemplo n.º 26
0
 public StepPositionWithCP56Time2a(int ioa, int value, bool isTransient, CP56Time2a timestamp) :
     base(ioa, value, isTransient)
 {
     Timestamp = timestamp;
 }
Ejemplo n.º 27
0
 public SingleCommandWithCP56Time2a(int ioa, bool command, bool selectCommand, int qu, CP56Time2a timestamp) :
     base(ioa, command, selectCommand, qu)
 {
     this.timestamp = timestamp;
 }
 public ClockSynchronizationCommand(int ioa, CP56Time2a newTime) : base(ioa)
 {
     this.newTime = newTime;
 }
Ejemplo n.º 29
0
 public DoubleCommandWithCP56Time2a(int ioa, int command, bool select, int quality, CP56Time2a timestamp) :
     base(ioa, command, select, quality)
 {
     this.timestamp = timestamp;
 }
Ejemplo n.º 30
0
 public StepCommandWithCP56Time2a(int ioa, StepCommandValue command, bool select, int quality, CP56Time2a timestamp) :
     base(ioa, command, select, quality)
 {
     this.timestamp = timestamp;
 }