use of org.openmuc.openiec61850.BdaReasonForInclusion in project Protocol-Adapter-IEC61850 by OSGP.
the class Iec61850ClientSSLDEventListener method logReportDetails.
private void logReportDetails(final Report report) {
final StringBuilder sb = new StringBuilder("Report details for device ").append(this.deviceIdentification).append(System.lineSeparator());
sb.append("\t RptId:\t").append(report.getRptId()).append(System.lineSeparator());
sb.append("\t DataSetRef:\t").append(report.getDataSetRef()).append(System.lineSeparator());
sb.append("\t ConfRev:\t").append(report.getConfRev()).append(System.lineSeparator());
sb.append("\t BufOvfl:\t").append(report.isBufOvfl()).append(System.lineSeparator());
sb.append("\t EntryId:\t").append(report.getEntryId()).append(System.lineSeparator());
sb.append("\tInclusionBitString:\t").append(Arrays.toString(report.getInclusionBitString())).append(System.lineSeparator());
sb.append("\tMoreSegmentsFollow:\t").append(report.isMoreSegmentsFollow()).append(System.lineSeparator());
sb.append("\t SqNum:\t").append(report.getSqNum()).append(System.lineSeparator());
sb.append("\t SubSqNum:\t").append(report.getSubSqNum()).append(System.lineSeparator());
sb.append("\t TimeOfEntry:\t").append(report.getTimeOfEntry()).append(System.lineSeparator());
if (report.getTimeOfEntry() != null) {
sb.append("\t \t(").append(new DateTime(report.getTimeOfEntry().getTimestampValue() + IEC61850_ENTRY_TIME_OFFSET)).append(')').append(System.lineSeparator());
}
final List<BdaReasonForInclusion> reasonCodes = report.getReasonCodes();
if (reasonCodes != null && !reasonCodes.isEmpty()) {
sb.append("\t ReasonCodes:").append(System.lineSeparator());
for (final BdaReasonForInclusion reasonCode : reasonCodes) {
sb.append("\t \t").append(reasonCode.getReference() == null ? HexConverter.toHexString(reasonCode.getValue()) : reasonCode).append("\t(").append(new Iec61850BdaReasonForInclusionHelper(reasonCode).getInfo()).append(')').append(System.lineSeparator());
}
}
sb.append("\t optFlds:").append(report.getOptFlds()).append("\t(").append(new Iec61850BdaOptFldsHelper(report.getOptFlds()).getInfo()).append(')').append(System.lineSeparator());
final DataSet dataSet = report.getDataSet();
if (dataSet == null) {
sb.append("\t DataSet:\tnull").append(System.lineSeparator());
} else {
sb.append("\t DataSet:\t").append(dataSet.getReferenceStr()).append(System.lineSeparator());
final List<FcModelNode> members = dataSet.getMembers();
if (members != null && !members.isEmpty()) {
sb.append("\t DataSet members:\t").append(members.size()).append(System.lineSeparator());
for (final FcModelNode member : members) {
sb.append("\t member:\t").append(member).append(System.lineSeparator());
if (member.getReference().toString().contains("CSLC.EvnRpn")) {
sb.append(this.evnRpnInfo("\t \t\t", member));
}
}
}
}
this.logger.info(sb.append(System.lineSeparator()).toString());
}
use of org.openmuc.openiec61850.BdaReasonForInclusion in project Protocol-Adapter-IEC61850 by OSGP.
the class Iec61850ClientRTUEventListener method logReportDetails.
private void logReportDetails(final Report report) {
final StringBuilder sb = new StringBuilder("Report details for device ").append(this.deviceIdentification).append(System.lineSeparator());
sb.append("\t RptId:\t").append(report.getRptId()).append(System.lineSeparator());
sb.append("\t DataSetRef:\t").append(report.getDataSetRef()).append(System.lineSeparator());
sb.append("\t ConfRev:\t").append(report.getConfRev()).append(System.lineSeparator());
sb.append("\t BufOvfl:\t").append(report.isBufOvfl()).append(System.lineSeparator());
sb.append("\t EntryId:\t").append(report.getEntryId()).append(System.lineSeparator());
sb.append("\tInclusionBitString:\t").append(Arrays.toString(report.getInclusionBitString())).append(System.lineSeparator());
sb.append("\tMoreSegmentsFollow:\t").append(report.isMoreSegmentsFollow()).append(System.lineSeparator());
sb.append("\t SqNum:\t").append(report.getSqNum()).append(System.lineSeparator());
sb.append("\t SubSqNum:\t").append(report.getSubSqNum()).append(System.lineSeparator());
sb.append("\t TimeOfEntry:\t").append(report.getTimeOfEntry()).append(System.lineSeparator());
if (report.getTimeOfEntry() != null) {
sb.append("\t \t(").append(new DateTime(report.getTimeOfEntry().getTimestampValue() + IEC61850_ENTRY_TIME_OFFSET)).append(')').append(System.lineSeparator());
}
final List<BdaReasonForInclusion> reasonCodes = report.getReasonCodes();
if ((reasonCodes != null) && !reasonCodes.isEmpty()) {
sb.append("\t ReasonCodes:").append(System.lineSeparator());
for (final BdaReasonForInclusion reasonCode : reasonCodes) {
sb.append("\t \t").append(reasonCode.getReference() == null ? HexConverter.toHexString(reasonCode.getValue()) : reasonCode).append("\t(").append(new Iec61850BdaReasonForInclusionHelper(reasonCode).getInfo()).append(')').append(System.lineSeparator());
}
}
sb.append("\t optFlds:").append(report.getOptFlds()).append("\t(").append(new Iec61850BdaOptFldsHelper(report.getOptFlds()).getInfo()).append(')').append(System.lineSeparator());
final DataSet dataSet = report.getDataSet();
if (dataSet == null) {
sb.append("\t DataSet:\tnull").append(System.lineSeparator());
} else {
sb.append("\t DataSet:\t").append(dataSet.getReferenceStr()).append(System.lineSeparator());
final List<FcModelNode> members = dataSet.getMembers();
if ((members != null) && !members.isEmpty()) {
sb.append("\t DataSet members:\t").append(members.size()).append(System.lineSeparator());
for (final FcModelNode member : members) {
sb.append("\t member:\t").append(member).append(System.lineSeparator());
sb.append("\t \t\t").append(member);
}
}
}
this.logger.info(sb.append(System.lineSeparator()).toString());
}
Aggregations