Commit a366218d authored by Dominique Marcadet's avatar Dominique Marcadet

better display of AnyLN found

display inst only if not LN0, display prefix if not default
parent 5c9ccb39
......@@ -1212,7 +1212,12 @@ public class AssociationImpl extends BaseElementImpl implements Association {
console.verbose( messagePrefix + "found " + mess2 + " on line " + lDevice.getLeft().getLineNumber() );
Pair< AnyLN, Integer > anyLN = SclUtilities.getAnyLN( lDevice.getLeft(), getLnClass(), getLnInst(), getPrefix() );
String mess3 = "LN( lnClass = " + getLnClass() + ", inst = " + getLnInst() + " )";
String mess3 = "LN( lnClass = " + getLnClass();
if( getLnInst() != null ) {
mess3 += ", inst = " + getLnInst();
if( getPrefix() != "" ) mess3 += ", prefix = " + getPrefix();
}
mess3 += " )";
if( anyLN.getLeft() == null ) {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess3, anyLN.getRight() );
return;
......
......@@ -1147,7 +1147,12 @@ public class ClientLNImpl extends SclObjectImpl implements ClientLN {
console.verbose( messagePrefix + "found " + mess3 + " on line " + lDevice.getLeft().getLineNumber() );
Pair< AnyLN,Integer > anyLN = SclUtilities.getAnyLN( lDevice.getLeft(), getLnClass(), getLnInst(), getPrefix() );
String mess4 = "LN( lnClass = " + getLnClass() + ", inst = " + getLnInst() + " )";
String mess4 = "LN( lnClass = " + getLnClass();
if( getLnInst() != null ) {
mess4 += ", inst = " + getLnInst();
if( getPrefix() != "" ) mess4 += ", prefix = " + getPrefix();
}
mess4 += " )";
if( anyLN.getLeft() == null ) {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess4, anyLN.getRight() );
return;
......
......@@ -2497,7 +2497,12 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef {
Pair< IED, LDevice > finalRes = Pair.of( ied.getLeft(), lDevice.getLeft() );
Pair< AnyLN,Integer > anyLN = SclUtilities.getAnyLN( lDevice.getLeft(), getLnClass(), getLnInst(), getPrefix() );
String mess2 = "LN( lnClass = " + getLnClass() + ", inst = " + getLnInst() + " )";
String mess2 = "LN( lnClass = " + getLnClass();
if( getLnInst() != null ) {
mess2 += ", inst = " + getLnInst();
if( getPrefix() != "" ) mess2 += ", prefix = " + getPrefix();
}
mess2 += " )";
if( anyLN.getLeft() == null ) {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess2, anyLN.getRight() );
return finalRes;
......@@ -2647,7 +2652,12 @@ public class ExtRefImpl extends BaseElementImpl implements ExtRef {
if( lDevice == null ) return;
Pair< AnyLN, Integer > anyLN = SclUtilities.getAnyLN( lDevice, getLnClass(), getLnInst(), getPrefix() );
String mess6 = "LN( lnClass = " + getLnClass() + ", inst = " + getLnInst() + " )";
String mess6 = "LN( lnClass = " + getLnClass();
if( getLnInst() != null ) {
mess6 += ", inst = " + getLnInst();
if( getPrefix() != "" ) mess6 += ", prefix = " + getPrefix();
}
mess6 += " )";
if( anyLN.getLeft() == null ) {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess6, anyLN.getRight() );
return;
......
......@@ -1098,7 +1098,12 @@ public class FCDAImpl extends SclObjectImpl implements FCDA {
console.verbose( messagePrefix + "found " + mess1 + " on line " + lDevice.getLeft().getLineNumber() );
Pair< AnyLN, Integer > anyLN = SclUtilities.getAnyLN( lDevice.getLeft(), getLnClass(), getLnInst(), getPrefix() );
String mess2 = "LN( lnClass = " + getLnClass() + ", inst = " + getLnInst() + " )";
String mess2 = "LN( lnClass = " + getLnClass();
if( getLnInst() != null ) {
mess2 += ", inst = " + getLnInst();
if( getPrefix() != "" ) mess2 += ", prefix = " + getPrefix();
}
mess2 += " )";
if( anyLN.getLeft() == null ) {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess2, anyLN.getRight() );
return;
......
......@@ -1257,7 +1257,12 @@ public class IEDNameImpl extends SclObjectImpl implements IEDName {
console.verbose( messagePrefix + "found " + mess3 + " on line " + lDevice.getLeft().getLineNumber() );
Pair< AnyLN,Integer > anyLN = SclUtilities.getAnyLN( lDevice.getLeft(), getLnClass(), getLnInst(), getPrefix() );
String mess4 = "LN( lnClass = " + getLnClass() + ", inst = " + getLnInst() + " )";
String mess4 = "LN( lnClass = " + getLnClass();
if( getLnInst() != null ) {
mess4 += ", inst = " + getLnInst();
if( getPrefix() != "" ) mess4 += ", prefix = " + getPrefix();
}
mess4 += " )";
if( anyLN.getLeft() == null ) {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess4, anyLN.getRight() );
return;
......
......@@ -962,13 +962,17 @@ public class LNodeImpl extends UnNamingImpl implements LNode {
}
console.verbose( messagePrefix + "found " + mess2 + " on line " + lDevice.getLeft().getLineNumber() );
// find inside an LN with
// LN.lnClass == LNode.lnClass
// LN.prefix == LNode.prefix
// LN.inst == LNode.lnInst
Pair< AnyLN, Integer > anyLN = SclUtilities.getAnyLN( lDevice.getLeft(), getLnClass(), getLnInst(), getPrefix() );
String mess3 = "LN( lnClass = " + getLnClass() + ", inst = " + getLnInst() + " )";
String mess3 = "LN( lnClass = " + getLnClass();
if( getLnInst() != null ) {
mess3 += ", inst = " + getLnInst();
if( getPrefix() != "" ) mess3 += ", prefix = " + getPrefix();
}
mess3 += " )";
if( anyLN.getLeft() == null ) {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess3, anyLN.getRight() );
return;
......
......@@ -1277,7 +1277,12 @@ public class LogControlImpl extends ControlWithTriggerOptImpl implements LogCont
}
Pair< AnyLN,Integer > anyLN = SclUtilities.getAnyLN( lDevice, getLnClass(), getLnInst(), getPrefix() );
String mess2 = "LN( lnClass = " + getLnClass() + ", inst = " + getLnInst() + " )";
String mess2 = "LN( lnClass = " + getLnClass();
if( getLnInst() != null ) {
mess2 += ", inst = " + getLnInst();
if( getPrefix() != "" ) mess2 += ", prefix = " + getPrefix();
}
mess2 += " )";
if( anyLN.getLeft() == null ) {
SclUtilities.displayNotFoundWarning( console, messagePrefix, mess2, anyLN.getRight() );
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment