Files
wwtools/aot/Samples/Monitor/Monitor/AAObjectInfo.xml
T
Joseph Doherty 32f26272ae Initial commit: Wonderware / System Platform tools and reference
Five tools under one repo, all docs organized per DOCS-GUIDE.md:

- aalogcli: .NET 4.8 / x86 CliFx CLI for reading System Platform binary
  logs (*.aaLGX) for LLM debugging, built on aaOpenSource/aaLog. Commands:
  last, tail, range, unread, fields. Stable JSON envelope under --llm-json.
  Build template under lib/build/ for rebuilding aaLogReader.dll.

- aot: ArchestrA Object Toolkit 2014 v4.0 reference material. Dev guide
  (Markdown converted from CHM), API reference for the ArchestrA.Toolkit
  namespace, and the Monitor / Watchdog VS sample solutions.

- graccesscli: .NET 4.8 / x86 CliFx CLI that automates Galaxy
  configuration via the ArchestrA GRAccess COM interop. Includes session
  daemon, IPC protocol, and llm-json envelope contract.

- grdb: SQL/DDL exploration of the Galaxy Repository database. DDL
  captures, reusable queries, hierarchy / contained-name <-> tag-name
  translation notes.

- histdb: LLM-oriented reference for AVEVA Historian retrieval. INSQL
  linked-server, extension tables, every wwXxx time-domain extension,
  every retrieval mode, alarm/event SQL recipes, REST API. Distilled
  from the 243-page Historian Retrieval Guide.

Root contains:
- CLAUDE.md: thin index pointing into each tool's README.
- DOCS-GUIDE.md: doctrine for organizing docs for LLM consumption.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-03 18:22:20 -04:00

