Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DynamicModelGenerator java tool #519

Open
chenjing1294 opened this issue Aug 14, 2024 · 0 comments
Open

DynamicModelGenerator java tool #519

chenjing1294 opened this issue Aug 14, 2024 · 0 comments

Comments

@chenjing1294
Copy link

file location: tools/model_generator/src/com/libiec61850/scl/DataAttributeDefinition.java
Why do we update this.value repeatedly in the for loop?

for (int i = 0; i < elementNodes.getLength(); i++) {
	Node elementNode = elementNodes.item(i);
	if (elementNode.getNodeName().equals("Val")) {
		
		String value = elementNode.getTextContent();
		
		if (attributeType == AttributeType.ENUMERATED) {
			this.value = new DataModelValue(attributeType, this.type, value);
		} 
		else {
			try {
				this.value = new DataModelValue(attributeType, (SclType) null, value);
			} catch (IllegalValueException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
		}
			
	}	
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant