Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Build a third-party .NET module that appears as a native TagProvider in the Unified Namespace.

ReferenceCodeExtensions API → Extension Module API Reference

Overview

An Extension Module is a custom .NET assembly that FrameworX loads as a TagProvider, so a third-party system (analytics, AI, cloud service, custom logic) is browsable and read/write directly inside the Unified Namespace — no external gateway process. It is declared by a manifest whose <TagProvider> element carries IsExtensionModule="True".

The official starting point is the UnsModuleSample project shipped in the TagProviderTemplateAdvanced reference. A second project in the same reference, UnsTagDiscoverySample, demonstrates the Discovery pattern and historian access.

Table of Contents
maxLevel3
stylenone

In this section...

children


Anatomy

File

Role

*.config.xml

Manifest. Declares the provider and generates the configuration UI.

Util.cs

Static entry-point class. The methods the host calls, plus the delegate fields the host injects.

ConnectInfo.cs

Per-instance worker holding the namespace and value cache.

AssetInfo.cs

One node: Name, TypeName, Min, Max, EngUnits, Description, Value, Quality, UtcTimestamp.

Manifest

The <TagProvider> element identifies the provider type; IsExtensionModule="True" is what makes it an Extension Module. The <Station><Custom> block defines the positional, semicolon-separated configuration fields shown in the Designer.

Entry-point methods (host → module)

Method

Role

ParseConfiguration

Split the station string into a dictionary.

PrepareConnect / Connect / IsConnected / Disconnect

Connection lifecycle.

GetElementType

Return the type of a node.

GetChildrenElements

Browse the tree; returns a DataTable (schema below).

AddAsset / RemoveAsset

Register / unregister a node and its metadata.

ReadTagsValue

Batch read: returns a bool[] plus out values, qualities, UTC timestamps.

WriteHistorianData

Write a value to a node.

SetReadTime / SetActive / SetAccessMode

Optional lifecycle hooks (empty stubs in the template).

Host callbacks (module → host)

Delegate

Role

GetObjectValue / SetObjectValue

Read / write FrameworX tags from inside the module.

TraceMessageCallback / IsTraceEnabledCallback

Emit trace through the host pipeline.

GetChildrenElements DataTable schema

Fixed columns: Name, IsAttribute, HasChildren, HasAttributes, HasHistorian, Value, TimeStamp when includeValue, Type, Error, IsExcluded, IsHidden, IsDeleted, Separator. A branch row sets IsAttribute=false, HasChildren=true, Type="Object". A leaf row sets IsAttribute=true, Type to the node type, and fills Value/TimeStamp.

Data types

Node types use the FrameworX-internal vocabulary: Integer, Double, Text, Digital (also available: Float, Long, Short, Byte, DateTime, TextArray, Folder).

Getting started

  1. Copy the UnsModuleSample project as a starting point.
  2. Edit the manifest: set AssemblyName, DefaultName, and the <Station> configuration fields.
  3. Implement the namespace in ConnectInfo and the entry-point methods in Util.
  4. Build the class library (netstandard2.0) and place the DLL plus its .config.xml in the FrameworX Bin/Protocols folder.
  5. In the Designer, open Unified Namespace > Tag Provider Services, click Add > Extension Module, select your module, and link it to a folder in the Asset Tree.


If you need to access this API, contact us through support@tatsoft.com


In this section...

Page Tree
root@self