public void DelayAcquisitionCommand(int commonAddress, CauseOfTransmission cot, IeTime16 time) { var aSdu = new ASdu(TypeId.C_CD_NA_1, false, cot, false, false, originatorAddress, commonAddress, new[] { new InformationObject(0, new[] { new InformationElement[] { time } }) }); Send(aSdu); }
public void Interrogation(int commonAddress, CauseOfTransmission cot, IeQualifierOfInterrogation qualifier) { var aSdu = new ASdu(TypeId.C_IC_NA_1, false, cot, false, false, originatorAddress, commonAddress, new[] { new InformationObject(0, new[] { new InformationElement[] { qualifier } }) }); Send(aSdu); }
public void Send(ASdu aSdu) { acknowledgedReceiveSequenceNumber = receiveSequenceNumber; var requestAPdu = new APdu(sendSequenceNumber, receiveSequenceNumber, APdu.ApciType.I_FORMAT, aSdu); sendSequenceNumber = (sendSequenceNumber + 1) % 32768; if (maxTimeNoAckSentFuture != null) { maxTimeNoAckSentFuture.Cancel(); maxTimeNoAckSentFuture = null; } if (maxTimeNoAckReceivedFuture == null) { ScheduleMaxTimeNoAckReceivedFuture(); } var length = requestAPdu.Encode(buffer, settings); writer.Write(buffer, 0, length); writer.Flush(); ResetMaxIdleTimeTimer(); }
public void SendASdu(ASdu asdu) { if (_connection != null) { _connection.Send(asdu); } }
public void TestCommandWithTimeTag(int commonAddress, IeTestSequenceCounter testSequenceCounter, IeTime56 time) { var aSdu = new ASdu(TypeId.C_TS_TA_1, false, CauseOfTransmission.ACTIVATION, false, false, originatorAddress, commonAddress, new[] { new InformationObject(0, new[] { new InformationElement[] { testSequenceCounter, time } }) }); Send(aSdu); }
public void TestCommand(int commonAddress) { var aSdu = new ASdu(TypeId.C_TS_NA_1, false, CauseOfTransmission.ACTIVATION, false, false, originatorAddress, commonAddress, new[] { new InformationObject(0, new[] { new InformationElement[] { new IeFixedTestBitPattern() } }) }); Send(aSdu); }
public void SendDirectory(int commonAddress, int informationObjectAddress, InformationElement[][] directory) { var aSdu = new ASdu(TypeId.F_DR_TA_1, false, CauseOfTransmission.FILE_TRANSFER, false, false, originatorAddress, commonAddress, new[] { new InformationObject( informationObjectAddress, directory) }); Send(aSdu); }
public void ResetProcessCommand(int commonAddress, IeQualifierOfResetProcessCommand qualifier) { var aSdu = new ASdu(TypeId.C_RP_NA_1, false, CauseOfTransmission.ACTIVATION, false, false, originatorAddress, commonAddress, new[] { new InformationObject(0, new[] { new InformationElement[] { qualifier } }) }); Send(aSdu); }
public void SynchronizeClocks(int commonAddress, IeTime56 time) { var io = new InformationObject(0, new[] { new InformationElement[] { time } }); InformationObject[] ios = { io }; var aSdu = new ASdu(TypeId.C_CS_NA_1, false, CauseOfTransmission.ACTIVATION, false, false, originatorAddress, commonAddress, ios); Send(aSdu); }
public void ReadCommand(int commonAddress, int informationObjectAddress) { var aSdu = new ASdu(TypeId.C_RD_NA_1, false, CauseOfTransmission.REQUEST, false, false, originatorAddress, commonAddress, new[] { new InformationObject(informationObjectAddress, new InformationElement[][] {}) }); Send(aSdu); }
public void FileReady(int commonAddress, int informationObjectAddress, IeNameOfFile nameOfFile, IeLengthOfFileOrSection lengthOfFile, IeFileReadyQualifier qualifier) { var aSdu = new ASdu(TypeId.F_FR_NA_1, false, CauseOfTransmission.FILE_TRANSFER, false, false, originatorAddress, commonAddress, new[] { new InformationObject(informationObjectAddress, new[] { new InformationElement[] { nameOfFile, lengthOfFile, qualifier } }) }); Send(aSdu); }
public void ParameterActivation(int commonAddress, CauseOfTransmission cot, int informationObjectAddress, IeQualifierOfParameterActivation qualifier) { var aSdu = new ASdu(TypeId.P_AC_NA_1, false, cot, false, false, originatorAddress, commonAddress, new[] { new InformationObject(informationObjectAddress, new[] { new InformationElement[] { qualifier } }) }); Send(aSdu); }
public void ParameterShortFloatCommand(int commonAddress, int informationObjectAddress, IeShortFloat shortFloat, IeQualifierOfParameterOfMeasuredValues qualifier) { var aSdu = new ASdu(TypeId.P_ME_NC_1, false, CauseOfTransmission.ACTIVATION, false, false, originatorAddress, commonAddress, new[] { new InformationObject(informationObjectAddress, new[] { new InformationElement[] { shortFloat, qualifier } }) }); Send(aSdu); }
public void SetNormalizedValueCommand(int commonAddress, CauseOfTransmission cot, int informationObjectAddress, IeNormalizedValue normalizedValue, IeQualifierOfSetPointCommand qualifier) { var aSdu = new ASdu(TypeId.C_SE_NA_1, false, cot, false, false, originatorAddress, commonAddress, new[] { new InformationObject(informationObjectAddress, new[] { new InformationElement[] { normalizedValue, qualifier } }) }); Send(aSdu); }
public void DoubleCommand(int commonAddress, CauseOfTransmission cot, int informationObjectAddress, IeDoubleCommand doubleCommand) { var aSdu = new ASdu(TypeId.C_DC_NA_1, false, cot, false, false, originatorAddress, commonAddress, new[] { new InformationObject(informationObjectAddress, new[] { new InformationElement[] { doubleCommand } }) }); Send(aSdu); }
public void BitStringCommandWithTimeTag(int commonAddress, CauseOfTransmission cot, int informationObjectAddress, IeBinaryStateInformation binaryStateInformation, IeTime56 timeTag) { var aSdu = new ASdu(TypeId.C_BO_TA_1, false, cot, false, false, originatorAddress, commonAddress, new[] { new InformationObject(informationObjectAddress, new[] { new InformationElement[] { binaryStateInformation, timeTag } }) }); Send(aSdu); }
public void SetShortFloatCommand(int commonAddress, CauseOfTransmission cot, int informationObjectAddress, IeShortFloat shortFloat, IeQualifierOfSetPointCommand qualifier) { var aSdu = new ASdu(TypeId.C_SE_NC_1, false, cot, false, false, originatorAddress, commonAddress, new[] { new InformationObject(informationObjectAddress, new[] { new InformationElement[] { shortFloat, qualifier } }) }); Send(aSdu); }
public void CallOrSelectFiles(int commonAddress, CauseOfTransmission cot, int informationObjectAddress, IeNameOfFile nameOfFile, IeNameOfSection nameOfSection, IeSelectAndCallQualifier qualifier) { var aSdu = new ASdu(TypeId.F_SC_NA_1, false, cot, false, false, originatorAddress, commonAddress, new[] { new InformationObject(informationObjectAddress, new[] { new InformationElement[] { nameOfFile, nameOfSection, qualifier } }) }); Send(aSdu); }
public void RegulatingStepCommandWithTimeTag(int commonAddress, CauseOfTransmission cot, int informationObjectAddress, IeRegulatingStepCommand regulatingStepCommand, IeTime56 timeTag) { var aSdu = new ASdu(TypeId.C_RC_TA_1, false, cot, false, false, originatorAddress, commonAddress, new[] { new InformationObject(informationObjectAddress, new[] { new InformationElement[] { regulatingStepCommand, timeTag } }) }); Send(aSdu); }
public void AckFileOrSection(int commonAddress, int informationObjectAddress, IeNameOfFile nameOfFile, IeNameOfSection nameOfSection, IeAckFileOrSectionQualifier qualifier) { var aSdu = new ASdu(TypeId.F_AF_NA_1, false, CauseOfTransmission.FILE_TRANSFER, false, false, originatorAddress, commonAddress, new[] { new InformationObject( informationObjectAddress, new[] { new InformationElement[] { nameOfFile, nameOfSection, qualifier } }) }); Send(aSdu); }
public void SetScaledValueCommandWithTimeTag(int commonAddress, CauseOfTransmission cot, int informationObjectAddress, IeScaledValue scaledValue, IeQualifierOfSetPointCommand qualifier, IeTime56 timeTag) { var aSdu = new ASdu(TypeId.C_SE_TB_1, false, cot, false, false, originatorAddress, commonAddress, new[] { new InformationObject(informationObjectAddress, new[] { new InformationElement[] { scaledValue, qualifier, timeTag } }) }); Send(aSdu); }
public void LastSectionOrSegment(int commonAddress, int informationObjectAddress, IeNameOfFile nameOfFile, IeNameOfSection nameOfSection, IeLastSectionOrSegmentQualifier qualifier, IeChecksum checksum) { var aSdu = new ASdu(TypeId.F_LS_NA_1, false, CauseOfTransmission.FILE_TRANSFER, false, false, originatorAddress, commonAddress, new[] { new InformationObject( informationObjectAddress, new[] { new InformationElement[] { nameOfFile, nameOfSection, qualifier, checksum } }) }); Send(aSdu); }
public void QueryLog(int commonAddress, int informationObjectAddress, IeNameOfFile nameOfFile, IeTime56 rangeStartTime, IeTime56 rangeEndTime) { var aSdu = new ASdu(TypeId.F_SC_NB_1, false, CauseOfTransmission.FILE_TRANSFER, false, false, originatorAddress, commonAddress, new[] { new InformationObject( informationObjectAddress, new[] { new InformationElement[] { nameOfFile, rangeStartTime, rangeEndTime } }) }); Send(aSdu); }
public void SendSegment(int commonAddress, int informationObjectAddress, IeNameOfFile nameOfFile, IeNameOfSection nameOfSection, IeFileSegment segment) { var aSdu = new ASdu(TypeId.F_SG_NA_1, false, CauseOfTransmission.FILE_TRANSFER, false, false, originatorAddress, commonAddress, new[] { new InformationObject(informationObjectAddress, new[] { new InformationElement[] { nameOfFile, nameOfSection, segment } }) }); Send(aSdu); }
public void SingleCommand(int commonAddress, int informationObjectAddress, IeSingleCommand singleCommand) { var cot = singleCommand.IsCommandStateOn() ? CauseOfTransmission.ACTIVATION : CauseOfTransmission.DEACTIVATION; var aSdu = new ASdu(TypeId.C_SC_NA_1, false, cot, false, false, originatorAddress, commonAddress, new[] { new InformationObject(informationObjectAddress, new[] { new InformationElement[] { singleCommand } }) }); Send(aSdu); }
public void SendConfirmation(ASdu aSdu) { var cot = aSdu.GetCauseOfTransmission(); if (cot == CauseOfTransmission.ACTIVATION) { cot = CauseOfTransmission.ACTIVATION_CON; } else if (cot == CauseOfTransmission.DEACTIVATION) { cot = CauseOfTransmission.DEACTIVATION_CON; } Send(new ASdu(aSdu.GetTypeIdentification(), aSdu.IsSequenceOfElements, cot, aSdu.IsTestFrame(), aSdu.IsNegativeConfirm(), aSdu.GetOriginatorAddress(), aSdu.GetCommonAddress(), aSdu.GetInformationObjects())); }
public void SendASdu(ASdu asdu) { _connection?.Send(asdu); }
public void SendASdu(ASdu asdu) { this.Publish("send", asdu); }
public void SendASdu(ASdu asdu) { _pubSubHub.Publish(this, "send", asdu); }