Skip to content
Documentation

Example 1: Getting Started

This example covers the basics of the PowerTSM .NET API: creating an ITsm instance, creating objects, and accessing the stores of a configured repository. Each section is named after the corresponding method in the example.

The first method CreatingAnITsmInstance() only shows how to create the core ITsm interface. This object is the entry point to the .NET API and provides access to various factories and services.

The CreatingTsmObjects() method presents how objects can be created using static methods or factories from the ITsm instance.

Simpler objects using static methods:

var function = FunctionType.StepRight();
var intervalType = IntervalType.Minute();

Complex objects using the ITsm instance:

var tsm = ITsm.Create();
var interval = tsm.Intervals.Create(intervalType, 30);

The output of this example should look like this:

  • A StepRight function type
  • A Minute interval type
  • A 30-minute interval object

The AccessingTsmData() method demonstrates how to connect to a configured repository and access its stores:

var tsm = ITsm.Create();
var repository = await tsm.Repositories.Load("TSM_Example_Repository");
var attributeStore = await repository.GetAttributeStore();
var timeSeriesStore = await repository.GetTimeSeriesStore();

This method:

  1. Creates an ITsm instance
  2. Loads a repository named TSM_Example_Repository from the HAKOM.xml configuration
  3. Retrieves the attribute store
  4. Retrieves the time series store

Note that this method doesn’t perform any operations with the retrieved stores; it simply demonstrates how to access them.

© 2026 Volue.Version v0.6.38017 November 2026