410 lines
19 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<xml>
<version>1</version>
<CCData>
<RTSODEC><![CDATA[ #region Declarations
//Declare Runtime Class Variables here.
//Variables declared in this region are available to all methods
//in the Runtime Class.
]]></RTSODEC>
<RTSOGetStatusDesc><![CDATA[ //------------------------------------------------------------------------------
// TODO: Runtime Event - GetStatusDesc
//
// This routine provides a String for an error code when a client requests it.
// By default this method looks for an entry in the dictionary that has the
// DetailedErrorCode as the PhraseID.
//
// You need to change this implmentation if you want to provide embedded values
// within your messages, or you want to use string PhraseIDs instead of integer
// PhraseIDs.
//------------------------------------------------------------------------------
switch (e.detailedErrorCode)
{
default:
e.status = GetText((int)e.detailedErrorCode);
break;
}
]]></RTSOGetStatusDesc>
<RTSOSetScanState><![CDATA[ //------------------------------------------------------------------------------
// TODO: Runtime Event - SetScanState
//
// Perform actions when the object goes on or off scan.
//------------------------------------------------------------------------------
]]></RTSOSetScanState>
<RTSOInitialize><![CDATA[ //------------------------------------------------------------------------------
// TODO: Runtime - Initialize
//
// Do not read or write attribute values of this primitive during Initialize
//------------------------------------------------------------------------------
]]></RTSOInitialize>
<RTSOExecute><![CDATA[ //------------------------------------------------------------------------------
// TODO: Runtime - Execute
//
// This is where the main logic of the object periodically executes when
// the object is on scan.
//
// Read or write the attributes of this primitive using the generated
// properties (Value, Quality).
//------------------------------------------------------------------------------
#region Example code
// // The lines below both increment the value of the attribute "Attribute1" by 1
// Example_001 ++;
// Example_001 = Example_001 + 1;
//
// //Example_001 quality is set to Bad on Condition_001 being true.
// Example_001.Quality = (Condition_001 ? DataQuality.DataQualityBad : DataQuality.DataQualityGood);
//
// // The attribute "ElapsedTime" contains the time elapsed since the last reset
// ElapsedTime = GetScanTime() - TimeOfLastReset;
//
// // Increment the 3rd element of an array
// FloatArray[3] ++;
//
// // Increment all the elements of an array
// for( short counter = 1; counter <= FloatArray.Length; counter ++)
// {
// FloatArray[counter] ++;
// }
#endregion
]]></RTSOExecute>
<RTSOShutdown><![CDATA[ //------------------------------------------------------------------------------
// TODO: Runtime Event - Shutdown
//
// Clean up dynamic allocation, release open resources, etc.
//------------------------------------------------------------------------------
]]></RTSOShutdown>
<RTSOStartup><![CDATA[ //------------------------------------------------------------------------------
// TODO: Runtime Event - Startup
//
// Cache attributes. Cache Primitive IDs of other known primitives.
//------------------------------------------------------------------------------
// RestoreDynamicAttributes will recreate the Dynamic Attributes and restore the check pointed
// values during failover startup. The Failover Support for Dynamic Attributes option must
// be enabled via the Object Editor to support this function. To maintain the
// Dynamic Attribute values the CheckpointDynamicAttributeData function must be called
// when Dynamic Attribute values are modified (refer to the Dynamic Attribute Set Handler).
//RestoreDynamicAttributes();
// Execute offscan code to initialize the object in its offscan state.
SetScanState(false);
]]></RTSOStartup>
<RTSODynamic_Attributes_Set_Handler><![CDATA[
string attrName = Get(e.attributeHandle.shAttributeId, e.attributeHandle.shPrimitiveId, EATTRIBUTEPROPERTY.idxAttribPropName);
//------------------------------------------------------------------------------
// TODO: Runtime Event - Dynamic Set Handler
//
// Implement set handler code for any dynamic attributes you create with set handlers
//------------------------------------------------------------------------------
// CheckpointDynamicAttributeData will update the checkpoint values for all Dynamic Attributes.
// To recreate Dynamic Attributes and restore Dynamic Attribute values the RestoreDynamicAttributes
// function must be called when starting up from failover (refer to the Startup method).
//CheckpointDynamicAttributeData();
#region Example
// if (attrName == "MyDynamic")
// {
// if (e.Value > 10)
// {
// LogWarning(string.Format("value for {0} must be less or equal to 10", attrName));
// }
// else
// {
// SetValue(attrName, e.Value);
// }
//
//
// return;
// }
#endregion
// if unhandled a warning is shown as a reminder
Set(e.attributeHandle.shAttributeId, e.attributeHandle.shPrimitiveId, e.Value);
LogWarning(string.Format("Uknown set handler for attribute '{0}'", attrName));
]]></RTSODynamic_Attributes_Set_Handler>
<CTSODEC><![CDATA[ #region Declarations
//Declare Configtime Class Variables here.
//Variables declared in this region are available to all methods
//in the Configtime Class.
]]></CTSODEC>
<CTSOValidate><![CDATA[ //------------------------------------------------------------------------------
// TODO: Configtime Event - Validate
//
// Validate sets the warning or error text for the object.
// It is used to check conditions that would not be checked using
// a SetHandler, such as reporting that an object was not
// configured, or that combinations of attributes are illegal.
//
// Other than calling AddWarningMessage or AddErrorMessage, Validate
// should never modify the state of the object.
//------------------------------------------------------------------------------
#region Example code
// if (MyTestDefaultState)
// {
// //Add a warning message using the dictionay phrase ID "ObjectStillInDefaultState"
// AddWarningMessage(GetText("ObjectStillInDefaultState"));
//
// //Change the status to Warning if the current status is Good
// if (status == EPACKAGESTATUS.ePackageGood)
// {
// status = EPACKAGESTATUS.ePackageWarning;
// }
// }
//
// if (MyTestAttributeCombinationValid)
// {
// //Add a warning message using the dictionay phrase ID "AttributeCombinationInvalid"
// AddWarningMessage(GetText("AttributeCombinationInvalid"));
//
// // Change the status to Warning if the current status is Good
// if (status == EPACKAGESTATUS.ePackageGood)
// {
// status = EPACKAGESTATUS.ePackageWarning;
// }
// }
#endregion
// By default set the object status to Good
status = EPACKAGESTATUS.ePackageGood;
// The following statement will exit validate when validating templates.
// Place code that should be validated in templates and instances before this
// statement. Code placed after this statement will execute in instances only.
if ((bool)Get((short)ECOMMONPRIMITIVE.idxCommonIsTemplate, eCommonPrimitiveId))
{
return;
}
]]></CTSOValidate>
<CTSOInitialize><![CDATA[ //------------------------------------------------------------------------------
// TODO: Configtime Event - Initialize
//
// Any custom initialization can be done here, including caching of attribute
// values, primitive IDs etc.
//------------------------------------------------------------------------------
]]></CTSOInitialize>
<CTSOMigrate><![CDATA[ //------------------------------------------------------------------------------
// TODO: Configtime Event - Migrate
//
// Migrate executes when importing a template into a Galaxy that contains
// a previous version (major) of the template. The template must be derived or
// instantiated for migrate to execute.
//
// Migrate provides access to the previous versions attribute information.
// A typical application for migrate code is to preserve attribute values
// when an attribute name has changed (refer to the Example code below).
//
// To enable this event the migrate option must be configured via the Toolkit
// Editor or in code (i.e. [ObjectAttributes.AMigrate("1","2")]).
//
// If no implementation is provided, the system will copy all attribute values
// from the old object to the new one by matching the attribute names.
//------------------------------------------------------------------------------
#region Example code
// //Check major version of previous template
// if (migrate.MajorVersion() == 1)
// {
// //Attribute "Eg_001" has been renamed to "Example_001".
// //Transfer attribute value, lock and security classification
// Example_001 = migrate.GetValue("Eg_001"); //Gets value
// Example_001.Locked = migrate.GetLocked("Eg_001"); //Gets lock status
// Example_001.Security = migrate.GetSecurity("Eg_001"); //Gets Security Classification
//
// //Transfer primitive values
// SetValue("Example_001.TrendHi", migrate.GetValue("Eg_001.TrendHi"));
// SetValue("Example_001.TrendHi", EATTRIBUTEPROPERTY.idxAttribPropLocked, migrate.GetLocked("Eg_001.TrendHi"));
//
// //Automatically migrate all child primitives
// migrate.AutoMigrateChildPrimitives = true;
// }
#endregion
]]></CTSOMigrate>
<CTSOPreValidate><![CDATA[ //------------------------------------------------------------------------------
// TODO: Configtime Event - PreValidate
//
// PreValidate is called when the object is about to be validated (e.g. when
// an edit session is ending and the object is about to be saved.)
//
// A primitive can modify attributes within this method.
//
// Note: It is often not necessary to perform any actions in OnPreValidate.
//------------------------------------------------------------------------------
]]></CTSOPreValidate>
<CTSOPostCreate><![CDATA[ //------------------------------------------------------------------------------
// TODO: Configtime Event - PostCreate
//
// OnPostCreate is called when an object is first created.
//
// One purpose for implementing this method is to insure that the initial
// state of the primitive is valid.
//
// This method can be used by a Resuable Primitive to correct invalid initial
// states that can arise when an attribute value has been overridden. If the
// attribute has a SetHandler with validation or side effects the SetHandler
// does not execute as overrides do not trigger SetHandlers.
//------------------------------------------------------------------------------
#region Example code
// // If statistics are enabled, add the Statistics virtual primitive
// // the way the SetHandler would have done it.
// if (StatsEnable)
// {
// AddPrimitive("Statistics", "Statistics1", "Statistics1");
// }
#endregion
]]></CTSOPostCreate>
<CTSODynamic_Attributes_Set_Handler><![CDATA[
string attrName = Get(e.attributeHandle.shAttributeId, e.attributeHandle.shPrimitiveId, EATTRIBUTEPROPERTY.idxAttribPropName);
//------------------------------------------------------------------------------
// TODO: Configtime Event - Dynamic Set Handler
//
// Implement set handler code for any dynamic attributes you create with set handlers
//------------------------------------------------------------------------------
#region Example
// if (attrName == "MyDynamic")
// {
// if (e.Value > 10)
// {
// LogWarning(string.Format("value for {0} must be less or equal to 10", attrName));
// }
// else
// {
// SetValue(attrName, e.Value);
// }
//
//
// return;
// }
#endregion
// if unhandled a warning is shown as a reminder
Set(e.attributeHandle.shAttributeId, e.attributeHandle.shPrimitiveId, e.Value);
LogWarning(string.Format("Uknown set handler for attribute '{0}'", attrName));
]]></CTSODynamic_Attributes_Set_Handler>
</CCData>
<BuildInfo>
<OutputDir><![CDATA[..\Output\]]></OutputDir>
<Project TopMost="True" CreateAADEF="True">
<FullOutputFileName><![CDATA[bin\Debug\Monitor5.dll]]></FullOutputFileName>
<OutputPath><![CDATA[bin\Debug\]]></OutputPath>
<ProjectPath><![CDATA[]]></ProjectPath>
<ClassName>ArchestrA.Toolkit.Monitor.Monitor</ClassName>
<DependentFiles>
<dep>
<name><![CDATA[Monitor5RC.dll]]></name>
<vendor><![CDATA[test]]></vendor>
<type>Runtime</type>
<fileType>ComDLL</fileType>
<def />
</dep>
<dep>
<name><![CDATA[Monitor5.dll]]></name>
<vendor><![CDATA[test]]></vendor>
<type>Runtime, Configtime</type>
<fileType>NETFrameworkAssembly</fileType>
</dep>
<dep>
<name><![CDATA[Monitor5.reg]]></name>
<vendor><![CDATA[test]]></vendor>
<type>Runtime, Configtime</type>
<fileType>MergeRegistryScript</fileType>
</dep>
<dep>
<name><![CDATA[MonitorRuntime5.dll]]></name>
<vendor><![CDATA[test]]></vendor>
<type>Runtime</type>
<fileType>NETFrameworkAssembly</fileType>
</dep>
<dep>
<name><![CDATA[MonitorRuntime5.reg]]></name>
<vendor><![CDATA[test]]></vendor>
<type>Runtime</type>
<fileType>MergeRegistryScript</fileType>
</dep>
<dep>
<name><![CDATA[MonitorConfigtime5.dll]]></name>
<vendor><![CDATA[test]]></vendor>
<type>Configtime</type>
<fileType>NETFrameworkAssembly</fileType>
</dep>
<dep>
<name><![CDATA[MonitorConfigtime5.reg]]></name>
<vendor><![CDATA[test]]></vendor>
<type>Configtime</type>
<fileType>MergeRegistryScript</fileType>
</dep>
<dep>
<name><![CDATA[MonitorEditor5.dll]]></name>
<vendor><![CDATA[test]]></vendor>
<type>Editor</type>
<fileType>NETFrameworkAssembly</fileType>
</dep>
<dep>
<name><![CDATA[MonitorEditor5.reg]]></name>
<vendor><![CDATA[test]]></vendor>
<type>Editor</type>
<fileType>MergeRegistryScript</fileType>
</dep>
<dep>
<name><![CDATA[C:\WINDOWS\assembly\GAC_MSIL\ArchestrA.Toolkit.ArchestrAControlLibrary\1.0.0.0__f787e550f2f530ee\ArchestrA.Toolkit.ArchestrAControlLibrary.dll]]></name>
<vendor><![CDATA[Wonderware]]></vendor>
<type>Runtime, Configtime, Editor</type>
<fileType>NETFrameworkAssembly</fileType>
</dep>
<dep>
<name><![CDATA[C:\WINDOWS\assembly\GAC_MSIL\ArchestrA.Toolkit.ArchestrAObjectSupport\1.0.0.0__f787e550f2f530ee\ArchestrA.Toolkit.ArchestrAObjectSupport.dll]]></name>
<vendor><![CDATA[Wonderware]]></vendor>
<type>Runtime, Configtime</type>
<fileType>NETFrameworkAssembly</fileType>
</dep>
<editor>MonitorEditor5</editor>
<attribute>
<name>ResetInputAvg</name>
<run />
</attribute>
<attribute>
<name>PVHiLimit</name>
<cfg />
<run />
</attribute>
<attribute>
<name>PV</name>
<run />
</attribute>
<FullName>Monitor</FullName>
</DependentFiles>
</Project>
<Project>
<FullOutputFileName><![CDATA[..\MonitorRuntime\bin\Debug\MonitorRuntime5.dll]]></FullOutputFileName>
<OutputPath><![CDATA[..\MonitorRuntime\bin\Debug\]]></OutputPath>
<ProjectPath><![CDATA[..\MonitorRuntime]]></ProjectPath>
</Project>
<Project>
<FullOutputFileName><![CDATA[..\MonitorConfigtime\bin\Debug\MonitorConfigtime5.dll]]></FullOutputFileName>
<OutputPath><![CDATA[..\MonitorConfigtime\bin\Debug\]]></OutputPath>
<ProjectPath><![CDATA[..\MonitorConfigtime]]></ProjectPath>
</Project>
<Project>
<FullOutputFileName><![CDATA[..\MonitorEditor\bin\Debug\MonitorEditor5.dll]]></FullOutputFileName>
<OutputPath><![CDATA[..\MonitorEditor\bin\Debug\]]></OutputPath>
<ProjectPath><![CDATA[..\MonitorEditor]]></ProjectPath>
</Project>
</BuildInfo>
<Build_Type><![CDATA[Build & Instantiate]]></Build_Type>
</xml>