public EventOfProtectionEquipment(int ioa, SingleEvent singleEvent, CP16Time2a elapsedTime, CP24Time2a timestamp)
     : base(ioa)
 {
     this.singleEvent = singleEvent;
     this.elapsedTime = elapsedTime;
     this.timestamp   = timestamp;
 }
Exemple #2
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;
 }
Exemple #3
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;
 }
        internal DelayAcquisitionCommand(ApplicationLayerParameters parameters, byte[] msg, int startIndex)
            : base(parameters, msg, startIndex, false)
        {
            startIndex += parameters.SizeOfIOA; /* skip IOA */

            if ((msg.Length - startIndex) < GetEncodedSize())
            {
                throw new ASDUParsingException("Message too small");
            }

            /* parse CP16Time2a (time stamp) */
            delay = new CP16Time2a(msg, startIndex);
        }
        internal EventOfProtectionEquipment(ApplicationLayerParameters parameters, byte[] msg, int startIndex, bool isSequence)
            : base(parameters, msg, startIndex, isSequence)
        {
            if (!isSequence)
            {
                startIndex += parameters.SizeOfIOA; /* skip IOA */
            }
            if ((msg.Length - startIndex) < GetEncodedSize())
            {
                throw new ASDUParsingException("Message too small");
            }

            singleEvent = new SingleEvent(msg[startIndex++]);

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

            /* parse CP56Time2a (time stamp) */
            timestamp = new CP24Time2a(msg, startIndex);
        }
Exemple #6
0
        internal PackedOutputCircuitInfo(ApplicationLayerParameters parameters, byte[] msg, int startIndex, bool isSequence) :
            base(parameters, msg, startIndex, isSequence)
        {
            if (!isSequence)
            {
                startIndex += parameters.SizeOfIOA;                 /* skip IOA */
            }
            if ((msg.Length - startIndex) < GetEncodedSize())
            {
                throw new ASDUParsingException("Message too small");
            }

            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);
        }
Exemple #7
0
        public override void SendDelayAcquisitionCommand(CauseOfTransmission cot, int ca, CP16Time2a delay)
        {
            ASDU asdu = new ASDU(appLayerParameters, CauseOfTransmission.ACTIVATION, false, false, (byte)appLayerParameters.OA, ca, false);

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

            EnqueueUserData(asdu);
        }
Exemple #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 abstract void SendDelayAcquisitionCommand(CauseOfTransmission cot, int ca, CP16Time2a delay);
 public DelayAcquisitionCommand(int ioa, CP16Time2a delay)
     : base(ioa)
 {
     this.delay = delay;
 }
Exemple #10
0
 //Обработчик команды определения запаздывания
 private bool delayAcquisitionHandler(object parameter, IMasterConnection connection, ASDU asdu, CP16Time2a delayTime)
 {
     return(true);
 }