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

            /* parse CP16Time2a (time stamp) */
            delay = new CP16Time2a(msg, startIndex);
        }
Beispiel #2
0
 public PackedOutputCircuitInfo(int objectAddress, OutputCircuitInfo oci, QualityDescriptorP qdp, CP16Time2a operatingTime, CP24Time2a timestamp)
     : base(objectAddress)
 {
     this.oci           = oci;
     this.qdp           = qdp;
     this.operatingTime = operatingTime;
     this.timestamp     = timestamp;
 }
Beispiel #3
0
 public PackedStartEventsOfProtectionEquipment(int objectAddress, StartEvent spe, QualityDescriptorP qdp, CP16Time2a elapsedTime, CP24Time2a timestamp)
     : base(objectAddress)
 {
     this.spe         = spe;
     this.qdp         = qdp;
     this.elapsedTime = elapsedTime;
     this.timestamp   = timestamp;
 }
Beispiel #4
0
        /// <summary>
        /// Sends a delay acquisition command (C_CD_NA_1 typeID: 106).
        /// </summary>
        /// <param name="cot">Cause of transmission</param>
        /// <param name="ca">Common address</param>
        /// <param name="delay">delay for acquisition</param>
        /// <exception cref="ConnectionException">description</exception>
        public void SendDelayAcquisitionCommand(CauseOfTransmission cot, int ca, CP16Time2a delay)
        {
            ASDU asdu = new ASDU(parameters, CauseOfTransmission.ACTIVATION, false, false, (byte)parameters.OriginatorAddress, ca, false);

            asdu.AddInformationObject(new DelayAcquisitionCommand(0, delay));

            SendASDUInternal(asdu);
        }
Beispiel #5
0
        internal EventOfProtectionEquipment(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 CP24Time2a(msg, startIndex);
        }
Beispiel #6
0
        internal PackedStartEventsOfProtectionEquipment(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 CP24Time2a(msg, startIndex);
        }
Beispiel #7
0
        internal PackedOutputCircuitInfo(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 CP24Time2a(msg, startIndex);
        }
Beispiel #8
0
        /// <summary>
        /// Sends a delay acquisition command (C_CD_NA_1 typeID: 106).
        /// </summary>
        /// <param name="cot">Cause of transmission</param>
        /// <param name="ca">Common address</param>
        /// <param name="delay">delay for acquisition</param>
        /// <exception cref="ConnectionException">description</exception>
        public void SendDelayAcquisitionCommand(CauseOfTransmission cot, int ca, CP16Time2a delay)
        {
            Frame frame = new T104Frame();

            EncodeIdentificationField(frame, TypeID.C_CD_NA_1, 1, cot, ca);

            EncodeIOA(frame, 0);

            frame.AppendBytes(delay.GetEncodedValue());

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

            sendIMessage(frame);
        }
Beispiel #9
0
 public EventOfProtectionEquipmentWithCP56Time2a(int ioa, SingleEvent singleEvent, CP16Time2a elapsedTime, CP56Time2a timestamp)
     : base(ioa)
 {
     this.singleEvent = singleEvent;
     this.elapsedTime = elapsedTime;
     this.timestamp   = timestamp;
 }
 public DelayAcquisitionCommand(int ioa, CP16Time2a delay) : base(ioa)
 {
     this.delay = delay;
 }