SlideShare une entreprise Scribd logo
1  sur  34
Télécharger pour lire hors ligne
Practical usage of OPC
UA information models
Eero Laukkanen
Why to model?
Interoperability with
common information
models
Information
organization with
types and relations
How to model?
(server-side example)
Address space
Types Objects
1. Create types
Types Objects
Model
UaModeler
<UAObjectType NodeId="ns=1;i=1001" BrowseName="1:ValveType">
<DisplayName>ValveType</DisplayName>
<References>
<Reference ReferenceType="HasProperty">ns=1;i=6012</Reference>
<Reference ReferenceType="HasComponent">ns=1;i=6010</Reference>
<Reference ReferenceType="HasComponent">ns=1;i=6011</Reference>
<Reference ReferenceType="HasSubtype" IsForward="false">i=58</Reference>
</References>
</UAObjectType>
<UAVariable DataType="Date" ParentNodeId="ns=1;i=1001" NodeId="ns=1;i=6012" Browse
<DisplayName>BestBefore</DisplayName>
<References>
<Reference ReferenceType="HasModellingRule">i=78</Reference>
<Reference ReferenceType="HasTypeDefinition">i=68</Reference>
<Reference ReferenceType="HasProperty" IsForward="false">ns=1;i=1001</Refe
</References>
</UAVariable>
<UAVariable DataType="Double" ParentNodeId="ns=1;i=1001" NodeId="ns=1;i=6010" Brow
XML
TypesTypes
Model XML Types
<UAObjectType NodeId="ns=1;i=1001" BrowseName="1:ValveType">
<DisplayName>ValveType</DisplayName>
<References>
<Reference ReferenceType="HasProperty">ns=1;i=6012</Reference>
<Reference ReferenceType="HasComponent">ns=1;i=6010</Reference>
<Reference ReferenceType="HasComponent">ns=1;i=6011</Reference>
<Reference ReferenceType="HasSubtype" IsForward="false">i=58</Reference>
</References>
</UAObjectType>
<UAVariable DataType="Date" ParentNodeId="ns=1;i=1001" NodeId="ns=1;i=6012"
BrowseName="1:BestBefore" UserAccessLevel="3" AccessLevel="3">
<DisplayName>BestBefore</DisplayName>
<References>
<Reference ReferenceType="HasModellingRule">i=78</Reference>
<Reference ReferenceType="HasTypeDefinition">i=68</Reference>
<Reference ReferenceType="HasProperty"
IsForward="false">ns=1;i=1001</Reference>
</References>
</UAVariable>
<UAVariable DataType="Double" ParentNodeId="ns=1;i=1001" NodeId="ns=1;i=6010"
BrowseName="1:Flow" UserAccessLevel="3" AccessLevel="3">
<DisplayName>Flow</DisplayName>
<References>
<Reference ReferenceType="HasTypeDefinition">i=63</Reference>
<Reference ReferenceType="HasModellingRule">i=78</Reference>
<Reference ReferenceType="HasComponent"
IsForward="false">ns=1;i=1001</Reference>
</References>
</UAVariable>
<UAVariable DataType="Boolean" ParentNodeId="ns=1;i=1001" NodeId="ns=1;i=6011"
BrowseName="1:IsOpen" UserAccessLevel="3" AccessLevel="3">
<DisplayName>IsOpen</DisplayName>
<References>
<Reference ReferenceType="HasTypeDefinition">i=63</Reference>
<Reference ReferenceType="HasModellingRule">i=78</Reference>
<Reference ReferenceType="HasComponent"
IsForward="false">ns=1;i=1001</Reference>
</References>
</UAVariable>
MANUAL
2. Create objects
Types Objects
Java
classes
Application
code Objects
Model XML Types
MANUAL
MANUAL MANUAL
Problems?

Manual work

Error-prone

Solution?

Create objects
from the types

XML
Application
code
Objects
Model XML Types
MANUAL
MANUAL
Generate
Java classes

