Search in sources :

Example 1 with BsdParser

use of org.eclipse.milo.opcua.binaryschema.parser.BsdParser in project milo by eclipse.

the class BsdParserTest method parseTypeDictionary.

@BeforeSuite
public void parseTypeDictionary() throws Exception {
    BsdParser parser = createBsdParser();
    DictionaryDescription dictionary = parser.parse(getClass().getClassLoader().getResourceAsStream("dictionaries/BsdParserTest.bsd.xml"));
    dictionary.getStructCodecs().forEach(cd -> codecTable.put(dictionary.getNamespaceUri(), cd.getDescription(), cd.getCodec()));
    dictionary.getEnumCodecs().forEach(cd -> codecTable.put(dictionary.getNamespaceUri(), cd.getDescription(), cd.getCodec()));
}
Also used : BsdParser(org.eclipse.milo.opcua.binaryschema.parser.BsdParser) DictionaryDescription(org.eclipse.milo.opcua.binaryschema.parser.DictionaryDescription) BeforeSuite(org.testng.annotations.BeforeSuite)

Aggregations

BsdParser (org.eclipse.milo.opcua.binaryschema.parser.BsdParser)1 DictionaryDescription (org.eclipse.milo.opcua.binaryschema.parser.DictionaryDescription)1 BeforeSuite (org.testng.annotations.BeforeSuite)1