32f26272ae
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>
784 lines
38 KiB
XML
784 lines
38 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>
|
|
<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>
|
|
<RTSCDEC><![CDATA[ #region Declarations
|
|
//Declare Runtime Class Variables here.
|
|
//Variables declared in this region are available to all methods
|
|
//in the Runtime Class.
|
|
|
|
|
|
]]></RTSCDEC>
|
|
<RTSCGetStatusDesc><![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;
|
|
}
|
|
]]></RTSCGetStatusDesc>
|
|
<RTSCSetScanState><![CDATA[ //------------------------------------------------------------------------------
|
|
// TODO: Runtime Event - SetScanState
|
|
//
|
|
// Perform actions when the object goes on or off scan.
|
|
//------------------------------------------------------------------------------
|
|
]]></RTSCSetScanState>
|
|
<RTSCInitialize><![CDATA[ //------------------------------------------------------------------------------
|
|
// TODO: Runtime - Initialize
|
|
//
|
|
// Do not read or write attribute values of this primitive during Initialize
|
|
//------------------------------------------------------------------------------
|
|
]]></RTSCInitialize>
|
|
<RTSCExecute><![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
|
|
]]></RTSCExecute>
|
|
<RTSCDynamic_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));
|
|
|
|
]]></RTSCDynamic_Attributes_Set_Handler>
|
|
<CTSCDEC><![CDATA[ #region Declarations
|
|
//Declare Configtime Class Variables here.
|
|
//Variables declared in this region are available to all methods
|
|
//in the Configtime Class.
|
|
|
|
|
|
]]></CTSCDEC>
|
|
<CTSCValidate><![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;
|
|
}
|
|
]]></CTSCValidate>
|
|
<CTSCInitialize><![CDATA[ //------------------------------------------------------------------------------
|
|
// TODO: Configtime Event - Initialize
|
|
//
|
|
// Any custom initialization can be done here, including caching of attribute
|
|
// values, primitive IDs etc.
|
|
//------------------------------------------------------------------------------
|
|
]]></CTSCInitialize>
|
|
<CTSCMigrate><![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
|
|
]]></CTSCMigrate>
|
|
<CTSCPreValidate><![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.
|
|
//------------------------------------------------------------------------------
|
|
]]></CTSCPreValidate>
|
|
<CTSCPostCreate><![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
|
|
]]></CTSCPostCreate>
|
|
<CTSCDynamic_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));
|
|
|
|
]]></CTSCDynamic_Attributes_Set_Handler>
|
|
<RTSOShutdown><![CDATA[ //------------------------------------------------------------------------------
|
|
// TODO: Runtime Event - Shutdown
|
|
//
|
|
// Clean up dynamic allocation, release open resources, etc.
|
|
//------------------------------------------------------------------------------
|
|
|
|
// Activate marked attributes before shutting down
|
|
AdviseOnlyActivateAttributes();
|
|
]]></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();
|
|
|
|
m_TimeOfLastChange = GetScanTime();
|
|
|
|
// Execute offscan code to initialize the object in its offscan state.
|
|
SetScanState(false);
|
|
|
|
// Suspend marked attributes at startup
|
|
AdviseOnlySuspendAttributes();
|
|
|
|
]]></RTSOStartup><RTSCShutdown><![CDATA[ //------------------------------------------------------------------------------
|
|
// TODO: Runtime Event - Shutdown
|
|
//
|
|
// Clean up dynamic allocation, release open resources, etc.
|
|
//------------------------------------------------------------------------------
|
|
|
|
// Activate marked attributes before shutting down
|
|
AdviseOnlyActivateAttributes();
|
|
]]></RTSCShutdown><RTSCStartup><![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);
|
|
|
|
// Suspend marked attributes at startup
|
|
AdviseOnlySuspendAttributes();
|
|
]]></RTSCStartup></CCData>
|
|
<Build Attach_Runtime_Debugger="False" Attach_IDE_Debugger="False" Enable_Migrate="False" Copy_Reusable="True" Copy_Output="False" Output_Path="" Attach_Configuration_Debugger="False" />
|
|
<Version Restart_Bootstrap="False" Version_Type="Retain" Restart_GR="False" AppendDelete_Version="Delete" Restart_IDE="False" />
|
|
<BuildInfo>
|
|
<OutputDir><![CDATA[..\Output\]]></OutputDir>
|
|
<Project CreateAADEF="True">
|
|
<FullOutputFileName><![CDATA[..\Stats\Statsobj\bin\Debug\WatchDogStats1.dll]]></FullOutputFileName>
|
|
<OutputPath><![CDATA[..\Stats\Statsobj\bin\Debug\]]></OutputPath>
|
|
<ProjectPath><![CDATA[..\Stats\Statsobj]]></ProjectPath>
|
|
<ClassName>ArchestrA.Toolkit.Watchdog.Stats</ClassName>
|
|
<DependentFiles>
|
|
<dep>
|
|
<name><![CDATA[WatchDogStats1RC.dll]]></name>
|
|
<vendor><![CDATA[ArchestrA]]></vendor>
|
|
<type>Runtime</type>
|
|
<fileType>ComDLL</fileType>
|
|
<def />
|
|
</dep>
|
|
<dep>
|
|
<name><![CDATA[WatchDogStats1.dll]]></name>
|
|
<vendor><![CDATA[ArchestrA]]></vendor>
|
|
<type>Runtime, Configtime</type>
|
|
<fileType>NETFrameworkAssembly</fileType>
|
|
</dep>
|
|
<dep>
|
|
<name><![CDATA[WatchDogStats1.reg]]></name>
|
|
<vendor><![CDATA[ArchestrA]]></vendor>
|
|
<type>Runtime, Configtime</type>
|
|
<fileType>MergeRegistryScript</fileType>
|
|
</dep>
|
|
<dep>
|
|
<name><![CDATA[WatchDogStatsRuntime1.dll]]></name>
|
|
<vendor><![CDATA[ArchestrA]]></vendor>
|
|
<type>Runtime</type>
|
|
<fileType>NETFrameworkAssembly</fileType>
|
|
</dep>
|
|
<dep>
|
|
<name><![CDATA[WatchDogStatsRuntime1.reg]]></name>
|
|
<vendor><![CDATA[ArchestrA]]></vendor>
|
|
<type>Runtime</type>
|
|
<fileType>MergeRegistryScript</fileType>
|
|
</dep>
|
|
<dep>
|
|
<name><![CDATA[WatchDogStatsConfigtime1.dll]]></name>
|
|
<vendor><![CDATA[ArchestrA]]></vendor>
|
|
<type>Configtime</type>
|
|
<fileType>NETFrameworkAssembly</fileType>
|
|
</dep>
|
|
<dep>
|
|
<name><![CDATA[WatchDogStatsConfigtime1.reg]]></name>
|
|
<vendor><![CDATA[ArchestrA]]></vendor>
|
|
<type>Configtime</type>
|
|
<fileType>MergeRegistryScript</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>
|
|
<attribute>
|
|
<name>Reset</name>
|
|
<run />
|
|
</attribute>
|
|
<FullName>WatchDogStats</FullName>
|
|
</DependentFiles>
|
|
</Project>
|
|
<Project TopMost="True" CreateAADEF="True">
|
|
<FullOutputFileName><![CDATA[bin\Debug\WatchDog1.dll]]></FullOutputFileName>
|
|
<OutputPath><![CDATA[bin\Debug\]]></OutputPath>
|
|
<ProjectPath><![CDATA[]]></ProjectPath>
|
|
<ClassName>ArchestrA.Toolkit.Watchdog.WatchDog</ClassName>
|
|
<DependentFiles>
|
|
<dep>
|
|
<name><![CDATA[WatchDog1RC.dll]]></name>
|
|
<vendor><![CDATA[ArchestrA]]></vendor>
|
|
<type>Runtime</type>
|
|
<fileType>ComDLL</fileType>
|
|
<def />
|
|
</dep>
|
|
<dep>
|
|
<name><![CDATA[WatchDog1.dll]]></name>
|
|
<vendor><![CDATA[ArchestrA]]></vendor>
|
|
<type>Runtime, Configtime</type>
|
|
<fileType>NETFrameworkAssembly</fileType>
|
|
</dep>
|
|
<dep>
|
|
<name><![CDATA[WatchDog1.reg]]></name>
|
|
<vendor><![CDATA[ArchestrA]]></vendor>
|
|
<type>Runtime, Configtime</type>
|
|
<fileType>MergeRegistryScript</fileType>
|
|
</dep>
|
|
<dep>
|
|
<name><![CDATA[WatchdogRuntime1.dll]]></name>
|
|
<vendor><![CDATA[ArchestrA]]></vendor>
|
|
<type>Runtime</type>
|
|
<fileType>NETFrameworkAssembly</fileType>
|
|
</dep>
|
|
<dep>
|
|
<name><![CDATA[WatchdogRuntime1.reg]]></name>
|
|
<vendor><![CDATA[ArchestrA]]></vendor>
|
|
<type>Runtime</type>
|
|
<fileType>MergeRegistryScript</fileType>
|
|
</dep>
|
|
<dep>
|
|
<name><![CDATA[WatchdogConfigtime1.dll]]></name>
|
|
<vendor><![CDATA[ArchestrA]]></vendor>
|
|
<type>Configtime</type>
|
|
<fileType>NETFrameworkAssembly</fileType>
|
|
</dep>
|
|
<dep>
|
|
<name><![CDATA[WatchdogConfigtime1.reg]]></name>
|
|
<vendor><![CDATA[ArchestrA]]></vendor>
|
|
<type>Configtime</type>
|
|
<fileType>MergeRegistryScript</fileType>
|
|
</dep>
|
|
<dep>
|
|
<name><![CDATA[WatchdogEditor1.dll]]></name>
|
|
<vendor><![CDATA[ArchestrA]]></vendor>
|
|
<type>Editor</type>
|
|
<fileType>NETFrameworkAssembly</fileType>
|
|
</dep>
|
|
<dep>
|
|
<name><![CDATA[WatchdogEditor1.reg]]></name>
|
|
<vendor><![CDATA[ArchestrA]]></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>WatchdogEditor1</editor>
|
|
<attribute>
|
|
<name>Stats_Enable</name>
|
|
<cfg />
|
|
</attribute>
|
|
<attribute>
|
|
<name>Timeout_Limit</name>
|
|
<cfg />
|
|
<run />
|
|
</attribute>
|
|
<FullName>WatchDog</FullName>
|
|
</DependentFiles>
|
|
</Project>
|
|
<Project>
|
|
<FullOutputFileName><![CDATA[..\WatchdogEditor\bin\Debug\WatchdogEditor1.dll]]></FullOutputFileName>
|
|
<OutputPath><![CDATA[..\WatchdogEditor\bin\Debug\]]></OutputPath>
|
|
<ProjectPath><![CDATA[..\WatchdogEditor]]></ProjectPath>
|
|
</Project>
|
|
<Project>
|
|
<FullOutputFileName><![CDATA[..\WatchdogConfigtime\bin\Debug\WatchdogConfigtime1.dll]]></FullOutputFileName>
|
|
<OutputPath><![CDATA[..\WatchdogConfigtime\bin\Debug\]]></OutputPath>
|
|
<ProjectPath><![CDATA[..\WatchdogConfigtime]]></ProjectPath>
|
|
</Project>
|
|
<Project>
|
|
<FullOutputFileName><![CDATA[..\WatchdogRuntime\bin\Debug\WatchdogRuntime1.dll]]></FullOutputFileName>
|
|
<OutputPath><![CDATA[..\WatchdogRuntime\bin\Debug\]]></OutputPath>
|
|
<ProjectPath><![CDATA[..\WatchdogRuntime]]></ProjectPath>
|
|
</Project>
|
|
<Project>
|
|
<FullOutputFileName><![CDATA[..\Stats\StatsConfigtime\bin\Debug\WatchDogStatsConfigtime1.dll]]></FullOutputFileName>
|
|
<OutputPath><![CDATA[..\Stats\StatsConfigtime\bin\Debug\]]></OutputPath>
|
|
<ProjectPath><![CDATA[..\Stats\StatsConfigtime]]></ProjectPath>
|
|
</Project>
|
|
<Project>
|
|
<FullOutputFileName><![CDATA[..\Stats\StatsRuntime\bin\Debug\WatchDogStatsRuntime1.dll]]></FullOutputFileName>
|
|
<OutputPath><![CDATA[..\Stats\StatsRuntime\bin\Debug\]]></OutputPath>
|
|
<ProjectPath><![CDATA[..\Stats\StatsRuntime]]></ProjectPath>
|
|
</Project>
|
|
</BuildInfo>
|
|
</xml> |