// using "pure" nodes
UaNode valve = …;
double flow = (Double) valve.getComponent("Flow").getValue();
boolean isOpen = (Boolean) valve.getComponent("IsOpen").getValue();
DateTime bestBefore = (DateTime)
valve.getProperty("BestBefore").getValue();
// using generated Java class
ValveType valve = …;
double flow = valve.getFlowValue();
Boolean isOpen = valve.getIsOpenValue();
DateTime bestBefore = valve.getBestBefore();
XML
Application
code
Objects
Model XML TypesXML
Java
classes
Application
code 
MANUAL
MANUAL
Ready yet?
Code generator
XML Templates
Generator
Java classes
public class {{name}} {
{{#fields}}
{{type}} {{name}};
{{/fields}}
}
public class ValveType {
double flow;
boolean isOpen;
DateTime bestBefore;
}
Creating objects
// create valve object
NodeManagerUaNode manager = …;
NodeId valveTypeId = …;
ValveType valve =
manager.createNodeWithTypeAndName(valveTypeId, "Valve1");
// add object to the address space
UaObject objects = manager.getNode(Identifiers.ObjectsFolder);
objects.addComponent(valve);
// use the object
valve.setFlowValue(0.674);
valve.setIsOpenValue(true);
DateTime bestBefore = DateTime.parseDateTime("2024-11-16");
valve.setBestBeforeValue(bestBefore);
Questions?
eero@prosysopc.com
prosysopc.com

Contenu connexe

Similaire à Practical usage of OPC UA information models

Data models pivot with splunk break out session
Data models pivot with splunk break out sessionData models pivot with splunk break out session
Data models pivot with splunk break out sessionGeorg Knon
 
SplunkLive! Data Models 101
SplunkLive! Data Models 101SplunkLive! Data Models 101
SplunkLive! Data Models 101Splunk
 
Data Models Breakout Session
Data Models Breakout SessionData Models Breakout Session
Data Models Breakout SessionSplunk
 
SplunkLive! Analytics with Splunk Enterprise
SplunkLive! Analytics with Splunk EnterpriseSplunkLive! Analytics with Splunk Enterprise
SplunkLive! Analytics with Splunk EnterpriseSplunk
 
ASP.net MVC CodeCamp Presentation
ASP.net MVC CodeCamp PresentationASP.net MVC CodeCamp Presentation
ASP.net MVC CodeCamp Presentationbuildmaster
 
Analytics with splunk - Advanced
Analytics with splunk - AdvancedAnalytics with splunk - Advanced
Analytics with splunk - Advancedjenny_splunk
 
SplunkLive! Analytics with Splunk Enterprise - Part 2
SplunkLive! Analytics with Splunk Enterprise - Part 2SplunkLive! Analytics with Splunk Enterprise - Part 2
SplunkLive! Analytics with Splunk Enterprise - Part 2Splunk
 
Handout for Metadata for Visual Resources
Handout for Metadata for Visual ResourcesHandout for Metadata for Visual Resources
Handout for Metadata for Visual ResourcesJenn Riley
 

Similaire à Practical usage of OPC UA information models (8)

Data models pivot with splunk break out session
Data models pivot with splunk break out sessionData models pivot with splunk break out session
Data models pivot with splunk break out session
 
SplunkLive! Data Models 101
SplunkLive! Data Models 101SplunkLive! Data Models 101
SplunkLive! Data Models 101
 
Data Models Breakout Session
Data Models Breakout SessionData Models Breakout Session
Data Models Breakout Session
 
SplunkLive! Analytics with Splunk Enterprise
SplunkLive! Analytics with Splunk EnterpriseSplunkLive! Analytics with Splunk Enterprise
SplunkLive! Analytics with Splunk Enterprise
 
ASP.net MVC CodeCamp Presentation
ASP.net MVC CodeCamp PresentationASP.net MVC CodeCamp Presentation
ASP.net MVC CodeCamp Presentation
 
Analytics with splunk - Advanced
Analytics with splunk - AdvancedAnalytics with splunk - Advanced
Analytics with splunk - Advanced
 
SplunkLive! Analytics with Splunk Enterprise - Part 2
SplunkLive! Analytics with Splunk Enterprise - Part 2SplunkLive! Analytics with Splunk Enterprise - Part 2
SplunkLive! Analytics with Splunk Enterprise - Part 2
 
Handout for Metadata for Visual Resources
Handout for Metadata for Visual ResourcesHandout for Metadata for Visual Resources
Handout for Metadata for Visual Resources
 

Plus de Eero Laukkanen

Comparison of release engineering practices in a large mature company and a s...
Comparison of release engineering practices in a large mature company and a s...Comparison of release engineering practices in a large mature company and a s...
Comparison of release engineering practices in a large mature company and a s...Eero Laukkanen
 
Towards continuous delivery by reducing the feature freeze period: a case study
Towards continuous delivery by reducing the feature freeze period: a case studyTowards continuous delivery by reducing the feature freeze period: a case study
Towards continuous delivery by reducing the feature freeze period: a case studyEero Laukkanen
 
Bottom-up Adoption of Continuous Delivery in a Stage-gate Managed Software Or...
Bottom-up Adoption of Continuous Delivery in a Stage-gate Managed Software Or...Bottom-up Adoption of Continuous Delivery in a Stage-gate Managed Software Or...
Bottom-up Adoption of Continuous Delivery in a Stage-gate Managed Software Or...Eero Laukkanen
 
Continuous Integration, Delivery and Deployment
Continuous Integration, Delivery and DeploymentContinuous Integration, Delivery and Deployment
Continuous Integration, Delivery and DeploymentEero Laukkanen
 
Stakeholder Perceptions of the Adoption of Continuous Integration – A Case Study
Stakeholder Perceptions of the Adoption of Continuous Integration – A Case StudyStakeholder Perceptions of the Adoption of Continuous Integration – A Case Study
Stakeholder Perceptions of the Adoption of Continuous Integration – A Case StudyEero Laukkanen
 
Build waiting time in continuous integration
Build waiting time in continuous integrationBuild waiting time in continuous integration
Build waiting time in continuous integrationEero Laukkanen
 

Plus de Eero Laukkanen (6)

Comparison of release engineering practices in a large mature company and a s...
Comparison of release engineering practices in a large mature company and a s...Comparison of release engineering practices in a large mature company and a s...
Comparison of release engineering practices in a large mature company and a s...
 
Towards continuous delivery by reducing the feature freeze period: a case study
Towards continuous delivery by reducing the feature freeze period: a case studyTowards continuous delivery by reducing the feature freeze period: a case study
Towards continuous delivery by reducing the feature freeze period: a case study
 
Bottom-up Adoption of Continuous Delivery in a Stage-gate Managed Software Or...
Bottom-up Adoption of Continuous Delivery in a Stage-gate Managed Software Or...Bottom-up Adoption of Continuous Delivery in a Stage-gate Managed Software Or...
Bottom-up Adoption of Continuous Delivery in a Stage-gate Managed Software Or...
 
Continuous Integration, Delivery and Deployment
Continuous Integration, Delivery and DeploymentContinuous Integration, Delivery and Deployment
Continuous Integration, Delivery and Deployment
 
Stakeholder Perceptions of the Adoption of Continuous Integration – A Case Study
Stakeholder Perceptions of the Adoption of Continuous Integration – A Case StudyStakeholder Perceptions of the Adoption of Continuous Integration – A Case Study
Stakeholder Perceptions of the Adoption of Continuous Integration – A Case Study
 
Build waiting time in continuous integration
Build waiting time in continuous integrationBuild waiting time in continuous integration
Build waiting time in continuous integration
 

Dernier

Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 

Dernier (20)

Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 

Practical usage of OPC UA information models

