How jorgesoap/aveva_trn works
Main Components
• Sample Exercises: The core of the project is composed of multiple exercises (Ex1, Ex2, Ex3, Ex4, Ex5) that each focus on a separate aspect of interacting with the PI System via the AFSDK.
• AF Database: The provided “AF Database - Green Power Company.xml” is central to the sample’s operation. It represents the external PI/AF data source that each exercise interacts with.
• Test Suite: The “Tests” folder contains test projects which are used both for unit-level and integrated testing of the sample solutions.
• Configuration & Build Infrastructure: Files like appsettings.placeholder.json (to be renamed and filled in as appsettings.json), Directory.Build.props, azure-pipelines.yml, and others support environment configuration, continuous integration, and enforcing coding styles.
Relationships and Interactions
• Test Projects → Exercise Projects: The test suite executes methods within the exercise projects to verify that each specific use case behaves as expected.
• Configuration Files → Exercise Projects and Tests: Global settings (such as configurations from app.config and appsettings.json) affect how the projects locate and interact with the AF Database.
• External Dependency → PI System Explorer/AF Database: The steps in the README indicate that users must import the provided AF database into PI System Explorer, which is a clear external dependency.
• CI/CD Infrastructure: Files like azure-pipelines.yml indicate integration with automated build and testing processes.
Architectural Patterns and Design Principles
• Modular Design: Although these are sample exercises, each one is built as a separate module to demonstrate specific functionalities. This separation makes it easier to validate individual functionalities.
• Test-Driven Emphasis: The inclusion of tests for both unit and integration levels suggests that the project’s architecture is designed to encourage TDD practices.
• Configurability: The use of multiple config files (app.config, appsettings.json) emphasizes the importance of externalizing configurations.
• Simplistic and Educational Structure: As a “Getting Started” sample, the design intentionally focuses on clarity and step-by-step interaction with a core product (the PI System).