  • 1. Practical usage of OPC UA information models Eero Laukkanen
  • 10. <UAObjectType NodeId="ns=1;i=1001" BrowseName="1:ValveType"> <DisplayName>ValveType</DisplayName> <References> <Reference ReferenceType="HasProperty">ns=1;i=6012</Reference> <Reference ReferenceType="HasComponent">ns=1;i=6010</Reference> <Reference ReferenceType="HasComponent">ns=1;i=6011</Reference> <Reference ReferenceType="HasSubtype" IsForward="false">i=58</Reference> </References> </UAObjectType> <UAVariable DataType="Date" ParentNodeId="ns=1;i=1001" NodeId="ns=1;i=6012" Browse <DisplayName>BestBefore</DisplayName> <References> <Reference ReferenceType="HasModellingRule">i=78</Reference> <Reference ReferenceType="HasTypeDefinition">i=68</Reference> <Reference ReferenceType="HasProperty" IsForward="false">ns=1;i=1001</Refe </References> </UAVariable> <UAVariable DataType="Double" ParentNodeId="ns=1;i=1001" NodeId="ns=1;i=6010" Brow XML
  • 12. Model XML Types <UAObjectType NodeId="ns=1;i=1001" BrowseName="1:ValveType"> <DisplayName>ValveType</DisplayName> <References> <Reference ReferenceType="HasProperty">ns=1;i=6012</Reference> <Reference ReferenceType="HasComponent">ns=1;i=6010</Reference> <Reference ReferenceType="HasComponent">ns=1;i=6011</Reference> <Reference ReferenceType="HasSubtype" IsForward="false">i=58</Reference> </References> </UAObjectType> <UAVariable DataType="Date" ParentNodeId="ns=1;i=1001" NodeId="ns=1;i=6012" BrowseName="1:BestBefore" UserAccessLevel="3" AccessLevel="3"> <DisplayName>BestBefore</DisplayName> <References> <Reference ReferenceType="HasModellingRule">i=78</Reference> <Reference ReferenceType="HasTypeDefinition">i=68</Reference> <Reference ReferenceType="HasProperty" IsForward="false">ns=1;i=1001</Reference> </References> </UAVariable> <UAVariable DataType="Double" ParentNodeId="ns=1;i=1001" NodeId="ns=1;i=6010" BrowseName="1:Flow" UserAccessLevel="3" AccessLevel="3"> <DisplayName>Flow</DisplayName> <References> <Reference ReferenceType="HasTypeDefinition">i=63</Reference> <Reference ReferenceType="HasModellingRule">i=78</Reference> <Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=1001</Reference> </References> </UAVariable> <UAVariable DataType="Boolean" ParentNodeId="ns=1;i=1001" NodeId="ns=1;i=6011" BrowseName="1:IsOpen" UserAccessLevel="3" AccessLevel="3"> <DisplayName>IsOpen</DisplayName> <References> <Reference ReferenceType="HasTypeDefinition">i=63</Reference> <Reference ReferenceType="HasModellingRule">i=78</Reference> <Reference ReferenceType="HasComponent" IsForward="false">ns=1;i=1001</Reference> </References> </UAVariable> MANUAL
  • 14.
  • 21.
  • 24. // using "pure" nodes UaNode valve = …; double flow = (Double) valve.getComponent("Flow").getValue(); boolean isOpen = (Boolean) valve.getComponent("IsOpen").getValue(); DateTime bestBefore = (DateTime) valve.getProperty("BestBefore").getValue(); // using generated Java class ValveType valve = …; double flow = valve.getFlowValue(); Boolean isOpen = valve.getIsOpenValue(); DateTime bestBefore = valve.getBestBefore();
  • 29. public class {{name}} { {{#fields}} {{type}} {{name}}; {{/fields}} }
  • 30. public class ValveType { double flow; boolean isOpen; DateTime bestBefore; }
  • 32. // create valve object NodeManagerUaNode manager = …; NodeId valveTypeId = …; ValveType valve = manager.createNodeWithTypeAndName(valveTypeId, "Valve1"); // add object to the address space UaObject objects = manager.getNode(Identifiers.ObjectsFolder); objects.addComponent(valve); // use the object valve.setFlowValue(0.674); valve.setIsOpenValue(true); DateTime bestBefore = DateTime.parseDateTime("2024-11-16"); valve.setBestBeforeValue(bestBefore);
  • 33.