commit 32f26272ae02aee3b540776e64fd46794387eb69 Author: Joseph Doherty Date: Sun May 3 18:22:20 2026 -0400 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) diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0dc92d5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,25 @@ +# Build output +**/bin/ +**/obj/ +*.user +*.suo + +# OS / editor noise +.DS_Store +Thumbs.db +*.swp +.vs/ +.vscode/ +.idea/ + +# Local logs / scratch +*.log + +# NuGet caches +packages/ +.nuget/ + +# Don't commit the AVEVA DLL itself by default — it is reproduced from +# aalogcli/lib/build/ per the README recipe. Keep the build template, +# upstream license, and gitkeep so the folder structure is preserved. +aalogcli/lib/aaLogReader.dll diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..bb2b874 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,44 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## What this repo is + +A personal collection of reference material and tools for working with **AVEVA / Wonderware System Platform** (formerly Invensys / Wonderware): vendor documentation, sample projects, an active CLI codebase, and a SQL exploration of the Galaxy Repository — pulled together for offline reference and for grounding LLM-assisted work on Wonderware integrations. + +## How docs are organized + +This repo is consumed primarily by LLM coding agents. Documentation follows the rules in **[`DOCS-GUIDE.md`](DOCS-GUIDE.md)** — read it before adding or restructuring documentation. The short version: + +- This `CLAUDE.md` is a **thin index**: it points to tools, not into them. +- Each tool has its own `README.md` at its folder root that introduces the tool and routes into its deep docs. +- Deep documentation (API references, workflows, incident notes) lives inside each tool folder. + +When in doubt about where content belongs, default to pushing it deeper. `DOCS-GUIDE.md` has the full doctrine and the maintenance rules. + +## Layout + +- [`aalogcli/`](aalogcli/README.md) — `.NET Framework 4.8 / x86` CliFx-based CLI that reads System Platform binary logs (`*.aaLGX`) for LLM-driven debugging, built on the [aaOpenSource/aaLog](https://github.com/aaOpenSource/aaLog) reader library. +- [`aot/`](aot/README.md) — ArchestrA Object Toolkit 2014 v4.0 reference material (dev guide, API reference, sample VS solutions). +- [`graccesscli/`](graccesscli/README.md) — `.NET Framework 4.8 / x86` CliFx-based CLI for automating Galaxy configuration through the ArchestrA GRAccess COM interop. +- [`grdb/`](grdb/README.md) — SQL/DDL exploration of the Galaxy Repository SQL database (queries, schema, hierarchy/tag-name translation). +- [`histdb/`](histdb/README.md) — LLM-oriented reference for AVEVA Historian retrieval (extension tables, `wwXxx` time-domain extensions, retrieval modes/options, alarm-event SQL, REST API). Distilled from the official Historian Retrieval Guide. + +## Tool / resource index + +| Task | Go to | +| --- | --- | +| Read System Platform logs (last N records, last N minutes, ranges, incremental) — for LLM debugging | [`aalogcli/README.md`](aalogcli/README.md) | +| Anything AOT — object/primitive design, attributes, building, debugging, samples, API reference | [`aot/README.md`](aot/README.md) | +| Automate Galaxy configuration via GRAccess COM (CLI usage, session daemon, mutations, LLM integration) | [`graccesscli/README.md`](graccesscli/README.md) | +| Galaxy Repository SQL — connect, schema, hierarchy queries, contained-name ↔ tag-name translation | [`grdb/README.md`](grdb/README.md) | +| AVEVA Historian retrieval — SQL via `INSQL`, `wwXxx` extensions, retrieval modes/options, alarm/event SQL, REST API | [`histdb/README.md`](histdb/README.md) | + +## Maintaining this index + +Authoritative rules: **[`DOCS-GUIDE.md`](DOCS-GUIDE.md)**. The short version that applies here: + +- A new top-level tool requires a new `/README.md` first, then **one** row in the index above pointing to that README. Do not fan out per-file links at the root. +- A removed tool deletes its row in the same change. +- When a tool's internals change, update the tool's own README/deep docs — touch this file only if the task → tool mapping changed. +- If this file grows past ~150 lines or starts repeating tool-internal facts, refactor downward per `DOCS-GUIDE.md`. diff --git a/DOCS-GUIDE.md b/DOCS-GUIDE.md new file mode 100644 index 0000000..92ca17c --- /dev/null +++ b/DOCS-GUIDE.md @@ -0,0 +1,102 @@ +# DOCS-GUIDE.md + +How documentation in this repo is organized and written. The primary consumer of these docs is an **LLM coding agent** — the rules below are tuned for that, not for human browsing. + +## Why this matters + +LLM agents pay a real cost for every token they read. Documentation that is duplicated, buried, or scattered forces the agent to load more context than the task needs, which slows it down, blows the cache, and lets stale copies drift out of sync. The structure below exists to keep one fact in one place and let the agent reach it through the shortest path. + +## The three-layer structure + +``` +/ + CLAUDE.md # layer 1: thin index, pointers only + DOCS-GUIDE.md # this file + / + README.md # layer 2: tool entry point, router into deep docs + CLAUDE.md # (optional) tool-specific agent guide + AGENTS.md # (optional) coding-agent rules for this tool + /... # layer 3: deep documentation, one file per concept +``` + +Each layer has a strict job. If a piece of content fits two layers, it belongs in the deeper one — only the deeper layer is allowed to grow. + +### Layer 1 — root `CLAUDE.md`: thin index only + +`CLAUDE.md` answers exactly one question for the agent: **"Given this task, which tool's documentation do I open?"** Nothing else. + +Allowed content: + +- One paragraph: what this repo is. +- A `Layout` section: each tool folder, one line, with a link to its `README.md`. +- A `Tool / resource index` table: task → tool, where each cell links into the tool's `README.md` (or a specific deep doc when that's clearly the right entry point). +- Repo-wide conventions and a pointer to this `DOCS-GUIDE.md`. + +Disallowed content: + +- Tool-specific gotchas, API details, build commands, workflow steps, code samples, schema notes, incident histories. +- Any per-doc fan-out (long bulleted lists of every file inside a tool — that belongs in the tool's `README.md`). +- Anything that would have to change when a tool's internals change. Per-tool churn must stay inside the tool folder. + +If the agent has to read `CLAUDE.md` past the index to answer a tool-specific question, `CLAUDE.md` is too fat. Push the answer down a layer. + +**Rule of thumb:** if `CLAUDE.md` exceeds ~150 lines or repeats facts that already live inside a tool folder, refactor. + +### Layer 2 — `/README.md`: tool entry point + +Every top-level folder under the repo root is a "tool" — a discrete bundle of code, reference material, or both. **Every tool MUST have a `README.md` at its own root.** That README is a router, not a manual. + +Required sections, in this order: + +1. **One-sentence identification.** What the tool is, what it's for. +2. **Hard constraints / prerequisites.** Anything that, if missed, invalidates the rest of the doc — runtime, architecture, auth, admin requirements, vendor installs. Front-load these. +3. **Layout.** The folder shape with one-line descriptions of each immediate child. Don't catalog deeply; the agent can `ls`. +4. **Resource index.** Task → file table covering the tool's deep docs and any sibling agent guides (`CLAUDE.md`, `AGENTS.md`). +5. **Maintenance.** Pointer back to this `DOCS-GUIDE.md` and to `../CLAUDE.md`, with a note that both must be updated when the tool's surface changes. + +Disallowed: long prose tutorials, full API references, schema dumps, workflow walkthroughs. The README routes; the deep docs explain. + +### Layer 3 — deep documentation + +Workflow guides, API references, sample projects, incident notes, schema captures. The bulk of the bytes lives here. + +Rules: + +- **One file per cohesive concept.** Don't merge unrelated topics into a kitchen-sink doc. Don't fragment a single concept across five files because each step felt small. +- **Lead with a one-sentence summary** at the top of every file. Agents grep headers. +- **Cross-link explicitly** with `[label](relative/path.md)`. Bare filenames in prose are invisible to the renderer and to the agent's link-following. +- **Date and status time-sensitive material** (incident notes, regression tracking, "active defect" docs). Stale undated content is worse than no content. +- **Code samples must be runnable as stated.** If a snippet only works under a specific platform constraint, say so inline — don't rely on the reader having read the README first. + +## Writing conventions + +- Prefer **tables** for catalogs (task → resource, type → meaning), **numbered lists** for ordered procedures, **prose** for "why". +- **Don't duplicate content.** If the same fact would naturally live in two files, designate one canonical home and have the other link to it. Duplication is the #1 cause of doc drift. +- **Use relative paths** that resolve from the file's own location. Avoid absolute filesystem paths in cross-references. +- **No decorative chrome.** Skip emojis, banner art, "Welcome to..." intros, and trailing summaries that restate the doc. +- **Be concrete.** Name the file, the function, the command, the constraint. Vague guidance ("be careful with COM") wastes tokens. +- **Mark uncertainty.** If something is provisional or unverified, say so. Confident-sounding wrong content is the worst outcome for LLM consumers. + +## What goes where — quick test + +| Content | Goes in | +| --- | --- | +| "Which tool handles X?" | root `CLAUDE.md` index row | +| "What is this tool and what constrains it?" | `/README.md` | +| "How do I do task X with this tool?" | `//.md` | +| Tool API reference / type catalog | `//...` | +| Coding rules for an agent working in this tool | `/AGENTS.md` or `/CLAUDE.md` | +| Active incident / regression / defect | `/.md`, linked from the tool README | +| Cross-tool architectural rule | root `CLAUDE.md`, only if it can be violated without entering a tool folder | + +If you can answer the question by reading only the root `CLAUDE.md` index plus one `/README.md`, the structure is working. + +## Maintenance discipline + +- **New tool added →** create `/README.md` first, then add **one** row to the root `CLAUDE.md` index pointing to that README. Resist adding a per-file fan-out at the root. +- **Tool removed →** delete the row in `CLAUDE.md` in the same change. Orphaned index rows are worse than missing ones. +- **Doc renamed or moved →** grep the repo for the old path and fix every reference in the same change. Stale paths are the largest single source of LLM confusion in this repo. +- **Tool internals change →** update the tool's own README and deep docs; touch the root `CLAUDE.md` only if the task → tool mapping changed. +- **`CLAUDE.md` exceeds ~150 lines, or starts repeating tool-internal facts →** refactor. Pull content down into the appropriate tool's README.md or deep docs. + +When in doubt, ask: *would a different tool's agent ever need this?* If no, it doesn't belong at the root. diff --git a/aalogcli/AGENTS.md b/aalogcli/AGENTS.md new file mode 100644 index 0000000..9e635f6 --- /dev/null +++ b/aalogcli/AGENTS.md @@ -0,0 +1,83 @@ +# AGENTS.md + +Guidance for coding agents working in the `aalogcli` folder. + +## Project Snapshot + +This folder contains `aalogcli` (assembly name `aalog`), a `.NET Framework 4.8 / x86` CliFx-based CLI for reading AVEVA / Wonderware System Platform binary log files (`*.aaLGX`). It wraps the third-party reader library [`aaOpenSource/aaLog`](https://github.com/aaOpenSource/aaLog) and exposes it as `last`, `tail`, `range`, `unread`, and `fields` commands tailored for LLM-driven debugging (stable JSON envelope, bounded payloads, post-fetch filters). + +For end-to-end command reference and examples, read [`docs/usage.md`](docs/usage.md). For the JSON shape of an emitted record, read [`docs/fields.md`](docs/fields.md). For the upstream reader's API (used by [`LogReaderFactory.cs`](src/AaLog.Cli/LogReaderFactory.cs) and the commands), see the [aaLog README](https://github.com/aaOpenSource/aaLog). + +## Key Documentation + +All paths are relative to this `aalogcli/` folder. + +- [`README.md`](README.md) — tool entry point, hard constraints, build instructions. +- [`docs/usage.md`](docs/usage.md) — every command, every option, with worked examples for the LLM-JSON envelope. +- [`docs/fields.md`](docs/fields.md) — `LogRecordDto` field reference; the canonical shape of records in `--llm-json` output. + +## Repository Layout + +```text +aalogcli/ + AaLog.Cli.slnx + lib/aaLogReader.dll (provisioned out-of-band — see README) + src/AaLog.Cli/ + AaLog.Cli.csproj + Program.cs + LogReaderFactory.cs + Commands/ + CommonOptions.cs (ReadCommandBase — shared options) + LastCommand.cs (`last` — last N records) + TailCommand.cs (`tail` — last N minutes) + RangeCommand.cs (`range` — explicit start/end) + UnreadCommand.cs (`unread`— incremental, cache-backed) + FieldsCommand.cs (`fields`— field reference printout) + Output/ + LogRecordDto.cs (LLM-friendly subset of aaLogReader.LogRecord) + OutputWriter.cs (human single-line + llm-json envelope) + Filtering/ + RecordFilter.cs (substring / regex over Component, Level, Message) + IsExternalInit.cs (C# 9 `init` polyfill for net48) +``` + +## Build And Test + +Run commands from this `aalogcli` folder unless noted otherwise. + +```powershell +dotnet build src/AaLog.Cli/AaLog.Cli.csproj -p:Platform=x86 -c Release +dotnet run --project src/AaLog.Cli/AaLog.Cli.csproj -- +``` + +There is no test project at present. If you add one, mirror `graccesscli`'s convention: `tests/AaLog.Cli.Tests/AaLog.Cli.Tests.csproj`, `net48` / `x86`, xunit + Shouldly. + +## Implementation Rules + +- Keep the CLI targeting `net48` and `x86`. The upstream `aaLogReader` is net40 — net48 loads it cleanly, .NET 10 / x64 will not. +- Do **not** add a `[STAThread]` apartment requirement. Unlike `graccesscli`, `aaLogReader` is plain managed file I/O and runs fine on any thread. +- Construct readers through [`LogReaderFactory.Open`](src/AaLog.Cli/LogReaderFactory.cs) so every command honors `--log-dir` the same way. +- Always wrap the reader in `using` — it implements `IDisposable` and holds a `FileStream`. +- Treat the upstream library as authoritative for log decoding. Do not reimplement aaLGX parsing in this CLI. +- Filtering is **client-side**, after the library returns records. Do not push filter strings into `OptionsStruct.LogRecordPostFilters` from the CLI layer — surface stays flatter that way. +- Every read command must inherit [`ReadCommandBase`](src/AaLog.Cli/Commands/CommonOptions.cs) so `--log-dir` / `--component` / `--level` / `--message` / `--regex` / `--llm-json` stay consistent. +- `--llm-json` envelope shape is `{ query: {...}, count: N, records: [LogRecordDto, ...] }`. Preserve the envelope contract — agents may parse it positionally. +- `LogRecordDto` is the JSON contract. Adding a field is a non-breaking change; renaming or removing one is breaking — bump the docs in the same commit and call it out. +- C# language version is 9.0. `init` is supported through `IsExternalInit.cs`; do not use the `required` keyword. +- Use CliFx command patterns: `[Command]`, `[CommandOption]`, classes implement `ICommand`. + +## Output Contracts + +| Mode | Trigger | Shape | +| --- | --- | --- | +| Human | default | One line per record: `[localTs] [level] component (process#pid/tid) \| message` | +| LLM-JSON | `--llm-json` | `{ "query": {...}, "count": N, "records": [LogRecordDto, ...] }` | + +The `query` object echoes the invocation parameters so an agent reading the JSON can confirm which window it actually got. `log_dir` in the query is the **resolved** directory (post-`--log-dir` override), so it doubles as a sanity check. + +## Adding A New Command + +1. Add `Commands/Command.cs` inheriting `ReadCommandBase` and implementing `ICommand`. +2. If it introduces a new query verb (e.g. `since-message-number`), wrap the corresponding `aaLogReader` method in `LogReaderFactory` or inline; document the verb in [`docs/usage.md`](docs/usage.md). +3. Add a row in [`README.md`](README.md) and [`docs/usage.md`](docs/usage.md). Do not modify `../CLAUDE.md` — the root index points at this README and that is sufficient. +4. Keep `--llm-json` envelope semantics identical across commands (`query`, `count`, `records`). diff --git a/aalogcli/AaLog.Cli.slnx b/aalogcli/AaLog.Cli.slnx new file mode 100644 index 0000000..db2629f --- /dev/null +++ b/aalogcli/AaLog.Cli.slnx @@ -0,0 +1,5 @@ + + + + + diff --git a/aalogcli/README.md b/aalogcli/README.md new file mode 100644 index 0000000..5fdc15e --- /dev/null +++ b/aalogcli/README.md @@ -0,0 +1,95 @@ +# aalogcli + +A `.NET Framework 4.8 / x86` CLI for reading the AVEVA / Wonderware **System Platform** binary log files (`*.aaLGX`) — built on the [aaOpenSource/aaLog](https://github.com/aaOpenSource/aaLog) reader library and tuned for LLM-driven debugging (last N records, last N minutes, explicit time ranges, incremental "unread" polling, JSON envelope output). + +## Hard constraints + +- **Default log directory is `C:\ProgramData\ArchestrA\LogFiles`**, which only exists on a host running System Platform / Application Server. Override with `--log-dir ` when reading copied logs. +- **`lib/aaLogReader.dll` must be provisioned before building** — `aaLog` is not on NuGet. See [Provisioning aaLogReader.dll](#provisioning-aalogreaderdll). +- **Target framework is `net48`, platform `x86`** to match the upstream library and stay aligned with `graccesscli`. Do not retarget to .NET 10 / x64. +- **Filtering is post-fetch**, so `--component` / `--level` / `--message` narrow the result set the library returns; they do not push down into the binary scan. + +## Layout + +```text +aalogcli/ + AaLog.Cli.slnx + README.md this file + AGENTS.md agent guidance for working in this folder + lib/ + aaLogReader.dll (not committed — see provisioning section) + src/AaLog.Cli/ + AaLog.Cli.csproj + Program.cs + LogReaderFactory.cs + Commands/ last, tail, range, unread, fields + Output/ LogRecordDto, OutputWriter (human + llm-json) + Filtering/ post-fetch substring/regex filter + docs/ + usage.md command surface, options, examples + fields.md LogRecord JSON field reference +``` + +## Resource index — by task + +| Task | Go to | +| --- | --- | +| Agent rules for editing this CLI | [`AGENTS.md`](AGENTS.md) | +| Run the CLI / option reference / example invocations | [`docs/usage.md`](docs/usage.md) | +| `LogRecord` JSON field shape and types | [`docs/fields.md`](docs/fields.md) | +| Upstream reader library (license, source, build) | [aaOpenSource/aaLog on GitHub](https://github.com/aaOpenSource/aaLog) | +| LLM JSON envelope contract | [`docs/usage.md`](docs/usage.md#llm-json-envelope) | + +## Provisioning `aaLogReader.dll` + +The upstream library is GitHub-only, targets .NET 4.0, and ships with a legacy MSBuild `.csproj` plus a `packages.config` — none of which the modern .NET SDK 10 build pipeline restores cleanly. The recipe below rebuilds it as an SDK-style net48 project; this is the path that's been verified end-to-end on this repo. + +If you have Visual Studio with full MSBuild + NuGet on PATH and prefer the upstream csproj as-is, that works too — just produce `aaLogReader.dll` somehow and drop it in `lib/`. + +### SDK-style rebuild recipe (verified) + +```powershell +# 1. Clone upstream sources somewhere outside this repo: +git clone https://github.com/aaOpenSource/aaLog.git $env:TEMP\aaLog + +# 2. Create a sibling build folder with the SDK csproj from this repo's +# aalogcli/lib/build/aaLogReader.csproj template (see below). +mkdir $env:TEMP\aaLogReader-build +copy \aalogcli\lib\build\aaLogReader.csproj $env:TEMP\aaLogReader-build\ + +# 3. Two source files need a one-line patch — they reference [CallerMemberName] +# behind an #if NET45_OR_GREATER guard but never `using System.Runtime.CompilerServices;`. +# Copy the templates from this repo's lib/build/patched/ into a sibling folder: +mkdir $env:TEMP\aaLogReader-build\patched +copy \aalogcli\lib\build\patched\*.cs $env:TEMP\aaLogReader-build\patched\ + +# 4. Build and copy out: +cd $env:TEMP\aaLogReader-build +dotnet build -c Release +copy bin\Release\net48\aaLogReader.dll \aalogcli\lib\aaLogReader.dll +``` + +The csproj template sets `false` (the upstream `AssemblyInfo.cs` uses `[assembly: AssemblyVersion("1.0.*")]`) and pins `Newtonsoft.Json 13.0.3` / `log4net 2.0.15` to match what `aalog` itself uses, so there are no transitive-version conflicts at runtime. + +`aaLogReader.dll` only needs to land in `lib/`. `Newtonsoft.Json.dll` and `log4net.dll` are pulled in via NuGet by `aalog` itself and end up next to `aalog.exe` automatically. + +## Build & run + +```powershell +dotnet build src/AaLog.Cli/AaLog.Cli.csproj -p:Platform=x86 -c Release + +# Last 50 records, human readable: +dotnet run --project src/AaLog.Cli/AaLog.Cli.csproj -- last + +# Last 5 minutes, error-level only, JSON envelope for an LLM: +dotnet run --project src/AaLog.Cli/AaLog.Cli.csproj -- tail --minutes 5 --level Error --llm-json + +# Explicit range with regex message filter: +dotnet run --project src/AaLog.Cli/AaLog.Cli.csproj -- range --from 2026-05-03T08:00 --to 2026-05-03T09:00 --message "Galaxy.*timeout" --regex --llm-json +``` + +The built executable is `bin\Release\net48\aalog.exe` — drop it on `PATH` and use `aalog last -n 100`. + +## Maintenance + +This README follows the project doctrine in [`../DOCS-GUIDE.md`](../DOCS-GUIDE.md). When you add a command, an option, or a new field to the DTO, update [`docs/usage.md`](docs/usage.md) and [`docs/fields.md`](docs/fields.md) in the same change. The root [`../CLAUDE.md`](../CLAUDE.md) holds one row pointing at this README — it should not need to change unless the tool's task surface changes. diff --git a/aalogcli/docs/fields.md b/aalogcli/docs/fields.md new file mode 100644 index 0000000..2d71e1c --- /dev/null +++ b/aalogcli/docs/fields.md @@ -0,0 +1,33 @@ +# aalog — LogRecord field reference + +The `--llm-json` envelope emits records of shape `LogRecordDto`, an LLM-friendly subset of the upstream [`aaLogReader.LogRecord`](https://github.com/aaOpenSource/aaLog/blob/master/aaLogReader/Types/LogRecord.cs) (declared in the bare `aaLogReader` namespace despite the file path). File-format internals (`RecordLength`, `OffsetToPrevRecord`, `OffsetToNextRecord`) and the redundant `EventDate` / `EventTime` / `EventMillisec` triple are dropped. + +## Fields + +| Field | Type | Source | Meaning | +| --- | --- | --- | --- | +| `MessageNumber` | `ulong` | `LogRecord.MessageNumber` | Monotonic record id assigned by the logger. Stable across reads of the same log directory; useful as a cursor. | +| `TimestampUtc` | `string` | `LogRecord.EventDateTimeUtc` | Event time in UTC, ISO-8601 with `Z` suffix and millisecond precision (`2026-05-03T13:59:42.117Z`). | +| `TimestampLocal` | `string` | `LogRecord.EventDateTimeLocal`| Event time in the host's local zone, ISO-8601 without offset (`2026-05-03T08:59:42.117`). | +| `Level` | `string` | `LogRecord.LogFlag` | Severity / category. Common values: `Info`, `Warning`, `Error`, `Trace`, `Debug`. | +| `Component` | `string` | `LogRecord.Component` | Originating subsystem (e.g. `aaEngine`, `Bootstrap`, `aaGR`, `aaIDE`). Best filter axis for narrowing scope. | +| `ProcessName` | `string` | `LogRecord.ProcessName` | Name of the OS process that emitted the record. | +| `ProcessId` | `uint` | `LogRecord.ProcessID` | OS process id. | +| `ThreadId` | `uint` | `LogRecord.ThreadID` | OS thread id within the process. | +| `SessionId` | `string` | `LogRecord.SessionID` | Session identifier; often empty. | +| `Host` | `string` | `LogRecord.HostFQDN` | Fully-qualified host name at time of emission. | +| `Message` | `string` | `LogRecord.Message` | Free-form message body. | + +## Backward / forward compatibility + +- **Adding a new field** to `LogRecordDto` is non-breaking. Agents that pin the existing field set continue to work. +- **Renaming or removing a field** is breaking. If it ever happens, bump this doc and the `--llm-json` example in [`usage.md`](usage.md) in the same change. +- The upstream library's underlying `LogRecord` may change shape across `aaLogReader.dll` versions. The CLI shields callers from that — only fields mapped explicitly in `LogRecordDto.From` ([`src/AaLog.Cli/Output/LogRecordDto.cs`](../src/AaLog.Cli/Output/LogRecordDto.cs)) reach the JSON envelope. + +## Quick reference at runtime + +```powershell +aalog fields +``` + +prints the same field list to stdout in plain text — useful when the caller can't load this file. diff --git a/aalogcli/docs/usage.md b/aalogcli/docs/usage.md new file mode 100644 index 0000000..ced1f62 --- /dev/null +++ b/aalogcli/docs/usage.md @@ -0,0 +1,137 @@ +# aalog — usage + +Command surface for the `aalog` CLI. The tool reads AVEVA / Wonderware System Platform binary logs (`*.aaLGX`) under `C:\ProgramData\ArchestrA\LogFiles` (override with `--log-dir`). + +## Common options + +Inherited by `last`, `tail`, `range`, and `unread`: + +| Option | Default | Notes | +| --- | --- | --- | +| `--log-dir ` | `C:\ProgramData\ArchestrA\LogFiles` | Read from a copied-out log directory. | +| `--component ` | (none) | Substring match against `Component`. With `--regex`, treated as a regex. | +| `--level ` | (none) | Substring/regex against `LogFlag` (`Info`, `Warning`, `Error`, `Trace`, …). | +| `--message ` | (none) | Substring/regex against the message body. | +| `--regex` | off | Switch all three pattern options to regex (case-insensitive). | +| `--llm-json` | off | Emit the stable JSON envelope instead of human-readable lines. | + +## Commands + +### `aalog last` + +Most recent N records ending at `now` (or `--until`). + +| Option | Default | Notes | +| --- | --- | --- | +| `-n`, `--count ` | `50` | How many records to return. | +| `--until ` | now | ISO-8601 local time anchor for the end of the window. | + +```powershell +aalog last # last 50, human readable +aalog last -n 200 --llm-json # last 200, JSON envelope +aalog last --component aaEngine --level Error -n 100 +``` + +### `aalog tail` + +Records from the last N minutes. + +| Option | Default | Notes | +| --- | --- | --- | +| `-m`, `--minutes ` | `10` | Window length in minutes. Must be positive. | +| `--max ` | `1000` | Hard cap on records returned (keeps LLM payloads bounded). | + +```powershell +aalog tail # last 10 minutes +aalog tail -m 60 --level Error --llm-json # last hour, errors only, JSON +aalog tail -m 5 --message "checkpoint failed" --regex +``` + +### `aalog range` + +Explicit start/end timestamps. + +| Option | Default | Notes | +| --- | --- | --- | +| `--from ` | (required) | Start timestamp, ISO-8601 local time. | +| `--to ` | now | End timestamp, ISO-8601 local time. Must be later than `--from`. | +| `--max ` | `1000` | Hard cap on records returned. | + +```powershell +aalog range --from 2026-05-03T08:00 --to 2026-05-03T09:00 --llm-json +aalog range --from 2026-05-03T14:30:00 --component "Galaxy" --level Warning +``` + +### `aalog unread` + +Incremental polling. Uses the upstream library's cache file (under `%LOCALAPPDATA%\aaLogReader\` by default) to remember the last record ID seen, so successive invocations only return what's new. + +| Option | Default | Notes | +| --- | --- | --- | +| `--max ` | `1000` | Maximum unread records to return. | +| `--ignore-cache` | off | Re-read regardless; the next call resumes from the new high-water mark. | +| `--client-id ` | (none) | Distinct cache files for parallel consumers. | + +```powershell +aalog unread --llm-json # everything new since last call +aalog unread --client-id watchdog --max 200 # independent cache for this consumer +``` + +### `aalog fields` + +Print the LogRecord JSON field reference and exit. Same content as [`fields.md`](fields.md). + +```powershell +aalog fields +``` + +## LLM-JSON envelope + +When `--llm-json` is set, every read command writes a single JSON document to stdout: + +```json +{ + "query": { + "command": "tail", + "minutes": 5, + "start": "2026-05-03T08:55:00", + "end": "2026-05-03T09:00:00", + "max": 1000, + "component": null, + "level": "Error", + "message": null, + "regex": false, + "log_dir": "C:\\ProgramData\\ArchestrA\\LogFiles" + }, + "count": 3, + "records": [ + { + "MessageNumber": 18234021, + "TimestampUtc": "2026-05-03T13:59:42.117Z", + "TimestampLocal": "2026-05-03T08:59:42.117", + "Level": "Error", + "Component": "aaEngine", + "ProcessName": "aaEngine", + "ProcessId": 4128, + "ThreadId": 6884, + "SessionId": "", + "Host": "PROD-AS-01.example.local", + "Message": "Galaxy connection timeout after 30000ms" + } + ] +} +``` + +### Envelope guarantees + +- `query` echoes every parameter that affected the result, including the **resolved** `log_dir` after `--log-dir` is applied. Agents can confirm scope without re-running the command. +- `count == records.length`. +- `records` is sorted **newest first** for `last`, `tail`, `range`, and `unread`. +- Field names in `records[*]` match exactly what `aalog fields` prints. Adding new fields is non-breaking; renaming or removing them is. + +## Tips for LLM use + +- Cap aggressively. `--minutes 60 --max 200 --level Error` is more useful than dumping a thousand lines of `Trace`. +- Filter on `Component` first when chasing a specific subsystem (e.g. `aaEngine`, `Bootstrap`, `aaGR`). Levels alone are noisy. +- For follow-along debugging, prefer `unread --client-id ` so each agent has its own cache. +- Pair with `graccesscli` mutations: run a `graccess` command, then `aalog tail -m 1 --llm-json` to read the resulting log activity. diff --git a/aalogcli/lib/.gitkeep b/aalogcli/lib/.gitkeep new file mode 100644 index 0000000..916559c --- /dev/null +++ b/aalogcli/lib/.gitkeep @@ -0,0 +1,3 @@ +aaLogReader.dll must be dropped into this folder before building. + +See ../README.md "Provisioning aaLogReader.dll" for build instructions. diff --git a/aalogcli/lib/aaLogReader.LICENSE.txt b/aalogcli/lib/aaLogReader.LICENSE.txt new file mode 100644 index 0000000..af11524 --- /dev/null +++ b/aalogcli/lib/aaLogReader.LICENSE.txt @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright (c) 2014 Andy Robinson (Phase 2 Automation) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + diff --git a/aalogcli/lib/build/README.md b/aalogcli/lib/build/README.md new file mode 100644 index 0000000..cee7a4a --- /dev/null +++ b/aalogcli/lib/build/README.md @@ -0,0 +1,31 @@ +# aaLogReader build template + +Use these three files to rebuild `aaLogReader.dll` from upstream sources without depending on legacy MSBuild + `packages.config`. See [`../../README.md`](../../README.md) "Provisioning aaLogReader.dll" for the full step-by-step. + +## Files + +- [`aaLogReader.csproj`](aaLogReader.csproj) — SDK-style csproj targeting `net48`, references `Newtonsoft.Json 13.0.3` and `log4net 2.0.15`. Disables determinism (the upstream `AssemblyInfo.cs` uses a wildcarded `[assembly: AssemblyVersion("1.0.*")]`) and pulls in upstream source via relative `` globs. Two source files are excluded from those globs and replaced by the patched copies below. +- [`patched/LogRecord.cs`](patched/LogRecord.cs) — upstream `aaLogReader/Types/LogRecord.cs` with `using System.Runtime.CompilerServices;` added. +- [`patched/LogHeader.cs`](patched/LogHeader.cs) — same patch applied to `aaLogReader/Types/LogHeader.cs`. + +## Why the patches + +The upstream files reference `[CallerMemberName]` inside an `#if NET45_OR_GREATER` branch but never `using System.Runtime.CompilerServices;`. The original csproj only defined `NET45_OR_GREATER` for `TargetFrameworkVersion >= 4.5`; targeting net40 left the branch dead and the compiler never tripped. When SDK-style projects target net48, the compiler reaches that branch and fails because the attribute can't be resolved. The patched copies add the missing using directive and otherwise match upstream byte-for-byte. + +## Layout the recipe expects + +``` +$env:TEMP\ + aaLog\ (git clone https://github.com/aaOpenSource/aaLog.git) + aaLogReader\ + aaLgxReader.cs + aaLogReader.cs + Enum\, Helpers\, Properties\, Struct\, Types\ + aaLogReader-build\ + aaLogReader.csproj (copied from this folder) + patched\ + LogRecord.cs (copied from this folder) + LogHeader.cs (copied from this folder) +``` + +`dotnet build -c Release` from `aaLogReader-build/` produces `bin/Release/net48/aaLogReader.dll`. Copy that into `aalogcli/lib/aaLogReader.dll`. diff --git a/aalogcli/lib/build/aaLogReader.csproj b/aalogcli/lib/build/aaLogReader.csproj new file mode 100644 index 0000000..939ff8b --- /dev/null +++ b/aalogcli/lib/build/aaLogReader.csproj @@ -0,0 +1,38 @@ + + + + net48 + aaLogReader + aaLogReader + latest + false + false + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/aalogcli/lib/build/patched/LogHeader.cs b/aalogcli/lib/build/patched/LogHeader.cs new file mode 100644 index 0000000..ece3c5b --- /dev/null +++ b/aalogcli/lib/build/patched/LogHeader.cs @@ -0,0 +1,259 @@ +using System; +using Newtonsoft.Json; +using System.Text; +using System.Runtime.CompilerServices; + +namespace aaLogReader +{ + public class LogHeader : ILogHeader + { + private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + + public string LogFilePath { get; set; } + + public ulong StartMsgNumber { get; set; } + + public ulong MsgCount { get; set; } + + public ulong EndMsgNumber + { + get + { + return (ulong)(checked(this.StartMsgNumber + this.MsgCount) - 1); + } + } + + private ulong _startFileTime; + private DateTimeOffset _startDateTime; + + public ulong StartFileTime + { + get { return _startFileTime; } + set + { + _startFileTime = value; + _startDateTime = DateTimeOffset.FromFileTime((long)value); + } + } + + public DateTimeOffset StartDateTime + { + get { return _startDateTime; } + } + + [JsonIgnore] + public DateTime StartDateTimeLocal + { + get { return _startDateTime.LocalDateTime; } + } + + [JsonIgnore] + public DateTime StartDateTimeUtc + { + get { return _startDateTime.UtcDateTime; } + } + + private ulong _endFileTime; + private DateTimeOffset _endDateTime; + + public ulong EndFileTime + { + get { return _endFileTime; } + set + { + _endFileTime = value; + _endDateTime = DateTimeOffset.FromFileTime((long)value); + } + } + + public DateTimeOffset EndDateTime + { + get { return _endDateTime; } + } + + [JsonIgnore] + public DateTime EndDateTimeLocal + { + get { return _endDateTime.LocalDateTime; } + } + + [JsonIgnore] + public DateTime EndDateTimeUtc + { + get { return _endDateTime.UtcDateTime; } + } + + public int OffsetFirstRecord { get; set; } + + public int OffsetLastRecord { get; set; } + + public string ComputerName { get; set; } + + public string Session { get; set; } + + public string PrevFileName { get; set; } + + public string HostFQDN { get; set; } + + [JsonIgnore] + public ReturnCodeStruct ReturnCode { get; set; } + + public string ToJSON() + { + return JsonConvert.SerializeObject(this); + } + + /// + /// Return the log header data in the form of a Key-Value Pair + /// + /// Full or Minimal + /// + public string ToKVP() + { + string returnValue; + StringBuilder localSB = new StringBuilder(); + + try + { + + localSB.AppendFormat("MsgStartingNumber=\"{0}\"", this.StartMsgNumber.ToString("yyyy-MM-dd HH:mm:ss.fff")); + localSB.AppendFormat(", MsgCount=\"{0}\"", this.MsgCount); + localSB.AppendFormat(", MsgLastNumber=\"{0}\"", this.EndMsgNumber); + localSB.AppendFormat(", StartDateTime=\"{0}\"", this.StartDateTime); + localSB.AppendFormat(", EndDateTime=\"{0}\"", this.EndDateTime); + localSB.AppendFormat(", OffsetFirstRecord=\"{0}\"", this.OffsetFirstRecord); + localSB.AppendFormat(", OffsetLastRecord=\"{0}\"", this.OffsetLastRecord); + localSB.AppendFormat(", ComputerName=\"{0}\"", this.ComputerName); + localSB.AppendFormat(", Session=\"{0}\"", this.Session); + localSB.AppendFormat(", PrevFileName=\"{0}\"", this.PrevFileName); + localSB.AppendFormat(", HostFQDN=\"{0}\"", this.HostFQDN); + + returnValue = localSB.ToString(); + } + catch (Exception ex) + { + LogException(ex); + returnValue = ""; + } + + return returnValue; + } + + /// + /// Get a header for a series of log records with a delimiter + /// + /// + /// + /// + private string localHeader(char Delimiter = ',') + { + string returnValue; + StringBuilder localSB = new StringBuilder(); + + try + { + localSB.Append("LogFilePath"); + localSB.Append(Delimiter + "MsgStartingNumber"); + localSB.Append(Delimiter + "MsgCount"); + localSB.Append(Delimiter + "MsgLastNumber"); + localSB.Append(Delimiter + "StartDateTime"); + localSB.Append(Delimiter + "StartFileTime"); + localSB.Append(Delimiter + "EndDateTime"); + localSB.Append(Delimiter + "EndFileTime"); + localSB.Append(Delimiter + "OffsetFirstRecord"); + localSB.Append(Delimiter + "OffsetLastRecord"); + localSB.Append(Delimiter + "ComputerName"); + localSB.Append(Delimiter + "Session"); + localSB.Append(Delimiter + "PrevFileName"); + localSB.Append(Delimiter + "HostFQDN"); + + returnValue = localSB.ToString(); + } + catch (Exception ex) + { + LogException(ex); + returnValue = ""; + } + + return returnValue; + } + + public static string Header(char Delimiter = ',') + { + LogHeader lh = new LogHeader(); + return lh.localHeader(Delimiter); + } + + public static string HeaderCSV() + { + return LogHeader.Header(','); + } + + public static string HeaderTSV() + { + return LogHeader.Header('\t'); + } + + /// + /// Get the lastRecordRead in the form of a delimited string + /// + /// Delimiter to Use + /// Full or Minimal + /// + public string ToDelimitedString(char Delimiter = ',') + { + + string returnValue; + StringBuilder localSB = new StringBuilder(); + + try + { + localSB.Append("\"" + this.LogFilePath + "\""); + localSB.Append(Delimiter + this.StartMsgNumber.ToString()); + localSB.Append(Delimiter + this.MsgCount.ToString()); + localSB.Append(Delimiter + this.EndMsgNumber.ToString()); + localSB.Append(Delimiter + "\"" + this.StartDateTime.ToString("yyyy-MM-dd HH:mm:ss.fff") + "\""); + localSB.Append(Delimiter + this.StartFileTime.ToString()); + localSB.Append(Delimiter + "\"" + this.EndDateTime.ToString("yyyy-MM-dd HH:mm:ss.fff") + "\""); + localSB.Append(Delimiter + this.EndFileTime.ToString()); + localSB.Append(Delimiter + this.OffsetFirstRecord.ToString()); + localSB.Append(Delimiter + this.OffsetLastRecord.ToString()); + localSB.Append(Delimiter + "\"" + this.ComputerName + "\""); + localSB.Append(Delimiter + this.Session); + localSB.Append(Delimiter + "\"" + this.PrevFileName + "\""); + localSB.Append(Delimiter + "\"" + this.HostFQDN + "\""); + + returnValue = localSB.ToString(); + } + catch (Exception ex) + { + LogException(ex); + returnValue = ""; + } + + return returnValue; + } + + public string ToCSV() + { + return this.ToDelimitedString(','); + } + + public string ToTSV() + { + return this.ToDelimitedString('\t'); + } + +#if NET45_OR_GREATER + private void LogException(Exception ex, [CallerMemberName]string methodName = "") + { +#else + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + private void LogException(Exception ex) + { + string methodName = new System.Diagnostics.StackFrame(1, false).GetMethod().Name; +#endif + log.Error(string.Format("{0}: {1} - {2}", methodName, ex.GetType().Name, ex.Message), ex); + } + } +} \ No newline at end of file diff --git a/aalogcli/lib/build/patched/LogRecord.cs b/aalogcli/lib/build/patched/LogRecord.cs new file mode 100644 index 0000000..7fcec97 --- /dev/null +++ b/aalogcli/lib/build/patched/LogRecord.cs @@ -0,0 +1,278 @@ +using System; +using Newtonsoft.Json; +using System.Text; +using System.ComponentModel.DataAnnotations; +using System.Runtime.CompilerServices; + +namespace aaLogReader +{ + /// + /// A standard log record + /// + public class LogRecord : ILogRecord + { + private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); + + // Default constructor + public LogRecord() + { + this.ReturnCode.Status = false; + this.ReturnCode.Message = ""; + } + + [JsonIgnore] + public int RecordLength { get; set; } + + [JsonIgnore] + public int OffsetToPrevRecord { get; set; } + + [JsonIgnore] + public int OffsetToNextRecord { get; set; } + + [Key] + public ulong MessageNumber { get; set; } + + public uint ProcessID { get; set; } + + public uint ThreadID { get; set; } + + private ulong _eventFileTime; + private DateTimeOffset _eventDateTime; + + public ulong EventFileTime + { + get { return _eventFileTime; } + set + { + _eventFileTime = value; + _eventDateTime = DateTimeOffset.FromFileTime((long)value); + } + } + + // TODO: Add UTC Offset for Exact Timestamp + // public int EventUTCOffset; + + public DateTimeOffset EventDateTime + { + get { return _eventDateTime; } + } + + [JsonIgnore] + public DateTime EventDateTimeLocal + { + get { return _eventDateTime.LocalDateTime; } + } + + [JsonIgnore] + public DateTime EventDateTimeUtc + { + get { return _eventDateTime.UtcDateTime; } + } + + [JsonIgnore] + public DateTime EventDate + { + get + { + return this.EventDateTime.Date; + } + } + + [JsonIgnore] + public string EventTime + { + get { return this.EventDateTime.ToString("hh:mm:ss.fff tt"); } + } + + [JsonIgnore] + public int EventMillisec + { + get { return this.EventDateTime.Millisecond; } + } + + public string LogFlag { get; set; } + + public string Component { get; set; } + + public string Message { get; set; } + + public string ProcessName { get; set; } + + public string SessionID { get; set; } + + public string HostFQDN { get; set; } + + [JsonIgnore] + public ReturnCodeStruct ReturnCode; + + public string ToJSON() + { + return JsonConvert.SerializeObject(this); + } + + /// + /// Return the log record in the form of a Key-Value Pair + /// + /// Full or Minimal + /// + public string ToKVP(ExportFormat format = ExportFormat.Full) + { + string returnValue; + StringBuilder localSB = new StringBuilder(); + + try + { + localSB.AppendFormat("Timestamp=\"{0}\"", this.EventDateTime.ToString("yyyy-MM-dd HH:mm:ss.fff")); + localSB.AppendFormat(", LogFlag=\"{0}\"", this.LogFlag); + localSB.AppendFormat(", Message=\"{0}\"", this.Message); + localSB.AppendFormat(", HostFQDN=\"{0}\"", this.HostFQDN); + + if (format == ExportFormat.Full) + { + // Use all parameters if we want a full format + localSB.AppendFormat(", MessageNumber=\"{0}\"", this.MessageNumber); + localSB.AppendFormat(", ProcessID=\"{0}\"", this.ProcessID); + localSB.AppendFormat(", ThreadID=\"{0}\"", this.ThreadID); + localSB.AppendFormat(", Component=\"{0}\"", this.Component); + localSB.AppendFormat(", ProcessName=\"{0}\"", this.ProcessName); + localSB.AppendFormat(", SessionID=\"{0}\"", this.SessionID); + localSB.AppendFormat(", EventFileTime=\"{0}\"", this.EventFileTime); + } + returnValue = localSB.ToString(); + } + catch (Exception ex) + { + LogException(ex); + returnValue = ""; + } + + return returnValue; + } + + /// + /// Get a header for a series of log records with a delimiter + /// + /// + /// + /// + private string localHeader(char Delimiter = ',', ExportFormat format = ExportFormat.Full) + { + string returnValue; + StringBuilder localSB = new StringBuilder(); + + try + { + + localSB.Append("EventDateTime"); + localSB.Append(Delimiter + "LogFlag"); + localSB.Append(Delimiter + "Message"); + localSB.Append(Delimiter + "HostFQDN"); + + + if (format == ExportFormat.Full) + { + // Use all parameters if we want a full format + localSB.Append(Delimiter + "MessageNumber"); + localSB.Append(Delimiter + "ProcessID"); + localSB.Append(Delimiter + "ThreadID"); + localSB.Append(Delimiter + "Component"); + localSB.Append(Delimiter + "ProcessName"); + localSB.Append(Delimiter + "SessionID"); + localSB.Append(Delimiter + "EventFileTime"); + } + + returnValue = localSB.ToString(); + } + catch (Exception ex) + { + LogException(ex); + returnValue = ""; + } + + return returnValue; + } + + public static string Header(char Delimiter = ',', ExportFormat format = ExportFormat.Full) + { + LogRecord lr = new LogRecord(); + return lr.localHeader(Delimiter, format); + } + + public static string HeaderCSV(ExportFormat format = ExportFormat.Full) + { + return LogRecord.Header(',', format); + } + + public static string HeaderTSV(ExportFormat format = ExportFormat.Full) + { + return LogRecord.Header('\t', format); + } + + /// + /// Get the log record in the form of a delimited string + /// + /// Delimiter to Use + /// Full or Minimal + /// + public string ToDelimitedString(char Delimiter = ',', ExportFormat format = ExportFormat.Full, DateTimeKind kind = DateTimeKind.Unspecified) + { + + string returnValue; + StringBuilder localSB = new StringBuilder(); + + try + { + if (kind == DateTimeKind.Utc) + localSB.Append("\"" + this.EventDateTimeUtc.ToString("yyyy-MM-dd HH:mm:ss.fffZ") + "\""); + else + localSB.Append("\"" + this.EventDateTime.ToString("yyyy-MM-dd HH:mm:ss.fff") + "\""); + localSB.Append(Delimiter + this.LogFlag); + localSB.Append(Delimiter + "\"" + this.Message + "\""); + localSB.Append(Delimiter + this.HostFQDN); + + if (format == ExportFormat.Full) + { + // Use all parameters if we want a full format + localSB.Append(Delimiter + this.MessageNumber.ToString()); + localSB.Append(Delimiter + this.ProcessID.ToString()); + localSB.Append(Delimiter + this.ThreadID.ToString()); + localSB.Append(Delimiter + "\"" + this.Component + "\""); + localSB.Append(Delimiter + "\"" + this.ProcessName + "\""); + localSB.Append(Delimiter + this.SessionID); + localSB.Append(Delimiter + this.EventFileTime.ToString()); + } + + returnValue = localSB.ToString(); + } + catch (Exception ex) + { + LogException(ex); + returnValue = ""; + } + + return returnValue; + } + + public string ToCSV(ExportFormat format = ExportFormat.Full) + { + return this.ToDelimitedString(',', format); + } + + public string ToTSV(ExportFormat format = ExportFormat.Full) + { + return this.ToDelimitedString('\t', format); + } + +#if NET45_OR_GREATER + private void LogException(Exception ex, [CallerMemberName]string methodName = "") + { +#else + [System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)] + private void LogException(Exception ex) + { + string methodName = new System.Diagnostics.StackFrame(1, false).GetMethod().Name; +#endif + log.Error(string.Format("{0}: {1} - {2}", methodName, ex.GetType().Name, ex.Message), ex); + } + } +} diff --git a/aalogcli/src/AaLog.Cli/AaLog.Cli.csproj b/aalogcli/src/AaLog.Cli/AaLog.Cli.csproj new file mode 100644 index 0000000..5353af6 --- /dev/null +++ b/aalogcli/src/AaLog.Cli/AaLog.Cli.csproj @@ -0,0 +1,28 @@ + + + + Exe + net48 + x86 + x86 + true + AaLog.Cli + aalog + 9.0 + disable + + + + + + + + + + + ..\..\lib\aaLogReader.dll + true + + + + diff --git a/aalogcli/src/AaLog.Cli/Commands/CommonOptions.cs b/aalogcli/src/AaLog.Cli/Commands/CommonOptions.cs new file mode 100644 index 0000000..b20107a --- /dev/null +++ b/aalogcli/src/AaLog.Cli/Commands/CommonOptions.cs @@ -0,0 +1,28 @@ +using CliFx.Attributes; + +namespace AaLog.Cli.Commands +{ + /// Shared option set inherited by every read command. Kept as an abstract base so + /// CliFx still treats each subclass as a distinct command, but option declarations + /// only live in one place. + public abstract class ReadCommandBase + { + [CommandOption("log-dir", Description = "Override the log directory. Defaults to C:\\ProgramData\\ArchestrA\\LogFiles.")] + public string LogDirectory { get; init; } + + [CommandOption("component", Description = "Substring (or regex with --regex) to match against the Component field.")] + public string Component { get; init; } + + [CommandOption("level", Description = "Substring (or regex with --regex) to match against the Level / LogFlag field (Info, Warning, Error, ...).")] + public string Level { get; init; } + + [CommandOption("message", Description = "Substring (or regex with --regex) to match against the Message body.")] + public string Message { get; init; } + + [CommandOption("regex", Description = "Treat --component / --level / --message as regular expressions instead of substrings.")] + public bool UseRegex { get; init; } + + [CommandOption("llm-json", Description = "Emit a stable JSON envelope { query, count, records } instead of human-readable lines.")] + public bool LlmJson { get; init; } + } +} diff --git a/aalogcli/src/AaLog.Cli/Commands/FieldsCommand.cs b/aalogcli/src/AaLog.Cli/Commands/FieldsCommand.cs new file mode 100644 index 0000000..7fa5cf1 --- /dev/null +++ b/aalogcli/src/AaLog.Cli/Commands/FieldsCommand.cs @@ -0,0 +1,33 @@ +using System.Threading.Tasks; +using CliFx; +using CliFx.Attributes; +using CliFx.Infrastructure; + +namespace AaLog.Cli.Commands +{ + /// Quick field-reference printout so an agent can discover output shape without + /// having to read the docs/ folder. Mirrors LogRecordDto exactly. + [Command("fields", Description = "Print the LogRecord JSON field reference and exit.")] + public sealed class FieldsCommand : ICommand + { + public ValueTask ExecuteAsync(IConsole console) + { + console.Output.WriteLine("LogRecord fields emitted by aalog (subset of aaLogReader.LogRecord):"); + console.Output.WriteLine(); + console.Output.WriteLine(" MessageNumber ulong Monotonic record id assigned by the logger."); + console.Output.WriteLine(" TimestampUtc string Event time, ISO-8601 with Z suffix."); + console.Output.WriteLine(" TimestampLocal string Event time in the host's local zone, ISO-8601."); + console.Output.WriteLine(" Level string LogFlag value: Info, Warning, Error, Trace, ..."); + console.Output.WriteLine(" Component string Originating component (e.g. Bootstrap, aaEngine)."); + console.Output.WriteLine(" ProcessName string Process that emitted the record."); + console.Output.WriteLine(" ProcessId uint OS process id."); + console.Output.WriteLine(" ThreadId uint OS thread id."); + console.Output.WriteLine(" SessionId string Session id, when present."); + console.Output.WriteLine(" Host string Host FQDN at time of emission."); + console.Output.WriteLine(" Message string Free-form message body."); + console.Output.WriteLine(); + console.Output.WriteLine("LLM-JSON envelope shape: { query: {...}, count: N, records: [LogRecord, ...] }"); + return default; + } + } +} diff --git a/aalogcli/src/AaLog.Cli/Commands/LastCommand.cs b/aalogcli/src/AaLog.Cli/Commands/LastCommand.cs new file mode 100644 index 0000000..eeb480a --- /dev/null +++ b/aalogcli/src/AaLog.Cli/Commands/LastCommand.cs @@ -0,0 +1,54 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using AaLog.Cli.Filtering; +using AaLog.Cli.Output; +using CliFx; +using CliFx.Attributes; +using CliFx.Infrastructure; + +namespace AaLog.Cli.Commands +{ + [Command("last", Description = "Fetch the most recent N records ending at 'now' (or --until).")] + public sealed class LastCommand : ReadCommandBase, ICommand + { + [CommandOption("count", 'n', Description = "Number of records to fetch (most recent first). Default 50.")] + public int Count { get; init; } = 50; + + [CommandOption("until", Description = "Anchor timestamp for the 'end' of the window (ISO-8601, local time). Defaults to now.")] + public DateTime? Until { get; init; } + + public ValueTask ExecuteAsync(IConsole console) + { + var endTimestamp = Until ?? DateTime.Now; + using var reader = LogReaderFactory.Open(LogDirectory); + var raw = reader.GetRecordsByEndTimestampAndCount(endTimestamp, Count) ?? new List(); + + // Library returns newest-first when fetched by end-timestamp; keep that for human reading. + var dtos = raw.Select(LogRecordDto.From); + var filtered = RecordFilter.Apply(dtos, Component, Level, Message, UseRegex); + + if (LlmJson) + { + var query = new + { + command = "last", + count = Count, + until = endTimestamp.ToString("yyyy-MM-ddTHH:mm:ss"), + component = Component, + level = Level, + message = Message, + regex = UseRegex, + log_dir = reader.Options.LogDirectory, + }; + OutputWriter.WriteLlmJson(console, query, filtered); + } + else + { + OutputWriter.WriteHuman(console, filtered); + } + return default; + } + } +} diff --git a/aalogcli/src/AaLog.Cli/Commands/RangeCommand.cs b/aalogcli/src/AaLog.Cli/Commands/RangeCommand.cs new file mode 100644 index 0000000..0043fa3 --- /dev/null +++ b/aalogcli/src/AaLog.Cli/Commands/RangeCommand.cs @@ -0,0 +1,62 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using AaLog.Cli.Filtering; +using AaLog.Cli.Output; +using CliFx; +using CliFx.Attributes; +using CliFx.Exceptions; +using CliFx.Infrastructure; + +namespace AaLog.Cli.Commands +{ + [Command("range", Description = "Fetch records between explicit start and end timestamps.")] + public sealed class RangeCommand : ReadCommandBase, ICommand + { + [CommandOption("from", IsRequired = true, Description = "Start timestamp (ISO-8601 local time, e.g. 2026-05-03T14:00:00).")] + public DateTime From { get; init; } + + [CommandOption("to", Description = "End timestamp (ISO-8601 local time). Defaults to now.")] + public DateTime? To { get; init; } + + [CommandOption("max", Description = "Hard cap on records returned. Default 1000.")] + public int Max { get; init; } = 1000; + + public ValueTask ExecuteAsync(IConsole console) + { + var to = To ?? DateTime.Now; + if (to <= From) + throw new CommandException("--to must be later than --from.", 2); + + using var reader = LogReaderFactory.Open(LogDirectory); + var raw = reader.GetRecordsByStartAndEndTimeStamp(From, to) ?? new List(); + + var ordered = raw.OrderByDescending(r => r.EventDateTimeUtc).Take(Max); + var dtos = ordered.Select(LogRecordDto.From); + var filtered = RecordFilter.Apply(dtos, Component, Level, Message, UseRegex); + + if (LlmJson) + { + var query = new + { + command = "range", + from = From.ToString("yyyy-MM-ddTHH:mm:ss"), + to = to.ToString("yyyy-MM-ddTHH:mm:ss"), + max = Max, + component = Component, + level = Level, + message = Message, + regex = UseRegex, + log_dir = reader.Options.LogDirectory, + }; + OutputWriter.WriteLlmJson(console, query, filtered); + } + else + { + OutputWriter.WriteHuman(console, filtered); + } + return default; + } + } +} diff --git a/aalogcli/src/AaLog.Cli/Commands/TailCommand.cs b/aalogcli/src/AaLog.Cli/Commands/TailCommand.cs new file mode 100644 index 0000000..9e800d0 --- /dev/null +++ b/aalogcli/src/AaLog.Cli/Commands/TailCommand.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using AaLog.Cli.Filtering; +using AaLog.Cli.Output; +using CliFx; +using CliFx.Attributes; +using CliFx.Exceptions; +using CliFx.Infrastructure; + +namespace AaLog.Cli.Commands +{ + [Command("tail", Description = "Fetch records from the last N minutes.")] + public sealed class TailCommand : ReadCommandBase, ICommand + { + [CommandOption("minutes", 'm', Description = "How many minutes back from now to read. Default 10.")] + public int Minutes { get; init; } = 10; + + [CommandOption("max", Description = "Hard cap on records returned to keep LLM payloads bounded. Default 1000.")] + public int Max { get; init; } = 1000; + + public ValueTask ExecuteAsync(IConsole console) + { + if (Minutes <= 0) + throw new CommandException("--minutes must be a positive integer.", 2); + + var end = DateTime.Now; + var start = end.AddMinutes(-Minutes); + + using var reader = LogReaderFactory.Open(LogDirectory); + var raw = reader.GetRecordsByStartAndEndTimeStamp(start, end) ?? new List(); + + // Newest first, then cap. + var ordered = raw.OrderByDescending(r => r.EventDateTimeUtc).Take(Max); + var dtos = ordered.Select(LogRecordDto.From); + var filtered = RecordFilter.Apply(dtos, Component, Level, Message, UseRegex); + + if (LlmJson) + { + var query = new + { + command = "tail", + minutes = Minutes, + start = start.ToString("yyyy-MM-ddTHH:mm:ss"), + end = end.ToString("yyyy-MM-ddTHH:mm:ss"), + max = Max, + component = Component, + level = Level, + message = Message, + regex = UseRegex, + log_dir = reader.Options.LogDirectory, + }; + OutputWriter.WriteLlmJson(console, query, filtered); + } + else + { + OutputWriter.WriteHuman(console, filtered); + } + return default; + } + } +} diff --git a/aalogcli/src/AaLog.Cli/Commands/UnreadCommand.cs b/aalogcli/src/AaLog.Cli/Commands/UnreadCommand.cs new file mode 100644 index 0000000..3b8f708 --- /dev/null +++ b/aalogcli/src/AaLog.Cli/Commands/UnreadCommand.cs @@ -0,0 +1,56 @@ +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using AaLog.Cli.Filtering; +using AaLog.Cli.Output; +using CliFx; +using CliFx.Attributes; +using CliFx.Infrastructure; + +namespace AaLog.Cli.Commands +{ + [Command("unread", Description = "Fetch records the cache has not yet seen. Useful for incremental polling.")] + public sealed class UnreadCommand : ReadCommandBase, ICommand + { + [CommandOption("max", Description = "Maximum number of unread records to return. Default 1000.")] + public ulong Max { get; init; } = 1000; + + [CommandOption("ignore-cache", Description = "Re-read regardless of the cache file. The next call will pick up from the new high-water mark.")] + public bool IgnoreCache { get; init; } + + [CommandOption("client-id", Description = "Optional client ID. Use distinct IDs to maintain independent cache files for parallel consumers.")] + public string ClientId { get; init; } + + public ValueTask ExecuteAsync(IConsole console) + { + using var reader = LogReaderFactory.Open(LogDirectory); + var raw = reader.GetUnreadRecords(Max, "", IgnoreCache, ClientId) + ?? new List(); + + var dtos = raw.OrderByDescending(r => r.EventDateTimeUtc).Select(LogRecordDto.From); + var filtered = RecordFilter.Apply(dtos, Component, Level, Message, UseRegex); + + if (LlmJson) + { + var query = new + { + command = "unread", + max = Max, + ignore_cache = IgnoreCache, + client_id = ClientId, + component = Component, + level = Level, + message = Message, + regex = UseRegex, + log_dir = reader.Options.LogDirectory, + }; + OutputWriter.WriteLlmJson(console, query, filtered); + } + else + { + OutputWriter.WriteHuman(console, filtered); + } + return default; + } + } +} diff --git a/aalogcli/src/AaLog.Cli/Filtering/RecordFilter.cs b/aalogcli/src/AaLog.Cli/Filtering/RecordFilter.cs new file mode 100644 index 0000000..0f92cab --- /dev/null +++ b/aalogcli/src/AaLog.Cli/Filtering/RecordFilter.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.RegularExpressions; +using AaLog.Cli.Output; + +namespace AaLog.Cli.Filtering +{ + /// Client-side filtering applied after fetch. The aaLogReader library has its own + /// LogRecordPostFilters facility, but rolling our own keeps the surface flat and + /// avoids leaking library structs into the CLI argument layer. + public static class RecordFilter + { + public static IReadOnlyList Apply( + IEnumerable records, + string componentPattern, + string levelPattern, + string messagePattern, + bool useRegex) + { + Predicate componentMatch = Build(componentPattern, useRegex); + Predicate levelMatch = Build(levelPattern, useRegex); + Predicate messageMatch = Build(messagePattern, useRegex); + + return records + .Where(r => componentMatch(r.Component ?? string.Empty)) + .Where(r => levelMatch(r.Level ?? string.Empty)) + .Where(r => messageMatch(r.Message ?? string.Empty)) + .ToList(); + } + + private static Predicate Build(string pattern, bool useRegex) + { + if (string.IsNullOrEmpty(pattern)) return _ => true; + + if (useRegex) + { + var rx = new Regex(pattern, RegexOptions.IgnoreCase | RegexOptions.Compiled); + return s => rx.IsMatch(s); + } + + return s => s.IndexOf(pattern, StringComparison.OrdinalIgnoreCase) >= 0; + } + } +} diff --git a/aalogcli/src/AaLog.Cli/IsExternalInit.cs b/aalogcli/src/AaLog.Cli/IsExternalInit.cs new file mode 100644 index 0000000..89e8e6a --- /dev/null +++ b/aalogcli/src/AaLog.Cli/IsExternalInit.cs @@ -0,0 +1,5 @@ +// Polyfill so C# 9.0 `init` accessors compile on net48. +namespace System.Runtime.CompilerServices +{ + internal static class IsExternalInit { } +} diff --git a/aalogcli/src/AaLog.Cli/LogReaderFactory.cs b/aalogcli/src/AaLog.Cli/LogReaderFactory.cs new file mode 100644 index 0000000..58aeed3 --- /dev/null +++ b/aalogcli/src/AaLog.Cli/LogReaderFactory.cs @@ -0,0 +1,19 @@ +using aaLogReader; + +namespace AaLog.Cli +{ + /// One place to construct an aaLogReader so every command honors --log-dir the + /// same way and inherits the library's defaults otherwise. + internal static class LogReaderFactory + { + public static aaLogReader.aaLogReader Open(string logDirectoryOverride) + { + var options = new OptionsStruct(); + if (!string.IsNullOrWhiteSpace(logDirectoryOverride)) + { + options.LogDirectory = logDirectoryOverride; + } + return new aaLogReader.aaLogReader(options); + } + } +} diff --git a/aalogcli/src/AaLog.Cli/Output/LogRecordDto.cs b/aalogcli/src/AaLog.Cli/Output/LogRecordDto.cs new file mode 100644 index 0000000..4e40b46 --- /dev/null +++ b/aalogcli/src/AaLog.Cli/Output/LogRecordDto.cs @@ -0,0 +1,37 @@ +using aaLogReader; + +namespace AaLog.Cli.Output +{ + /// LLM-friendly subset of the underlying aaLogReader record. Drops file-format + /// internals (record length, offsets) and the date/time/millis triple that is + /// redundant with the full ISO-8601 timestamps. + public class LogRecordDto + { + public ulong MessageNumber { get; init; } + public string TimestampUtc { get; init; } + public string TimestampLocal { get; init; } + public string Level { get; init; } + public string Component { get; init; } + public string ProcessName { get; init; } + public uint ProcessId { get; init; } + public uint ThreadId { get; init; } + public string SessionId { get; init; } + public string Host { get; init; } + public string Message { get; init; } + + public static LogRecordDto From(LogRecord r) => new LogRecordDto + { + MessageNumber = r.MessageNumber, + TimestampUtc = r.EventDateTimeUtc.ToString("yyyy-MM-ddTHH:mm:ss.fffZ"), + TimestampLocal = r.EventDateTimeLocal.ToString("yyyy-MM-ddTHH:mm:ss.fff"), + Level = r.LogFlag, + Component = r.Component, + ProcessName = r.ProcessName, + ProcessId = r.ProcessID, + ThreadId = r.ThreadID, + SessionId = r.SessionID, + Host = r.HostFQDN, + Message = r.Message, + }; + } +} diff --git a/aalogcli/src/AaLog.Cli/Output/OutputWriter.cs b/aalogcli/src/AaLog.Cli/Output/OutputWriter.cs new file mode 100644 index 0000000..b048683 --- /dev/null +++ b/aalogcli/src/AaLog.Cli/Output/OutputWriter.cs @@ -0,0 +1,38 @@ +using System.Collections.Generic; +using CliFx.Infrastructure; +using Newtonsoft.Json; + +namespace AaLog.Cli.Output +{ + /// Two output modes: + /// - Human: single-line per record, easy to scan in a terminal. + /// - LlmJson: stable envelope { query, count, records } for agent consumption. + public static class OutputWriter + { + private static readonly JsonSerializerSettings JsonSettings = new JsonSerializerSettings + { + NullValueHandling = NullValueHandling.Include, + Formatting = Formatting.Indented, + }; + + public static void WriteHuman(IConsole console, IReadOnlyList records) + { + foreach (var r in records) + { + console.Output.WriteLine( + $"[{r.TimestampLocal}] [{r.Level,-7}] {r.Component} ({r.ProcessName}#{r.ProcessId}/{r.ThreadId}) | {r.Message}"); + } + } + + public static void WriteLlmJson(IConsole console, object query, IReadOnlyList records) + { + var envelope = new + { + query, + count = records.Count, + records, + }; + console.Output.WriteLine(JsonConvert.SerializeObject(envelope, JsonSettings)); + } + } +} diff --git a/aalogcli/src/AaLog.Cli/Program.cs b/aalogcli/src/AaLog.Cli/Program.cs new file mode 100644 index 0000000..43ed229 --- /dev/null +++ b/aalogcli/src/AaLog.Cli/Program.cs @@ -0,0 +1,17 @@ +using System.Threading.Tasks; +using CliFx; + +namespace AaLog.Cli +{ + public static class Program + { + public static async Task Main(string[] args) => + await new CliApplicationBuilder() + .SetTitle("aalog") + .SetExecutableName("aalog") + .SetDescription("Read AVEVA / Wonderware System Platform binary log records.") + .AddCommandsFromThisAssembly() + .Build() + .RunAsync(args); + } +} diff --git a/aot/README.md b/aot/README.md new file mode 100644 index 0000000..e658843 --- /dev/null +++ b/aot/README.md @@ -0,0 +1,74 @@ +# ArchestrA Object Toolkit (AOT) Reference Material + +LLM-oriented copy of the AVEVA / Wonderware *ArchestrA Object Toolkit 2014 v4.0* documentation, converted from the shipped CHM files. Original CHMs live with the AOT install at `C:\Program Files (x86)\Wonderware\Toolkits\ArchestrA Object\Docs\`. + +## Layout + +- [`dev-guide/`](dev-guide/README.md) — Development Guide: chapters and appendices on object design, primitives, attributes, internationalization, building/versioning, debugging, and best practices. +- [`reference/`](reference/README.md) — API Reference for the `ArchestrA.Toolkit` namespace: 69 types (classes, structs, enums) with members and code samples. +- [`Samples/`](Samples) — Verbatim AOT 2014 sample Visual Studio solutions (`Monitor`, `Watchdog`). C# `.sln` plus per-tier projects (``, `Configtime`, `Editor`, `Runtime`). Vendor samples — do not modify unless the user asks. + +## Key concepts to keep straight + +When the user asks AOT questions, these distinctions matter: + +- **ApplicationObject vs. Primitive.** ApplicationObjects model real-world equipment (pump, valve). Primitives are reusable code/attribute modules composed into objects. Every object implicitly contains the hidden "Common" primitive. +- **Three project tiers per object.** An AOT object is split across `*Configtime` (config-time logic in the IDE), `*Runtime` (deployed runtime behavior), and `*Editor` (custom editor form derived from `aaBaseEditorForm`). The samples follow this exact tier split. +- **Build artifacts.** Building an ApplicationObject produces an `.aaPDF`; a reusable primitive produces an `.aaPRI`. Building requires Visual Studio launched with administrator privileges. +- **`CMx*` value wrappers.** Attribute values are not raw .NET types — they are wrapped in `CMxString`, `CMxInteger`, `CMxFloat`, `CMxBoolean`, etc. (and their `*Array` siblings). `CMxValue`/`CMxType`/`CMxVariant` sit above them. Indirects use `CMxIndirect` / `CMxIndirectBase` / `CMxIndirectWriteOnly`. +- **Event-arg classes** (`SetHandlerEventArgs`, `ConfigtimeSetHandlerEventArgs`, `RuntimeSetHandlerEventArgs`, `RuntimeStartupEventArgs`, etc.) are how user code hooks into the object lifecycle. + +## Working in this repo + +- Treat [`dev-guide/`](dev-guide/README.md) and [`reference/`](reference/README.md) as authoritative source-of-truth when answering AOT questions; they were converted from the official AVEVA CHMs. Cite the specific Markdown file when relevant. +- The dev-guide chapter ordering matches the original CHM TOC (`01-` … `09-`, then `appendix-*`). Prefer the most specific file (e.g., attribute categories live in [`appendix-f-attribute-categories.md`](dev-guide/appendix-f-attribute-categories.md), security classifications in [`appendix-e-security-classifications.md`](dev-guide/appendix-e-security-classifications.md)). +- The samples ([`Monitor`](Samples/Monitor), [`Watchdog`](Samples/Watchdog)) are the canonical worked examples — refer to them for patterns like the three-tier project split, `[AObject]` / `[ObjectAttributes.*]` decoration, dictionary (`.aaDCT`) wiring, and reusable-primitive references (`[AReusablePrimitiveRef]`). +- No build/test commands apply at this folder root. To actually build a sample, open it in Visual Studio (run as Administrator) with the AOT installed — not from this directory. + +## Resource index — by task + +| Task | Go to | +| --- | --- | +| Conceptual overview, workflow, UI tour | [`dev-guide/01-overview.md`](dev-guide/01-overview.md) | +| Planning an object's shape (attributes, primitives, virtuals) | [`dev-guide/02-object-design.md`](dev-guide/02-object-design.md) | +| Visual Studio project setup for AOT | [`dev-guide/03-working-with-projects.md`](dev-guide/03-working-with-projects.md) | +| Defining an ApplicationObject in the Object Designer | [`dev-guide/04-defining-application-objects.md`](dev-guide/04-defining-application-objects.md) | +| Defining a reusable primitive | [`dev-guide/05-defining-primitives.md`](dev-guide/05-defining-primitives.md) | +| Attribute configuration, set handlers, locking | [`dev-guide/06-configuring-attributes.md`](dev-guide/06-configuring-attributes.md) | +| Localization / multilingual dictionaries | [`dev-guide/07-internationalizing.md`](dev-guide/07-internationalizing.md) | +| Building `.aaPDF` / `.aaPRI`, versioning, deployment | [`dev-guide/08-building-and-versioning.md`](dev-guide/08-building-and-versioning.md) | +| Attaching the VS debugger to Application Server | [`dev-guide/09-debugging.md`](dev-guide/09-debugging.md) | +| Programming techniques and recommended workflow | [`dev-guide/appendix-a-ref-guide.md`](dev-guide/appendix-a-ref-guide.md) | +| Best practices (config-time, run-time, editor, quality, naming) | [`dev-guide/appendix-a-best-practices.md`](dev-guide/appendix-a-best-practices.md) | +| Sample project walkthroughs | [`dev-guide/appendix-b-sample-projects.md`](dev-guide/appendix-b-sample-projects.md) | +| ArchestrA data type catalog (`MxDouble`, `MxBoolean`, …) | [`dev-guide/appendix-d-data-types.md`](dev-guide/appendix-d-data-types.md) | +| Security classifications (Free Access, Operate, Tune, …) | [`dev-guide/appendix-e-security-classifications.md`](dev-guide/appendix-e-security-classifications.md) | +| Attribute categories (Configurable, Calculated, Writeable_*, …) | [`dev-guide/appendix-f-attribute-categories.md`](dev-guide/appendix-f-attribute-categories.md) | +| API lookup for any `ArchestrA.Toolkit` type | [`reference/README.md`](reference/README.md) (one file per type) | +| Worked C# example, three-tier object | [`Samples/Monitor/`](Samples/Monitor) | +| Worked C# example with stats sub-project | [`Samples/Watchdog/`](Samples/Watchdog) | + +## Common gotchas + +These trip people up regularly when working in AOT / System Platform. Long-form versions live in [`dev-guide/appendix-a-best-practices.md`](dev-guide/appendix-a-best-practices.md); summarized here so they surface without a doc dive. + +- **Visual Studio must run as Administrator** to build an AOT object. Builds will fail or produce no `.aaPDF` otherwise. +- **No DeviceIntegration objects.** AOT 2014 cannot create DI objects — only ApplicationObjects and reusable primitives. +- **Galaxy Dump/Load bypasses the editor.** Validation must live in `OnValidate` (config-time), not in the editor form. Editor-only validation is silently skipped during a Galaxy Load. +- **Set handlers must accept "set to current value" silently.** Rejecting a no-op set causes spurious noise during Dump/Load. Don't reject just because the attribute isn't currently editable. +- **Avoid write-only attributes that mutate object shape.** If a set handler adds/renames/removes a primitive based on a value that isn't readable back, Dump/Load can't reproduce the object. Expose the state as a readable array instead. +- **Engine scans are ~100 µs budgets.** Runtime methods must be non-blocking and short. Push slow/blocking work to a thread, and tear those threads down on shutdown — otherwise the engine "overscans". +- **Quality is not enforced against value.** A `Good`-quality attribute can still hold `NaN`; a `Bad`-quality attribute can hold a normal-looking number. Always check both before using a value. +- **`Initializing` is a substate of `Bad`.** It's transient (until first input arrives). Don't raise "bad value" alarms while a value is `Initializing`, or you'll get transient alarms on every OnScan. +- **Don't write through the wrapper to set quality on Input/Output/InputOutput attributes.** Unsupported, and may cause unexpected I/O writes. +- **OnScan/OffScan quality discipline.** Set CalculatedQuality attributes to `Bad` on OffScan and `Good` (or `Initializing`) on OnScan. Forgetting this leaves stale-but-`Good` values after the object stops scanning. +- **Outputs on startup.** The default contract is "object mirrors PLC" — never auto-write to the field on startup/deploy/OnScan unless you're explicitly implementing the rare reverse case. Use `ESTARTUPCONTEXT` to detect why startup happened. +- **Failover/dynamic attributes need explicit calls.** Call `UpdateDynamicAttributeData()` after changing a dynamic attribute's name/type/category/security/set-handler-flag, `CheckpointDynamicAttributeData()` after value changes, and `RestoreDynamicAttributes()` from the Startup handler. Skipping any of these silently breaks failover. +- **Quarantine state is sticky.** An unhandled exception in a primitive freezes its set handlers and `Execute` until the object is undeployed — attributes are still readable for forensics, but the object is effectively dead. +- **Naming restrictions are strict.** Spaces and `. + - * / \ = ( ) \` ~ ! % ^ & @ [ ] { } | : ; " , < > ?` are invalid in ArchestrA names. Each segment between periods is capped at 32 chars; full attribute names cap at 329 chars, primitives at 255. Localized characters work in *external* names only, not internal names. +- **Logger is for trapped errors and dev diagnostics, not operator info.** Per-scan logging will tank performance; gate any retained diagnostic logging behind a flag. +- **`SendEvent` (Application Data Change) is for object-initiated changes only.** Don't fire it for user/operator sets — those are already logged by the infrastructure, and you'll double-log. + +## Maintenance + +When adding new tools, samples, or doc sets, update **both** this README and the root [`../CLAUDE.md`](../CLAUDE.md) so the task → resource map stays consistent. See [`../DOCS-GUIDE.md`](../DOCS-GUIDE.md) for the full doctrine. diff --git a/aot/Samples/Monitor/Monitor.sln b/aot/Samples/Monitor/Monitor.sln new file mode 100644 index 0000000..b67ab84 --- /dev/null +++ b/aot/Samples/Monitor/Monitor.sln @@ -0,0 +1,38 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Monitor", "Monitor\Monitor.csproj", "{0D1ADE9C-7960-4C20-A274-1FFEAAFF9315}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonitorRuntime", "MonitorRuntime\MonitorRuntime.csproj", "{71A913E8-9A33-4A92-AD13-6B9023E5C8E5}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonitorConfigtime", "MonitorConfigtime\MonitorConfigtime.csproj", "{E684C279-E337-41AB-BB43-CA0A04E65D53}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonitorEditor", "MonitorEditor\MonitorEditor.csproj", "{06CEDE14-B295-4817-A439-D2B60D71FF4C}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0D1ADE9C-7960-4C20-A274-1FFEAAFF9315}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0D1ADE9C-7960-4C20-A274-1FFEAAFF9315}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0D1ADE9C-7960-4C20-A274-1FFEAAFF9315}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0D1ADE9C-7960-4C20-A274-1FFEAAFF9315}.Release|Any CPU.Build.0 = Release|Any CPU + {71A913E8-9A33-4A92-AD13-6B9023E5C8E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {71A913E8-9A33-4A92-AD13-6B9023E5C8E5}.Debug|Any CPU.Build.0 = Debug|Any CPU + {71A913E8-9A33-4A92-AD13-6B9023E5C8E5}.Release|Any CPU.ActiveCfg = Release|Any CPU + {71A913E8-9A33-4A92-AD13-6B9023E5C8E5}.Release|Any CPU.Build.0 = Release|Any CPU + {E684C279-E337-41AB-BB43-CA0A04E65D53}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {E684C279-E337-41AB-BB43-CA0A04E65D53}.Debug|Any CPU.Build.0 = Debug|Any CPU + {E684C279-E337-41AB-BB43-CA0A04E65D53}.Release|Any CPU.ActiveCfg = Release|Any CPU + {E684C279-E337-41AB-BB43-CA0A04E65D53}.Release|Any CPU.Build.0 = Release|Any CPU + {06CEDE14-B295-4817-A439-D2B60D71FF4C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {06CEDE14-B295-4817-A439-D2B60D71FF4C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {06CEDE14-B295-4817-A439-D2B60D71FF4C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {06CEDE14-B295-4817-A439-D2B60D71FF4C}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/aot/Samples/Monitor/Monitor.snk b/aot/Samples/Monitor/Monitor.snk new file mode 100644 index 0000000..19bf2fe Binary files /dev/null and b/aot/Samples/Monitor/Monitor.snk differ diff --git a/aot/Samples/Monitor/Monitor/AAObjectInfo.xml b/aot/Samples/Monitor/Monitor/AAObjectInfo.xml new file mode 100644 index 0000000..e5f4e6f --- /dev/null +++ b/aot/Samples/Monitor/Monitor/AAObjectInfo.xml @@ -0,0 +1,410 @@ + + + 1 + + + + + + + + + 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)); + +]]> + + + + + + + 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)); + +]]> + + + + + + + + ArchestrA.Toolkit.Monitor.Monitor + + + + + Runtime + ComDLL + + + + + + Runtime, Configtime + NETFrameworkAssembly + + + + + Runtime, Configtime + MergeRegistryScript + + + + + Runtime + NETFrameworkAssembly + + + + + Runtime + MergeRegistryScript + + + + + Configtime + NETFrameworkAssembly + + + + + Configtime + MergeRegistryScript + + + + + Editor + NETFrameworkAssembly + + + + + Editor + MergeRegistryScript + + + + + Runtime, Configtime, Editor + NETFrameworkAssembly + + + + + Runtime, Configtime + NETFrameworkAssembly + + MonitorEditor5 + + ResetInputAvg + + + + PVHiLimit + + + + + PV + + + Monitor + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/aot/Samples/Monitor/Monitor/Monitor.cs b/aot/Samples/Monitor/Monitor/Monitor.cs new file mode 100644 index 0000000..25972a3 --- /dev/null +++ b/aot/Samples/Monitor/Monitor/Monitor.cs @@ -0,0 +1,69 @@ +//------------------------------------------------------------------------------ +// Copyright (C) 2008 Invensys Systems Inc. All rights reserved. +// +// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY +// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +//------------------------------------------------------------------------------ + +using System; +using System.Runtime.InteropServices; +using System.Collections; +using ArchestrA.Core; +using ArchestrA.Toolkit; +using ArchestrA.Toolkit.SystemPrimitive; + +namespace ArchestrA.Toolkit.Monitor +{ + #region Object Information - Toolkit generated code + // Required region for Object Information - do not modify + // the contents of this region with the code editor. + [AObject()] + [Guid("fbdfa384-05c8-42ce-8b41-75e40436b6f2")] + [ObjectAttributes.Dictionary(@"Monitor5.aaDCT")] + [ObjectAttributes.ConfigtimeCLSID("dbed4eb2-a279-4660-9497-448092f54047")] + [ObjectAttributes.RuntimeCLSID("df4726d8-fe33-4d79-a6a1-b8198f1e5ac1")] + [ObjectAttributes.MajorVersion(1)] + [ObjectAttributes.MinorVersion(1)] + [ObjectAttributes.Migrate("")] + #endregion + + // Required attributes for Object Information. + // Changes made using the code editor will appear in the Toolkit Editor. + [ObjectAttributes.Name("Monitor")] + [ObjectAttributes.Vendor("test")] + [ObjectAttributes.ShortDescription("Description for Watchdog")] + [ObjectAttributes.ToolsetName("Application")] + [ObjectAttributes.Events()] + [ObjectAttributes.IDEBehavior()] + [AReusablePrimitiveRef(@"ArchestrA\InputOutputPrimitive1.aaPri", "PVInputOutput", "PVInputOutput", false)] + [AReusablePrimitiveRef.AttrOverride("PVInputOutput", "DataType", "LockStatus", true)] + [AReusablePrimitiveRef.AttrOverride("PVInputOutput", "DataType", "Value", MxDataType.MxFloat)] + + /// + /// Summary description for Monitor + /// + public class Monitor + { + [Attributes.AAttrCategory(MxAttributeCategory.MxCategoryCalculatedRetentive)] + [Attributes.AAttrCalculatedQuality(true)] + public CMxDouble PVInputAvg = new CMxDouble(); + + [Attributes.AAttrFrequentlyAccessed(true)] + [Attributes.AAttrCategory(MxAttributeCategory.MxCategoryWriteable_US)] + [Attributes.AAttrCalculatedQuality(true)] + public CMxFloat PV = new CMxFloat(); + + [Attributes.AAttrCategory(MxAttributeCategory.MxCategoryWriteable_USC)] + public CMxFloat PVHiLimit = new CMxFloat(); + + [Attributes.AAttrCategory(MxAttributeCategory.MxCategoryWriteable_US)] + public CMxBoolean ResetInputAvg = new CMxBoolean(); + + public Monitor() + { + } + } +} + diff --git a/aot/Samples/Monitor/Monitor/Monitor.csproj b/aot/Samples/Monitor/Monitor/Monitor.csproj new file mode 100644 index 0000000..3e70573 --- /dev/null +++ b/aot/Samples/Monitor/Monitor/Monitor.csproj @@ -0,0 +1,127 @@ + + + + Debug + AnyCPU + 9.0.21022 + 2.0 + {0D1ADE9C-7960-4C20-A274-1FFEAAFF9315} + Library + Properties + ArchestrA.Toolkit.Monitor + Monitor5 + true + ..\Monitor.snk + + + 4.0 + + + false + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + x86 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + x86 + + + + False + C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Toolkit.ArchestrAObjectSupport.dll + True + + + False + C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Core.dll + True + + + + + + + + + + + + + + + + + Monitor.snk + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 2.0 %28x86%29 + true + + + False + .NET Framework 3.0 %28x86%29 + false + + + False + .NET Framework 3.5 + false + + + False + .NET Framework 3.5 SP1 + false + + + + + + + + + + + \ No newline at end of file diff --git a/aot/Samples/Monitor/Monitor/Monitor1.aaDCT b/aot/Samples/Monitor/Monitor/Monitor1.aaDCT new file mode 100644 index 0000000..8301697 --- /dev/null +++ b/aot/Samples/Monitor/Monitor/Monitor1.aaDCT @@ -0,0 +1,16 @@ + + + + + English Example + + + German Example + + + + + The value you tried to send out exceeded HiLimit + + + diff --git a/aot/Samples/Monitor/Monitor/Properties/AssemblyInfo.cs b/aot/Samples/Monitor/Monitor/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..ea90f9d --- /dev/null +++ b/aot/Samples/Monitor/Monitor/Properties/AssemblyInfo.cs @@ -0,0 +1,45 @@ +//------------------------------------------------------------------------------ +// Copyright (C) 2008 Invensys Systems Inc. All rights reserved. +// +// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY +// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +//------------------------------------------------------------------------------ + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("MonitorDef")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("test")] +[assembly: AssemblyProduct("MonitorDef")] +[assembly: AssemblyCopyright("Copyright © Wonderware 2006")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(true)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("700395fc-5289-432f-a186-7ce01ed63ee9")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.1.0.0")] + diff --git a/aot/Samples/Monitor/MonitorConfigtime/MonitorConfigtime.cs b/aot/Samples/Monitor/MonitorConfigtime/MonitorConfigtime.cs new file mode 100644 index 0000000..5ee1a9c --- /dev/null +++ b/aot/Samples/Monitor/MonitorConfigtime/MonitorConfigtime.cs @@ -0,0 +1,472 @@ +//------------------------------------------------------------------------------ +// Copyright (C) 2008 Invensys Systems Inc. All rights reserved. +// +// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY +// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +//------------------------------------------------------------------------------ + +using System; +using System.Runtime.InteropServices; +using System.Collections; +using ArchestrA.Core; +using ArchestrA.Toolkit; + +namespace ArchestrA.Toolkit.Monitor +{ + [Guid("dbed4eb2-a279-4660-9497-448092f54047")] + /// + /// Summary description for MonitorConfigtime + /// + public class MonitorConfigtime : ConfigtimeBase + { + #region Attributes - Toolkit generated code + // The following C# properties have been defined to simplify access to + // attribute values - do not modify the contents of this region with + // the code editor. + private CMxFloat PVHiLimit + { + get { return InternalReferenceOnly.PVHiLimit; } + set { InternalReferenceOnly.PVHiLimit.Set(value); } + } + + + + public __PVInputOutput PVInputOutput = null; + + public class __PVInputOutput + { + public SupportWrapper Wrapper = new SupportWrapper(); + + private CMxReference _ReferenceSecondary = null; + + public CMxReference ReferenceSecondary + { + get { if (_ReferenceSecondary == null) { _ReferenceSecondary = new CMxReference(Wrapper, "PVInputOutput.ReferenceSecondary"); } return _ReferenceSecondary; } + set { if (_ReferenceSecondary == null) { _ReferenceSecondary = new CMxReference(Wrapper, "PVInputOutput.ReferenceSecondary"); } _ReferenceSecondary.Set(value); } + } + + private CMxReference _Reference = null; + + public CMxReference Reference + { + get { if (_Reference == null) { _Reference = new CMxReference(Wrapper, "PVInputOutput.Reference"); } return _Reference; } + set { if (_Reference == null) { _Reference = new CMxReference(Wrapper, "PVInputOutput.Reference"); } _Reference.Set(value); } + } + + private CMxBoolean _SeparateFeedbackConfigured = null; + + public CMxBoolean SeparateFeedbackConfigured + { + get { if (_SeparateFeedbackConfigured == null) { _SeparateFeedbackConfigured = new CMxBoolean(Wrapper, "PVInputOutput.SeparateFeedbackConfigured"); } return _SeparateFeedbackConfigured; } + set { if (_SeparateFeedbackConfigured == null) { _SeparateFeedbackConfigured = new CMxBoolean(Wrapper, "PVInputOutput.SeparateFeedbackConfigured"); } _SeparateFeedbackConfigured.Set(value); } + } + + private CMxDataType _DataType = null; + + public CMxDataType DataType + { + get { if (_DataType == null) { _DataType = new CMxDataType(Wrapper, "PVInputOutput.DataType"); } return _DataType; } + set { if (_DataType == null) { _DataType = new CMxDataType(Wrapper, "PVInputOutput.DataType"); } _DataType.Set(value); } + } + + public __PVInputOutput(AObjectBase baseClass) + { + Wrapper.baseClass = baseClass; + } + + } + + #endregion Attributes + + #region Internal Reference Only + //Toolkit code required to access the attributes declared in the Object Class + private Monitor InternalReferenceOnly = null; + #endregion Internal Reference Only + + #region Declarations + //Declare Configtime Class Variables here. + //Variables declared in this region are available to all methods + //in the Configtime Class. + + + #endregion Declarations + + + public MonitorConfigtime() + { + InternalReferenceOnly = new Monitor(); + this.AObjectInstance = InternalReferenceOnly; + + #region Configuration Event Registration - Toolkit generated code + // Required region for Configuration Events - do not modify + // the contents of this region with the code editor. + this.ConfigtimeInitialize += new ConfigtimeInitializeDelegate(MonitorConfigtime_ConfigtimeInitialize); + this.ConfigtimeValidate += new ConfigtimeValidateDelegate(MonitorConfigtime_ConfigtimeValidate); + this.ConfigtimeMigrate += new MigrateDelegate(MonitorConfigtime_ConfigtimeMigrate); + this.ConfigtimeDynamic += new ConfigtimeDynamicSetHandlerDelegate(MonitorConfigtime_ConfigtimeDynamic); + this.PreValidate += new ObjectEventDelegate(MonitorConfigtime_PreValidate); + this.PostCreate += new ObjectEventDelegate(MonitorConfigtime_PostCreate); + #endregion Configuration Event Registration + + #region Optional Configuration Event Registration - Toolkit generated code + // Required region for Configuration Events - do not modify + // the contents of this region with the code editor. + // Optional events are enabled by the ObjectAttributes.Events + // attribute in the Object class. + #endregion Optional Configuration Event Registration + + #region Configtime Set Handler Registration Toolkit generated code + // Required method for Configtime SetHandlers. + // Changes made using the code editor will appear in the Toolkit Editor. + // + // WARNING: Changes made to this region will result in a Shape Change. + + + // TODO: Configtime SetHandler registration + this.RegisterConfigtimeSetHandler("PVHiLimit", new ConfigtimeSetHandlerDelegate(PVHiLimitSetHandler)); + #endregion Configtime Set Handler Registration + + #region Primitive Wrapper Initialization - Toolkit generated code + PVInputOutput = new __PVInputOutput(this); + #endregion Primitive Wrapper Initialization + + } + + private void MonitorConfigtime_ConfigtimeInitialize(object sender) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - Initialize + // + // Any custom initialization can be done here, including caching of attribute + // values, primitive IDs etc. + //------------------------------------------------------------------------------ + } + + private void MonitorConfigtime_ConfigtimeMigrate(object sender, ref MigrateHandler migrate) + { + //------------------------------------------------------------------------------ + // 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 + } + + private void MonitorConfigtime_ConfigtimeValidate(object sender, ref EPACKAGESTATUS status) + { + //------------------------------------------------------------------------------ + // 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 (IsTemplate) + { + return; + } + } + + private void MonitorConfigtime_ConfigtimeDynamic(object sender, ref ConfigtimeSetHandlerEventArgs e) + { + + 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 + SetValue(e.attributeHandle.shAttributeId, e.attributeHandle.shPrimitiveId, e.Value); + LogWarning(string.Format("Uknown set handler for attribute '{0}'", attrName)); + + } + + private void MonitorConfigtime_PostCreate(object sender, object optionalParameter) + { + //------------------------------------------------------------------------------ + // 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 + } + + private void MonitorConfigtime_PreValidate(object sender, object optionalParameter) + { + //------------------------------------------------------------------------------ + // 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. + //------------------------------------------------------------------------------ + } + + #region Optional Configuration Events + //------------------------------------------------------------------------------ + // TODO: Optional Configtime Events + // + // Use the Toolkit Editor to enable each optional event or add the event to the + // ObjectAttributes.Events attribute in the object class. + // + // Multiple events can be enabled using the | delimiter. + // + // Example: + // [ObjectAttributes.Events(a.EventHandlerEnum.OnPreDeploy | a.EventHandlerEnum.OnPreDelete)] + // + //------------------------------------------------------------------------------ + + private void MonitorConfigtime_PreUndeploy(object sender, ref SupportEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - PreUndeploy + // + //------------------------------------------------------------------------------ + + } + private void MonitorConfigtime_PreUnassign(object sender, ref GeneralEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - PreUnassign + // + //------------------------------------------------------------------------------ + + } + private void MonitorConfigtime_PreRename(object sender, ref RenameEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - PreRename + // + //------------------------------------------------------------------------------ + + } + private void MonitorConfigtime_PreDeploy(object sender, ref DeployEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - PreDeploy + // + // Use the Toolkit Editor to enable this event or add OnPreDeploy to the + // ObjectAttributes.Events attribute in the object class. Multiple events can + // be enabled using the | delimiter. + // + // Example: [ObjectAttributes.Events(a.EventHandlerEnum.OnPreDeploy)] + // + //------------------------------------------------------------------------------ + + } + private void MonitorConfigtime_PreDelete(object sender, ref SupportEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - PreDelete + // + //------------------------------------------------------------------------------ + + } + private void MonitorConfigtime_PreCheckIn(object sender, ref SupportEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - PreCheckIn + // + //------------------------------------------------------------------------------ + + } + private void MonitorConfigtime_PreAssignTo(object sender, ref GeneralEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - PreAssignTo + // + //------------------------------------------------------------------------------ + + } + private void MonitorConfigtime_PostUndeploy(object sender, ref SupportEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - PostUndeploy + // + //------------------------------------------------------------------------------ + + } + private void MonitorConfigtime_PostUnassignFrom(object sender, ref GeneralEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - PostUnassignFrom + // + //------------------------------------------------------------------------------ + + } + private void MonitorConfigtime_PostUnassign(object sender, ref GeneralEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - PostUnassign + // + //------------------------------------------------------------------------------ + + } + private void MonitorConfigtime_PostRename(object sender, ref RenameEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - PostRename + // + //------------------------------------------------------------------------------ + + } + private void MonitorConfigtime_PostDeploy(object sender, ref SupportEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - PostDeploy + // + //------------------------------------------------------------------------------ + + } + private void MonitorConfigtime_PostDelete(object sender, ref SupportEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - PostDelete + // + //------------------------------------------------------------------------------ + + } + private void MonitorConfigtime_PostAssignTo(object sender, ref GeneralEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - PostAssignTo + // + //------------------------------------------------------------------------------ + + } + private void MonitorConfigtime_PostAssign(object sender, ref GeneralEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - PostAssign + // + //------------------------------------------------------------------------------ + + } + private void MonitorConfigtime_PostCheckIn(object sender, ref SupportEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - PostCheckIn + // + //------------------------------------------------------------------------------ + + } + + #endregion + + private void PVHiLimitSetHandler(object sender, ref ConfigtimeSetHandlerEventArgs e) + { + PVHiLimit.SetHandlerValue = e; + } + } +} + diff --git a/aot/Samples/Monitor/MonitorConfigtime/MonitorConfigtime.csproj b/aot/Samples/Monitor/MonitorConfigtime/MonitorConfigtime.csproj new file mode 100644 index 0000000..f9f7bec --- /dev/null +++ b/aot/Samples/Monitor/MonitorConfigtime/MonitorConfigtime.csproj @@ -0,0 +1,132 @@ + + + + Debug + AnyCPU + 9.0.21022 + 2.0 + {E684C279-E337-41AB-BB43-CA0A04E65D53} + Library + Properties + ArchestrA.Toolkit.Monitor + MonitorConfigtime5 + true + ..\Monitor.snk + + + 4.0 + + + false + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + x86 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + x86 + + + + False + C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Toolkit.ArchestrAObjectSupport.dll + True + + + False + C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Core.dll + True + + + + + + + + + + + + + + + + + {0D1ADE9C-7960-4C20-A274-1FFEAAFF9315} + Monitor + + + + + Monitor.snk + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 2.0 %28x86%29 + true + + + False + .NET Framework 3.0 %28x86%29 + false + + + False + .NET Framework 3.5 + false + + + False + .NET Framework 3.5 SP1 + false + + + + + + + + + + + \ No newline at end of file diff --git a/aot/Samples/Monitor/MonitorConfigtime/Properties/AssemblyInfo.cs b/aot/Samples/Monitor/MonitorConfigtime/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..0eb5392 --- /dev/null +++ b/aot/Samples/Monitor/MonitorConfigtime/Properties/AssemblyInfo.cs @@ -0,0 +1,44 @@ +//------------------------------------------------------------------------------ +// Copyright (C) 2008 Invensys Systems Inc. All rights reserved. +// +// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY +// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +//------------------------------------------------------------------------------ + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Configtime")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("test")] +[assembly: AssemblyProduct("Configtime")] +[assembly: AssemblyCopyright("Copyright © Wonderware 2006")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(true)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("4eee53a0-aa70-40ae-86fc-32f8d1396da1")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.1.0.0")] diff --git a/aot/Samples/Monitor/MonitorEditor/MonitorEditor.Designer.cs b/aot/Samples/Monitor/MonitorEditor/MonitorEditor.Designer.cs new file mode 100644 index 0000000..01b6f1b --- /dev/null +++ b/aot/Samples/Monitor/MonitorEditor/MonitorEditor.Designer.cs @@ -0,0 +1,352 @@ +//------------------------------------------------------------------------------ +// Copyright (C) 2008 Invensys Systems Inc. All rights reserved. +// +// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY +// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +//------------------------------------------------------------------------------ + +namespace ArchestrA.Toolkit.Monitor +{ + partial class MonitorEditor + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing) + { + if (components != null) + { + components.Dispose(); + } + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MonitorEditor)); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.aaLockIcon3 = new ArchestraEditorFramework.aaLockIcon(); + this.aaLabel4 = new ArchestraEditorFramework.aaLabel(); + this.aaCheckBox1 = new ArchestraEditorFramework.aaCheckBox(); + this.aaLockIcon2 = new ArchestraEditorFramework.aaLockIcon(); + this.aaSecurityClassificationIcon3 = new ArchestraEditorFramework.aaSecurityClassificationIcon(); + this.aaLabel3 = new ArchestraEditorFramework.aaLabel(); + this.aaTextBoxMxReference2 = new ArchestraEditorFramework.aaTextBoxMxReference(); + this.aaLockIcon1 = new ArchestraEditorFramework.aaLockIcon(); + this.aaSecurityClassificationIcon2 = new ArchestraEditorFramework.aaSecurityClassificationIcon(); + this.aaLabel2 = new ArchestraEditorFramework.aaLabel(); + this.aaTextBoxMxReference1 = new ArchestraEditorFramework.aaTextBoxMxReference(); + this.aaSecurityClassificationIcon1 = new ArchestraEditorFramework.aaSecurityClassificationIcon(); + this.aaLabel1 = new ArchestraEditorFramework.aaLabel(); + this.aaCustomUpDown1 = new ArchestraEditorFramework.aaCustomUpDown(); + this.MainTabControl.SuspendLayout(); + this.tabPage1.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.aaLockIcon3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaLockIcon2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaSecurityClassificationIcon3)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaLockIcon1)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaSecurityClassificationIcon2)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaSecurityClassificationIcon1)).BeginInit(); + this.SuspendLayout(); + // + // CaptionPanel + // + this.CaptionPanel.Size = new System.Drawing.Size(748, 32); + // + // MainTabControl + // + this.MainTabControl.Controls.Add(this.tabPage1); + this.MainTabControl.Size = new System.Drawing.Size(732, 438); + // + // tabPage1 + // + this.tabPage1.BackColor = System.Drawing.SystemColors.Window; + this.tabPage1.Controls.Add(this.aaLockIcon3); + this.tabPage1.Controls.Add(this.aaLabel4); + this.tabPage1.Controls.Add(this.aaCheckBox1); + this.tabPage1.Controls.Add(this.aaLockIcon2); + this.tabPage1.Controls.Add(this.aaSecurityClassificationIcon3); + this.tabPage1.Controls.Add(this.aaLabel3); + this.tabPage1.Controls.Add(this.aaTextBoxMxReference2); + this.tabPage1.Controls.Add(this.aaLockIcon1); + this.tabPage1.Controls.Add(this.aaSecurityClassificationIcon2); + this.tabPage1.Controls.Add(this.aaLabel2); + this.tabPage1.Controls.Add(this.aaTextBoxMxReference1); + this.tabPage1.Controls.Add(this.aaSecurityClassificationIcon1); + this.tabPage1.Controls.Add(this.aaLabel1); + this.tabPage1.Controls.Add(this.aaCustomUpDown1); + this.tabPage1.Location = new System.Drawing.Point(4, 22); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(724, 412); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "tabPage1"; + // + // aaLockIcon3 + // + this.aaLockIcon3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaLockIcon3.Attribute = "PVInputOutput.SeparateFeedbackConfigured"; + this.aaLockIcon3.BackColor = System.Drawing.Color.Transparent; + this.aaLockIcon3.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaLockIcon3.Image = ((System.Drawing.Image)(resources.GetObject("aaLockIcon3.Image"))); + this.aaLockIcon3.Location = new System.Drawing.Point(604, 115); + this.aaLockIcon3.Name = "aaLockIcon3"; + this.aaLockIcon3.Size = new System.Drawing.Size(21, 20); + this.aaLockIcon3.TabIndex = 27; + this.aaLockIcon3.TabStop = false; + this.aaLockIcon3.Text = "PVInputOutput.SeparateFeedbackConfigured"; + // + // aaLabel4 + // + this.aaLabel4.Attribute = null; + this.aaLabel4.BackColor = System.Drawing.Color.Transparent; + this.aaLabel4.Dictionary = null; + this.aaLabel4.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaLabel4.Location = new System.Drawing.Point(43, 116); + this.aaLabel4.Name = "aaLabel4"; + this.aaLabel4.PhraseID = null; + this.aaLabel4.Size = new System.Drawing.Size(231, 20); + this.aaLabel4.TabIndex = 26; + this.aaLabel4.Text = "PVInputOutput.SeparateFeedbackConfigured:"; + this.aaLabel4.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // aaCheckBox1 + // + this.aaCheckBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.aaCheckBox1.Attribute = "PVInputOutput.SeparateFeedbackConfigured"; + this.aaCheckBox1.BackColor = System.Drawing.Color.Transparent; + this.aaCheckBox1.Dictionary = null; + this.aaCheckBox1.FlatStyle = System.Windows.Forms.FlatStyle.System; + this.aaCheckBox1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaCheckBox1.Location = new System.Drawing.Point(280, 116); + this.aaCheckBox1.Name = "aaCheckBox1"; + this.aaCheckBox1.PhraseID = null; + this.aaCheckBox1.Size = new System.Drawing.Size(20, 24); + this.aaCheckBox1.TabIndex = 25; + this.aaCheckBox1.UseVisualStyleBackColor = false; + // + // aaLockIcon2 + // + this.aaLockIcon2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaLockIcon2.Attribute = "PVInputOutput.ReferenceSecondary"; + this.aaLockIcon2.BackColor = System.Drawing.Color.Transparent; + this.aaLockIcon2.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaLockIcon2.Image = ((System.Drawing.Image)(resources.GetObject("aaLockIcon2.Image"))); + this.aaLockIcon2.Location = new System.Drawing.Point(604, 89); + this.aaLockIcon2.Name = "aaLockIcon2"; + this.aaLockIcon2.Size = new System.Drawing.Size(20, 20); + this.aaLockIcon2.TabIndex = 24; + this.aaLockIcon2.TabStop = false; + this.aaLockIcon2.Text = "PVInputOutput.ReferenceSecondary"; + // + // aaSecurityClassificationIcon3 + // + this.aaSecurityClassificationIcon3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaSecurityClassificationIcon3.Attribute = "PVInputOutput.ReferenceSecondary"; + this.aaSecurityClassificationIcon3.BackColor = System.Drawing.Color.Transparent; + this.aaSecurityClassificationIcon3.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaSecurityClassificationIcon3.Image = ((System.Drawing.Image)(resources.GetObject("aaSecurityClassificationIcon3.Image"))); + this.aaSecurityClassificationIcon3.Location = new System.Drawing.Point(576, 89); + this.aaSecurityClassificationIcon3.Name = "aaSecurityClassificationIcon3"; + this.aaSecurityClassificationIcon3.Size = new System.Drawing.Size(20, 20); + this.aaSecurityClassificationIcon3.TabIndex = 23; + this.aaSecurityClassificationIcon3.TabStop = false; + this.aaSecurityClassificationIcon3.Text = "PVInputOutput.ReferenceSecondary"; + // + // aaLabel3 + // + this.aaLabel3.Attribute = null; + this.aaLabel3.BackColor = System.Drawing.Color.Transparent; + this.aaLabel3.Dictionary = null; + this.aaLabel3.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaLabel3.Location = new System.Drawing.Point(81, 89); + this.aaLabel3.Name = "aaLabel3"; + this.aaLabel3.PhraseID = null; + this.aaLabel3.Size = new System.Drawing.Size(191, 20); + this.aaLabel3.TabIndex = 22; + this.aaLabel3.Text = "PVInputOutput.ReferenceSecondary:"; + this.aaLabel3.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // aaTextBoxMxReference2 + // + this.aaTextBoxMxReference2.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.aaTextBoxMxReference2.Attribute = "PVInputOutput.ReferenceSecondary"; + this.aaTextBoxMxReference2.BackColor = System.Drawing.Color.Transparent; + this.aaTextBoxMxReference2.Dictionary = null; + this.aaTextBoxMxReference2.FilterNamePhraseID = null; + this.aaTextBoxMxReference2.Font = new System.Drawing.Font("Tahoma", 8.25F); + this.aaTextBoxMxReference2.Location = new System.Drawing.Point(280, 89); + this.aaTextBoxMxReference2.Name = "aaTextBoxMxReference2"; + this.aaTextBoxMxReference2.Size = new System.Drawing.Size(288, 21); + this.aaTextBoxMxReference2.TabIndex = 21; + // + // aaLockIcon1 + // + this.aaLockIcon1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaLockIcon1.Attribute = "PVInputOutput.Reference"; + this.aaLockIcon1.BackColor = System.Drawing.Color.Transparent; + this.aaLockIcon1.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaLockIcon1.Image = ((System.Drawing.Image)(resources.GetObject("aaLockIcon1.Image"))); + this.aaLockIcon1.Location = new System.Drawing.Point(604, 62); + this.aaLockIcon1.Name = "aaLockIcon1"; + this.aaLockIcon1.Size = new System.Drawing.Size(20, 20); + this.aaLockIcon1.TabIndex = 20; + this.aaLockIcon1.TabStop = false; + this.aaLockIcon1.Text = "PVInputOutput.Reference"; + // + // aaSecurityClassificationIcon2 + // + this.aaSecurityClassificationIcon2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaSecurityClassificationIcon2.Attribute = "PVInputOutput.Reference"; + this.aaSecurityClassificationIcon2.BackColor = System.Drawing.Color.Transparent; + this.aaSecurityClassificationIcon2.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaSecurityClassificationIcon2.Image = ((System.Drawing.Image)(resources.GetObject("aaSecurityClassificationIcon2.Image"))); + this.aaSecurityClassificationIcon2.Location = new System.Drawing.Point(576, 62); + this.aaSecurityClassificationIcon2.Name = "aaSecurityClassificationIcon2"; + this.aaSecurityClassificationIcon2.Size = new System.Drawing.Size(20, 20); + this.aaSecurityClassificationIcon2.TabIndex = 19; + this.aaSecurityClassificationIcon2.TabStop = false; + this.aaSecurityClassificationIcon2.Text = "PVInputOutput.Reference"; + // + // aaLabel2 + // + this.aaLabel2.Attribute = null; + this.aaLabel2.BackColor = System.Drawing.Color.Transparent; + this.aaLabel2.Dictionary = null; + this.aaLabel2.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaLabel2.Location = new System.Drawing.Point(133, 62); + this.aaLabel2.Name = "aaLabel2"; + this.aaLabel2.PhraseID = null; + this.aaLabel2.Size = new System.Drawing.Size(139, 20); + this.aaLabel2.TabIndex = 18; + this.aaLabel2.Text = "PVInputOutput.Reference:"; + this.aaLabel2.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // aaTextBoxMxReference1 + // + this.aaTextBoxMxReference1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.aaTextBoxMxReference1.Attribute = "PVInputOutput.Reference"; + this.aaTextBoxMxReference1.BackColor = System.Drawing.Color.Transparent; + this.aaTextBoxMxReference1.Dictionary = null; + this.aaTextBoxMxReference1.FilterNamePhraseID = null; + this.aaTextBoxMxReference1.Font = new System.Drawing.Font("Tahoma", 8.25F); + this.aaTextBoxMxReference1.Location = new System.Drawing.Point(280, 62); + this.aaTextBoxMxReference1.Name = "aaTextBoxMxReference1"; + this.aaTextBoxMxReference1.Size = new System.Drawing.Size(288, 21); + this.aaTextBoxMxReference1.TabIndex = 17; + // + // aaSecurityClassificationIcon1 + // + this.aaSecurityClassificationIcon1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaSecurityClassificationIcon1.Attribute = "PVHiLimit"; + this.aaSecurityClassificationIcon1.BackColor = System.Drawing.Color.Transparent; + this.aaSecurityClassificationIcon1.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaSecurityClassificationIcon1.Image = ((System.Drawing.Image)(resources.GetObject("aaSecurityClassificationIcon1.Image"))); + this.aaSecurityClassificationIcon1.Location = new System.Drawing.Point(576, 35); + this.aaSecurityClassificationIcon1.Name = "aaSecurityClassificationIcon1"; + this.aaSecurityClassificationIcon1.Size = new System.Drawing.Size(20, 20); + this.aaSecurityClassificationIcon1.TabIndex = 16; + this.aaSecurityClassificationIcon1.TabStop = false; + this.aaSecurityClassificationIcon1.Text = "PVHiLimit"; + // + // aaLabel1 + // + this.aaLabel1.Attribute = null; + this.aaLabel1.BackColor = System.Drawing.Color.Transparent; + this.aaLabel1.Dictionary = null; + this.aaLabel1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaLabel1.Location = new System.Drawing.Point(213, 35); + this.aaLabel1.Name = "aaLabel1"; + this.aaLabel1.PhraseID = null; + this.aaLabel1.Size = new System.Drawing.Size(59, 20); + this.aaLabel1.TabIndex = 15; + this.aaLabel1.Text = "PVHiLimit:"; + this.aaLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // aaCustomUpDown1 + // + this.aaCustomUpDown1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.aaCustomUpDown1.Attribute = "PVHiLimit"; + this.aaCustomUpDown1.BackColor = System.Drawing.Color.Transparent; + this.aaCustomUpDown1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaCustomUpDown1.Increment = new decimal(new int[] { + 1, + 0, + 0, + 65536}); + this.aaCustomUpDown1.Location = new System.Drawing.Point(280, 35); + this.aaCustomUpDown1.Maximum = new decimal(new int[] { + 268435456, + 1042612833, + 542101086, + 0}); + this.aaCustomUpDown1.Minimum = new decimal(new int[] { + 268435456, + 1042612833, + 542101086, + -2147483648}); + this.aaCustomUpDown1.Name = "aaCustomUpDown1"; + this.aaCustomUpDown1.Size = new System.Drawing.Size(201, 21); + this.aaCustomUpDown1.TabIndex = 14; + this.aaCustomUpDown1.Value = new decimal(new int[] { + 0, + 0, + 0, + 0}); + // + // MonitorEditor + // + this.Name = "MonitorEditor"; + this.Size = new System.Drawing.Size(748, 482); + this.MainTabControl.ResumeLayout(false); + this.tabPage1.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.aaLockIcon3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaLockIcon2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaSecurityClassificationIcon3)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaLockIcon1)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaSecurityClassificationIcon2)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaSecurityClassificationIcon1)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TabPage tabPage1; + private ArchestraEditorFramework.aaLockIcon aaLockIcon3; + private ArchestraEditorFramework.aaLabel aaLabel4; + private ArchestraEditorFramework.aaCheckBox aaCheckBox1; + private ArchestraEditorFramework.aaLockIcon aaLockIcon2; + private ArchestraEditorFramework.aaSecurityClassificationIcon aaSecurityClassificationIcon3; + private ArchestraEditorFramework.aaLabel aaLabel3; + private ArchestraEditorFramework.aaTextBoxMxReference aaTextBoxMxReference2; + private ArchestraEditorFramework.aaLockIcon aaLockIcon1; + private ArchestraEditorFramework.aaSecurityClassificationIcon aaSecurityClassificationIcon2; + private ArchestraEditorFramework.aaLabel aaLabel2; + private ArchestraEditorFramework.aaTextBoxMxReference aaTextBoxMxReference1; + private ArchestraEditorFramework.aaSecurityClassificationIcon aaSecurityClassificationIcon1; + private ArchestraEditorFramework.aaLabel aaLabel1; + private ArchestraEditorFramework.aaCustomUpDown aaCustomUpDown1; + } +} diff --git a/aot/Samples/Monitor/MonitorEditor/MonitorEditor.cs b/aot/Samples/Monitor/MonitorEditor/MonitorEditor.cs new file mode 100644 index 0000000..ff9d366 --- /dev/null +++ b/aot/Samples/Monitor/MonitorEditor/MonitorEditor.cs @@ -0,0 +1,36 @@ +//------------------------------------------------------------------------------ +// Copyright (C) 2008 Invensys Systems Inc. All rights reserved. +// +// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY +// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Text; +using System.Windows.Forms; +using System.Runtime.InteropServices; + + +namespace ArchestrA.Toolkit.Monitor +{ + [Guid("d5f5236a-f1eb-4620-b2df-4c1adc4f3e7b")] + [ProgId("test.Monitor.5")] + + public partial class MonitorEditor : ArchestraEditorFramework.aaBaseEditorForm + { + public MonitorEditor() + { + this.Dictionary = "test:Monitor5.aaDCT"; + // This call is required by the Windows Form Designer. + InitializeComponent(); + + // TODO: Add any initialization after the InitializeComponent call + } + } +} diff --git a/aot/Samples/Monitor/MonitorEditor/MonitorEditor.csproj b/aot/Samples/Monitor/MonitorEditor/MonitorEditor.csproj new file mode 100644 index 0000000..5093d3f --- /dev/null +++ b/aot/Samples/Monitor/MonitorEditor/MonitorEditor.csproj @@ -0,0 +1,139 @@ + + + + Debug + AnyCPU + 9.0.21022 + 2.0 + {06CEDE14-B295-4817-A439-D2B60D71FF4C} + Library + Properties + ArchestrA.Toolkit.Monitor + MonitorEditor5 + true + ..\Monitor.snk + + + 4.0 + + + false + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + x86 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + x86 + + + + False + C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Toolkit.ArchestrAControlLibrary.dll + False + + + False + C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestraEditorFramework.dll + + + False + C:\Program Files\Archestra\Toolkits\AOT\bin\IaaEditorFormLibInterop.dll + + + + + + + + + + + + + + + MonitorEditor.cs + + + + + + Designer + MonitorEditor.cs + + + + + Monitor.snk + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 2.0 %28x86%29 + true + + + False + .NET Framework 3.0 %28x86%29 + false + + + False + .NET Framework 3.5 + false + + + False + .NET Framework 3.5 SP1 + false + + + + + + + + + + + \ No newline at end of file diff --git a/aot/Samples/Monitor/MonitorEditor/MonitorEditor.resx b/aot/Samples/Monitor/MonitorEditor/MonitorEditor.resx new file mode 100644 index 0000000..1df0bbe --- /dev/null +++ b/aot/Samples/Monitor/MonitorEditor/MonitorEditor.resx @@ -0,0 +1,211 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ + Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA + GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2 + BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9 + /sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU + KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg + JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ + Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA + GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2 + BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9 + /sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU + KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg + JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAg1JREFUOE+t1G1P2lAYBuDtN/mf+Dt+NPu4uDcWEyMKggxM3CIimMoUcAjIoLSFliJS + oLSnvXfOqZV24sYWmjwfSHku7ofz8hrAq7U+DFxnhbBoVMey2toqY1ktC/IEMog9hACm6cIYu9B1B0rP + Qb1BUK3YKJVsFAsWcjkL0c+32NzMspZQqGfgcAgMBi5UzYEs22g2TRwfq8hmVWQyfaTTPaSOFCQT4v+D + mYyKL2mKUSiVknF4KK0Gui7wlFBdJDxKL6BEXMLBvrga6DiPoB4eOZmUkUhIiB+IiMVE7O11VgOJ4/KE + OgMDCePxLvZpqkjkzYvlL05oUQjxQL4oATBGEzGMvfOL/aimed9TFMLf80Piy2zb2PYj+FvC3d12CNzY + iMAvSbIhitZy0LKcRcLAttnZaXkg3aoM6vdZKhvdrsU/392Zz0GWlKU05w4fWQuMHP3U5A2q6qLXI5Ak + gk7HQqs15+CP2nQ56KOzGQn9hx8/NHiDIhM+3s/2nG94hlVvJri+Nl4GfXQ6Jd5JaZh4/+6WN3TaFh1v + jnp9xrFKeYLvpTEEYfRn0Ecnhnf0tt/WeEOD4jU6XrUywdXVGJeXD7i4GOE8f/930EeNMb0UBIc33NDx + ymWDXhJjnrBQuMfZmY7TU301kKHsRmHFQJZKEB5QLI6Qzw+Ro9C3rwOcnGirg8Hr6Z9Oyrpu7V90BMb8 + GyGmhwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ + Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA + GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2 + BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9 + /sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU + KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg + JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAg1JREFUOE+t1G1P2lAYBuDtN/mf+Dt+NPu4uDcWEyMKggxM3CIimMoUcAjIoLSFliJS + oLSnvXfOqZV24sYWmjwfSHku7ofz8hrAq7U+DFxnhbBoVMey2toqY1ktC/IEMog9hACm6cIYu9B1B0rP + Qb1BUK3YKJVsFAsWcjkL0c+32NzMspZQqGfgcAgMBi5UzYEs22g2TRwfq8hmVWQyfaTTPaSOFCQT4v+D + mYyKL2mKUSiVknF4KK0Gui7wlFBdJDxKL6BEXMLBvrga6DiPoB4eOZmUkUhIiB+IiMVE7O11VgOJ4/KE + OgMDCePxLvZpqkjkzYvlL05oUQjxQL4oATBGEzGMvfOL/aimed9TFMLf80Piy2zb2PYj+FvC3d12CNzY + iMAvSbIhitZy0LKcRcLAttnZaXkg3aoM6vdZKhvdrsU/392Zz0GWlKU05w4fWQuMHP3U5A2q6qLXI5Ak + gk7HQqs15+CP2nQ56KOzGQn9hx8/NHiDIhM+3s/2nG94hlVvJri+Nl4GfXQ6Jd5JaZh4/+6WN3TaFh1v + jnp9xrFKeYLvpTEEYfRn0Ecnhnf0tt/WeEOD4jU6XrUywdXVGJeXD7i4GOE8f/930EeNMb0UBIc33NDx + ymWDXhJjnrBQuMfZmY7TU301kKHsRmHFQJZKEB5QLI6Qzw+Ro9C3rwOcnGirg8Hr6Z9Oyrpu7V90BMb8 + GyGmhwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAg1JREFUOE+t1G1P2lAYBuDtN/mf+Dt+NPu4uDcWEyMKggxM3CIimMoUcAjIoLSFliJS + oLSnvXfOqZV24sYWmjwfSHku7ofz8hrAq7U+DFxnhbBoVMey2toqY1ktC/IEMog9hACm6cIYu9B1B0rP + Qb1BUK3YKJVsFAsWcjkL0c+32NzMspZQqGfgcAgMBi5UzYEs22g2TRwfq8hmVWQyfaTTPaSOFCQT4v+D + mYyKL2mKUSiVknF4KK0Gui7wlFBdJDxKL6BEXMLBvrga6DiPoB4eOZmUkUhIiB+IiMVE7O11VgOJ4/KE + OgMDCePxLvZpqkjkzYvlL05oUQjxQL4oATBGEzGMvfOL/aimed9TFMLf80Piy2zb2PYj+FvC3d12CNzY + iMAvSbIhitZy0LKcRcLAttnZaXkg3aoM6vdZKhvdrsU/392Zz0GWlKU05w4fWQuMHP3U5A2q6qLXI5Ak + gk7HQqs15+CP2nQ56KOzGQn9hx8/NHiDIhM+3s/2nG94hlVvJri+Nl4GfXQ6Jd5JaZh4/+6WN3TaFh1v + jnp9xrFKeYLvpTEEYfRn0Ecnhnf0tt/WeEOD4jU6XrUywdXVGJeXD7i4GOE8f/930EeNMb0UBIc33NDx + ymWDXhJjnrBQuMfZmY7TU301kKHsRmHFQJZKEB5QLI6Qzw+Ro9C3rwOcnGirg8Hr6Z9Oyrpu7V90BMb8 + GyGmhwAAAABJRU5ErkJggg== + + + \ No newline at end of file diff --git a/aot/Samples/Monitor/MonitorEditor/Properties/AssemblyInfo.cs b/aot/Samples/Monitor/MonitorEditor/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..6c196f9 --- /dev/null +++ b/aot/Samples/Monitor/MonitorEditor/Properties/AssemblyInfo.cs @@ -0,0 +1,44 @@ +//------------------------------------------------------------------------------ +// Copyright (C) 2008 Invensys Systems Inc. All rights reserved. +// +// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY +// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +//------------------------------------------------------------------------------ + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Editor")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("test")] +[assembly: AssemblyProduct("Editor")] +[assembly: AssemblyCopyright("Copyright © Wonderware 2006")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(true)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("d7aafff8-15ff-41dd-a6a7-d5e9c37b4605")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.1.0.0")] diff --git a/aot/Samples/Monitor/MonitorRuntime/MonitorRuntime.cs b/aot/Samples/Monitor/MonitorRuntime/MonitorRuntime.cs new file mode 100644 index 0000000..8c42120 --- /dev/null +++ b/aot/Samples/Monitor/MonitorRuntime/MonitorRuntime.cs @@ -0,0 +1,398 @@ +//------------------------------------------------------------------------------ +// Copyright (C) 2008 Invensys Systems Inc. All rights reserved. +// +// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY +// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +//------------------------------------------------------------------------------ + +using System; +using System.Runtime.InteropServices; +using System.Collections; +using ArchestrA.Core; +using ArchestrA.Toolkit; + +namespace ArchestrA.Toolkit.Monitor +{ + [Guid("df4726d8-fe33-4d79-a6a1-b8198f1e5ac1")] + /// + /// Summary description for Monitor + /// + public class MonitorRuntime : RuntimeBase + { + #region Attributes - Toolkit generated code + // The following C# properties have been defined to simplify access to + // attribute values - do not modify the contents of this region with + // the code editor. + private CMxBoolean ResetInputAvg + { + get { return InternalReferenceOnly.ResetInputAvg; } + set { InternalReferenceOnly.ResetInputAvg.Set(value); } + } + + private CMxFloat PVHiLimit + { + get { return InternalReferenceOnly.PVHiLimit; } + set { InternalReferenceOnly.PVHiLimit.Set(value); } + } + + private CMxDouble PVInputAvg + { + get { return InternalReferenceOnly.PVInputAvg; } + set { InternalReferenceOnly.PVInputAvg.Set(value); } + } + + private CMxFloat PV + { + get { return InternalReferenceOnly.PV; } + set { InternalReferenceOnly.PV.Set(value); } + } + + + + public __PVInputOutput PVInputOutput = null; + + public class __PVInputOutput : InputOutputPrimBase + { + protected override void Initialize(SupportWrapper _Wrapper) + { + if (_ReadValue == null) { _ReadValue = new CMxVariant(Wrapper, "PVInputOutput.ReadValue"); } + if (_WriteValue == null) { _WriteValue = new CMxVariant(Wrapper, "PVInputOutput.WriteValue"); } + if (_DataType == null) { _DataType = new CMxDataType(Wrapper, "PVInputOutput.DataType"); } + + attrId = _ReadValue.Attribute.shAttributeId; + attrId2 = _WriteValue.Attribute.shAttributeId; + primId = _ReadValue.Attribute.shPrimitiveId; + dataType = _DataType.Value; + + base.Initialize(Wrapper); + } + + public SupportWrapper Wrapper = new SupportWrapper(); + + private CMxStatus _ReadStatus = null; + + public CMxStatus ReadStatus + { + get { if (_ReadStatus == null) { _ReadStatus = new CMxStatus(Wrapper, "PVInputOutput.ReadStatus"); } return _ReadStatus; } + set { if (_ReadStatus == null) { _ReadStatus = new CMxStatus(Wrapper, "PVInputOutput.ReadStatus"); } _ReadStatus.Set(value); } + } + + private CMxVariant _ReadValue = null; + + public CMxVariant ReadValue + { + get { if (_ReadValue == null) { _ReadValue = new CMxVariant(Wrapper, "PVInputOutput.ReadValue"); } return _ReadValue; } + set { if (_ReadValue == null) { _ReadValue = new CMxVariant(Wrapper, "PVInputOutput.ReadValue"); } _ReadValue.Set(value); } + } + + private CMxReference _ReferenceSecondary = null; + + public CMxReference ReferenceSecondary + { + get { if (_ReferenceSecondary == null) { _ReferenceSecondary = new CMxReference(Wrapper, "PVInputOutput.ReferenceSecondary"); } return _ReferenceSecondary; } + set { if (_ReferenceSecondary == null) { _ReferenceSecondary = new CMxReference(Wrapper, "PVInputOutput.ReferenceSecondary"); } _ReferenceSecondary.Set(value); } + } + + private CMxReference _Reference = null; + + public CMxReference Reference + { + get { if (_Reference == null) { _Reference = new CMxReference(Wrapper, "PVInputOutput.Reference"); } return _Reference; } + set { if (_Reference == null) { _Reference = new CMxReference(Wrapper, "PVInputOutput.Reference"); } _Reference.Set(value); } + } + + private CMxDataType _DataType = null; + + public CMxDataType DataType + { + get { if (_DataType == null) { _DataType = new CMxDataType(Wrapper, "PVInputOutput.DataType"); } return _DataType; } + } + + private CMxVariant _WriteValue = null; + + public CMxVariant WriteValue + { + get { if (_WriteValue == null) { _WriteValue = new CMxVariant(Wrapper, "PVInputOutput.WriteValue"); } return _WriteValue; } + set { if (_WriteValue == null) { _WriteValue = new CMxVariant(Wrapper, "PVInputOutput.WriteValue"); } _WriteValue.Set(value); } + } + + private CMxStatus _WriteStatus = null; + + public CMxStatus WriteStatus + { + get { if (_WriteStatus == null) { _WriteStatus = new CMxStatus(Wrapper, "PVInputOutput.WriteStatus"); } return _WriteStatus; } + set { if (_WriteStatus == null) { _WriteStatus = new CMxStatus(Wrapper, "PVInputOutput.WriteStatus"); } _WriteStatus.Set(value); } + } + + public AoAWrapper AoA = null; + + public void SuspendUpdatesList() + { + if (AoA == null) { AoA = new AoAWrapper(Wrapper, new string[] { "PVInputOutput.ReadValue" }); } AoA.SuspendUpdatesList(); + } + + public void ActivateUpdatesList() + { + if (AoA == null) { AoA = new AoAWrapper(Wrapper, new string[] { "PVInputOutput.ReadValue" }); } AoA.ActivateUpdatesList(); + } + + public __PVInputOutput(AObjectBase baseClass) + { + Wrapper.baseClass = baseClass; + } + + } + + #endregion Attributes + + #region Internal Reference Only + //Toolkit code required to access the attributes declared in the Object Class + private Monitor InternalReferenceOnly = null; + #endregion Internal Reference Only + + #region Declarations + //Declare Runtime Class Variables here. + //Variables declared in this region are available to all methods + //in the Runtime Class. + long totalReads; + double accumulatedInput; + + #endregion Declarations + + + public MonitorRuntime() + { + InternalReferenceOnly = new Monitor(); + this.AObjectInstance = InternalReferenceOnly; + + #region Runtime Event Registration - Toolkit generated code + // Required region for Runtime Events - do not modify + // the contents of this region with the code editor. + base.RuntimeGetStatusDesc += new RuntimeGetStatusDescDelegate(MonitorRuntime_RuntimeGetStatusDesc); + base.RuntimeSetScanState += new RuntimeSetScanStateDelegate(Monitor_RuntimeSetScanState); + base.RuntimeExecute += new RuntimeExecuteDelegate(Monitor_RuntimeExecute); + base.RuntimeShutdown += new RuntimeShutdownDelegate(Monitor_RuntimeShutdown); + base.RuntimeStartup += new RuntimeStartupDelegate(Monitor_RuntimeStartup); + base.RuntimeDynamic += new RuntimeDynamicSetHandlerDelegate(MonitorRuntime_RuntimeDynamic); + base.RuntimeInitialize += new RuntimeInitializeDelegate(MonitorRuntime_RuntimeInitialize); + #endregion Runtime Event Registration + + #region Runtime Set Handler Registration Toolkit generated code + // Required method for Runtime SetHandlers. + // Changes made using the code editor will appear in the Toolkit Editor. + // + // WARNING: Changes made to this region will result in a Shape Change. + + // TODO: Runtime SetHandler registration + this.RegisterRuntimeSetHandler("ResetInputAvg", new RuntimeSetHandlerDelegate(ResetInputAvgSetHandler)); + this.RegisterRuntimeSetHandler("PVHiLimit", new RuntimeSetHandlerDelegate(PVHiLimitSetHandler)); + this.RegisterRuntimeSetHandler("PV", new RuntimeSetHandlerDelegate(PVSetHandler)); + #endregion Runtime Set Handler Registration + + #region Primitive Wrapper Initialization - Toolkit generated code + PVInputOutput = new __PVInputOutput(this); + #endregion Primitive Wrapper Initialization + + #region Primitive Advise only Activate Registration - Toolkit generated code + #endregion Primitive Advise only Activate Initialization + + } + + private void MonitorRuntime_RuntimeInitialize(object sender) + { + //------------------------------------------------------------------------------ + // TODO: Runtime - Initialize + // + // Do not read or write attribute values of this primitive during Initialize + //------------------------------------------------------------------------------ + } + + private void Monitor_RuntimeExecute(object sender) + { + //------------------------------------------------------------------------------ + // 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 + + if ((PVInputOutput.ReadStatus.Value.success == -1) && PVInputOutput.ReadValue.Quality.isGood) + { + float inputValue = (float)PVInputOutput.GetReadValue(); + + PV = inputValue; + accumulatedInput += Convert.ToDouble(inputValue); + totalReads++; + + PVInputAvg = accumulatedInput / totalReads; + + PVInputAvg.Quality = DataQuality.DataQualityGood; + + } + } + + private void Monitor_RuntimeShutdown(object sender) + { + //------------------------------------------------------------------------------ + // TODO: Runtime Event - Shutdown + // + // Clean up dynamic allocation, release open resources, etc. + //------------------------------------------------------------------------------ + } + + private void Monitor_RuntimeStartup(object sender, RuntimeStartupEventArgs e) + { + //------------------------------------------------------------------------------ + // 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); + } + + private void Monitor_RuntimeSetScanState(object sender, RuntimeSetScanStateEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Runtime Event - SetScanState + // + // Perform actions when the object goes on or off scan. + //------------------------------------------------------------------------------ + + if (e.onScan) + { + PVInputAvg.Quality = DataQuality.DataQualityInitializing; + } + else + { + PVInputAvg.Quality = DataQuality.DataQualityBad; + } + } + + private void MonitorRuntime_RuntimeGetStatusDesc(object sender, ref RuntimeGetStatusDescEventArgs e) + { + //------------------------------------------------------------------------------ + // 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) + { + case 10000: + e.status = GetText("HiLimitExceeded"); + break; + default: + e.status = GetText((int)e.detailedErrorCode); + break; + } + } + + private void MonitorRuntime_RuntimeDynamic(object sender, ref RuntimeSetHandlerEventArgs e) + { + + 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 + SetValue(e.attributeHandle.shAttributeId, e.attributeHandle.shPrimitiveId, e.Value); + LogWarning(string.Format("Uknown set handler for attribute '{0}'", attrName)); + + } + + private void PVSetHandler(object sender, ref RuntimeSetHandlerEventArgs e) + { + if (e.Value > PVHiLimit) + { + e.status.detail = 10000; + e.status.Category = MxStatusCategory.MxCategoryOperationalError; + } + else + { + PV.SetHandlerValue = e; + PVInputOutput.WriteValue = e.Value; + } + } + + private void PVHiLimitSetHandler(object sender, ref RuntimeSetHandlerEventArgs e) + { + PVHiLimit.SetHandlerValue = e; + } + + private void ResetInputAvgSetHandler(object sender, ref RuntimeSetHandlerEventArgs e) + { + ResetInputAvg.SetHandlerValue = e; + totalReads = 0; + accumulatedInput = 0; + } + } +} + diff --git a/aot/Samples/Monitor/MonitorRuntime/MonitorRuntime.csproj b/aot/Samples/Monitor/MonitorRuntime/MonitorRuntime.csproj new file mode 100644 index 0000000..8b9f33f --- /dev/null +++ b/aot/Samples/Monitor/MonitorRuntime/MonitorRuntime.csproj @@ -0,0 +1,118 @@ + + + + Debug + AnyCPU + 9.0.21022 + 2.0 + {71A913E8-9A33-4A92-AD13-6B9023E5C8E5} + Library + Properties + ArchestrA.Toolkit.Monitor + MonitorRuntime5 + true + ..\Monitor.snk + + + + + 4.0 + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + x86 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + x86 + + + + False + C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Toolkit.ArchestrAObjectSupport.dll + True + + + False + C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Core.dll + True + + + + + + + + + + + + + + + + + {0D1ADE9C-7960-4C20-A274-1FFEAAFF9315} + Monitor + + + + + Monitor.snk + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + + + + + + + + + \ No newline at end of file diff --git a/aot/Samples/Monitor/MonitorRuntime/Properties/AssemblyInfo.cs b/aot/Samples/Monitor/MonitorRuntime/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..8baa473 --- /dev/null +++ b/aot/Samples/Monitor/MonitorRuntime/Properties/AssemblyInfo.cs @@ -0,0 +1,44 @@ +//------------------------------------------------------------------------------ +// Copyright (C) 2008 Invensys Systems Inc. All rights reserved. +// +// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY +// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +//------------------------------------------------------------------------------ + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Runtime")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("test")] +[assembly: AssemblyProduct("Runtime")] +[assembly: AssemblyCopyright("Copyright © Wonderware 2006")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(true)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("e59227fc-54f8-45ec-895b-723cebc485af")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.1.0.0")] diff --git a/aot/Samples/Watchdog/Stats/StatsConfigtime/Properties/AssemblyInfo.cs b/aot/Samples/Watchdog/Stats/StatsConfigtime/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..1ae5860 --- /dev/null +++ b/aot/Samples/Watchdog/Stats/StatsConfigtime/Properties/AssemblyInfo.cs @@ -0,0 +1,44 @@ +//------------------------------------------------------------------------------ +// Copyright (C) 2008 Invensys Systems Inc. All rights reserved. +// +// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY +// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +//------------------------------------------------------------------------------ + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("StatsConfigtime")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("ArchestrA")] +[assembly: AssemblyProduct("Configtime")] +[assembly: AssemblyCopyright("Copyright © Wonderware 2006")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(true)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("f413d64a-8d99-4e96-ac2b-77a673299ac5")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.1.0.0")] diff --git a/aot/Samples/Watchdog/Stats/StatsConfigtime/StatsConfigtime.cs b/aot/Samples/Watchdog/Stats/StatsConfigtime/StatsConfigtime.cs new file mode 100644 index 0000000..5e45264 --- /dev/null +++ b/aot/Samples/Watchdog/Stats/StatsConfigtime/StatsConfigtime.cs @@ -0,0 +1,302 @@ +//------------------------------------------------------------------------------ +// Copyright (C) 2008 Invensys Systems Inc. All rights reserved. +// +// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY +// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +//------------------------------------------------------------------------------ + +using System; +using System.Runtime.InteropServices; + +using ArchestrA.Core; +using ArchestrA.Toolkit; + +namespace ArchestrA.Toolkit.Watchdog +{ + [Guid("057251b9-4dfa-4216-80ae-0981f7bc63e9")] + /// + /// Summary description for WatchdogConfigtime + /// + public class StatsConfigtime : ConfigtimeBase + { + #region Attributes - Toolkit generated code + // The following C# properties have been defined to simplify access to + // attribute values - do not modify the contents of this region with + // the code editor. + private bool TimeoutCnt_Historized + { + get { return GetValue("TimeoutCnt.Historized"); } + set { SetValue("TimeoutCnt.Historized", (value)); } + } + + + + #endregion Attributes + + #region Internal Reference Only + //Toolkit code required to access the attributes declared in the Object Class + private Stats InternalReferenceOnly = null; + #endregion Internal Reference Only + + #region Declarations + //Declare Configtime Class Variables here. + //Variables declared in this region are available to all methods + //in the Configtime Class. + + + #endregion Declarations + + public StatsConfigtime() + { + InternalReferenceOnly = new Stats(); + this.AObjectInstance = InternalReferenceOnly; + + #region Configuration Event Registration - Toolkit generated code + // Required region for Configuration Events - do not modify + // the contents of this region with the code editor. + this.ConfigtimeInitialize += new ConfigtimeInitializeDelegate(StatsConfigtime_ConfigtimeInitialize); + this.ConfigtimeValidate += new ConfigtimeValidateDelegate(StatsConfigtime_ConfigtimeValidate); + this.ConfigtimeMigrate += new MigrateDelegate(StatsConfigtime_ConfigtimeMigrate); + this.ConfigtimeDynamic += new ConfigtimeDynamicSetHandlerDelegate(StatsConfigtime_ConfigtimeDynamic); + this.PreValidate += new ObjectEventDelegate(StatsConfigtime_PreValidate); + this.PostCreate += new ObjectEventDelegate(StatsConfigtime_PostCreate); + #endregion Configuration Event Registration + + #region Configtime Set Handler Registration Toolkit generated code + // Required method for Configtime SetHandlers. + // Changes made using the code editor will appear in the Toolkit Editor. + // + // WARNING: Changes made to this region will result in a Shape Change. + + + // TODO: Configtime SetHandler registration + // this.RegisterConfigtimeSetHandler("Example_001", new ConfigtimeSetHandlerDelegate(Example_001SetHandler)); + this.RegisterConfigtimeSetHandler("TimeoutCnt.Historized", new ConfigtimeSetHandlerDelegate(TimeoutCnt_HistorizedSetHandler)); + #endregion Configtime Set Handler Registration + + #region Primitive Wrapper Initialization - Toolkit generated code + #endregion Primitive Wrapper Initialization + + } + + private void StatsConfigtime_ConfigtimeInitialize(object sender) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - Initialize + // + // Any custom initialization can be done here, including caching of attribute + // values, primitive IDs etc. + //------------------------------------------------------------------------------ + } + + private void StatsConfigtime_ConfigtimeMigrate(object sender, ref MigrateHandler migrate) + { + //------------------------------------------------------------------------------ + // 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 + } + + private void StatsConfigtime_ConfigtimeValidate(object sender, ref EPACKAGESTATUS status) + { + //------------------------------------------------------------------------------ + // 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 (IsTemplate) + { + return; + } + } + + private void StatsConfigtime_ConfigtimeDynamic(object sender, ref ConfigtimeSetHandlerEventArgs e) + { + + 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 + SetValue(e.attributeHandle.shAttributeId, e.attributeHandle.shPrimitiveId, e.Value); + LogWarning(string.Format("Uknown set handler for attribute '{0}'", attrName)); + + } + + private void StatsConfigtime_PostCreate(object sender, object optionalParameter) + { + //------------------------------------------------------------------------------ + // 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 + } + + private void StatsConfigtime_PreValidate(object sender, object optionalParameter) + { + //------------------------------------------------------------------------------ + // 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. + //------------------------------------------------------------------------------ + } + + private void TimeoutCnt_HistorizedSetHandler(object sender, ref ConfigtimeSetHandlerEventArgs e) + { + // Required Set Handler for Virtual History Primtive. + // Do not modify this Set Handler via the code editor. + // + // WARNING: Changes made to this Set Handler will be overwritten by the code generator. + + if (TimeoutCnt_Historized == e.Value) + { + return; + } + + if (e.Value) + { + if (!AddPrimitive("TimeoutCntHistory", "TimeoutCntHistory1", "TimeoutCnt")) + { + e.Message = PrimitiveResult.message; + return; // Add failed + } + } + else + { + if (!DeletePrimitive("TimeoutCntHistory1")) + { + e.Message = PrimitiveResult.message; + return; // Remove Failed failed + } + } + + TimeoutCnt_Historized = e.Value; + } + + //TODO: Configtime SetHandler declaration + //private void Example_001SetHandler(object sender, ref ConfigtimeSetHandlerEventArgs e) + //{ + // Example_001 = e.Value; + //} + + } +} + diff --git a/aot/Samples/Watchdog/Stats/StatsConfigtime/StatsConfigtime.csproj b/aot/Samples/Watchdog/Stats/StatsConfigtime/StatsConfigtime.csproj new file mode 100644 index 0000000..65d90e0 --- /dev/null +++ b/aot/Samples/Watchdog/Stats/StatsConfigtime/StatsConfigtime.csproj @@ -0,0 +1,132 @@ + + + + Debug + AnyCPU + 9.0.21022 + 2.0 + {63437254-FEDA-404A-8FCB-B2036ED949CB} + Library + Properties + ArchestrA.Toolkit.Watchdog + WatchDogStatsConfigtime1 + true + ..\..\Watchdog.snk + + + 3.5 + + + false + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + x86 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + x86 + + + + False + C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Toolkit.ArchestrAObjectSupport.dll + True + + + False + C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Core.dll + True + + + + + + + + + + + + + + + + + {A7BA2304-935A-4DDD-80CC-E6387B2980E6} + Statsobj + + + + + Watchdog.snk + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 2.0 %28x86%29 + true + + + False + .NET Framework 3.0 %28x86%29 + false + + + False + .NET Framework 3.5 + false + + + False + .NET Framework 3.5 SP1 + false + + + + + + + + + + + \ No newline at end of file diff --git a/aot/Samples/Watchdog/Stats/StatsRuntime/Properties/AssemblyInfo.cs b/aot/Samples/Watchdog/Stats/StatsRuntime/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..47facab --- /dev/null +++ b/aot/Samples/Watchdog/Stats/StatsRuntime/Properties/AssemblyInfo.cs @@ -0,0 +1,44 @@ +//------------------------------------------------------------------------------ +// Copyright (C) 2008 Invensys Systems Inc. All rights reserved. +// +// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY +// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +//------------------------------------------------------------------------------ + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("StatsRuntime")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("ArchestrA")] +[assembly: AssemblyProduct("Runtime")] +[assembly: AssemblyCopyright("Copyright © Wonderware 2006")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(true)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("1e5f4d65-4d90-4529-896f-3a72ddc8052b")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.1.0.0")] diff --git a/aot/Samples/Watchdog/Stats/StatsRuntime/StatsRuntime.cs b/aot/Samples/Watchdog/Stats/StatsRuntime/StatsRuntime.cs new file mode 100644 index 0000000..7ca7f3d --- /dev/null +++ b/aot/Samples/Watchdog/Stats/StatsRuntime/StatsRuntime.cs @@ -0,0 +1,329 @@ +//------------------------------------------------------------------------------ +// Copyright (C) 2008 Invensys Systems Inc. All rights reserved. +// +// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY +// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +//------------------------------------------------------------------------------ + +using System; +using System.Runtime.InteropServices; + +using ArchestrA.Core; +using ArchestrA.Toolkit; + +namespace ArchestrA.Toolkit.Watchdog +{ + [Guid("85ca8612-8c40-4e51-b8b5-8588f2af5e59")] + /// + /// Summary description for Watchdog + /// + public class StatsRuntime : RuntimeBase + { + #region Attributes - Toolkit generated code + // The following C# properties have been defined to simplify access to + // attribute values - do not modify the contents of this region with + // the code editor. + private CMxTime LastTimeout + { + get { return InternalReferenceOnly.LastTimeout; } + set { InternalReferenceOnly.LastTimeout.Set(value); } + } + + private CMxInteger TimeoutCnt + { + get { return InternalReferenceOnly.TimeoutCnt; } + set { InternalReferenceOnly.TimeoutCnt.Set(value); } + } + + private CMxBoolean Reset + { + get { return InternalReferenceOnly.Reset; } + set { InternalReferenceOnly.Reset.Set(value); } + } + + private CMxElapsedTime DelayMax + { + get { return InternalReferenceOnly.DelayMax; } + set { InternalReferenceOnly.DelayMax.Set(value); } + } + + private CMxElapsedTime DelayAverage + { + get { return InternalReferenceOnly.DelayAverage; } + set { InternalReferenceOnly.DelayAverage.Set(value); } + } + + + + #endregion Attributes + + #region Internal Reference Only + //Toolkit code required to access the attributes declared in the Object Class + private Stats InternalReferenceOnly = null; + #endregion Internal Reference Only + + #region Declarations + //Declare Runtime Class Variables here. + //Variables declared in this region are available to all methods + //in the Runtime Class. + + bool m_PreviousTimeoutCondition; + TimeSpan m_PreviousTimeSinceChange; + TimeSpan m_DelayTotal; + long m_ChangeDetectedCount; + + #endregion Declarations + + + public StatsRuntime() + { + InternalReferenceOnly = new Stats(); + this.AObjectInstance = InternalReferenceOnly; + + #region Runtime Event Registration - Toolkit generated code + // Required region for Runtime Events - do not modify + // the contents of this region with the code editor. + base.RuntimeGetStatusDesc += new RuntimeGetStatusDescDelegate(StatsRuntime_RuntimeGetStatusDesc); + base.RuntimeSetScanState += new RuntimeSetScanStateDelegate(StatsRuntime_RuntimeSetScanState); + base.RuntimeExecute += new RuntimeExecuteDelegate(StatsRuntime_RuntimeExecute); + base.RuntimeShutdown += new RuntimeShutdownDelegate(StatsRuntime_RuntimeShutdown); + base.RuntimeStartup += new RuntimeStartupDelegate(StatsRuntime_RuntimeStartup); + base.RuntimeDynamic += new RuntimeDynamicSetHandlerDelegate(StatsRuntime_RuntimeDynamic); + base.RuntimeInitialize += new RuntimeInitializeDelegate(StatsRuntime_RuntimeInitialize); + #endregion Runtime Event Registration + + #region Runtime Set Handler Registration Toolkit generated code + // Required method for Runtime SetHandlers. + // Changes made using the code editor will appear in the Toolkit Editor. + // + // WARNING: Changes made to this region will result in a Shape Change. + + // TODO: Runtime SetHandler registration + this.RegisterRuntimeSetHandler("Reset", new RuntimeSetHandlerDelegate(ResetSetHandler)); + #endregion Runtime Set Handler Registration + + #region Primitive Wrapper Initialization - Toolkit generated code + #endregion Primitive Wrapper Initialization + + #region Primitive Advise only Activate Registration - Toolkit generated code + #endregion Primitive Advise only Activate Initialization + } + + private void StatsRuntime_RuntimeInitialize(object sender) + { + //------------------------------------------------------------------------------ + // TODO: Runtime - Initialize + // + // Do not read or write attribute values of this primitive during Initialize + //------------------------------------------------------------------------------ + } + + private void StatsRuntime_RuntimeExecute(object sender) + { + //------------------------------------------------------------------------------ + // 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 + + bool CurrentTimeoutCondition; + GetBoolean("myparent.Timeout", out CurrentTimeoutCondition); + if (!m_PreviousTimeoutCondition && CurrentTimeoutCondition) + { + TimeoutCnt++; + LastTimeout = GetScanTime(); + } + + //Compute the average delay by maintaining a sum/count of all the time elapsed between input changes, + //(since the last reset) and dividing by the number input changes detected + // + TimeSpan CurrentTimeSinceChange; + GetElapsedTime("myparent.TimeSinceChange", out CurrentTimeSinceChange); + if (CurrentTimeSinceChange.Ticks == 0) //The input just changed + { + m_DelayTotal = m_DelayTotal + m_PreviousTimeSinceChange; + DelayAverage = new TimeSpan(m_DelayTotal.Ticks / ++m_ChangeDetectedCount); + } + + //Compute the maximum delay + if (CurrentTimeSinceChange > DelayMax) + { + DelayMax = CurrentTimeSinceChange; + } + + //Save these values for tests made during the next scan (see above) + m_PreviousTimeoutCondition = CurrentTimeoutCondition; + m_PreviousTimeSinceChange = CurrentTimeSinceChange; + } + + private void StatsRuntime_RuntimeShutdown(object sender) + { + //------------------------------------------------------------------------------ + // TODO: Runtime Event - Shutdown + // + // Clean up dynamic allocation, release open resources, etc. + //------------------------------------------------------------------------------ + + // Activate marked attributes before shutting down + AdviseOnlyActivateAttributes(); + } + + private void StatsRuntime_RuntimeStartup(object sender, RuntimeStartupEventArgs e) + { + //------------------------------------------------------------------------------ + // 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(); + } + + + private void AdviseOnlySuspendAttributes() + { + // Required Method for Advise only Active. + // Do not modify this method via the code editor. + // + // WARNING: Changes made to this method will be overwritten by the code generator. + + if (AdviseOnlyActiveEnabled) + { + } + } + + private void AdviseOnlyActivateAttributes() + { + // Required Method for Advise only Active. + // Do not modify this method via the code editor. + // + // WARNING: Changes made to this method will be overwritten by the code generator. + + if (AdviseOnlyActiveEnabled) + { + } + } + + + private void StatsRuntime_RuntimeSetScanState(object sender, RuntimeSetScanStateEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Runtime Event - SetScanState + // + // Perform actions when the object goes on or off scan. + //------------------------------------------------------------------------------ + } + + private void StatsRuntime_RuntimeGetStatusDesc(object sender, ref RuntimeGetStatusDescEventArgs e) + { + //------------------------------------------------------------------------------ + // 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; + } + } + + private void StatsRuntime_RuntimeDynamic(object sender, ref RuntimeSetHandlerEventArgs e) + { + 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 + SetValue(e.attributeHandle.shAttributeId, e.attributeHandle.shPrimitiveId, e.Value); + LogWarning(string.Format("Uknown set handler for attribute '{0}'", attrName)); + + } + + private void ResetSetHandler(object sender, ref RuntimeSetHandlerEventArgs e) + { + + TimeoutCnt = 0; + LastTimeout = DateTime.MinValue; + DelayAverage = new TimeSpan(0); + DelayMax = new TimeSpan(0); + + m_ChangeDetectedCount = 0; + m_DelayTotal = new TimeSpan(0); + } + } +} + diff --git a/aot/Samples/Watchdog/Stats/StatsRuntime/StatsRuntime.csproj b/aot/Samples/Watchdog/Stats/StatsRuntime/StatsRuntime.csproj new file mode 100644 index 0000000..763649b --- /dev/null +++ b/aot/Samples/Watchdog/Stats/StatsRuntime/StatsRuntime.csproj @@ -0,0 +1,132 @@ + + + + Debug + AnyCPU + 9.0.21022 + 2.0 + {7E2D944C-A637-451B-A66D-E7861F1D4CBE} + Library + Properties + ArchestrA.Toolkit.Watchdog + WatchDogStatsRuntime1 + true + ..\..\Watchdog.snk + + + 3.5 + + + false + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + x86 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + x86 + + + + False + C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Toolkit.ArchestrAObjectSupport.dll + True + + + False + C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Core.dll + True + + + + + + + + + + + + + + + + + {A7BA2304-935A-4DDD-80CC-E6387B2980E6} + Statsobj + + + + + Watchdog.snk + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 2.0 %28x86%29 + true + + + False + .NET Framework 3.0 %28x86%29 + false + + + False + .NET Framework 3.5 + false + + + False + .NET Framework 3.5 SP1 + false + + + + + + + + + + + \ No newline at end of file diff --git a/aot/Samples/Watchdog/Stats/Statsobj/Properties/AssemblyInfo.cs b/aot/Samples/Watchdog/Stats/Statsobj/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..b468427 --- /dev/null +++ b/aot/Samples/Watchdog/Stats/Statsobj/Properties/AssemblyInfo.cs @@ -0,0 +1,45 @@ +//------------------------------------------------------------------------------ +// Copyright (C) 2008 Invensys Systems Inc. All rights reserved. +// +// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY +// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +//------------------------------------------------------------------------------ + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Stats")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("ArchestrA")] +[assembly: AssemblyProduct("Stats")] +[assembly: AssemblyCopyright("Copyright © Wonderware 2006")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(true)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("ef0c77fe-c73f-4d03-b50f-dc94d84e0a44")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.1.0.0")] + diff --git a/aot/Samples/Watchdog/Stats/Statsobj/Stats.cs b/aot/Samples/Watchdog/Stats/Statsobj/Stats.cs new file mode 100644 index 0000000..b27d93a --- /dev/null +++ b/aot/Samples/Watchdog/Stats/Statsobj/Stats.cs @@ -0,0 +1,67 @@ +//------------------------------------------------------------------------------ +// Copyright (C) 2008 Invensys Systems Inc. All rights reserved. +// +// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY +// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +//------------------------------------------------------------------------------ + +using System; +using System.Runtime.InteropServices; + +using ArchestrA.Core; +using ArchestrA.Toolkit; + +namespace ArchestrA.Toolkit.Watchdog +{ + #region Object Information - Toolkit generated code + // Required region for Object Information - do not modify + // the contents of this region with the code editor. + [APrimitive()] + [Guid("78ce58a4-b80a-4a1e-a9b1-d8b5a4e8233c")] + [ObjectAttributes.ExecutionGroup("Custom 2")] + [ObjectAttributes.Dictionary(@"WatchDog1.aaDCT")] + [ObjectAttributes.Vendor("ArchestrA")] + [ObjectAttributes.ConfigtimeCLSID("057251b9-4dfa-4216-80ae-0981f7bc63e9")] + [ObjectAttributes.RuntimeCLSID("85ca8612-8c40-4e51-b8b5-8588f2af5e59")] + [ObjectAttributes.MajorVersion(1)] + [ObjectAttributes.FullName("WatchDogStats")] + #endregion + + /// + /// Summary description for Stats + /// + public class Stats : APrimitiveBase + { + [Attributes.AAttrCategory(MxAttributeCategory.MxCategoryCalculated)] + public CMxElapsedTime DelayMax = new CMxElapsedTime(); + + [Attributes.AAttrSecurityClassification(MxSecurityClassification.MxSecurityOperate)] + [Attributes.AAttrCategory(MxAttributeCategory.MxCategoryWriteable_U)] + public CMxBoolean Reset = new CMxBoolean(); + + [Attributes.AAttrCategory(MxAttributeCategory.MxCategoryCalculated)] + public CMxElapsedTime DelayAverage = new CMxElapsedTime(); + + [Attributes.AAttrCategory(MxAttributeCategory.MxCategoryCalculated)] + public CMxTime LastTimeout = new CMxTime(); + + [SystemPrimitive.HistoryPrimitive.AttrOverride("TimeoutCntHistory", SystemPrimitive.HistoryPrimitive.EngineeringUnits, "LockStatus", true)] + [SystemPrimitive.HistoryPrimitive("TimeoutCntHistory", Common.SystemPrimitive.ExtensionMode.VirtualEnable)] + [Attributes.AAttrCategory(MxAttributeCategory.MxCategoryCalculated)] + public CMxInteger TimeoutCnt = new CMxInteger(); + + // required to allow the aaDEF file to be generated + public Stats() + { + } + + // required to use the child primitive as an attribute in an object + public Stats(string _name, bool _virt) + : base(_name, _virt) + { + } + } +} + diff --git a/aot/Samples/Watchdog/Stats/Statsobj/Statsobj.csproj b/aot/Samples/Watchdog/Stats/Statsobj/Statsobj.csproj new file mode 100644 index 0000000..ac6e0a0 --- /dev/null +++ b/aot/Samples/Watchdog/Stats/Statsobj/Statsobj.csproj @@ -0,0 +1,123 @@ + + + + Debug + AnyCPU + 9.0.21022 + 2.0 + {A7BA2304-935A-4DDD-80CC-E6387B2980E6} + Library + Properties + ArchestrA.Toolkit.Watchdog + WatchDogStats1 + true + ..\..\Watchdog.snk + + + 3.5 + + + false + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + x86 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + x86 + + + + False + C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Toolkit.ArchestrAObjectSupport.dll + True + + + False + C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Core.dll + True + + + + + + + + + + + + + + Watchdog.snk + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 2.0 %28x86%29 + true + + + False + .NET Framework 3.0 %28x86%29 + false + + + False + .NET Framework 3.5 + false + + + False + .NET Framework 3.5 SP1 + false + + + + + + + + + + + \ No newline at end of file diff --git a/aot/Samples/Watchdog/Watchdog.sln b/aot/Samples/Watchdog/Watchdog.sln new file mode 100644 index 0000000..fc0552a --- /dev/null +++ b/aot/Samples/Watchdog/Watchdog.sln @@ -0,0 +1,63 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Stats", "Stats", "{6D3152B2-421E-466D-8329-09A231689461}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Watchdog", "Watchdog\Watchdog.csproj", "{0E30645D-B574-41BF-B302-64FEE3C8208A}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WatchdogRuntime", "WatchdogRuntime\WatchdogRuntime.csproj", "{FCAA2DA3-97F2-4C42-BB09-6729738D6872}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WatchdogConfigtime", "WatchdogConfigtime\WatchdogConfigtime.csproj", "{9C114E5F-13AC-4864-8301-4D3B422D075F}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WatchdogEditor", "WatchdogEditor\WatchdogEditor.csproj", "{B2B3A624-324D-47B1-956D-94B48B7140A6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Statsobj", "Stats\Statsobj\Statsobj.csproj", "{A7BA2304-935A-4DDD-80CC-E6387B2980E6}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StatsConfigtime", "Stats\StatsConfigtime\StatsConfigtime.csproj", "{63437254-FEDA-404A-8FCB-B2036ED949CB}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "StatsRuntime", "Stats\StatsRuntime\StatsRuntime.csproj", "{7E2D944C-A637-451B-A66D-E7861F1D4CBE}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0E30645D-B574-41BF-B302-64FEE3C8208A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0E30645D-B574-41BF-B302-64FEE3C8208A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0E30645D-B574-41BF-B302-64FEE3C8208A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0E30645D-B574-41BF-B302-64FEE3C8208A}.Release|Any CPU.Build.0 = Release|Any CPU + {FCAA2DA3-97F2-4C42-BB09-6729738D6872}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FCAA2DA3-97F2-4C42-BB09-6729738D6872}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FCAA2DA3-97F2-4C42-BB09-6729738D6872}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FCAA2DA3-97F2-4C42-BB09-6729738D6872}.Release|Any CPU.Build.0 = Release|Any CPU + {9C114E5F-13AC-4864-8301-4D3B422D075F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9C114E5F-13AC-4864-8301-4D3B422D075F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9C114E5F-13AC-4864-8301-4D3B422D075F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9C114E5F-13AC-4864-8301-4D3B422D075F}.Release|Any CPU.Build.0 = Release|Any CPU + {B2B3A624-324D-47B1-956D-94B48B7140A6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B2B3A624-324D-47B1-956D-94B48B7140A6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B2B3A624-324D-47B1-956D-94B48B7140A6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B2B3A624-324D-47B1-956D-94B48B7140A6}.Release|Any CPU.Build.0 = Release|Any CPU + {A7BA2304-935A-4DDD-80CC-E6387B2980E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A7BA2304-935A-4DDD-80CC-E6387B2980E6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A7BA2304-935A-4DDD-80CC-E6387B2980E6}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A7BA2304-935A-4DDD-80CC-E6387B2980E6}.Release|Any CPU.Build.0 = Release|Any CPU + {63437254-FEDA-404A-8FCB-B2036ED949CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {63437254-FEDA-404A-8FCB-B2036ED949CB}.Debug|Any CPU.Build.0 = Debug|Any CPU + {63437254-FEDA-404A-8FCB-B2036ED949CB}.Release|Any CPU.ActiveCfg = Release|Any CPU + {63437254-FEDA-404A-8FCB-B2036ED949CB}.Release|Any CPU.Build.0 = Release|Any CPU + {7E2D944C-A637-451B-A66D-E7861F1D4CBE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7E2D944C-A637-451B-A66D-E7861F1D4CBE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7E2D944C-A637-451B-A66D-E7861F1D4CBE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7E2D944C-A637-451B-A66D-E7861F1D4CBE}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {A7BA2304-935A-4DDD-80CC-E6387B2980E6} = {6D3152B2-421E-466D-8329-09A231689461} + {63437254-FEDA-404A-8FCB-B2036ED949CB} = {6D3152B2-421E-466D-8329-09A231689461} + {7E2D944C-A637-451B-A66D-E7861F1D4CBE} = {6D3152B2-421E-466D-8329-09A231689461} + EndGlobalSection +EndGlobal diff --git a/aot/Samples/Watchdog/Watchdog.snk b/aot/Samples/Watchdog/Watchdog.snk new file mode 100644 index 0000000..b823030 Binary files /dev/null and b/aot/Samples/Watchdog/Watchdog.snk differ diff --git a/aot/Samples/Watchdog/Watchdog/AAObjectInfo.xml b/aot/Samples/Watchdog/Watchdog/AAObjectInfo.xml new file mode 100644 index 0000000..43491aa --- /dev/null +++ b/aot/Samples/Watchdog/Watchdog/AAObjectInfo.xml @@ -0,0 +1,784 @@ + + + 1 + + + + + + + 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)); + +]]> + + + + + + + 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)); + +]]> + + + + + + 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)); + +]]> + + + + + + + 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)); + +]]> + + + + + + + + + + ArchestrA.Toolkit.Watchdog.Stats + + + + + Runtime + ComDLL + + + + + + Runtime, Configtime + NETFrameworkAssembly + + + + + Runtime, Configtime + MergeRegistryScript + + + + + Runtime + NETFrameworkAssembly + + + + + Runtime + MergeRegistryScript + + + + + Configtime + NETFrameworkAssembly + + + + + Configtime + MergeRegistryScript + + + + + Runtime, Configtime + NETFrameworkAssembly + + + Reset + + + WatchDogStats + + + + + + + ArchestrA.Toolkit.Watchdog.WatchDog + + + + + Runtime + ComDLL + + + + + + Runtime, Configtime + NETFrameworkAssembly + + + + + Runtime, Configtime + MergeRegistryScript + + + + + Runtime + NETFrameworkAssembly + + + + + Runtime + MergeRegistryScript + + + + + Configtime + NETFrameworkAssembly + + + + + Configtime + MergeRegistryScript + + + + + Editor + NETFrameworkAssembly + + + + + Editor + MergeRegistryScript + + + + + Runtime, Configtime, Editor + NETFrameworkAssembly + + + + + Runtime, Configtime + NETFrameworkAssembly + + WatchdogEditor1 + + Stats_Enable + + + + Timeout_Limit + + + + WatchDog + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/aot/Samples/Watchdog/Watchdog/Properties/AssemblyInfo.cs b/aot/Samples/Watchdog/Watchdog/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..6cb3270 --- /dev/null +++ b/aot/Samples/Watchdog/Watchdog/Properties/AssemblyInfo.cs @@ -0,0 +1,45 @@ +//------------------------------------------------------------------------------ +// Copyright (C) 2008 Invensys Systems Inc. All rights reserved. +// +// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY +// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +//------------------------------------------------------------------------------ + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("WatchdogDef")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("ArchestrA")] +[assembly: AssemblyProduct("WatchdogDef")] +[assembly: AssemblyCopyright("Copyright © Wonderware 2006")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(true)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("f7d23252-7e19-48f7-be50-fc7b2ee424a5")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.1.0.0")] + diff --git a/aot/Samples/Watchdog/Watchdog/WatchDog1.aaDCT b/aot/Samples/Watchdog/Watchdog/WatchDog1.aaDCT new file mode 100644 index 0000000..ea1aa7f --- /dev/null +++ b/aot/Samples/Watchdog/Watchdog/WatchDog1.aaDCT @@ -0,0 +1,108 @@ + + + + + MonitoredBit.InputSource: + + + + + Stats.Enable: + + + + + Stats.TimeoutCnt.Historized: + + + + + Timeout.Alarmed: + + + + + Timeout.Limit: + + + + + TimeSinceChange.Historized: + + + + + General + + + + + Stats.Reset: + + + + + Stats.TimeoutCnt.ForceStoragePeriod: + + + + + Stats.TimeoutCnt.TrendHi: + + + + + Stats.TimeoutCnt.TrendLo: + + + + + Stats.TimeoutCnt.ValueDeadBand: + + + + + Timeout.AckMsg: + + + + + Timeout.DescAttrName: + + + + + Timeout.Priority: + + + + + TimeSinceChange.ForceStoragePeriod: + + + + + TimeSinceChange.TrendHi: + + + + + TimeSinceChange.TrendLo: + + + + + TimeSinceChange.ValueDeadBand: + + + + + Advanced + + + + + Timeout.Limit must be a positive number. + + + diff --git a/aot/Samples/Watchdog/Watchdog/Watchdog.cs b/aot/Samples/Watchdog/Watchdog/Watchdog.cs new file mode 100644 index 0000000..9cfc56b --- /dev/null +++ b/aot/Samples/Watchdog/Watchdog/Watchdog.cs @@ -0,0 +1,79 @@ +//------------------------------------------------------------------------------ +// Copyright (C) 2008 Invensys Systems Inc. All rights reserved. +// +// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY +// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +//------------------------------------------------------------------------------ + +using System; +using System.Runtime.InteropServices; +using System.Collections; +using ArchestrA.Core; +using ArchestrA.Toolkit; +using ArchestrA.Toolkit.SystemPrimitive; + +namespace ArchestrA.Toolkit.Watchdog +{ + #region Object Information - Toolkit generated code + // Required region for Object Information - do not modify + // the contents of this region with the code editor. + [AObject()] + [Stats("Stats", true)] + [Guid("d53d3f79-53f7-40c9-9718-531accb6bb6d")] + [ObjectAttributes.Dictionary(@"WatchDog1.aaDCT")] + [ObjectAttributes.ConfigtimeCLSID("0fba961c-3462-49d6-9963-11aac3c6e9d1")] + [ObjectAttributes.RuntimeCLSID("886e73ad-ddb7-45ca-8ca2-e652e1e9bafd")] + [ObjectAttributes.MajorVersion(1)] + [ObjectAttributes.MinorVersion(1)] + [ObjectAttributes.MinIASVersion("3.1.0")] + [ObjectAttributes.Migrate("")] + #endregion + + // Required attributes for Object Information. + // Changes made using the code editor will appear in the Toolkit Editor. + [ObjectAttributes.Name("WatchDog")] + [ObjectAttributes.Vendor("ArchestrA")] + [ObjectAttributes.ShortDescription("This object raises an alarm when an input stops changing for too long. It optionally maintains statistics.")] + [ObjectAttributes.ToolsetName("AOT Samples")] + [ObjectAttributes.Events()] + [ObjectAttributes.IDEBehavior()] + [AReusablePrimitiveRef(@"ArchestrA\InputPrimitive1.aaPri", "InputPrimitive1", "MonitoredBit", false)] + [AReusablePrimitiveRef.AttrOverride("InputPrimitive1", "DataType", "LockStatus", true)] + [AReusablePrimitiveRef.AttrOverride("InputPrimitive1", "DataType", "Value", MxDataType.MxBoolean)] + + /// + /// Summary description for Watchdog + /// + public class WatchDog + { + [Attributes.AAttrName("Timeout.Limit")] + [Attributes.AAttrSecurityClassification(MxSecurityClassification.MxSecurityTune)] + [Attributes.AAttrFrequentlyAccessed(true)] + [Attributes.AAttrCategory(MxAttributeCategory.MxCategoryWriteable_UC_Lockable)] + public CMxElapsedTime Timeout_Limit = new CMxElapsedTime("00:00:05.0000000"); + + [Attributes.AAttrName("Stats.Enable")] + [Attributes.AAttrCategory(MxAttributeCategory.MxCategoryPackageOnly_Lockable)] + public CMxBoolean Stats_Enable = new CMxBoolean(); + + [SystemPrimitive.HistoryPrimitive.AttrOverride("TimeSinceChangeHistory", SystemPrimitive.HistoryPrimitive.EngineeringUnits, "LockStatus", true)] + [SystemPrimitive.HistoryPrimitive("TimeSinceChangeHistory", Common.SystemPrimitive.ExtensionMode.VirtualEnable)] + [Attributes.AAttrCategory(MxAttributeCategory.MxCategoryCalculated)] + public CMxElapsedTime TimeSinceChange = new CMxElapsedTime(); + + [SystemPrimitive.AlarmPrimitive.AttrOverride("TimeoutAlarm", SystemPrimitive.AlarmPrimitive.Value, "LockStatus", true)] + [SystemPrimitive.AlarmPrimitive.AttrOverride("TimeoutAlarm", SystemPrimitive.AlarmPrimitive.Limit, "LockStatus", true)] + [SystemPrimitive.AlarmPrimitive.AttrOverride("TimeoutAlarm", SystemPrimitive.AlarmPrimitive.EngineeringUnits, "LockStatus", true)] + [SystemPrimitive.AlarmPrimitive.AttrOverride("TimeoutAlarm", SystemPrimitive.AlarmPrimitive.Category, "LockStatus", true)] + [SystemPrimitive.AlarmPrimitive.AttrOverride("TimeoutAlarm", SystemPrimitive.AlarmPrimitive.Category, "Value", 12)] + [SystemPrimitive.AlarmPrimitive("TimeoutAlarm", Common.SystemPrimitive.ExtensionMode.VirtualEnable)] + [Attributes.AAttrCategory(MxAttributeCategory.MxCategoryCalculated)] + public CMxBoolean Timeout = new CMxBoolean(); + public WatchDog() + { + } + } +} + diff --git a/aot/Samples/Watchdog/Watchdog/Watchdog.csproj b/aot/Samples/Watchdog/Watchdog/Watchdog.csproj new file mode 100644 index 0000000..9775e86 --- /dev/null +++ b/aot/Samples/Watchdog/Watchdog/Watchdog.csproj @@ -0,0 +1,133 @@ + + + + Debug + AnyCPU + 9.0.21022 + 2.0 + {0E30645D-B574-41BF-B302-64FEE3C8208A} + Library + Properties + ArchestrA.Toolkit.Watchdog + WatchDog1 + true + ..\Watchdog.snk + + + 3.5 + + + false + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + x86 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + x86 + + + + False + C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Toolkit.ArchestrAObjectSupport.dll + True + + + False + C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Core.dll + True + + + + + + + + + + + + + + + + + Watchdog.snk + + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 2.0 %28x86%29 + true + + + False + .NET Framework 3.0 %28x86%29 + false + + + False + .NET Framework 3.5 + false + + + False + .NET Framework 3.5 SP1 + false + + + + + {A7BA2304-935A-4DDD-80CC-E6387B2980E6} + Statsobj + + + + + + + + + + + \ No newline at end of file diff --git a/aot/Samples/Watchdog/WatchdogConfigtime/Properties/AssemblyInfo.cs b/aot/Samples/Watchdog/WatchdogConfigtime/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..bcf1d1e --- /dev/null +++ b/aot/Samples/Watchdog/WatchdogConfigtime/Properties/AssemblyInfo.cs @@ -0,0 +1,44 @@ +//------------------------------------------------------------------------------ +// Copyright (C) 2008 Invensys Systems Inc. All rights reserved. +// +// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY +// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +//------------------------------------------------------------------------------ + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Configtime")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("ArchestrA")] +[assembly: AssemblyProduct("Configtime")] +[assembly: AssemblyCopyright("Copyright © Wonderware 2006")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(true)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("b23434ca-aaab-4ec7-90c5-5689e0ac7892")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.1.0.0")] diff --git a/aot/Samples/Watchdog/WatchdogConfigtime/WatchdogConfigtime.cs b/aot/Samples/Watchdog/WatchdogConfigtime/WatchdogConfigtime.cs new file mode 100644 index 0000000..ad49946 --- /dev/null +++ b/aot/Samples/Watchdog/WatchdogConfigtime/WatchdogConfigtime.cs @@ -0,0 +1,573 @@ +//------------------------------------------------------------------------------ +// Copyright (C) 2008 Invensys Systems Inc. All rights reserved. +// +// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY +// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +//------------------------------------------------------------------------------ + +using System; +using System.Runtime.InteropServices; +using System.Collections; +using ArchestrA.Core; +using ArchestrA.Toolkit; + +namespace ArchestrA.Toolkit.Watchdog +{ + [Guid("0fba961c-3462-49d6-9963-11aac3c6e9d1")] + /// + /// Summary description for WatchdogConfigtime + /// + public class WatchdogConfigtime : ConfigtimeBase + { + #region Attributes - Toolkit generated code + // The following C# properties have been defined to simplify access to + // attribute values - do not modify the contents of this region with + // the code editor. + private bool Timeout_Alarmed + { + get { return GetValue("Timeout.Alarmed"); } + set { SetValue("Timeout.Alarmed", (value)); } + } + + private CMxBoolean Stats_Enable + { + get { return InternalReferenceOnly.Stats_Enable; } + set { InternalReferenceOnly.Stats_Enable.Set(value); } + } + + private bool TimeSinceChange_Historized + { + get { return GetValue("TimeSinceChange.Historized"); } + set { SetValue("TimeSinceChange.Historized", (value)); } + } + + private CMxElapsedTime Timeout_Limit + { + get { return InternalReferenceOnly.Timeout_Limit; } + set { InternalReferenceOnly.Timeout_Limit.Set(value); } + } + + + + public __InputPrimitive1 InputPrimitive1 = null; + + public class __InputPrimitive1 + { + public SupportWrapper Wrapper = new SupportWrapper(); + + private CMxReference _InputSource = null; + + public CMxReference InputSource + { + get { if (_InputSource == null) { _InputSource = new CMxReference(Wrapper, "MonitoredBit.InputSource"); } return _InputSource; } + set { if (_InputSource == null) { _InputSource = new CMxReference(Wrapper, "MonitoredBit.InputSource"); } _InputSource.Set(value); } + } + + private CMxDataType _DataType = null; + + public CMxDataType DataType + { + get { if (_DataType == null) { _DataType = new CMxDataType(Wrapper, "MonitoredBit.DataType"); } return _DataType; } + set { if (_DataType == null) { _DataType = new CMxDataType(Wrapper, "MonitoredBit.DataType"); } _DataType.Set(value); } + } + + public __InputPrimitive1(AObjectBase baseClass) + { + Wrapper.baseClass = baseClass; + } + + } + + #endregion Attributes + + #region Internal Reference Only + //Toolkit code required to access the attributes declared in the Object Class + private WatchDog InternalReferenceOnly = null; + #endregion Internal Reference Only + + #region Declarations + //Declare Configtime Class Variables here. + //Variables declared in this region are available to all methods + //in the Configtime Class. + + + #endregion Declarations + + + public WatchdogConfigtime() + { + InternalReferenceOnly = new WatchDog(); + this.AObjectInstance = InternalReferenceOnly; + + #region Configuration Event Registration - Toolkit generated code + // Required region for Configuration Events - do not modify + // the contents of this region with the code editor. + this.ConfigtimeInitialize += new ConfigtimeInitializeDelegate(WatchdogConfigtime_ConfigtimeInitialize); + this.ConfigtimeValidate += new ConfigtimeValidateDelegate(WatchdogConfigtime_ConfigtimeValidate); + this.ConfigtimeMigrate += new MigrateDelegate(WatchdogConfigtime_ConfigtimeMigrate); + this.ConfigtimeDynamic += new ConfigtimeDynamicSetHandlerDelegate(WatchdogConfigtime_ConfigtimeDynamic); + this.PreValidate += new ObjectEventDelegate(WatchdogConfigtime_PreValidate); + this.PostCreate += new ObjectEventDelegate(WatchdogConfigtime_PostCreate); + #endregion Configuration Event Registration + + #region Optional Configuration Event Registration - Toolkit generated code + // Required region for Configuration Events - do not modify + // the contents of this region with the code editor. + // Optional events are enabled by the ObjectAttributes.Events + // attribute in the Object class. + #endregion Optional Configuration Event Registration + + #region Configtime Set Handler Registration Toolkit generated code + // Required method for Configtime SetHandlers. + // Changes made using the code editor will appear in the Toolkit Editor. + // + // WARNING: Changes made to this region will result in a Shape Change. + + + // TODO: Configtime SetHandler registration + // this.RegisterConfigtimeSetHandler("Example_001", new ConfigtimeSetHandlerDelegate(Example_001SetHandler)); + this.RegisterConfigtimeSetHandler("Timeout.Alarmed", new ConfigtimeSetHandlerDelegate(Timeout_AlarmedSetHandler)); + this.RegisterConfigtimeSetHandler("TimeSinceChange.Historized", new ConfigtimeSetHandlerDelegate(TimeSinceChange_HistorizedSetHandler)); + this.RegisterConfigtimeSetHandler("Stats.Enable", new ConfigtimeSetHandlerDelegate(Stats_EnableSetHandler)); + this.RegisterConfigtimeSetHandler("Timeout.Limit", new ConfigtimeSetHandlerDelegate(Timeout_LimitSetHandler)); + #endregion Configtime Set Handler Registration + + #region Primitive Wrapper Initialization - Toolkit generated code + InputPrimitive1 = new __InputPrimitive1(this); + #endregion Primitive Wrapper Initialization + + } + + private void WatchdogConfigtime_ConfigtimeInitialize(object sender) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - Initialize + // + // Any custom initialization can be done here, including caching of attribute + // values, primitive IDs etc. + //------------------------------------------------------------------------------ + } + + private void WatchdogConfigtime_ConfigtimeMigrate(object sender, ref MigrateHandler migrate) + { + //------------------------------------------------------------------------------ + // 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 + } + + private void WatchdogConfigtime_ConfigtimeValidate(object sender, ref EPACKAGESTATUS status) + { + //------------------------------------------------------------------------------ + // 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 (IsTemplate) + { + return; + } + } + + private void WatchdogConfigtime_ConfigtimeDynamic(object sender, ref ConfigtimeSetHandlerEventArgs e) + { + + 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 + SetValue(e.attributeHandle.shAttributeId, e.attributeHandle.shPrimitiveId, e.Value); + LogWarning(string.Format("Uknown set handler for attribute '{0}'", attrName)); + + } + + private void WatchdogConfigtime_PostCreate(object sender, object optionalParameter) + { + //------------------------------------------------------------------------------ + // 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 + } + + private void WatchdogConfigtime_PreValidate(object sender, object optionalParameter) + { + //------------------------------------------------------------------------------ + // 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. + //------------------------------------------------------------------------------ + } + + #region Optional Configuration Events + //------------------------------------------------------------------------------ + // TODO: Optional Configtime Events + // + // Use the Toolkit Editor to enable each optional event or add the event to the + // ObjectAttributes.Events attribute in the object class. + // + // Multiple events can be enabled using the | delimiter. + // + // Example: + // [ObjectAttributes.Events(a.EventHandlerEnum.OnPreDeploy | a.EventHandlerEnum.OnPreDelete)] + // + //------------------------------------------------------------------------------ + + private void WatchdogConfigtime_PreUndeploy(object sender, ref SupportEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - PreUndeploy + // + //------------------------------------------------------------------------------ + + } + private void WatchdogConfigtime_PreUnassign(object sender, ref GeneralEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - PreUnassign + // + //------------------------------------------------------------------------------ + + } + private void WatchdogConfigtime_PreRename(object sender, ref RenameEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - PreRename + // + //------------------------------------------------------------------------------ + + } + private void WatchdogConfigtime_PreDeploy(object sender, ref DeployEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - PreDeploy + // + // Use the Toolkit Editor to enable this event or add OnPreDeploy to the + // ObjectAttributes.Events attribute in the object class. Multiple events can + // be enabled using the | delimiter. + // + // Example: [ObjectAttributes.Events(a.EventHandlerEnum.OnPreDeploy)] + // + //------------------------------------------------------------------------------ + + } + private void WatchdogConfigtime_PreDelete(object sender, ref SupportEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - PreDelete + // + //------------------------------------------------------------------------------ + + } + private void WatchdogConfigtime_PreCheckIn(object sender, ref SupportEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - PreCheckIn + // + //------------------------------------------------------------------------------ + + } + private void WatchdogConfigtime_PreAssignTo(object sender, ref GeneralEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - PreAssignTo + // + //------------------------------------------------------------------------------ + + } + private void WatchdogConfigtime_PostUndeploy(object sender, ref SupportEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - PostUndeploy + // + //------------------------------------------------------------------------------ + + } + private void WatchdogConfigtime_PostUnassignFrom(object sender, ref GeneralEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - PostUnassignFrom + // + //------------------------------------------------------------------------------ + + } + private void WatchdogConfigtime_PostUnassign(object sender, ref GeneralEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - PostUnassign + // + //------------------------------------------------------------------------------ + + } + private void WatchdogConfigtime_PostRename(object sender, ref RenameEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - PostRename + // + //------------------------------------------------------------------------------ + + } + private void WatchdogConfigtime_PostDeploy(object sender, ref SupportEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - PostDeploy + // + //------------------------------------------------------------------------------ + + } + private void WatchdogConfigtime_PostDelete(object sender, ref SupportEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - PostDelete + // + //------------------------------------------------------------------------------ + + } + private void WatchdogConfigtime_PostAssignTo(object sender, ref GeneralEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - PostAssignTo + // + //------------------------------------------------------------------------------ + + } + private void WatchdogConfigtime_PostAssign(object sender, ref GeneralEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - PostAssign + // + //------------------------------------------------------------------------------ + + } + private void WatchdogConfigtime_PostCheckIn(object sender, ref SupportEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Configtime Event - PostCheckIn + // + //------------------------------------------------------------------------------ + + } + + #endregion + + private void TimeSinceChange_HistorizedSetHandler(object sender, ref ConfigtimeSetHandlerEventArgs e) + { + // Required Set Handler for Virtual History Primtive. + // Do not modify this Set Handler via the code editor. + // + // WARNING: Changes made to this Set Handler will be overwritten by the code generator. + + if (TimeSinceChange_Historized == e.Value) + { + return; + } + + if (e.Value) + { + if (!AddPrimitive("TimeSinceChangeHistory", "TimeSinceChangeHistory1", "TimeSinceChange")) + { + e.Message = PrimitiveResult.message; + return; // Add failed + } + } + else + { + if (!DeletePrimitive("TimeSinceChangeHistory1")) + { + e.Message = PrimitiveResult.message; + return; // Remove Failed failed + } + } + + TimeSinceChange_Historized = e.Value; + } + + private void Timeout_AlarmedSetHandler(object sender, ref ConfigtimeSetHandlerEventArgs e) + { + // Required Set Handler for Virtual Alarm Primtive. + // Do not modify this Set Handler via the code editor. + // + // WARNING: Changes made to this Set Handler will be overwritten by the code generator. + + if (Timeout_Alarmed == e.Value) + { + return; + } + + if (e.Value) + { + if (!AddPrimitive("TimeoutAlarm", "TimeoutAlarm1", "Timeout")) + { + e.Message = PrimitiveResult.message; + return; // Add failed + } + } + else + { + if (!DeletePrimitive("TimeoutAlarm1")) + { + e.Message = PrimitiveResult.message; + return; // Remove Failed failed + } + } + + Timeout_Alarmed = e.Value; + } + + private void Timeout_LimitSetHandler(object sender, ref ConfigtimeSetHandlerEventArgs e) + { + if (e.Value < 0) + { + e.Message = GetText("Timeout.Limit must be a positive number."); + } + + Timeout_Limit.SetHandlerValue = e; + } + + private void Stats_EnableSetHandler(object sender, ref ConfigtimeSetHandlerEventArgs e) + { + + if (e.Value == Stats_Enable) return; + + if (e.Value) + { + if (!AddPrimitive("Stats", "Stats1", "Stats")) + { + e.Message = PrimitiveResult.message; + return; //Add failed + } + } + else + { + if (!DeletePrimitive("Stats1")) + { + e.Message = PrimitiveResult.message; + return; //delete failed + } + } + + Stats_Enable.SetHandlerValue = e; + + } + } +} + diff --git a/aot/Samples/Watchdog/WatchdogConfigtime/WatchdogConfigtime.csproj b/aot/Samples/Watchdog/WatchdogConfigtime/WatchdogConfigtime.csproj new file mode 100644 index 0000000..7cf1e51 --- /dev/null +++ b/aot/Samples/Watchdog/WatchdogConfigtime/WatchdogConfigtime.csproj @@ -0,0 +1,132 @@ + + + + Debug + AnyCPU + 9.0.21022 + 2.0 + {9C114E5F-13AC-4864-8301-4D3B422D075F} + Library + Properties + ArchestrA.Toolkit.Watchdog + WatchdogConfigtime1 + true + ..\Watchdog.snk + + + 3.5 + + + false + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + x86 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + x86 + + + + False + C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Toolkit.ArchestrAObjectSupport.dll + True + + + False + C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Core.dll + True + + + + + + + + + + + + + + + + + {0E30645D-B574-41BF-B302-64FEE3C8208A} + Watchdog + + + + + Watchdog.snk + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 2.0 %28x86%29 + true + + + False + .NET Framework 3.0 %28x86%29 + false + + + False + .NET Framework 3.5 + false + + + False + .NET Framework 3.5 SP1 + false + + + + + + + + + + + \ No newline at end of file diff --git a/aot/Samples/Watchdog/WatchdogEditor/Properties/AssemblyInfo.cs b/aot/Samples/Watchdog/WatchdogEditor/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..6823de1 --- /dev/null +++ b/aot/Samples/Watchdog/WatchdogEditor/Properties/AssemblyInfo.cs @@ -0,0 +1,44 @@ +//------------------------------------------------------------------------------ +// Copyright (C) 2008 Invensys Systems Inc. All rights reserved. +// +// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY +// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +//------------------------------------------------------------------------------ + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Editor")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("ArchestrA")] +[assembly: AssemblyProduct("Editor")] +[assembly: AssemblyCopyright("Copyright © Wonderware 2006")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(true)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("1ce95fcc-1c0e-4318-aec4-8871c21457b8")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.1.0.0")] diff --git a/aot/Samples/Watchdog/WatchdogEditor/WatchdogEditor.Designer.cs b/aot/Samples/Watchdog/WatchdogEditor/WatchdogEditor.Designer.cs new file mode 100644 index 0000000..805320a --- /dev/null +++ b/aot/Samples/Watchdog/WatchdogEditor/WatchdogEditor.Designer.cs @@ -0,0 +1,1331 @@ +//------------------------------------------------------------------------------ +// Copyright (C) 2008 Invensys Systems Inc. All rights reserved. +// +// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY +// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +//------------------------------------------------------------------------------ + +namespace ArchestrA.Toolkit.Watchdog +{ + partial class WatchdogEditor + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing) + { + if (components != null) + { + components.Dispose(); + } + } + base.Dispose(disposing); + } + + #region Component Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WatchdogEditor)); + this.tabPage1 = new System.Windows.Forms.TabPage(); + this.tabPage2 = new System.Windows.Forms.TabPage(); + this.aaWatchdogMonitoredBitInputSourcePrompt = new ArchestraEditorFramework.aaLabel(); + this.aaWatchdogMonitoredBitInputSource = new ArchestraEditorFramework.aaTextBoxMxReference(); + this.aaWatchdogMonitoredBitInputSourceSecurityClass = new ArchestraEditorFramework.aaSecurityClassificationIcon(); + this.aaWatchdogMonitoredBitInputSourceLock = new ArchestraEditorFramework.aaLockIcon(); + this.aaStats_EnablePrompt = new ArchestraEditorFramework.aaLabel(); + this.aaStats_Enable = new ArchestraEditorFramework.aaCheckBox(); + this.aaStats_EnableLock = new ArchestraEditorFramework.aaLockIcon(); + this.aaWatchdogStatsTimeoutCnt_HistorizedPrompt = new ArchestraEditorFramework.aaLabel(); + this.aaWatchdogStatsTimeoutCnt_Historized = new ArchestraEditorFramework.aaCheckBox(); + this.aaWatchdogStatsTimeoutCnt_HistorizedLock = new ArchestraEditorFramework.aaLockIcon(); + this.aaTimeout_AlarmedPrompt = new ArchestraEditorFramework.aaLabel(); + this.aaTimeout_Alarmed = new ArchestraEditorFramework.aaCheckBox(); + this.aaTimeout_AlarmedLock = new ArchestraEditorFramework.aaLockIcon(); + this.aaTimeout_LimitPrompt = new ArchestraEditorFramework.aaLabel(); + this.aaTimeout_Limit = new ArchestraEditorFramework.aaTextBox(); + this.aaTimeout_LimitSecurityClass = new ArchestraEditorFramework.aaSecurityClassificationIcon(); + this.aaTimeout_LimitLock = new ArchestraEditorFramework.aaLockIcon(); + this.aaTimeSinceChange_HistorizedPrompt = new ArchestraEditorFramework.aaLabel(); + this.aaTimeSinceChange_Historized = new ArchestraEditorFramework.aaCheckBox(); + this.aaTimeSinceChange_HistorizedLock = new ArchestraEditorFramework.aaLockIcon(); + this.aaWatchdogStatsResetPrompt = new ArchestraEditorFramework.aaLabel(); + this.aaWatchdogStatsResetSecurityClass = new ArchestraEditorFramework.aaSecurityClassificationIcon(); + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodPrompt = new ArchestraEditorFramework.aaLabel(); + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriod = new ArchestraEditorFramework.aaCustomUpDown(); + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodSecurityClass = new ArchestraEditorFramework.aaSecurityClassificationIcon(); + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodLock = new ArchestraEditorFramework.aaLockIcon(); + this.aaWatchdogStatsTimeoutCntHistTrendHiPrompt = new ArchestraEditorFramework.aaLabel(); + this.aaWatchdogStatsTimeoutCntHistTrendHi = new ArchestraEditorFramework.aaCustomUpDown(); + this.aaWatchdogStatsTimeoutCntHistTrendHiSecurityClass = new ArchestraEditorFramework.aaSecurityClassificationIcon(); + this.aaWatchdogStatsTimeoutCntHistTrendHiLock = new ArchestraEditorFramework.aaLockIcon(); + this.aaWatchdogStatsTimeoutCntHistTrendLoPrompt = new ArchestraEditorFramework.aaLabel(); + this.aaWatchdogStatsTimeoutCntHistTrendLo = new ArchestraEditorFramework.aaCustomUpDown(); + this.aaWatchdogStatsTimeoutCntHistTrendLoSecurityClass = new ArchestraEditorFramework.aaSecurityClassificationIcon(); + this.aaWatchdogStatsTimeoutCntHistTrendLoLock = new ArchestraEditorFramework.aaLockIcon(); + this.aaWatchdogStatsTimeoutCntHistValueDeadBandPrompt = new ArchestraEditorFramework.aaLabel(); + this.aaWatchdogStatsTimeoutCntHistValueDeadBand = new ArchestraEditorFramework.aaCustomUpDown(); + this.aaWatchdogStatsTimeoutCntHistValueDeadBandSecurityClass = new ArchestraEditorFramework.aaSecurityClassificationIcon(); + this.aaWatchdogStatsTimeoutCntHistValueDeadBandLock = new ArchestraEditorFramework.aaLockIcon(); + this.aaWatchdogTimeoutAlarmAckMsgPrompt = new ArchestraEditorFramework.aaLabel(); + this.aaWatchdogTimeoutAlarmAckMsgSecurityClass = new ArchestraEditorFramework.aaSecurityClassificationIcon(); + this.aaWatchdogTimeoutAlarmDescAttrNamePrompt = new ArchestraEditorFramework.aaLabel(); + this.aaWatchdogTimeoutAlarmDescAttrName = new ArchestraEditorFramework.aaTextBoxMxReference(); + this.aaWatchdogTimeoutAlarmDescAttrNameLock = new ArchestraEditorFramework.aaLockIcon(); + this.aaWatchdogTimeoutAlarmPriorityPrompt = new ArchestraEditorFramework.aaLabel(); + this.aaWatchdogTimeoutAlarmPriority = new ArchestraEditorFramework.aaCustomUpDown(); + this.aaWatchdogTimeoutAlarmPrioritySecurityClass = new ArchestraEditorFramework.aaSecurityClassificationIcon(); + this.aaWatchdogTimeoutAlarmPriorityLock = new ArchestraEditorFramework.aaLockIcon(); + this.aaWatchdogTimeSinceChangeHistForceStoragePeriodPrompt = new ArchestraEditorFramework.aaLabel(); + this.aaWatchdogTimeSinceChangeHistForceStoragePeriod = new ArchestraEditorFramework.aaCustomUpDown(); + this.aaWatchdogTimeSinceChangeHistForceStoragePeriodSecurityClass = new ArchestraEditorFramework.aaSecurityClassificationIcon(); + this.aaWatchdogTimeSinceChangeHistForceStoragePeriodLock = new ArchestraEditorFramework.aaLockIcon(); + this.aaWatchdogTimeSinceChangeHistTrendHiPrompt = new ArchestraEditorFramework.aaLabel(); + this.aaWatchdogTimeSinceChangeHistTrendHi = new ArchestraEditorFramework.aaCustomUpDown(); + this.aaWatchdogTimeSinceChangeHistTrendHiSecurityClass = new ArchestraEditorFramework.aaSecurityClassificationIcon(); + this.aaWatchdogTimeSinceChangeHistTrendHiLock = new ArchestraEditorFramework.aaLockIcon(); + this.aaWatchdogTimeSinceChangeHistTrendLoPrompt = new ArchestraEditorFramework.aaLabel(); + this.aaWatchdogTimeSinceChangeHistTrendLo = new ArchestraEditorFramework.aaCustomUpDown(); + this.aaWatchdogTimeSinceChangeHistTrendLoSecurityClass = new ArchestraEditorFramework.aaSecurityClassificationIcon(); + this.aaWatchdogTimeSinceChangeHistTrendLoLock = new ArchestraEditorFramework.aaLockIcon(); + this.aaWatchdogTimeSinceChangeHistValueDeadBandPrompt = new ArchestraEditorFramework.aaLabel(); + this.aaWatchdogTimeSinceChangeHistValueDeadBand = new ArchestraEditorFramework.aaCustomUpDown(); + this.aaWatchdogTimeSinceChangeHistValueDeadBandSecurityClass = new ArchestraEditorFramework.aaSecurityClassificationIcon(); + this.aaWatchdogTimeSinceChangeHistValueDeadBandLock = new ArchestraEditorFramework.aaLockIcon(); + this.MainTabControl.SuspendLayout(); + this.tabPage1.SuspendLayout(); + this.tabPage2.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogMonitoredBitInputSourceSecurityClass)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogMonitoredBitInputSourceLock)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaStats_EnableLock)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogStatsTimeoutCnt_HistorizedLock)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaTimeout_AlarmedLock)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaTimeout_LimitSecurityClass)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaTimeout_LimitLock)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaTimeSinceChange_HistorizedLock)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogStatsResetSecurityClass)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodSecurityClass)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodLock)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogStatsTimeoutCntHistTrendHiSecurityClass)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogStatsTimeoutCntHistTrendHiLock)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogStatsTimeoutCntHistTrendLoSecurityClass)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogStatsTimeoutCntHistTrendLoLock)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogStatsTimeoutCntHistValueDeadBandSecurityClass)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogStatsTimeoutCntHistValueDeadBandLock)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogTimeoutAlarmAckMsgSecurityClass)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogTimeoutAlarmDescAttrNameLock)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogTimeoutAlarmPrioritySecurityClass)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogTimeoutAlarmPriorityLock)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogTimeSinceChangeHistForceStoragePeriodSecurityClass)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogTimeSinceChangeHistForceStoragePeriodLock)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogTimeSinceChangeHistTrendHiSecurityClass)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogTimeSinceChangeHistTrendHiLock)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogTimeSinceChangeHistTrendLoSecurityClass)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogTimeSinceChangeHistTrendLoLock)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogTimeSinceChangeHistValueDeadBandSecurityClass)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogTimeSinceChangeHistValueDeadBandLock)).BeginInit(); + this.SuspendLayout(); + // + // CaptionPanel + // + this.CaptionPanel.Size = new System.Drawing.Size(748, 32); + // + // MainTabControl + // + this.MainTabControl.Controls.Add(this.tabPage1); + this.MainTabControl.Controls.Add(this.tabPage2); + this.MainTabControl.Size = new System.Drawing.Size(732, 438); + // + // tabPage1 + // + this.tabPage1.BackColor = System.Drawing.SystemColors.Window; + this.tabPage1.Controls.Add(this.aaWatchdogMonitoredBitInputSourcePrompt); + this.tabPage1.Controls.Add(this.aaWatchdogMonitoredBitInputSource); + this.tabPage1.Controls.Add(this.aaWatchdogMonitoredBitInputSourceSecurityClass); + this.tabPage1.Controls.Add(this.aaWatchdogMonitoredBitInputSourceLock); + this.tabPage1.Controls.Add(this.aaStats_EnablePrompt); + this.tabPage1.Controls.Add(this.aaStats_Enable); + this.tabPage1.Controls.Add(this.aaStats_EnableLock); + this.tabPage1.Controls.Add(this.aaWatchdogStatsTimeoutCnt_HistorizedPrompt); + this.tabPage1.Controls.Add(this.aaWatchdogStatsTimeoutCnt_Historized); + this.tabPage1.Controls.Add(this.aaWatchdogStatsTimeoutCnt_HistorizedLock); + this.tabPage1.Controls.Add(this.aaTimeout_AlarmedPrompt); + this.tabPage1.Controls.Add(this.aaTimeout_Alarmed); + this.tabPage1.Controls.Add(this.aaTimeout_AlarmedLock); + this.tabPage1.Controls.Add(this.aaTimeout_LimitPrompt); + this.tabPage1.Controls.Add(this.aaTimeout_Limit); + this.tabPage1.Controls.Add(this.aaTimeout_LimitSecurityClass); + this.tabPage1.Controls.Add(this.aaTimeout_LimitLock); + this.tabPage1.Controls.Add(this.aaTimeSinceChange_HistorizedPrompt); + this.tabPage1.Controls.Add(this.aaTimeSinceChange_Historized); + this.tabPage1.Controls.Add(this.aaTimeSinceChange_HistorizedLock); + this.tabPage1.Location = new System.Drawing.Point(4, 22); + this.tabPage1.Name = "tabPage1"; + this.tabPage1.Padding = new System.Windows.Forms.Padding(3); + this.tabPage1.Size = new System.Drawing.Size(724, 412); + this.tabPage1.TabIndex = 0; + this.tabPage1.Text = "General"; + // + // tabPage2 + // + this.tabPage2.BackColor = System.Drawing.SystemColors.Window; + this.tabPage2.Controls.Add(this.aaWatchdogStatsResetPrompt); + this.tabPage2.Controls.Add(this.aaWatchdogStatsResetSecurityClass); + this.tabPage2.Controls.Add(this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodPrompt); + this.tabPage2.Controls.Add(this.aaWatchdogStatsTimeoutCntHistForceStoragePeriod); + this.tabPage2.Controls.Add(this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodSecurityClass); + this.tabPage2.Controls.Add(this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodLock); + this.tabPage2.Controls.Add(this.aaWatchdogStatsTimeoutCntHistTrendHiPrompt); + this.tabPage2.Controls.Add(this.aaWatchdogStatsTimeoutCntHistTrendHi); + this.tabPage2.Controls.Add(this.aaWatchdogStatsTimeoutCntHistTrendHiSecurityClass); + this.tabPage2.Controls.Add(this.aaWatchdogStatsTimeoutCntHistTrendHiLock); + this.tabPage2.Controls.Add(this.aaWatchdogStatsTimeoutCntHistTrendLoPrompt); + this.tabPage2.Controls.Add(this.aaWatchdogStatsTimeoutCntHistTrendLo); + this.tabPage2.Controls.Add(this.aaWatchdogStatsTimeoutCntHistTrendLoSecurityClass); + this.tabPage2.Controls.Add(this.aaWatchdogStatsTimeoutCntHistTrendLoLock); + this.tabPage2.Controls.Add(this.aaWatchdogStatsTimeoutCntHistValueDeadBandPrompt); + this.tabPage2.Controls.Add(this.aaWatchdogStatsTimeoutCntHistValueDeadBand); + this.tabPage2.Controls.Add(this.aaWatchdogStatsTimeoutCntHistValueDeadBandSecurityClass); + this.tabPage2.Controls.Add(this.aaWatchdogStatsTimeoutCntHistValueDeadBandLock); + this.tabPage2.Controls.Add(this.aaWatchdogTimeoutAlarmAckMsgPrompt); + this.tabPage2.Controls.Add(this.aaWatchdogTimeoutAlarmAckMsgSecurityClass); + this.tabPage2.Controls.Add(this.aaWatchdogTimeoutAlarmDescAttrNamePrompt); + this.tabPage2.Controls.Add(this.aaWatchdogTimeoutAlarmDescAttrName); + this.tabPage2.Controls.Add(this.aaWatchdogTimeoutAlarmDescAttrNameLock); + this.tabPage2.Controls.Add(this.aaWatchdogTimeoutAlarmPriorityPrompt); + this.tabPage2.Controls.Add(this.aaWatchdogTimeoutAlarmPriority); + this.tabPage2.Controls.Add(this.aaWatchdogTimeoutAlarmPrioritySecurityClass); + this.tabPage2.Controls.Add(this.aaWatchdogTimeoutAlarmPriorityLock); + this.tabPage2.Controls.Add(this.aaWatchdogTimeSinceChangeHistForceStoragePeriodPrompt); + this.tabPage2.Controls.Add(this.aaWatchdogTimeSinceChangeHistForceStoragePeriod); + this.tabPage2.Controls.Add(this.aaWatchdogTimeSinceChangeHistForceStoragePeriodSecurityClass); + this.tabPage2.Controls.Add(this.aaWatchdogTimeSinceChangeHistForceStoragePeriodLock); + this.tabPage2.Controls.Add(this.aaWatchdogTimeSinceChangeHistTrendHiPrompt); + this.tabPage2.Controls.Add(this.aaWatchdogTimeSinceChangeHistTrendHi); + this.tabPage2.Controls.Add(this.aaWatchdogTimeSinceChangeHistTrendHiSecurityClass); + this.tabPage2.Controls.Add(this.aaWatchdogTimeSinceChangeHistTrendHiLock); + this.tabPage2.Controls.Add(this.aaWatchdogTimeSinceChangeHistTrendLoPrompt); + this.tabPage2.Controls.Add(this.aaWatchdogTimeSinceChangeHistTrendLo); + this.tabPage2.Controls.Add(this.aaWatchdogTimeSinceChangeHistTrendLoSecurityClass); + this.tabPage2.Controls.Add(this.aaWatchdogTimeSinceChangeHistTrendLoLock); + this.tabPage2.Controls.Add(this.aaWatchdogTimeSinceChangeHistValueDeadBandPrompt); + this.tabPage2.Controls.Add(this.aaWatchdogTimeSinceChangeHistValueDeadBand); + this.tabPage2.Controls.Add(this.aaWatchdogTimeSinceChangeHistValueDeadBandSecurityClass); + this.tabPage2.Controls.Add(this.aaWatchdogTimeSinceChangeHistValueDeadBandLock); + this.tabPage2.Location = new System.Drawing.Point(4, 22); + this.tabPage2.Name = "tabPage2"; + this.tabPage2.Padding = new System.Windows.Forms.Padding(3); + this.tabPage2.Size = new System.Drawing.Size(724, 412); + this.tabPage2.TabIndex = 1; + this.tabPage2.Text = "Advanced"; + // + // aaWatchdogMonitoredBitInputSourcePrompt + // + this.aaWatchdogMonitoredBitInputSourcePrompt.Attribute = null; + this.aaWatchdogMonitoredBitInputSourcePrompt.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogMonitoredBitInputSourcePrompt.Dictionary = null; + this.aaWatchdogMonitoredBitInputSourcePrompt.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaWatchdogMonitoredBitInputSourcePrompt.Location = new System.Drawing.Point(47, 17); + this.aaWatchdogMonitoredBitInputSourcePrompt.Name = "aaWatchdogMonitoredBitInputSourcePrompt"; + this.aaWatchdogMonitoredBitInputSourcePrompt.PhraseID = "aaWatchdogMonitoredBitInputSourcePrompt"; + this.aaWatchdogMonitoredBitInputSourcePrompt.Size = new System.Drawing.Size(240, 20); + this.aaWatchdogMonitoredBitInputSourcePrompt.TabIndex = 35; + this.aaWatchdogMonitoredBitInputSourcePrompt.Text = "MonitoredBit.InputSource:"; + this.aaWatchdogMonitoredBitInputSourcePrompt.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // aaWatchdogMonitoredBitInputSource + // + this.aaWatchdogMonitoredBitInputSource.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.aaWatchdogMonitoredBitInputSource.Attribute = "MonitoredBit.InputSource"; + this.aaWatchdogMonitoredBitInputSource.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogMonitoredBitInputSource.Dictionary = null; + this.aaWatchdogMonitoredBitInputSource.FilterNamePhraseID = null; + this.aaWatchdogMonitoredBitInputSource.Font = new System.Drawing.Font("Tahoma", 8.25F); + this.aaWatchdogMonitoredBitInputSource.Location = new System.Drawing.Point(295, 17); + this.aaWatchdogMonitoredBitInputSource.Name = "aaWatchdogMonitoredBitInputSource"; + this.aaWatchdogMonitoredBitInputSource.Size = new System.Drawing.Size(300, 21); + this.aaWatchdogMonitoredBitInputSource.TabIndex = 34; + // + // aaWatchdogMonitoredBitInputSourceSecurityClass + // + this.aaWatchdogMonitoredBitInputSourceSecurityClass.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaWatchdogMonitoredBitInputSourceSecurityClass.Attribute = "MonitoredBit.InputSource"; + this.aaWatchdogMonitoredBitInputSourceSecurityClass.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogMonitoredBitInputSourceSecurityClass.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaWatchdogMonitoredBitInputSourceSecurityClass.Image = ((System.Drawing.Image)(resources.GetObject("aaWatchdogMonitoredBitInputSourceSecurityClass.Image"))); + this.aaWatchdogMonitoredBitInputSourceSecurityClass.Location = new System.Drawing.Point(603, 17); + this.aaWatchdogMonitoredBitInputSourceSecurityClass.Name = "aaWatchdogMonitoredBitInputSourceSecurityClass"; + this.aaWatchdogMonitoredBitInputSourceSecurityClass.Size = new System.Drawing.Size(20, 20); + this.aaWatchdogMonitoredBitInputSourceSecurityClass.TabIndex = 37; + this.aaWatchdogMonitoredBitInputSourceSecurityClass.TabStop = false; + // + // aaWatchdogMonitoredBitInputSourceLock + // + this.aaWatchdogMonitoredBitInputSourceLock.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaWatchdogMonitoredBitInputSourceLock.Attribute = "MonitoredBit.InputSource"; + this.aaWatchdogMonitoredBitInputSourceLock.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogMonitoredBitInputSourceLock.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaWatchdogMonitoredBitInputSourceLock.Image = ((System.Drawing.Image)(resources.GetObject("aaWatchdogMonitoredBitInputSourceLock.Image"))); + this.aaWatchdogMonitoredBitInputSourceLock.Location = new System.Drawing.Point(635, 17); + this.aaWatchdogMonitoredBitInputSourceLock.Name = "aaWatchdogMonitoredBitInputSourceLock"; + this.aaWatchdogMonitoredBitInputSourceLock.Size = new System.Drawing.Size(20, 20); + this.aaWatchdogMonitoredBitInputSourceLock.TabIndex = 39; + this.aaWatchdogMonitoredBitInputSourceLock.TabStop = false; + // + // aaStats_EnablePrompt + // + this.aaStats_EnablePrompt.Attribute = null; + this.aaStats_EnablePrompt.BackColor = System.Drawing.Color.Transparent; + this.aaStats_EnablePrompt.Dictionary = null; + this.aaStats_EnablePrompt.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaStats_EnablePrompt.Location = new System.Drawing.Point(47, 49); + this.aaStats_EnablePrompt.Name = "aaStats_EnablePrompt"; + this.aaStats_EnablePrompt.PhraseID = "aaStats_EnablePrompt"; + this.aaStats_EnablePrompt.Size = new System.Drawing.Size(240, 20); + this.aaStats_EnablePrompt.TabIndex = 41; + this.aaStats_EnablePrompt.Text = "Stats.Enable:"; + this.aaStats_EnablePrompt.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // aaStats_Enable + // + this.aaStats_Enable.Attribute = "Stats.Enable"; + this.aaStats_Enable.BackColor = System.Drawing.Color.Transparent; + this.aaStats_Enable.Dictionary = null; + this.aaStats_Enable.FlatStyle = System.Windows.Forms.FlatStyle.System; + this.aaStats_Enable.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaStats_Enable.Location = new System.Drawing.Point(295, 49); + this.aaStats_Enable.Name = "aaStats_Enable"; + this.aaStats_Enable.PhraseID = null; + this.aaStats_Enable.Size = new System.Drawing.Size(24, 24); + this.aaStats_Enable.TabIndex = 36; + this.aaStats_Enable.UseVisualStyleBackColor = false; + // + // aaStats_EnableLock + // + this.aaStats_EnableLock.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaStats_EnableLock.Attribute = "Stats.Enable"; + this.aaStats_EnableLock.BackColor = System.Drawing.Color.Transparent; + this.aaStats_EnableLock.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaStats_EnableLock.Image = ((System.Drawing.Image)(resources.GetObject("aaStats_EnableLock.Image"))); + this.aaStats_EnableLock.Location = new System.Drawing.Point(635, 49); + this.aaStats_EnableLock.Name = "aaStats_EnableLock"; + this.aaStats_EnableLock.Size = new System.Drawing.Size(20, 20); + this.aaStats_EnableLock.TabIndex = 43; + this.aaStats_EnableLock.TabStop = false; + // + // aaWatchdogStatsTimeoutCnt_HistorizedPrompt + // + this.aaWatchdogStatsTimeoutCnt_HistorizedPrompt.Attribute = null; + this.aaWatchdogStatsTimeoutCnt_HistorizedPrompt.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogStatsTimeoutCnt_HistorizedPrompt.Dictionary = null; + this.aaWatchdogStatsTimeoutCnt_HistorizedPrompt.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaWatchdogStatsTimeoutCnt_HistorizedPrompt.Location = new System.Drawing.Point(47, 81); + this.aaWatchdogStatsTimeoutCnt_HistorizedPrompt.Name = "aaWatchdogStatsTimeoutCnt_HistorizedPrompt"; + this.aaWatchdogStatsTimeoutCnt_HistorizedPrompt.PhraseID = "aaWatchdogStatsTimeoutCnt_HistorizedPrompt"; + this.aaWatchdogStatsTimeoutCnt_HistorizedPrompt.Size = new System.Drawing.Size(240, 20); + this.aaWatchdogStatsTimeoutCnt_HistorizedPrompt.TabIndex = 44; + this.aaWatchdogStatsTimeoutCnt_HistorizedPrompt.Text = "Stats.TimeoutCnt.Historized:"; + this.aaWatchdogStatsTimeoutCnt_HistorizedPrompt.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // aaWatchdogStatsTimeoutCnt_Historized + // + this.aaWatchdogStatsTimeoutCnt_Historized.Attribute = "Stats.TimeoutCnt.Historized"; + this.aaWatchdogStatsTimeoutCnt_Historized.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogStatsTimeoutCnt_Historized.Dictionary = null; + this.aaWatchdogStatsTimeoutCnt_Historized.FlatStyle = System.Windows.Forms.FlatStyle.System; + this.aaWatchdogStatsTimeoutCnt_Historized.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaWatchdogStatsTimeoutCnt_Historized.Location = new System.Drawing.Point(295, 81); + this.aaWatchdogStatsTimeoutCnt_Historized.Name = "aaWatchdogStatsTimeoutCnt_Historized"; + this.aaWatchdogStatsTimeoutCnt_Historized.PhraseID = null; + this.aaWatchdogStatsTimeoutCnt_Historized.Size = new System.Drawing.Size(24, 24); + this.aaWatchdogStatsTimeoutCnt_Historized.TabIndex = 38; + this.aaWatchdogStatsTimeoutCnt_Historized.UseVisualStyleBackColor = false; + // + // aaWatchdogStatsTimeoutCnt_HistorizedLock + // + this.aaWatchdogStatsTimeoutCnt_HistorizedLock.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaWatchdogStatsTimeoutCnt_HistorizedLock.Attribute = "Stats.TimeoutCnt.Historized"; + this.aaWatchdogStatsTimeoutCnt_HistorizedLock.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogStatsTimeoutCnt_HistorizedLock.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaWatchdogStatsTimeoutCnt_HistorizedLock.Image = ((System.Drawing.Image)(resources.GetObject("aaWatchdogStatsTimeoutCnt_HistorizedLock.Image"))); + this.aaWatchdogStatsTimeoutCnt_HistorizedLock.Location = new System.Drawing.Point(635, 81); + this.aaWatchdogStatsTimeoutCnt_HistorizedLock.Name = "aaWatchdogStatsTimeoutCnt_HistorizedLock"; + this.aaWatchdogStatsTimeoutCnt_HistorizedLock.Size = new System.Drawing.Size(20, 20); + this.aaWatchdogStatsTimeoutCnt_HistorizedLock.TabIndex = 46; + this.aaWatchdogStatsTimeoutCnt_HistorizedLock.TabStop = false; + // + // aaTimeout_AlarmedPrompt + // + this.aaTimeout_AlarmedPrompt.Attribute = null; + this.aaTimeout_AlarmedPrompt.BackColor = System.Drawing.Color.Transparent; + this.aaTimeout_AlarmedPrompt.Dictionary = null; + this.aaTimeout_AlarmedPrompt.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaTimeout_AlarmedPrompt.Location = new System.Drawing.Point(47, 113); + this.aaTimeout_AlarmedPrompt.Name = "aaTimeout_AlarmedPrompt"; + this.aaTimeout_AlarmedPrompt.PhraseID = "aaTimeout_AlarmedPrompt"; + this.aaTimeout_AlarmedPrompt.Size = new System.Drawing.Size(240, 20); + this.aaTimeout_AlarmedPrompt.TabIndex = 47; + this.aaTimeout_AlarmedPrompt.Text = "Timeout.Alarmed:"; + this.aaTimeout_AlarmedPrompt.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // aaTimeout_Alarmed + // + this.aaTimeout_Alarmed.Attribute = "Timeout.Alarmed"; + this.aaTimeout_Alarmed.BackColor = System.Drawing.Color.Transparent; + this.aaTimeout_Alarmed.Dictionary = null; + this.aaTimeout_Alarmed.FlatStyle = System.Windows.Forms.FlatStyle.System; + this.aaTimeout_Alarmed.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaTimeout_Alarmed.Location = new System.Drawing.Point(295, 113); + this.aaTimeout_Alarmed.Name = "aaTimeout_Alarmed"; + this.aaTimeout_Alarmed.PhraseID = null; + this.aaTimeout_Alarmed.Size = new System.Drawing.Size(24, 24); + this.aaTimeout_Alarmed.TabIndex = 40; + this.aaTimeout_Alarmed.UseVisualStyleBackColor = false; + // + // aaTimeout_AlarmedLock + // + this.aaTimeout_AlarmedLock.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaTimeout_AlarmedLock.Attribute = "Timeout.Condition.Alarmed"; + this.aaTimeout_AlarmedLock.BackColor = System.Drawing.Color.Transparent; + this.aaTimeout_AlarmedLock.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaTimeout_AlarmedLock.Image = ((System.Drawing.Image)(resources.GetObject("aaTimeout_AlarmedLock.Image"))); + this.aaTimeout_AlarmedLock.Location = new System.Drawing.Point(635, 113); + this.aaTimeout_AlarmedLock.Name = "aaTimeout_AlarmedLock"; + this.aaTimeout_AlarmedLock.Size = new System.Drawing.Size(20, 20); + this.aaTimeout_AlarmedLock.TabIndex = 48; + this.aaTimeout_AlarmedLock.TabStop = false; + // + // aaTimeout_LimitPrompt + // + this.aaTimeout_LimitPrompt.Attribute = null; + this.aaTimeout_LimitPrompt.BackColor = System.Drawing.Color.Transparent; + this.aaTimeout_LimitPrompt.Dictionary = null; + this.aaTimeout_LimitPrompt.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaTimeout_LimitPrompt.Location = new System.Drawing.Point(47, 145); + this.aaTimeout_LimitPrompt.Name = "aaTimeout_LimitPrompt"; + this.aaTimeout_LimitPrompt.PhraseID = "aaTimeout_LimitPrompt"; + this.aaTimeout_LimitPrompt.Size = new System.Drawing.Size(240, 20); + this.aaTimeout_LimitPrompt.TabIndex = 49; + this.aaTimeout_LimitPrompt.Text = "Timeout.Limit:"; + this.aaTimeout_LimitPrompt.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // aaTimeout_Limit + // + this.aaTimeout_Limit.Attribute = "Timeout.Limit"; + this.aaTimeout_Limit.BackColor = System.Drawing.Color.Transparent; + this.aaTimeout_Limit.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaTimeout_Limit.Location = new System.Drawing.Point(295, 145); + this.aaTimeout_Limit.MaxLength = 0; + this.aaTimeout_Limit.Name = "aaTimeout_Limit"; + this.aaTimeout_Limit.Size = new System.Drawing.Size(160, 21); + this.aaTimeout_Limit.TabIndex = 42; + // + // aaTimeout_LimitSecurityClass + // + this.aaTimeout_LimitSecurityClass.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaTimeout_LimitSecurityClass.Attribute = "Timeout.Limit"; + this.aaTimeout_LimitSecurityClass.BackColor = System.Drawing.Color.Transparent; + this.aaTimeout_LimitSecurityClass.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaTimeout_LimitSecurityClass.Image = ((System.Drawing.Image)(resources.GetObject("aaTimeout_LimitSecurityClass.Image"))); + this.aaTimeout_LimitSecurityClass.Location = new System.Drawing.Point(603, 145); + this.aaTimeout_LimitSecurityClass.Name = "aaTimeout_LimitSecurityClass"; + this.aaTimeout_LimitSecurityClass.Size = new System.Drawing.Size(20, 20); + this.aaTimeout_LimitSecurityClass.TabIndex = 50; + this.aaTimeout_LimitSecurityClass.TabStop = false; + // + // aaTimeout_LimitLock + // + this.aaTimeout_LimitLock.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaTimeout_LimitLock.Attribute = "Timeout.Limit"; + this.aaTimeout_LimitLock.BackColor = System.Drawing.Color.Transparent; + this.aaTimeout_LimitLock.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaTimeout_LimitLock.Image = ((System.Drawing.Image)(resources.GetObject("aaTimeout_LimitLock.Image"))); + this.aaTimeout_LimitLock.Location = new System.Drawing.Point(635, 145); + this.aaTimeout_LimitLock.Name = "aaTimeout_LimitLock"; + this.aaTimeout_LimitLock.Size = new System.Drawing.Size(20, 20); + this.aaTimeout_LimitLock.TabIndex = 51; + this.aaTimeout_LimitLock.TabStop = false; + // + // aaTimeSinceChange_HistorizedPrompt + // + this.aaTimeSinceChange_HistorizedPrompt.Attribute = null; + this.aaTimeSinceChange_HistorizedPrompt.BackColor = System.Drawing.Color.Transparent; + this.aaTimeSinceChange_HistorizedPrompt.Dictionary = null; + this.aaTimeSinceChange_HistorizedPrompt.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaTimeSinceChange_HistorizedPrompt.Location = new System.Drawing.Point(47, 177); + this.aaTimeSinceChange_HistorizedPrompt.Name = "aaTimeSinceChange_HistorizedPrompt"; + this.aaTimeSinceChange_HistorizedPrompt.PhraseID = "aaTimeSinceChange_HistorizedPrompt"; + this.aaTimeSinceChange_HistorizedPrompt.Size = new System.Drawing.Size(240, 20); + this.aaTimeSinceChange_HistorizedPrompt.TabIndex = 52; + this.aaTimeSinceChange_HistorizedPrompt.Text = "TimeSinceChange.Historized:"; + this.aaTimeSinceChange_HistorizedPrompt.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // aaTimeSinceChange_Historized + // + this.aaTimeSinceChange_Historized.Attribute = "TimeSinceChange.Historized"; + this.aaTimeSinceChange_Historized.BackColor = System.Drawing.Color.Transparent; + this.aaTimeSinceChange_Historized.Dictionary = null; + this.aaTimeSinceChange_Historized.FlatStyle = System.Windows.Forms.FlatStyle.System; + this.aaTimeSinceChange_Historized.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaTimeSinceChange_Historized.Location = new System.Drawing.Point(295, 177); + this.aaTimeSinceChange_Historized.Name = "aaTimeSinceChange_Historized"; + this.aaTimeSinceChange_Historized.PhraseID = null; + this.aaTimeSinceChange_Historized.Size = new System.Drawing.Size(24, 24); + this.aaTimeSinceChange_Historized.TabIndex = 45; + this.aaTimeSinceChange_Historized.UseVisualStyleBackColor = false; + // + // aaTimeSinceChange_HistorizedLock + // + this.aaTimeSinceChange_HistorizedLock.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaTimeSinceChange_HistorizedLock.Attribute = "TimeSinceChange.Historized"; + this.aaTimeSinceChange_HistorizedLock.BackColor = System.Drawing.Color.Transparent; + this.aaTimeSinceChange_HistorizedLock.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaTimeSinceChange_HistorizedLock.Image = ((System.Drawing.Image)(resources.GetObject("aaTimeSinceChange_HistorizedLock.Image"))); + this.aaTimeSinceChange_HistorizedLock.Location = new System.Drawing.Point(635, 177); + this.aaTimeSinceChange_HistorizedLock.Name = "aaTimeSinceChange_HistorizedLock"; + this.aaTimeSinceChange_HistorizedLock.Size = new System.Drawing.Size(20, 20); + this.aaTimeSinceChange_HistorizedLock.TabIndex = 53; + this.aaTimeSinceChange_HistorizedLock.TabStop = false; + // + // aaWatchdogStatsResetPrompt + // + this.aaWatchdogStatsResetPrompt.Attribute = null; + this.aaWatchdogStatsResetPrompt.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogStatsResetPrompt.Dictionary = null; + this.aaWatchdogStatsResetPrompt.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaWatchdogStatsResetPrompt.Location = new System.Drawing.Point(58, 18); + this.aaWatchdogStatsResetPrompt.Name = "aaWatchdogStatsResetPrompt"; + this.aaWatchdogStatsResetPrompt.PhraseID = "aaWatchdogStatsResetPrompt"; + this.aaWatchdogStatsResetPrompt.Size = new System.Drawing.Size(240, 20); + this.aaWatchdogStatsResetPrompt.TabIndex = 80; + this.aaWatchdogStatsResetPrompt.Text = "Stats.Reset:"; + this.aaWatchdogStatsResetPrompt.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // aaWatchdogStatsResetSecurityClass + // + this.aaWatchdogStatsResetSecurityClass.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaWatchdogStatsResetSecurityClass.Attribute = "Stats.Reset"; + this.aaWatchdogStatsResetSecurityClass.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogStatsResetSecurityClass.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaWatchdogStatsResetSecurityClass.Image = ((System.Drawing.Image)(resources.GetObject("aaWatchdogStatsResetSecurityClass.Image"))); + this.aaWatchdogStatsResetSecurityClass.Location = new System.Drawing.Point(614, 18); + this.aaWatchdogStatsResetSecurityClass.Name = "aaWatchdogStatsResetSecurityClass"; + this.aaWatchdogStatsResetSecurityClass.Size = new System.Drawing.Size(20, 20); + this.aaWatchdogStatsResetSecurityClass.TabIndex = 81; + this.aaWatchdogStatsResetSecurityClass.TabStop = false; + // + // aaWatchdogStatsTimeoutCntHistForceStoragePeriodPrompt + // + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodPrompt.Attribute = null; + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodPrompt.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodPrompt.Dictionary = null; + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodPrompt.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodPrompt.Location = new System.Drawing.Point(58, 50); + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodPrompt.Name = "aaWatchdogStatsTimeoutCntHistForceStoragePeriodPrompt"; + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodPrompt.PhraseID = "aaWatchdogStatsTimeoutCntHistForceStoragePeriodPrompt"; + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodPrompt.Size = new System.Drawing.Size(240, 20); + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodPrompt.TabIndex = 82; + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodPrompt.Text = "Stats.TimeoutCnt.ForceStoragePeriod:"; + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodPrompt.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // aaWatchdogStatsTimeoutCntHistForceStoragePeriod + // + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriod.Attribute = "Stats.TimeoutCnt.ForceStoragePeriod"; + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriod.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriod.Increment = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriod.Location = new System.Drawing.Point(306, 50); + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriod.Maximum = new decimal(new int[] { + 2147483647, + 0, + 0, + 0}); + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriod.Minimum = new decimal(new int[] { + -2147483648, + 0, + 0, + -2147483648}); + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriod.Name = "aaWatchdogStatsTimeoutCntHistForceStoragePeriod"; + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriod.Size = new System.Drawing.Size(96, 24); + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriod.TabIndex = 83; + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriod.Value = new decimal(new int[] { + 0, + 0, + 0, + 0}); + // + // aaWatchdogStatsTimeoutCntHistForceStoragePeriodSecurityClass + // + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodSecurityClass.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodSecurityClass.Attribute = "Stats.TimeoutCnt.ForceStoragePeriod"; + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodSecurityClass.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodSecurityClass.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodSecurityClass.Image = ((System.Drawing.Image)(resources.GetObject("aaWatchdogStatsTimeoutCntHistForceStoragePeriodSecurityClass.Image"))); + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodSecurityClass.Location = new System.Drawing.Point(614, 50); + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodSecurityClass.Name = "aaWatchdogStatsTimeoutCntHistForceStoragePeriodSecurityClass"; + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodSecurityClass.Size = new System.Drawing.Size(20, 20); + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodSecurityClass.TabIndex = 85; + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodSecurityClass.TabStop = false; + // + // aaWatchdogStatsTimeoutCntHistForceStoragePeriodLock + // + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodLock.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodLock.Attribute = "Stats.TimeoutCnt.ForceStoragePeriod"; + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodLock.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodLock.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodLock.Image = ((System.Drawing.Image)(resources.GetObject("aaWatchdogStatsTimeoutCntHistForceStoragePeriodLock.Image"))); + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodLock.Location = new System.Drawing.Point(646, 50); + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodLock.Name = "aaWatchdogStatsTimeoutCntHistForceStoragePeriodLock"; + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodLock.Size = new System.Drawing.Size(20, 20); + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodLock.TabIndex = 87; + this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodLock.TabStop = false; + // + // aaWatchdogStatsTimeoutCntHistTrendHiPrompt + // + this.aaWatchdogStatsTimeoutCntHistTrendHiPrompt.Attribute = null; + this.aaWatchdogStatsTimeoutCntHistTrendHiPrompt.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogStatsTimeoutCntHistTrendHiPrompt.Dictionary = null; + this.aaWatchdogStatsTimeoutCntHistTrendHiPrompt.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaWatchdogStatsTimeoutCntHistTrendHiPrompt.Location = new System.Drawing.Point(58, 82); + this.aaWatchdogStatsTimeoutCntHistTrendHiPrompt.Name = "aaWatchdogStatsTimeoutCntHistTrendHiPrompt"; + this.aaWatchdogStatsTimeoutCntHistTrendHiPrompt.PhraseID = "aaWatchdogStatsTimeoutCntHistTrendHiPrompt"; + this.aaWatchdogStatsTimeoutCntHistTrendHiPrompt.Size = new System.Drawing.Size(240, 20); + this.aaWatchdogStatsTimeoutCntHistTrendHiPrompt.TabIndex = 89; + this.aaWatchdogStatsTimeoutCntHistTrendHiPrompt.Text = "Stats.TimeoutCnt.TrendHi:"; + this.aaWatchdogStatsTimeoutCntHistTrendHiPrompt.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // aaWatchdogStatsTimeoutCntHistTrendHi + // + this.aaWatchdogStatsTimeoutCntHistTrendHi.Attribute = "Stats.TimeoutCnt.TrendHi"; + this.aaWatchdogStatsTimeoutCntHistTrendHi.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaWatchdogStatsTimeoutCntHistTrendHi.Increment = new decimal(new int[] { + 1, + 0, + 0, + 65536}); + this.aaWatchdogStatsTimeoutCntHistTrendHi.Location = new System.Drawing.Point(306, 82); + this.aaWatchdogStatsTimeoutCntHistTrendHi.Maximum = new decimal(new int[] { + -67108864, + 361109102, + -8810, + 0}); + this.aaWatchdogStatsTimeoutCntHistTrendHi.Minimum = new decimal(new int[] { + -67108864, + 361109102, + -8810, + -2147483648}); + this.aaWatchdogStatsTimeoutCntHistTrendHi.Name = "aaWatchdogStatsTimeoutCntHistTrendHi"; + this.aaWatchdogStatsTimeoutCntHistTrendHi.Size = new System.Drawing.Size(96, 24); + this.aaWatchdogStatsTimeoutCntHistTrendHi.TabIndex = 84; + this.aaWatchdogStatsTimeoutCntHistTrendHi.Value = new decimal(new int[] { + 0, + 0, + 0, + 0}); + // + // aaWatchdogStatsTimeoutCntHistTrendHiSecurityClass + // + this.aaWatchdogStatsTimeoutCntHistTrendHiSecurityClass.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaWatchdogStatsTimeoutCntHistTrendHiSecurityClass.Attribute = "Stats.TimeoutCnt.TrendHi"; + this.aaWatchdogStatsTimeoutCntHistTrendHiSecurityClass.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogStatsTimeoutCntHistTrendHiSecurityClass.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaWatchdogStatsTimeoutCntHistTrendHiSecurityClass.Image = ((System.Drawing.Image)(resources.GetObject("aaWatchdogStatsTimeoutCntHistTrendHiSecurityClass.Image"))); + this.aaWatchdogStatsTimeoutCntHistTrendHiSecurityClass.Location = new System.Drawing.Point(614, 82); + this.aaWatchdogStatsTimeoutCntHistTrendHiSecurityClass.Name = "aaWatchdogStatsTimeoutCntHistTrendHiSecurityClass"; + this.aaWatchdogStatsTimeoutCntHistTrendHiSecurityClass.Size = new System.Drawing.Size(20, 20); + this.aaWatchdogStatsTimeoutCntHistTrendHiSecurityClass.TabIndex = 91; + this.aaWatchdogStatsTimeoutCntHistTrendHiSecurityClass.TabStop = false; + // + // aaWatchdogStatsTimeoutCntHistTrendHiLock + // + this.aaWatchdogStatsTimeoutCntHistTrendHiLock.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaWatchdogStatsTimeoutCntHistTrendHiLock.Attribute = "Stats.TimeoutCnt.TrendHi"; + this.aaWatchdogStatsTimeoutCntHistTrendHiLock.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogStatsTimeoutCntHistTrendHiLock.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaWatchdogStatsTimeoutCntHistTrendHiLock.Image = ((System.Drawing.Image)(resources.GetObject("aaWatchdogStatsTimeoutCntHistTrendHiLock.Image"))); + this.aaWatchdogStatsTimeoutCntHistTrendHiLock.Location = new System.Drawing.Point(646, 82); + this.aaWatchdogStatsTimeoutCntHistTrendHiLock.Name = "aaWatchdogStatsTimeoutCntHistTrendHiLock"; + this.aaWatchdogStatsTimeoutCntHistTrendHiLock.Size = new System.Drawing.Size(20, 20); + this.aaWatchdogStatsTimeoutCntHistTrendHiLock.TabIndex = 93; + this.aaWatchdogStatsTimeoutCntHistTrendHiLock.TabStop = false; + // + // aaWatchdogStatsTimeoutCntHistTrendLoPrompt + // + this.aaWatchdogStatsTimeoutCntHistTrendLoPrompt.Attribute = null; + this.aaWatchdogStatsTimeoutCntHistTrendLoPrompt.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogStatsTimeoutCntHistTrendLoPrompt.Dictionary = null; + this.aaWatchdogStatsTimeoutCntHistTrendLoPrompt.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaWatchdogStatsTimeoutCntHistTrendLoPrompt.Location = new System.Drawing.Point(58, 114); + this.aaWatchdogStatsTimeoutCntHistTrendLoPrompt.Name = "aaWatchdogStatsTimeoutCntHistTrendLoPrompt"; + this.aaWatchdogStatsTimeoutCntHistTrendLoPrompt.PhraseID = "aaWatchdogStatsTimeoutCntHistTrendLoPrompt"; + this.aaWatchdogStatsTimeoutCntHistTrendLoPrompt.Size = new System.Drawing.Size(240, 20); + this.aaWatchdogStatsTimeoutCntHistTrendLoPrompt.TabIndex = 95; + this.aaWatchdogStatsTimeoutCntHistTrendLoPrompt.Text = "Stats.TimeoutCnt.TrendLo:"; + this.aaWatchdogStatsTimeoutCntHistTrendLoPrompt.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // aaWatchdogStatsTimeoutCntHistTrendLo + // + this.aaWatchdogStatsTimeoutCntHistTrendLo.Attribute = "Stats.TimeoutCnt.TrendLo"; + this.aaWatchdogStatsTimeoutCntHistTrendLo.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaWatchdogStatsTimeoutCntHistTrendLo.Increment = new decimal(new int[] { + 1, + 0, + 0, + 65536}); + this.aaWatchdogStatsTimeoutCntHistTrendLo.Location = new System.Drawing.Point(306, 114); + this.aaWatchdogStatsTimeoutCntHistTrendLo.Maximum = new decimal(new int[] { + -67108864, + 361109102, + -8810, + 0}); + this.aaWatchdogStatsTimeoutCntHistTrendLo.Minimum = new decimal(new int[] { + -67108864, + 361109102, + -8810, + -2147483648}); + this.aaWatchdogStatsTimeoutCntHistTrendLo.Name = "aaWatchdogStatsTimeoutCntHistTrendLo"; + this.aaWatchdogStatsTimeoutCntHistTrendLo.Size = new System.Drawing.Size(96, 24); + this.aaWatchdogStatsTimeoutCntHistTrendLo.TabIndex = 86; + this.aaWatchdogStatsTimeoutCntHistTrendLo.Value = new decimal(new int[] { + 0, + 0, + 0, + 0}); + // + // aaWatchdogStatsTimeoutCntHistTrendLoSecurityClass + // + this.aaWatchdogStatsTimeoutCntHistTrendLoSecurityClass.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaWatchdogStatsTimeoutCntHistTrendLoSecurityClass.Attribute = "Stats.TimeoutCnt.TrendLo"; + this.aaWatchdogStatsTimeoutCntHistTrendLoSecurityClass.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogStatsTimeoutCntHistTrendLoSecurityClass.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaWatchdogStatsTimeoutCntHistTrendLoSecurityClass.Image = ((System.Drawing.Image)(resources.GetObject("aaWatchdogStatsTimeoutCntHistTrendLoSecurityClass.Image"))); + this.aaWatchdogStatsTimeoutCntHistTrendLoSecurityClass.Location = new System.Drawing.Point(614, 114); + this.aaWatchdogStatsTimeoutCntHistTrendLoSecurityClass.Name = "aaWatchdogStatsTimeoutCntHistTrendLoSecurityClass"; + this.aaWatchdogStatsTimeoutCntHistTrendLoSecurityClass.Size = new System.Drawing.Size(20, 20); + this.aaWatchdogStatsTimeoutCntHistTrendLoSecurityClass.TabIndex = 97; + this.aaWatchdogStatsTimeoutCntHistTrendLoSecurityClass.TabStop = false; + // + // aaWatchdogStatsTimeoutCntHistTrendLoLock + // + this.aaWatchdogStatsTimeoutCntHistTrendLoLock.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaWatchdogStatsTimeoutCntHistTrendLoLock.Attribute = "Stats.TimeoutCnt.TrendLo"; + this.aaWatchdogStatsTimeoutCntHistTrendLoLock.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogStatsTimeoutCntHistTrendLoLock.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaWatchdogStatsTimeoutCntHistTrendLoLock.Image = ((System.Drawing.Image)(resources.GetObject("aaWatchdogStatsTimeoutCntHistTrendLoLock.Image"))); + this.aaWatchdogStatsTimeoutCntHistTrendLoLock.Location = new System.Drawing.Point(646, 114); + this.aaWatchdogStatsTimeoutCntHistTrendLoLock.Name = "aaWatchdogStatsTimeoutCntHistTrendLoLock"; + this.aaWatchdogStatsTimeoutCntHistTrendLoLock.Size = new System.Drawing.Size(20, 20); + this.aaWatchdogStatsTimeoutCntHistTrendLoLock.TabIndex = 99; + this.aaWatchdogStatsTimeoutCntHistTrendLoLock.TabStop = false; + // + // aaWatchdogStatsTimeoutCntHistValueDeadBandPrompt + // + this.aaWatchdogStatsTimeoutCntHistValueDeadBandPrompt.Attribute = null; + this.aaWatchdogStatsTimeoutCntHistValueDeadBandPrompt.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogStatsTimeoutCntHistValueDeadBandPrompt.Dictionary = null; + this.aaWatchdogStatsTimeoutCntHistValueDeadBandPrompt.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaWatchdogStatsTimeoutCntHistValueDeadBandPrompt.Location = new System.Drawing.Point(58, 146); + this.aaWatchdogStatsTimeoutCntHistValueDeadBandPrompt.Name = "aaWatchdogStatsTimeoutCntHistValueDeadBandPrompt"; + this.aaWatchdogStatsTimeoutCntHistValueDeadBandPrompt.PhraseID = "aaWatchdogStatsTimeoutCntHistValueDeadBandPrompt"; + this.aaWatchdogStatsTimeoutCntHistValueDeadBandPrompt.Size = new System.Drawing.Size(240, 20); + this.aaWatchdogStatsTimeoutCntHistValueDeadBandPrompt.TabIndex = 101; + this.aaWatchdogStatsTimeoutCntHistValueDeadBandPrompt.Text = "Stats.TimeoutCnt.ValueDeadBand:"; + this.aaWatchdogStatsTimeoutCntHistValueDeadBandPrompt.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // aaWatchdogStatsTimeoutCntHistValueDeadBand + // + this.aaWatchdogStatsTimeoutCntHistValueDeadBand.Attribute = "Stats.TimeoutCnt.ValueDeadBand"; + this.aaWatchdogStatsTimeoutCntHistValueDeadBand.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaWatchdogStatsTimeoutCntHistValueDeadBand.Increment = new decimal(new int[] { + 1, + 0, + 0, + 65536}); + this.aaWatchdogStatsTimeoutCntHistValueDeadBand.Location = new System.Drawing.Point(306, 146); + this.aaWatchdogStatsTimeoutCntHistValueDeadBand.Maximum = new decimal(new int[] { + -67108864, + 361109102, + -8810, + 0}); + this.aaWatchdogStatsTimeoutCntHistValueDeadBand.Minimum = new decimal(new int[] { + -67108864, + 361109102, + -8810, + -2147483648}); + this.aaWatchdogStatsTimeoutCntHistValueDeadBand.Name = "aaWatchdogStatsTimeoutCntHistValueDeadBand"; + this.aaWatchdogStatsTimeoutCntHistValueDeadBand.Size = new System.Drawing.Size(96, 24); + this.aaWatchdogStatsTimeoutCntHistValueDeadBand.TabIndex = 88; + this.aaWatchdogStatsTimeoutCntHistValueDeadBand.Value = new decimal(new int[] { + 0, + 0, + 0, + 0}); + // + // aaWatchdogStatsTimeoutCntHistValueDeadBandSecurityClass + // + this.aaWatchdogStatsTimeoutCntHistValueDeadBandSecurityClass.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaWatchdogStatsTimeoutCntHistValueDeadBandSecurityClass.Attribute = "Stats.TimeoutCnt.ValueDeadBand"; + this.aaWatchdogStatsTimeoutCntHistValueDeadBandSecurityClass.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogStatsTimeoutCntHistValueDeadBandSecurityClass.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaWatchdogStatsTimeoutCntHistValueDeadBandSecurityClass.Image = ((System.Drawing.Image)(resources.GetObject("aaWatchdogStatsTimeoutCntHistValueDeadBandSecurityClass.Image"))); + this.aaWatchdogStatsTimeoutCntHistValueDeadBandSecurityClass.Location = new System.Drawing.Point(614, 146); + this.aaWatchdogStatsTimeoutCntHistValueDeadBandSecurityClass.Name = "aaWatchdogStatsTimeoutCntHistValueDeadBandSecurityClass"; + this.aaWatchdogStatsTimeoutCntHistValueDeadBandSecurityClass.Size = new System.Drawing.Size(20, 20); + this.aaWatchdogStatsTimeoutCntHistValueDeadBandSecurityClass.TabIndex = 102; + this.aaWatchdogStatsTimeoutCntHistValueDeadBandSecurityClass.TabStop = false; + // + // aaWatchdogStatsTimeoutCntHistValueDeadBandLock + // + this.aaWatchdogStatsTimeoutCntHistValueDeadBandLock.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaWatchdogStatsTimeoutCntHistValueDeadBandLock.Attribute = "Stats.TimeoutCnt.ValueDeadBand"; + this.aaWatchdogStatsTimeoutCntHistValueDeadBandLock.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogStatsTimeoutCntHistValueDeadBandLock.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaWatchdogStatsTimeoutCntHistValueDeadBandLock.Image = ((System.Drawing.Image)(resources.GetObject("aaWatchdogStatsTimeoutCntHistValueDeadBandLock.Image"))); + this.aaWatchdogStatsTimeoutCntHistValueDeadBandLock.Location = new System.Drawing.Point(646, 146); + this.aaWatchdogStatsTimeoutCntHistValueDeadBandLock.Name = "aaWatchdogStatsTimeoutCntHistValueDeadBandLock"; + this.aaWatchdogStatsTimeoutCntHistValueDeadBandLock.Size = new System.Drawing.Size(20, 20); + this.aaWatchdogStatsTimeoutCntHistValueDeadBandLock.TabIndex = 103; + this.aaWatchdogStatsTimeoutCntHistValueDeadBandLock.TabStop = false; + // + // aaWatchdogTimeoutAlarmAckMsgPrompt + // + this.aaWatchdogTimeoutAlarmAckMsgPrompt.Attribute = null; + this.aaWatchdogTimeoutAlarmAckMsgPrompt.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogTimeoutAlarmAckMsgPrompt.Dictionary = null; + this.aaWatchdogTimeoutAlarmAckMsgPrompt.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaWatchdogTimeoutAlarmAckMsgPrompt.Location = new System.Drawing.Point(58, 178); + this.aaWatchdogTimeoutAlarmAckMsgPrompt.Name = "aaWatchdogTimeoutAlarmAckMsgPrompt"; + this.aaWatchdogTimeoutAlarmAckMsgPrompt.PhraseID = "aaWatchdogTimeoutAlarmAckMsgPrompt"; + this.aaWatchdogTimeoutAlarmAckMsgPrompt.Size = new System.Drawing.Size(240, 20); + this.aaWatchdogTimeoutAlarmAckMsgPrompt.TabIndex = 104; + this.aaWatchdogTimeoutAlarmAckMsgPrompt.Text = "Timeout.AckMsg:"; + this.aaWatchdogTimeoutAlarmAckMsgPrompt.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // aaWatchdogTimeoutAlarmAckMsgSecurityClass + // + this.aaWatchdogTimeoutAlarmAckMsgSecurityClass.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaWatchdogTimeoutAlarmAckMsgSecurityClass.Attribute = "Timeout.AckMsg"; + this.aaWatchdogTimeoutAlarmAckMsgSecurityClass.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogTimeoutAlarmAckMsgSecurityClass.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaWatchdogTimeoutAlarmAckMsgSecurityClass.Image = ((System.Drawing.Image)(resources.GetObject("aaWatchdogTimeoutAlarmAckMsgSecurityClass.Image"))); + this.aaWatchdogTimeoutAlarmAckMsgSecurityClass.Location = new System.Drawing.Point(614, 178); + this.aaWatchdogTimeoutAlarmAckMsgSecurityClass.Name = "aaWatchdogTimeoutAlarmAckMsgSecurityClass"; + this.aaWatchdogTimeoutAlarmAckMsgSecurityClass.Size = new System.Drawing.Size(20, 20); + this.aaWatchdogTimeoutAlarmAckMsgSecurityClass.TabIndex = 105; + this.aaWatchdogTimeoutAlarmAckMsgSecurityClass.TabStop = false; + // + // aaWatchdogTimeoutAlarmDescAttrNamePrompt + // + this.aaWatchdogTimeoutAlarmDescAttrNamePrompt.Attribute = null; + this.aaWatchdogTimeoutAlarmDescAttrNamePrompt.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogTimeoutAlarmDescAttrNamePrompt.Dictionary = null; + this.aaWatchdogTimeoutAlarmDescAttrNamePrompt.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaWatchdogTimeoutAlarmDescAttrNamePrompt.Location = new System.Drawing.Point(58, 210); + this.aaWatchdogTimeoutAlarmDescAttrNamePrompt.Name = "aaWatchdogTimeoutAlarmDescAttrNamePrompt"; + this.aaWatchdogTimeoutAlarmDescAttrNamePrompt.PhraseID = "aaWatchdogTimeoutAlarmDescAttrNamePrompt"; + this.aaWatchdogTimeoutAlarmDescAttrNamePrompt.Size = new System.Drawing.Size(240, 20); + this.aaWatchdogTimeoutAlarmDescAttrNamePrompt.TabIndex = 106; + this.aaWatchdogTimeoutAlarmDescAttrNamePrompt.Text = "Timeout.DescAttrName:"; + this.aaWatchdogTimeoutAlarmDescAttrNamePrompt.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // aaWatchdogTimeoutAlarmDescAttrName + // + this.aaWatchdogTimeoutAlarmDescAttrName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.aaWatchdogTimeoutAlarmDescAttrName.Attribute = "Timeout.DescAttrName"; + this.aaWatchdogTimeoutAlarmDescAttrName.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogTimeoutAlarmDescAttrName.BrowserMode = ArchestraEditorFramework.ArchestrABrowserMode.Local; + this.aaWatchdogTimeoutAlarmDescAttrName.Dictionary = null; + this.aaWatchdogTimeoutAlarmDescAttrName.FilterNamePhraseID = null; + this.aaWatchdogTimeoutAlarmDescAttrName.Font = new System.Drawing.Font("Tahoma", 8.25F); + this.aaWatchdogTimeoutAlarmDescAttrName.Location = new System.Drawing.Point(306, 210); + this.aaWatchdogTimeoutAlarmDescAttrName.Name = "aaWatchdogTimeoutAlarmDescAttrName"; + this.aaWatchdogTimeoutAlarmDescAttrName.Size = new System.Drawing.Size(300, 21); + this.aaWatchdogTimeoutAlarmDescAttrName.TabIndex = 90; + // + // aaWatchdogTimeoutAlarmDescAttrNameLock + // + this.aaWatchdogTimeoutAlarmDescAttrNameLock.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaWatchdogTimeoutAlarmDescAttrNameLock.Attribute = "Timeout.DescAttrName"; + this.aaWatchdogTimeoutAlarmDescAttrNameLock.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogTimeoutAlarmDescAttrNameLock.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaWatchdogTimeoutAlarmDescAttrNameLock.Image = ((System.Drawing.Image)(resources.GetObject("aaWatchdogTimeoutAlarmDescAttrNameLock.Image"))); + this.aaWatchdogTimeoutAlarmDescAttrNameLock.Location = new System.Drawing.Point(646, 210); + this.aaWatchdogTimeoutAlarmDescAttrNameLock.Name = "aaWatchdogTimeoutAlarmDescAttrNameLock"; + this.aaWatchdogTimeoutAlarmDescAttrNameLock.Size = new System.Drawing.Size(20, 20); + this.aaWatchdogTimeoutAlarmDescAttrNameLock.TabIndex = 107; + this.aaWatchdogTimeoutAlarmDescAttrNameLock.TabStop = false; + // + // aaWatchdogTimeoutAlarmPriorityPrompt + // + this.aaWatchdogTimeoutAlarmPriorityPrompt.Attribute = null; + this.aaWatchdogTimeoutAlarmPriorityPrompt.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogTimeoutAlarmPriorityPrompt.Dictionary = null; + this.aaWatchdogTimeoutAlarmPriorityPrompt.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaWatchdogTimeoutAlarmPriorityPrompt.Location = new System.Drawing.Point(58, 242); + this.aaWatchdogTimeoutAlarmPriorityPrompt.Name = "aaWatchdogTimeoutAlarmPriorityPrompt"; + this.aaWatchdogTimeoutAlarmPriorityPrompt.PhraseID = "aaWatchdogTimeoutAlarmPriorityPrompt"; + this.aaWatchdogTimeoutAlarmPriorityPrompt.Size = new System.Drawing.Size(240, 20); + this.aaWatchdogTimeoutAlarmPriorityPrompt.TabIndex = 108; + this.aaWatchdogTimeoutAlarmPriorityPrompt.Text = "Timeout.Priority:"; + this.aaWatchdogTimeoutAlarmPriorityPrompt.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // aaWatchdogTimeoutAlarmPriority + // + this.aaWatchdogTimeoutAlarmPriority.Attribute = "Timeout.Priority"; + this.aaWatchdogTimeoutAlarmPriority.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaWatchdogTimeoutAlarmPriority.Increment = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.aaWatchdogTimeoutAlarmPriority.Location = new System.Drawing.Point(306, 242); + this.aaWatchdogTimeoutAlarmPriority.Maximum = new decimal(new int[] { + 2147483647, + 0, + 0, + 0}); + this.aaWatchdogTimeoutAlarmPriority.Minimum = new decimal(new int[] { + -2147483648, + 0, + 0, + -2147483648}); + this.aaWatchdogTimeoutAlarmPriority.Name = "aaWatchdogTimeoutAlarmPriority"; + this.aaWatchdogTimeoutAlarmPriority.Size = new System.Drawing.Size(96, 24); + this.aaWatchdogTimeoutAlarmPriority.TabIndex = 92; + this.aaWatchdogTimeoutAlarmPriority.Value = new decimal(new int[] { + 0, + 0, + 0, + 0}); + // + // aaWatchdogTimeoutAlarmPrioritySecurityClass + // + this.aaWatchdogTimeoutAlarmPrioritySecurityClass.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaWatchdogTimeoutAlarmPrioritySecurityClass.Attribute = "Timeout.Priority"; + this.aaWatchdogTimeoutAlarmPrioritySecurityClass.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogTimeoutAlarmPrioritySecurityClass.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaWatchdogTimeoutAlarmPrioritySecurityClass.Image = ((System.Drawing.Image)(resources.GetObject("aaWatchdogTimeoutAlarmPrioritySecurityClass.Image"))); + this.aaWatchdogTimeoutAlarmPrioritySecurityClass.Location = new System.Drawing.Point(614, 242); + this.aaWatchdogTimeoutAlarmPrioritySecurityClass.Name = "aaWatchdogTimeoutAlarmPrioritySecurityClass"; + this.aaWatchdogTimeoutAlarmPrioritySecurityClass.Size = new System.Drawing.Size(20, 20); + this.aaWatchdogTimeoutAlarmPrioritySecurityClass.TabIndex = 109; + this.aaWatchdogTimeoutAlarmPrioritySecurityClass.TabStop = false; + // + // aaWatchdogTimeoutAlarmPriorityLock + // + this.aaWatchdogTimeoutAlarmPriorityLock.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaWatchdogTimeoutAlarmPriorityLock.Attribute = "Timeout.Priority"; + this.aaWatchdogTimeoutAlarmPriorityLock.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogTimeoutAlarmPriorityLock.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaWatchdogTimeoutAlarmPriorityLock.Image = ((System.Drawing.Image)(resources.GetObject("aaWatchdogTimeoutAlarmPriorityLock.Image"))); + this.aaWatchdogTimeoutAlarmPriorityLock.Location = new System.Drawing.Point(646, 242); + this.aaWatchdogTimeoutAlarmPriorityLock.Name = "aaWatchdogTimeoutAlarmPriorityLock"; + this.aaWatchdogTimeoutAlarmPriorityLock.Size = new System.Drawing.Size(20, 20); + this.aaWatchdogTimeoutAlarmPriorityLock.TabIndex = 110; + this.aaWatchdogTimeoutAlarmPriorityLock.TabStop = false; + // + // aaWatchdogTimeSinceChangeHistForceStoragePeriodPrompt + // + this.aaWatchdogTimeSinceChangeHistForceStoragePeriodPrompt.Attribute = null; + this.aaWatchdogTimeSinceChangeHistForceStoragePeriodPrompt.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogTimeSinceChangeHistForceStoragePeriodPrompt.Dictionary = null; + this.aaWatchdogTimeSinceChangeHistForceStoragePeriodPrompt.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaWatchdogTimeSinceChangeHistForceStoragePeriodPrompt.Location = new System.Drawing.Point(58, 274); + this.aaWatchdogTimeSinceChangeHistForceStoragePeriodPrompt.Name = "aaWatchdogTimeSinceChangeHistForceStoragePeriodPrompt"; + this.aaWatchdogTimeSinceChangeHistForceStoragePeriodPrompt.PhraseID = "aaWatchdogTimeSinceChangeHistForceStoragePeriodPrompt"; + this.aaWatchdogTimeSinceChangeHistForceStoragePeriodPrompt.Size = new System.Drawing.Size(240, 20); + this.aaWatchdogTimeSinceChangeHistForceStoragePeriodPrompt.TabIndex = 111; + this.aaWatchdogTimeSinceChangeHistForceStoragePeriodPrompt.Text = "TimeSinceChange.ForceStoragePeriod:"; + this.aaWatchdogTimeSinceChangeHistForceStoragePeriodPrompt.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // aaWatchdogTimeSinceChangeHistForceStoragePeriod + // + this.aaWatchdogTimeSinceChangeHistForceStoragePeriod.Attribute = "TimeSinceChange.ForceStoragePeriod"; + this.aaWatchdogTimeSinceChangeHistForceStoragePeriod.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaWatchdogTimeSinceChangeHistForceStoragePeriod.Increment = new decimal(new int[] { + 1, + 0, + 0, + 0}); + this.aaWatchdogTimeSinceChangeHistForceStoragePeriod.Location = new System.Drawing.Point(306, 274); + this.aaWatchdogTimeSinceChangeHistForceStoragePeriod.Maximum = new decimal(new int[] { + 2147483647, + 0, + 0, + 0}); + this.aaWatchdogTimeSinceChangeHistForceStoragePeriod.Minimum = new decimal(new int[] { + -2147483648, + 0, + 0, + -2147483648}); + this.aaWatchdogTimeSinceChangeHistForceStoragePeriod.Name = "aaWatchdogTimeSinceChangeHistForceStoragePeriod"; + this.aaWatchdogTimeSinceChangeHistForceStoragePeriod.Size = new System.Drawing.Size(96, 24); + this.aaWatchdogTimeSinceChangeHistForceStoragePeriod.TabIndex = 94; + this.aaWatchdogTimeSinceChangeHistForceStoragePeriod.Value = new decimal(new int[] { + 0, + 0, + 0, + 0}); + // + // aaWatchdogTimeSinceChangeHistForceStoragePeriodSecurityClass + // + this.aaWatchdogTimeSinceChangeHistForceStoragePeriodSecurityClass.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaWatchdogTimeSinceChangeHistForceStoragePeriodSecurityClass.Attribute = "TimeSinceChange.ForceStoragePeriod"; + this.aaWatchdogTimeSinceChangeHistForceStoragePeriodSecurityClass.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogTimeSinceChangeHistForceStoragePeriodSecurityClass.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaWatchdogTimeSinceChangeHistForceStoragePeriodSecurityClass.Image = ((System.Drawing.Image)(resources.GetObject("aaWatchdogTimeSinceChangeHistForceStoragePeriodSecurityClass.Image"))); + this.aaWatchdogTimeSinceChangeHistForceStoragePeriodSecurityClass.Location = new System.Drawing.Point(614, 274); + this.aaWatchdogTimeSinceChangeHistForceStoragePeriodSecurityClass.Name = "aaWatchdogTimeSinceChangeHistForceStoragePeriodSecurityClass"; + this.aaWatchdogTimeSinceChangeHistForceStoragePeriodSecurityClass.Size = new System.Drawing.Size(20, 20); + this.aaWatchdogTimeSinceChangeHistForceStoragePeriodSecurityClass.TabIndex = 112; + this.aaWatchdogTimeSinceChangeHistForceStoragePeriodSecurityClass.TabStop = false; + // + // aaWatchdogTimeSinceChangeHistForceStoragePeriodLock + // + this.aaWatchdogTimeSinceChangeHistForceStoragePeriodLock.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaWatchdogTimeSinceChangeHistForceStoragePeriodLock.Attribute = "TimeSinceChange.ForceStoragePeriod"; + this.aaWatchdogTimeSinceChangeHistForceStoragePeriodLock.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogTimeSinceChangeHistForceStoragePeriodLock.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaWatchdogTimeSinceChangeHistForceStoragePeriodLock.Image = ((System.Drawing.Image)(resources.GetObject("aaWatchdogTimeSinceChangeHistForceStoragePeriodLock.Image"))); + this.aaWatchdogTimeSinceChangeHistForceStoragePeriodLock.Location = new System.Drawing.Point(646, 274); + this.aaWatchdogTimeSinceChangeHistForceStoragePeriodLock.Name = "aaWatchdogTimeSinceChangeHistForceStoragePeriodLock"; + this.aaWatchdogTimeSinceChangeHistForceStoragePeriodLock.Size = new System.Drawing.Size(20, 20); + this.aaWatchdogTimeSinceChangeHistForceStoragePeriodLock.TabIndex = 113; + this.aaWatchdogTimeSinceChangeHistForceStoragePeriodLock.TabStop = false; + // + // aaWatchdogTimeSinceChangeHistTrendHiPrompt + // + this.aaWatchdogTimeSinceChangeHistTrendHiPrompt.Attribute = null; + this.aaWatchdogTimeSinceChangeHistTrendHiPrompt.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogTimeSinceChangeHistTrendHiPrompt.Dictionary = null; + this.aaWatchdogTimeSinceChangeHistTrendHiPrompt.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaWatchdogTimeSinceChangeHistTrendHiPrompt.Location = new System.Drawing.Point(58, 306); + this.aaWatchdogTimeSinceChangeHistTrendHiPrompt.Name = "aaWatchdogTimeSinceChangeHistTrendHiPrompt"; + this.aaWatchdogTimeSinceChangeHistTrendHiPrompt.PhraseID = "aaWatchdogTimeSinceChangeHistTrendHiPrompt"; + this.aaWatchdogTimeSinceChangeHistTrendHiPrompt.Size = new System.Drawing.Size(240, 20); + this.aaWatchdogTimeSinceChangeHistTrendHiPrompt.TabIndex = 114; + this.aaWatchdogTimeSinceChangeHistTrendHiPrompt.Text = "TimeSinceChange.TrendHi:"; + this.aaWatchdogTimeSinceChangeHistTrendHiPrompt.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // aaWatchdogTimeSinceChangeHistTrendHi + // + this.aaWatchdogTimeSinceChangeHistTrendHi.Attribute = "TimeSinceChange.TrendHi"; + this.aaWatchdogTimeSinceChangeHistTrendHi.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaWatchdogTimeSinceChangeHistTrendHi.Increment = new decimal(new int[] { + 1, + 0, + 0, + 65536}); + this.aaWatchdogTimeSinceChangeHistTrendHi.Location = new System.Drawing.Point(306, 306); + this.aaWatchdogTimeSinceChangeHistTrendHi.Maximum = new decimal(new int[] { + -67108864, + 361109102, + -8810, + 0}); + this.aaWatchdogTimeSinceChangeHistTrendHi.Minimum = new decimal(new int[] { + -67108864, + 361109102, + -8810, + -2147483648}); + this.aaWatchdogTimeSinceChangeHistTrendHi.Name = "aaWatchdogTimeSinceChangeHistTrendHi"; + this.aaWatchdogTimeSinceChangeHistTrendHi.Size = new System.Drawing.Size(96, 24); + this.aaWatchdogTimeSinceChangeHistTrendHi.TabIndex = 96; + this.aaWatchdogTimeSinceChangeHistTrendHi.Value = new decimal(new int[] { + 0, + 0, + 0, + 0}); + // + // aaWatchdogTimeSinceChangeHistTrendHiSecurityClass + // + this.aaWatchdogTimeSinceChangeHistTrendHiSecurityClass.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaWatchdogTimeSinceChangeHistTrendHiSecurityClass.Attribute = "TimeSinceChange.TrendHi"; + this.aaWatchdogTimeSinceChangeHistTrendHiSecurityClass.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogTimeSinceChangeHistTrendHiSecurityClass.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaWatchdogTimeSinceChangeHistTrendHiSecurityClass.Image = ((System.Drawing.Image)(resources.GetObject("aaWatchdogTimeSinceChangeHistTrendHiSecurityClass.Image"))); + this.aaWatchdogTimeSinceChangeHistTrendHiSecurityClass.Location = new System.Drawing.Point(614, 306); + this.aaWatchdogTimeSinceChangeHistTrendHiSecurityClass.Name = "aaWatchdogTimeSinceChangeHistTrendHiSecurityClass"; + this.aaWatchdogTimeSinceChangeHistTrendHiSecurityClass.Size = new System.Drawing.Size(20, 20); + this.aaWatchdogTimeSinceChangeHistTrendHiSecurityClass.TabIndex = 115; + this.aaWatchdogTimeSinceChangeHistTrendHiSecurityClass.TabStop = false; + // + // aaWatchdogTimeSinceChangeHistTrendHiLock + // + this.aaWatchdogTimeSinceChangeHistTrendHiLock.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaWatchdogTimeSinceChangeHistTrendHiLock.Attribute = "TimeSinceChange.TrendHi"; + this.aaWatchdogTimeSinceChangeHistTrendHiLock.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogTimeSinceChangeHistTrendHiLock.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaWatchdogTimeSinceChangeHistTrendHiLock.Image = ((System.Drawing.Image)(resources.GetObject("aaWatchdogTimeSinceChangeHistTrendHiLock.Image"))); + this.aaWatchdogTimeSinceChangeHistTrendHiLock.Location = new System.Drawing.Point(646, 306); + this.aaWatchdogTimeSinceChangeHistTrendHiLock.Name = "aaWatchdogTimeSinceChangeHistTrendHiLock"; + this.aaWatchdogTimeSinceChangeHistTrendHiLock.Size = new System.Drawing.Size(20, 20); + this.aaWatchdogTimeSinceChangeHistTrendHiLock.TabIndex = 116; + this.aaWatchdogTimeSinceChangeHistTrendHiLock.TabStop = false; + // + // aaWatchdogTimeSinceChangeHistTrendLoPrompt + // + this.aaWatchdogTimeSinceChangeHistTrendLoPrompt.Attribute = null; + this.aaWatchdogTimeSinceChangeHistTrendLoPrompt.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogTimeSinceChangeHistTrendLoPrompt.Dictionary = null; + this.aaWatchdogTimeSinceChangeHistTrendLoPrompt.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaWatchdogTimeSinceChangeHistTrendLoPrompt.Location = new System.Drawing.Point(58, 338); + this.aaWatchdogTimeSinceChangeHistTrendLoPrompt.Name = "aaWatchdogTimeSinceChangeHistTrendLoPrompt"; + this.aaWatchdogTimeSinceChangeHistTrendLoPrompt.PhraseID = "aaWatchdogTimeSinceChangeHistTrendLoPrompt"; + this.aaWatchdogTimeSinceChangeHistTrendLoPrompt.Size = new System.Drawing.Size(240, 20); + this.aaWatchdogTimeSinceChangeHistTrendLoPrompt.TabIndex = 117; + this.aaWatchdogTimeSinceChangeHistTrendLoPrompt.Text = "TimeSinceChange.TrendLo:"; + this.aaWatchdogTimeSinceChangeHistTrendLoPrompt.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // aaWatchdogTimeSinceChangeHistTrendLo + // + this.aaWatchdogTimeSinceChangeHistTrendLo.Attribute = "TimeSinceChange.TrendLo"; + this.aaWatchdogTimeSinceChangeHistTrendLo.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaWatchdogTimeSinceChangeHistTrendLo.Increment = new decimal(new int[] { + 1, + 0, + 0, + 65536}); + this.aaWatchdogTimeSinceChangeHistTrendLo.Location = new System.Drawing.Point(306, 338); + this.aaWatchdogTimeSinceChangeHistTrendLo.Maximum = new decimal(new int[] { + -67108864, + 361109102, + -8810, + 0}); + this.aaWatchdogTimeSinceChangeHistTrendLo.Minimum = new decimal(new int[] { + -67108864, + 361109102, + -8810, + -2147483648}); + this.aaWatchdogTimeSinceChangeHistTrendLo.Name = "aaWatchdogTimeSinceChangeHistTrendLo"; + this.aaWatchdogTimeSinceChangeHistTrendLo.Size = new System.Drawing.Size(96, 24); + this.aaWatchdogTimeSinceChangeHistTrendLo.TabIndex = 98; + this.aaWatchdogTimeSinceChangeHistTrendLo.Value = new decimal(new int[] { + 0, + 0, + 0, + 0}); + // + // aaWatchdogTimeSinceChangeHistTrendLoSecurityClass + // + this.aaWatchdogTimeSinceChangeHistTrendLoSecurityClass.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaWatchdogTimeSinceChangeHistTrendLoSecurityClass.Attribute = "TimeSinceChange.TrendLo"; + this.aaWatchdogTimeSinceChangeHistTrendLoSecurityClass.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogTimeSinceChangeHistTrendLoSecurityClass.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaWatchdogTimeSinceChangeHistTrendLoSecurityClass.Image = ((System.Drawing.Image)(resources.GetObject("aaWatchdogTimeSinceChangeHistTrendLoSecurityClass.Image"))); + this.aaWatchdogTimeSinceChangeHistTrendLoSecurityClass.Location = new System.Drawing.Point(614, 338); + this.aaWatchdogTimeSinceChangeHistTrendLoSecurityClass.Name = "aaWatchdogTimeSinceChangeHistTrendLoSecurityClass"; + this.aaWatchdogTimeSinceChangeHistTrendLoSecurityClass.Size = new System.Drawing.Size(20, 20); + this.aaWatchdogTimeSinceChangeHistTrendLoSecurityClass.TabIndex = 118; + this.aaWatchdogTimeSinceChangeHistTrendLoSecurityClass.TabStop = false; + // + // aaWatchdogTimeSinceChangeHistTrendLoLock + // + this.aaWatchdogTimeSinceChangeHistTrendLoLock.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaWatchdogTimeSinceChangeHistTrendLoLock.Attribute = "TimeSinceChange.TrendLo"; + this.aaWatchdogTimeSinceChangeHistTrendLoLock.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogTimeSinceChangeHistTrendLoLock.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaWatchdogTimeSinceChangeHistTrendLoLock.Image = ((System.Drawing.Image)(resources.GetObject("aaWatchdogTimeSinceChangeHistTrendLoLock.Image"))); + this.aaWatchdogTimeSinceChangeHistTrendLoLock.Location = new System.Drawing.Point(646, 338); + this.aaWatchdogTimeSinceChangeHistTrendLoLock.Name = "aaWatchdogTimeSinceChangeHistTrendLoLock"; + this.aaWatchdogTimeSinceChangeHistTrendLoLock.Size = new System.Drawing.Size(20, 20); + this.aaWatchdogTimeSinceChangeHistTrendLoLock.TabIndex = 119; + this.aaWatchdogTimeSinceChangeHistTrendLoLock.TabStop = false; + // + // aaWatchdogTimeSinceChangeHistValueDeadBandPrompt + // + this.aaWatchdogTimeSinceChangeHistValueDeadBandPrompt.Attribute = null; + this.aaWatchdogTimeSinceChangeHistValueDeadBandPrompt.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogTimeSinceChangeHistValueDeadBandPrompt.Dictionary = null; + this.aaWatchdogTimeSinceChangeHistValueDeadBandPrompt.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaWatchdogTimeSinceChangeHistValueDeadBandPrompt.Location = new System.Drawing.Point(58, 370); + this.aaWatchdogTimeSinceChangeHistValueDeadBandPrompt.Name = "aaWatchdogTimeSinceChangeHistValueDeadBandPrompt"; + this.aaWatchdogTimeSinceChangeHistValueDeadBandPrompt.PhraseID = "aaWatchdogTimeSinceChangeHistValueDeadBandPrompt"; + this.aaWatchdogTimeSinceChangeHistValueDeadBandPrompt.Size = new System.Drawing.Size(240, 20); + this.aaWatchdogTimeSinceChangeHistValueDeadBandPrompt.TabIndex = 120; + this.aaWatchdogTimeSinceChangeHistValueDeadBandPrompt.Text = "TimeSinceChange.ValueDeadBand:"; + this.aaWatchdogTimeSinceChangeHistValueDeadBandPrompt.TextAlign = System.Drawing.ContentAlignment.MiddleRight; + // + // aaWatchdogTimeSinceChangeHistValueDeadBand + // + this.aaWatchdogTimeSinceChangeHistValueDeadBand.Attribute = "TimeSinceChange.ValueDeadBand"; + this.aaWatchdogTimeSinceChangeHistValueDeadBand.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); + this.aaWatchdogTimeSinceChangeHistValueDeadBand.Increment = new decimal(new int[] { + 1, + 0, + 0, + 65536}); + this.aaWatchdogTimeSinceChangeHistValueDeadBand.Location = new System.Drawing.Point(306, 370); + this.aaWatchdogTimeSinceChangeHistValueDeadBand.Maximum = new decimal(new int[] { + -67108864, + 361109102, + -8810, + 0}); + this.aaWatchdogTimeSinceChangeHistValueDeadBand.Minimum = new decimal(new int[] { + -67108864, + 361109102, + -8810, + -2147483648}); + this.aaWatchdogTimeSinceChangeHistValueDeadBand.Name = "aaWatchdogTimeSinceChangeHistValueDeadBand"; + this.aaWatchdogTimeSinceChangeHistValueDeadBand.Size = new System.Drawing.Size(96, 24); + this.aaWatchdogTimeSinceChangeHistValueDeadBand.TabIndex = 100; + this.aaWatchdogTimeSinceChangeHistValueDeadBand.Value = new decimal(new int[] { + 0, + 0, + 0, + 0}); + // + // aaWatchdogTimeSinceChangeHistValueDeadBandSecurityClass + // + this.aaWatchdogTimeSinceChangeHistValueDeadBandSecurityClass.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaWatchdogTimeSinceChangeHistValueDeadBandSecurityClass.Attribute = "TimeSinceChange.ValueDeadBand"; + this.aaWatchdogTimeSinceChangeHistValueDeadBandSecurityClass.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogTimeSinceChangeHistValueDeadBandSecurityClass.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaWatchdogTimeSinceChangeHistValueDeadBandSecurityClass.Image = ((System.Drawing.Image)(resources.GetObject("aaWatchdogTimeSinceChangeHistValueDeadBandSecurityClass.Image"))); + this.aaWatchdogTimeSinceChangeHistValueDeadBandSecurityClass.Location = new System.Drawing.Point(614, 370); + this.aaWatchdogTimeSinceChangeHistValueDeadBandSecurityClass.Name = "aaWatchdogTimeSinceChangeHistValueDeadBandSecurityClass"; + this.aaWatchdogTimeSinceChangeHistValueDeadBandSecurityClass.Size = new System.Drawing.Size(20, 20); + this.aaWatchdogTimeSinceChangeHistValueDeadBandSecurityClass.TabIndex = 121; + this.aaWatchdogTimeSinceChangeHistValueDeadBandSecurityClass.TabStop = false; + // + // aaWatchdogTimeSinceChangeHistValueDeadBandLock + // + this.aaWatchdogTimeSinceChangeHistValueDeadBandLock.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.aaWatchdogTimeSinceChangeHistValueDeadBandLock.Attribute = "TimeSinceChange.ValueDeadBand"; + this.aaWatchdogTimeSinceChangeHistValueDeadBandLock.BackColor = System.Drawing.Color.Transparent; + this.aaWatchdogTimeSinceChangeHistValueDeadBandLock.Cursor = System.Windows.Forms.Cursors.Hand; + this.aaWatchdogTimeSinceChangeHistValueDeadBandLock.Image = ((System.Drawing.Image)(resources.GetObject("aaWatchdogTimeSinceChangeHistValueDeadBandLock.Image"))); + this.aaWatchdogTimeSinceChangeHistValueDeadBandLock.Location = new System.Drawing.Point(646, 370); + this.aaWatchdogTimeSinceChangeHistValueDeadBandLock.Name = "aaWatchdogTimeSinceChangeHistValueDeadBandLock"; + this.aaWatchdogTimeSinceChangeHistValueDeadBandLock.Size = new System.Drawing.Size(20, 20); + this.aaWatchdogTimeSinceChangeHistValueDeadBandLock.TabIndex = 122; + this.aaWatchdogTimeSinceChangeHistValueDeadBandLock.TabStop = false; + // + // WatchdogEditor + // + this.Name = "WatchdogEditor"; + this.Size = new System.Drawing.Size(748, 482); + this.MainTabControl.ResumeLayout(false); + this.tabPage1.ResumeLayout(false); + this.tabPage1.PerformLayout(); + this.tabPage2.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogMonitoredBitInputSourceSecurityClass)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogMonitoredBitInputSourceLock)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaStats_EnableLock)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogStatsTimeoutCnt_HistorizedLock)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaTimeout_AlarmedLock)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaTimeout_LimitSecurityClass)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaTimeout_LimitLock)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaTimeSinceChange_HistorizedLock)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogStatsResetSecurityClass)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodSecurityClass)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogStatsTimeoutCntHistForceStoragePeriodLock)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogStatsTimeoutCntHistTrendHiSecurityClass)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogStatsTimeoutCntHistTrendHiLock)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogStatsTimeoutCntHistTrendLoSecurityClass)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogStatsTimeoutCntHistTrendLoLock)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogStatsTimeoutCntHistValueDeadBandSecurityClass)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogStatsTimeoutCntHistValueDeadBandLock)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogTimeoutAlarmAckMsgSecurityClass)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogTimeoutAlarmDescAttrNameLock)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogTimeoutAlarmPrioritySecurityClass)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogTimeoutAlarmPriorityLock)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogTimeSinceChangeHistForceStoragePeriodSecurityClass)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogTimeSinceChangeHistForceStoragePeriodLock)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogTimeSinceChangeHistTrendHiSecurityClass)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogTimeSinceChangeHistTrendHiLock)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogTimeSinceChangeHistTrendLoSecurityClass)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogTimeSinceChangeHistTrendLoLock)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogTimeSinceChangeHistValueDeadBandSecurityClass)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.aaWatchdogTimeSinceChangeHistValueDeadBandLock)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TabPage tabPage1; + private ArchestraEditorFramework.aaLabel aaWatchdogMonitoredBitInputSourcePrompt; + private ArchestraEditorFramework.aaTextBoxMxReference aaWatchdogMonitoredBitInputSource; + private ArchestraEditorFramework.aaSecurityClassificationIcon aaWatchdogMonitoredBitInputSourceSecurityClass; + private ArchestraEditorFramework.aaLockIcon aaWatchdogMonitoredBitInputSourceLock; + private ArchestraEditorFramework.aaLabel aaStats_EnablePrompt; + private ArchestraEditorFramework.aaCheckBox aaStats_Enable; + private ArchestraEditorFramework.aaLockIcon aaStats_EnableLock; + private ArchestraEditorFramework.aaLabel aaWatchdogStatsTimeoutCnt_HistorizedPrompt; + private ArchestraEditorFramework.aaCheckBox aaWatchdogStatsTimeoutCnt_Historized; + private ArchestraEditorFramework.aaLockIcon aaWatchdogStatsTimeoutCnt_HistorizedLock; + private ArchestraEditorFramework.aaLabel aaTimeout_AlarmedPrompt; + private ArchestraEditorFramework.aaCheckBox aaTimeout_Alarmed; + private ArchestraEditorFramework.aaLockIcon aaTimeout_AlarmedLock; + private ArchestraEditorFramework.aaLabel aaTimeout_LimitPrompt; + private ArchestraEditorFramework.aaTextBox aaTimeout_Limit; + private ArchestraEditorFramework.aaSecurityClassificationIcon aaTimeout_LimitSecurityClass; + private ArchestraEditorFramework.aaLockIcon aaTimeout_LimitLock; + private ArchestraEditorFramework.aaLabel aaTimeSinceChange_HistorizedPrompt; + private ArchestraEditorFramework.aaCheckBox aaTimeSinceChange_Historized; + private ArchestraEditorFramework.aaLockIcon aaTimeSinceChange_HistorizedLock; + private System.Windows.Forms.TabPage tabPage2; + private ArchestraEditorFramework.aaLabel aaWatchdogStatsResetPrompt; + private ArchestraEditorFramework.aaSecurityClassificationIcon aaWatchdogStatsResetSecurityClass; + private ArchestraEditorFramework.aaLabel aaWatchdogStatsTimeoutCntHistForceStoragePeriodPrompt; + private ArchestraEditorFramework.aaCustomUpDown aaWatchdogStatsTimeoutCntHistForceStoragePeriod; + private ArchestraEditorFramework.aaSecurityClassificationIcon aaWatchdogStatsTimeoutCntHistForceStoragePeriodSecurityClass; + private ArchestraEditorFramework.aaLockIcon aaWatchdogStatsTimeoutCntHistForceStoragePeriodLock; + private ArchestraEditorFramework.aaLabel aaWatchdogStatsTimeoutCntHistTrendHiPrompt; + private ArchestraEditorFramework.aaCustomUpDown aaWatchdogStatsTimeoutCntHistTrendHi; + private ArchestraEditorFramework.aaSecurityClassificationIcon aaWatchdogStatsTimeoutCntHistTrendHiSecurityClass; + private ArchestraEditorFramework.aaLockIcon aaWatchdogStatsTimeoutCntHistTrendHiLock; + private ArchestraEditorFramework.aaLabel aaWatchdogStatsTimeoutCntHistTrendLoPrompt; + private ArchestraEditorFramework.aaCustomUpDown aaWatchdogStatsTimeoutCntHistTrendLo; + private ArchestraEditorFramework.aaSecurityClassificationIcon aaWatchdogStatsTimeoutCntHistTrendLoSecurityClass; + private ArchestraEditorFramework.aaLockIcon aaWatchdogStatsTimeoutCntHistTrendLoLock; + private ArchestraEditorFramework.aaLabel aaWatchdogStatsTimeoutCntHistValueDeadBandPrompt; + private ArchestraEditorFramework.aaCustomUpDown aaWatchdogStatsTimeoutCntHistValueDeadBand; + private ArchestraEditorFramework.aaSecurityClassificationIcon aaWatchdogStatsTimeoutCntHistValueDeadBandSecurityClass; + private ArchestraEditorFramework.aaLockIcon aaWatchdogStatsTimeoutCntHistValueDeadBandLock; + private ArchestraEditorFramework.aaLabel aaWatchdogTimeoutAlarmAckMsgPrompt; + private ArchestraEditorFramework.aaSecurityClassificationIcon aaWatchdogTimeoutAlarmAckMsgSecurityClass; + private ArchestraEditorFramework.aaLabel aaWatchdogTimeoutAlarmDescAttrNamePrompt; + private ArchestraEditorFramework.aaTextBoxMxReference aaWatchdogTimeoutAlarmDescAttrName; + private ArchestraEditorFramework.aaLockIcon aaWatchdogTimeoutAlarmDescAttrNameLock; + private ArchestraEditorFramework.aaLabel aaWatchdogTimeoutAlarmPriorityPrompt; + private ArchestraEditorFramework.aaCustomUpDown aaWatchdogTimeoutAlarmPriority; + private ArchestraEditorFramework.aaSecurityClassificationIcon aaWatchdogTimeoutAlarmPrioritySecurityClass; + private ArchestraEditorFramework.aaLockIcon aaWatchdogTimeoutAlarmPriorityLock; + private ArchestraEditorFramework.aaLabel aaWatchdogTimeSinceChangeHistForceStoragePeriodPrompt; + private ArchestraEditorFramework.aaCustomUpDown aaWatchdogTimeSinceChangeHistForceStoragePeriod; + private ArchestraEditorFramework.aaSecurityClassificationIcon aaWatchdogTimeSinceChangeHistForceStoragePeriodSecurityClass; + private ArchestraEditorFramework.aaLockIcon aaWatchdogTimeSinceChangeHistForceStoragePeriodLock; + private ArchestraEditorFramework.aaLabel aaWatchdogTimeSinceChangeHistTrendHiPrompt; + private ArchestraEditorFramework.aaCustomUpDown aaWatchdogTimeSinceChangeHistTrendHi; + private ArchestraEditorFramework.aaSecurityClassificationIcon aaWatchdogTimeSinceChangeHistTrendHiSecurityClass; + private ArchestraEditorFramework.aaLockIcon aaWatchdogTimeSinceChangeHistTrendHiLock; + private ArchestraEditorFramework.aaLabel aaWatchdogTimeSinceChangeHistTrendLoPrompt; + private ArchestraEditorFramework.aaCustomUpDown aaWatchdogTimeSinceChangeHistTrendLo; + private ArchestraEditorFramework.aaSecurityClassificationIcon aaWatchdogTimeSinceChangeHistTrendLoSecurityClass; + private ArchestraEditorFramework.aaLockIcon aaWatchdogTimeSinceChangeHistTrendLoLock; + private ArchestraEditorFramework.aaLabel aaWatchdogTimeSinceChangeHistValueDeadBandPrompt; + private ArchestraEditorFramework.aaCustomUpDown aaWatchdogTimeSinceChangeHistValueDeadBand; + private ArchestraEditorFramework.aaSecurityClassificationIcon aaWatchdogTimeSinceChangeHistValueDeadBandSecurityClass; + private ArchestraEditorFramework.aaLockIcon aaWatchdogTimeSinceChangeHistValueDeadBandLock; + } +} diff --git a/aot/Samples/Watchdog/WatchdogEditor/WatchdogEditor.cs b/aot/Samples/Watchdog/WatchdogEditor/WatchdogEditor.cs new file mode 100644 index 0000000..bac45a9 --- /dev/null +++ b/aot/Samples/Watchdog/WatchdogEditor/WatchdogEditor.cs @@ -0,0 +1,36 @@ +//------------------------------------------------------------------------------ +// Copyright (C) 2008 Invensys Systems Inc. All rights reserved. +// +// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY +// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +//------------------------------------------------------------------------------ + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Drawing; +using System.Data; +using System.Text; +using System.Windows.Forms; +using System.Runtime.InteropServices; + + +namespace ArchestrA.Toolkit.Watchdog +{ + [Guid("146f620e-19d6-43b6-80b9-e9cdfcb383e8")] + [ProgId("ArchestrA.WatchDog.1")] + + public partial class WatchdogEditor : ArchestraEditorFramework.aaBaseEditorForm + { + public WatchdogEditor() + { + this.Dictionary = "ArchestrA:WatchDog1.aaDCT"; + // This call is required by the Windows Form Designer. + InitializeComponent(); + + // TODO: Add any initialization after the InitializeComponent call + } + } +} diff --git a/aot/Samples/Watchdog/WatchdogEditor/WatchdogEditor.csproj b/aot/Samples/Watchdog/WatchdogEditor/WatchdogEditor.csproj new file mode 100644 index 0000000..3445f42 --- /dev/null +++ b/aot/Samples/Watchdog/WatchdogEditor/WatchdogEditor.csproj @@ -0,0 +1,139 @@ + + + + Debug + AnyCPU + 9.0.21022 + 2.0 + {B2B3A624-324D-47B1-956D-94B48B7140A6} + Library + Properties + ArchestrA.Toolkit.Watchdog + WatchdogEditor1 + true + ..\Watchdog.snk + + + 3.5 + + + false + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + x86 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + x86 + + + + False + C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Toolkit.ArchestrAControlLibrary.dll + False + + + False + C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestraEditorFramework.dll + + + False + C:\Program Files\Archestra\Toolkits\AOT\bin\IaaEditorFormLibInterop.dll + + + + + + + + + + + + + + + WatchdogEditor.cs + + + + + + Designer + WatchdogEditor.cs + + + + + Watchdog.snk + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 2.0 %28x86%29 + true + + + False + .NET Framework 3.0 %28x86%29 + false + + + False + .NET Framework 3.5 + false + + + False + .NET Framework 3.5 SP1 + false + + + + + + + + + + + \ No newline at end of file diff --git a/aot/Samples/Watchdog/WatchdogEditor/WatchdogEditor.resx b/aot/Samples/Watchdog/WatchdogEditor/WatchdogEditor.resx new file mode 100644 index 0000000..f93b8d8 --- /dev/null +++ b/aot/Samples/Watchdog/WatchdogEditor/WatchdogEditor.resx @@ -0,0 +1,540 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAg1JREFUOE+t1G1P2lAYBuDtN/mf+Dt+NPu4uDcWEyMKggxM3CIimMoUcAjIoLSFliJS + oLSnvXfOqZV24sYWmjwfSHku7ofz8hrAq7U+DFxnhbBoVMey2toqY1ktC/IEMog9hACm6cIYu9B1B0rP + Qb1BUK3YKJVsFAsWcjkL0c+32NzMspZQqGfgcAgMBi5UzYEs22g2TRwfq8hmVWQyfaTTPaSOFCQT4v+D + mYyKL2mKUSiVknF4KK0Gui7wlFBdJDxKL6BEXMLBvrga6DiPoB4eOZmUkUhIiB+IiMVE7O11VgOJ4/KE + OgMDCePxLvZpqkjkzYvlL05oUQjxQL4oATBGEzGMvfOL/aimed9TFMLf80Piy2zb2PYj+FvC3d12CNzY + iMAvSbIhitZy0LKcRcLAttnZaXkg3aoM6vdZKhvdrsU/392Zz0GWlKU05w4fWQuMHP3U5A2q6qLXI5Ak + gk7HQqs15+CP2nQ56KOzGQn9hx8/NHiDIhM+3s/2nG94hlVvJri+Nl4GfXQ6Jd5JaZh4/+6WN3TaFh1v + jnp9xrFKeYLvpTEEYfRn0Ecnhnf0tt/WeEOD4jU6XrUywdXVGJeXD7i4GOE8f/930EeNMb0UBIc33NDx + ymWDXhJjnrBQuMfZmY7TU301kKHsRmHFQJZKEB5QLI6Qzw+Ro9C3rwOcnGirg8Hr6Z9Oyrpu7V90BMb8 + GyGmhwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ + Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA + GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2 + BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9 + /sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU + KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg + JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ + Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA + GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2 + BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9 + /sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU + KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg + JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ + Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA + GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2 + BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9 + /sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU + KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg + JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ + Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA + GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2 + BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9 + /sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU + KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg + JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAg1JREFUOE+t1G1P2lAYBuDtN/mf+Dt+NPu4uDcWEyMKggxM3CIimMoUcAjIoLSFliJS + oLSnvXfOqZV24sYWmjwfSHku7ofz8hrAq7U+DFxnhbBoVMey2toqY1ktC/IEMog9hACm6cIYu9B1B0rP + Qb1BUK3YKJVsFAsWcjkL0c+32NzMspZQqGfgcAgMBi5UzYEs22g2TRwfq8hmVWQyfaTTPaSOFCQT4v+D + mYyKL2mKUSiVknF4KK0Gui7wlFBdJDxKL6BEXMLBvrga6DiPoB4eOZmUkUhIiB+IiMVE7O11VgOJ4/KE + OgMDCePxLvZpqkjkzYvlL05oUQjxQL4oATBGEzGMvfOL/aimed9TFMLf80Piy2zb2PYj+FvC3d12CNzY + iMAvSbIhitZy0LKcRcLAttnZaXkg3aoM6vdZKhvdrsU/392Zz0GWlKU05w4fWQuMHP3U5A2q6qLXI5Ak + gk7HQqs15+CP2nQ56KOzGQn9hx8/NHiDIhM+3s/2nG94hlVvJri+Nl4GfXQ6Jd5JaZh4/+6WN3TaFh1v + jnp9xrFKeYLvpTEEYfRn0Ecnhnf0tt/WeEOD4jU6XrUywdXVGJeXD7i4GOE8f/930EeNMb0UBIc33NDx + ymWDXhJjnrBQuMfZmY7TU301kKHsRmHFQJZKEB5QLI6Qzw+Ro9C3rwOcnGirg8Hr6Z9Oyrpu7V90BMb8 + GyGmhwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ + Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA + GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2 + BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9 + /sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU + KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg + JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ + Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA + GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2 + BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9 + /sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU + KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg + JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAg1JREFUOE+t1G1P2lAYBuDtN/mf+Dt+NPu4uDcWEyMKggxM3CIimMoUcAjIoLSFliJS + oLSnvXfOqZV24sYWmjwfSHku7ofz8hrAq7U+DFxnhbBoVMey2toqY1ktC/IEMog9hACm6cIYu9B1B0rP + Qb1BUK3YKJVsFAsWcjkL0c+32NzMspZQqGfgcAgMBi5UzYEs22g2TRwfq8hmVWQyfaTTPaSOFCQT4v+D + mYyKL2mKUSiVknF4KK0Gui7wlFBdJDxKL6BEXMLBvrga6DiPoB4eOZmUkUhIiB+IiMVE7O11VgOJ4/KE + OgMDCePxLvZpqkjkzYvlL05oUQjxQL4oATBGEzGMvfOL/aimed9TFMLf80Piy2zb2PYj+FvC3d12CNzY + iMAvSbIhitZy0LKcRcLAttnZaXkg3aoM6vdZKhvdrsU/392Zz0GWlKU05w4fWQuMHP3U5A2q6qLXI5Ak + gk7HQqs15+CP2nQ56KOzGQn9hx8/NHiDIhM+3s/2nG94hlVvJri+Nl4GfXQ6Jd5JaZh4/+6WN3TaFh1v + jnp9xrFKeYLvpTEEYfRn0Ecnhnf0tt/WeEOD4jU6XrUywdXVGJeXD7i4GOE8f/930EeNMb0UBIc33NDx + ymWDXhJjnrBQuMfZmY7TU301kKHsRmHFQJZKEB5QLI6Qzw+Ro9C3rwOcnGirg8Hr6Z9Oyrpu7V90BMb8 + GyGmhwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAg1JREFUOE+t1G1P2lAYBuDtN/mf+Dt+NPu4uDcWEyMKggxM3CIimMoUcAjIoLSFliJS + oLSnvXfOqZV24sYWmjwfSHku7ofz8hrAq7U+DFxnhbBoVMey2toqY1ktC/IEMog9hACm6cIYu9B1B0rP + Qb1BUK3YKJVsFAsWcjkL0c+32NzMspZQqGfgcAgMBi5UzYEs22g2TRwfq8hmVWQyfaTTPaSOFCQT4v+D + mYyKL2mKUSiVknF4KK0Gui7wlFBdJDxKL6BEXMLBvrga6DiPoB4eOZmUkUhIiB+IiMVE7O11VgOJ4/KE + OgMDCePxLvZpqkjkzYvlL05oUQjxQL4oATBGEzGMvfOL/aimed9TFMLf80Piy2zb2PYj+FvC3d12CNzY + iMAvSbIhitZy0LKcRcLAttnZaXkg3aoM6vdZKhvdrsU/392Zz0GWlKU05w4fWQuMHP3U5A2q6qLXI5Ak + gk7HQqs15+CP2nQ56KOzGQn9hx8/NHiDIhM+3s/2nG94hlVvJri+Nl4GfXQ6Jd5JaZh4/+6WN3TaFh1v + jnp9xrFKeYLvpTEEYfRn0Ecnhnf0tt/WeEOD4jU6XrUywdXVGJeXD7i4GOE8f/930EeNMb0UBIc33NDx + ymWDXhJjnrBQuMfZmY7TU301kKHsRmHFQJZKEB5QLI6Qzw+Ro9C3rwOcnGirg8Hr6Z9Oyrpu7V90BMb8 + GyGmhwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ + Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA + GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2 + BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9 + /sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU + KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg + JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAg1JREFUOE+t1G1P2lAYBuDtN/mf+Dt+NPu4uDcWEyMKggxM3CIimMoUcAjIoLSFliJS + oLSnvXfOqZV24sYWmjwfSHku7ofz8hrAq7U+DFxnhbBoVMey2toqY1ktC/IEMog9hACm6cIYu9B1B0rP + Qb1BUK3YKJVsFAsWcjkL0c+32NzMspZQqGfgcAgMBi5UzYEs22g2TRwfq8hmVWQyfaTTPaSOFCQT4v+D + mYyKL2mKUSiVknF4KK0Gui7wlFBdJDxKL6BEXMLBvrga6DiPoB4eOZmUkUhIiB+IiMVE7O11VgOJ4/KE + OgMDCePxLvZpqkjkzYvlL05oUQjxQL4oATBGEzGMvfOL/aimed9TFMLf80Piy2zb2PYj+FvC3d12CNzY + iMAvSbIhitZy0LKcRcLAttnZaXkg3aoM6vdZKhvdrsU/392Zz0GWlKU05w4fWQuMHP3U5A2q6qLXI5Ak + gk7HQqs15+CP2nQ56KOzGQn9hx8/NHiDIhM+3s/2nG94hlVvJri+Nl4GfXQ6Jd5JaZh4/+6WN3TaFh1v + jnp9xrFKeYLvpTEEYfRn0Ecnhnf0tt/WeEOD4jU6XrUywdXVGJeXD7i4GOE8f/930EeNMb0UBIc33NDx + ymWDXhJjnrBQuMfZmY7TU301kKHsRmHFQJZKEB5QLI6Qzw+Ro9C3rwOcnGirg8Hr6Z9Oyrpu7V90BMb8 + GyGmhwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ + Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA + GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2 + BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9 + /sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU + KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg + JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAg1JREFUOE+t1G1P2lAYBuDtN/mf+Dt+NPu4uDcWEyMKggxM3CIimMoUcAjIoLSFliJS + oLSnvXfOqZV24sYWmjwfSHku7ofz8hrAq7U+DFxnhbBoVMey2toqY1ktC/IEMog9hACm6cIYu9B1B0rP + Qb1BUK3YKJVsFAsWcjkL0c+32NzMspZQqGfgcAgMBi5UzYEs22g2TRwfq8hmVWQyfaTTPaSOFCQT4v+D + mYyKL2mKUSiVknF4KK0Gui7wlFBdJDxKL6BEXMLBvrga6DiPoB4eOZmUkUhIiB+IiMVE7O11VgOJ4/KE + OgMDCePxLvZpqkjkzYvlL05oUQjxQL4oATBGEzGMvfOL/aimed9TFMLf80Piy2zb2PYj+FvC3d12CNzY + iMAvSbIhitZy0LKcRcLAttnZaXkg3aoM6vdZKhvdrsU/392Zz0GWlKU05w4fWQuMHP3U5A2q6qLXI5Ak + gk7HQqs15+CP2nQ56KOzGQn9hx8/NHiDIhM+3s/2nG94hlVvJri+Nl4GfXQ6Jd5JaZh4/+6WN3TaFh1v + jnp9xrFKeYLvpTEEYfRn0Ecnhnf0tt/WeEOD4jU6XrUywdXVGJeXD7i4GOE8f/930EeNMb0UBIc33NDx + ymWDXhJjnrBQuMfZmY7TU301kKHsRmHFQJZKEB5QLI6Qzw+Ro9C3rwOcnGirg8Hr6Z9Oyrpu7V90BMb8 + GyGmhwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ + Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA + GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2 + BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9 + /sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU + KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg + JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAg1JREFUOE+t1G1P2lAYBuDtN/mf+Dt+NPu4uDcWEyMKggxM3CIimMoUcAjIoLSFliJS + oLSnvXfOqZV24sYWmjwfSHku7ofz8hrAq7U+DFxnhbBoVMey2toqY1ktC/IEMog9hACm6cIYu9B1B0rP + Qb1BUK3YKJVsFAsWcjkL0c+32NzMspZQqGfgcAgMBi5UzYEs22g2TRwfq8hmVWQyfaTTPaSOFCQT4v+D + mYyKL2mKUSiVknF4KK0Gui7wlFBdJDxKL6BEXMLBvrga6DiPoB4eOZmUkUhIiB+IiMVE7O11VgOJ4/KE + OgMDCePxLvZpqkjkzYvlL05oUQjxQL4oATBGEzGMvfOL/aimed9TFMLf80Piy2zb2PYj+FvC3d12CNzY + iMAvSbIhitZy0LKcRcLAttnZaXkg3aoM6vdZKhvdrsU/392Zz0GWlKU05w4fWQuMHP3U5A2q6qLXI5Ak + gk7HQqs15+CP2nQ56KOzGQn9hx8/NHiDIhM+3s/2nG94hlVvJri+Nl4GfXQ6Jd5JaZh4/+6WN3TaFh1v + jnp9xrFKeYLvpTEEYfRn0Ecnhnf0tt/WeEOD4jU6XrUywdXVGJeXD7i4GOE8f/930EeNMb0UBIc33NDx + ymWDXhJjnrBQuMfZmY7TU301kKHsRmHFQJZKEB5QLI6Qzw+Ro9C3rwOcnGirg8Hr6Z9Oyrpu7V90BMb8 + GyGmhwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ + Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA + GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2 + BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9 + /sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU + KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg + JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAg1JREFUOE+t1G1P2lAYBuDtN/mf+Dt+NPu4uDcWEyMKggxM3CIimMoUcAjIoLSFliJS + oLSnvXfOqZV24sYWmjwfSHku7ofz8hrAq7U+DFxnhbBoVMey2toqY1ktC/IEMog9hACm6cIYu9B1B0rP + Qb1BUK3YKJVsFAsWcjkL0c+32NzMspZQqGfgcAgMBi5UzYEs22g2TRwfq8hmVWQyfaTTPaSOFCQT4v+D + mYyKL2mKUSiVknF4KK0Gui7wlFBdJDxKL6BEXMLBvrga6DiPoB4eOZmUkUhIiB+IiMVE7O11VgOJ4/KE + OgMDCePxLvZpqkjkzYvlL05oUQjxQL4oATBGEzGMvfOL/aimed9TFMLf80Piy2zb2PYj+FvC3d12CNzY + iMAvSbIhitZy0LKcRcLAttnZaXkg3aoM6vdZKhvdrsU/392Zz0GWlKU05w4fWQuMHP3U5A2q6qLXI5Ak + gk7HQqs15+CP2nQ56KOzGQn9hx8/NHiDIhM+3s/2nG94hlVvJri+Nl4GfXQ6Jd5JaZh4/+6WN3TaFh1v + jnp9xrFKeYLvpTEEYfRn0Ecnhnf0tt/WeEOD4jU6XrUywdXVGJeXD7i4GOE8f/930EeNMb0UBIc33NDx + ymWDXhJjnrBQuMfZmY7TU301kKHsRmHFQJZKEB5QLI6Qzw+Ro9C3rwOcnGirg8Hr6Z9Oyrpu7V90BMb8 + GyGmhwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ + Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA + GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2 + BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9 + /sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU + KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg + JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAg1JREFUOE+t1G1P2lAYBuDtN/mf+Dt+NPu4uDcWEyMKggxM3CIimMoUcAjIoLSFliJS + oLSnvXfOqZV24sYWmjwfSHku7ofz8hrAq7U+DFxnhbBoVMey2toqY1ktC/IEMog9hACm6cIYu9B1B0rP + Qb1BUK3YKJVsFAsWcjkL0c+32NzMspZQqGfgcAgMBi5UzYEs22g2TRwfq8hmVWQyfaTTPaSOFCQT4v+D + mYyKL2mKUSiVknF4KK0Gui7wlFBdJDxKL6BEXMLBvrga6DiPoB4eOZmUkUhIiB+IiMVE7O11VgOJ4/KE + OgMDCePxLvZpqkjkzYvlL05oUQjxQL4oATBGEzGMvfOL/aimed9TFMLf80Piy2zb2PYj+FvC3d12CNzY + iMAvSbIhitZy0LKcRcLAttnZaXkg3aoM6vdZKhvdrsU/392Zz0GWlKU05w4fWQuMHP3U5A2q6qLXI5Ak + gk7HQqs15+CP2nQ56KOzGQn9hx8/NHiDIhM+3s/2nG94hlVvJri+Nl4GfXQ6Jd5JaZh4/+6WN3TaFh1v + jnp9xrFKeYLvpTEEYfRn0Ecnhnf0tt/WeEOD4jU6XrUywdXVGJeXD7i4GOE8f/930EeNMb0UBIc33NDx + ymWDXhJjnrBQuMfZmY7TU301kKHsRmHFQJZKEB5QLI6Qzw+Ro9C3rwOcnGirg8Hr6Z9Oyrpu7V90BMb8 + GyGmhwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ + Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA + GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2 + BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9 + /sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU + KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg + JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAg1JREFUOE+t1G1P2lAYBuDtN/mf+Dt+NPu4uDcWEyMKggxM3CIimMoUcAjIoLSFliJS + oLSnvXfOqZV24sYWmjwfSHku7ofz8hrAq7U+DFxnhbBoVMey2toqY1ktC/IEMog9hACm6cIYu9B1B0rP + Qb1BUK3YKJVsFAsWcjkL0c+32NzMspZQqGfgcAgMBi5UzYEs22g2TRwfq8hmVWQyfaTTPaSOFCQT4v+D + mYyKL2mKUSiVknF4KK0Gui7wlFBdJDxKL6BEXMLBvrga6DiPoB4eOZmUkUhIiB+IiMVE7O11VgOJ4/KE + OgMDCePxLvZpqkjkzYvlL05oUQjxQL4oATBGEzGMvfOL/aimed9TFMLf80Piy2zb2PYj+FvC3d12CNzY + iMAvSbIhitZy0LKcRcLAttnZaXkg3aoM6vdZKhvdrsU/392Zz0GWlKU05w4fWQuMHP3U5A2q6qLXI5Ak + gk7HQqs15+CP2nQ56KOzGQn9hx8/NHiDIhM+3s/2nG94hlVvJri+Nl4GfXQ6Jd5JaZh4/+6WN3TaFh1v + jnp9xrFKeYLvpTEEYfRn0Ecnhnf0tt/WeEOD4jU6XrUywdXVGJeXD7i4GOE8f/930EeNMb0UBIc33NDx + ymWDXhJjnrBQuMfZmY7TU301kKHsRmHFQJZKEB5QLI6Qzw+Ro9C3rwOcnGirg8Hr6Z9Oyrpu7V90BMb8 + GyGmhwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ + Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA + GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2 + BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9 + /sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU + KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg + JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAg1JREFUOE+t1G1P2lAYBuDtN/mf+Dt+NPu4uDcWEyMKggxM3CIimMoUcAjIoLSFliJS + oLSnvXfOqZV24sYWmjwfSHku7ofz8hrAq7U+DFxnhbBoVMey2toqY1ktC/IEMog9hACm6cIYu9B1B0rP + Qb1BUK3YKJVsFAsWcjkL0c+32NzMspZQqGfgcAgMBi5UzYEs22g2TRwfq8hmVWQyfaTTPaSOFCQT4v+D + mYyKL2mKUSiVknF4KK0Gui7wlFBdJDxKL6BEXMLBvrga6DiPoB4eOZmUkUhIiB+IiMVE7O11VgOJ4/KE + OgMDCePxLvZpqkjkzYvlL05oUQjxQL4oATBGEzGMvfOL/aimed9TFMLf80Piy2zb2PYj+FvC3d12CNzY + iMAvSbIhitZy0LKcRcLAttnZaXkg3aoM6vdZKhvdrsU/392Zz0GWlKU05w4fWQuMHP3U5A2q6qLXI5Ak + gk7HQqs15+CP2nQ56KOzGQn9hx8/NHiDIhM+3s/2nG94hlVvJri+Nl4GfXQ6Jd5JaZh4/+6WN3TaFh1v + jnp9xrFKeYLvpTEEYfRn0Ecnhnf0tt/WeEOD4jU6XrUywdXVGJeXD7i4GOE8f/930EeNMb0UBIc33NDx + ymWDXhJjnrBQuMfZmY7TU301kKHsRmHFQJZKEB5QLI6Qzw+Ro9C3rwOcnGirg8Hr6Z9Oyrpu7V90BMb8 + GyGmhwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ + Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA + GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2 + BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9 + /sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU + KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg + JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAg1JREFUOE+t1G1P2lAYBuDtN/mf+Dt+NPu4uDcWEyMKggxM3CIimMoUcAjIoLSFliJS + oLSnvXfOqZV24sYWmjwfSHku7ofz8hrAq7U+DFxnhbBoVMey2toqY1ktC/IEMog9hACm6cIYu9B1B0rP + Qb1BUK3YKJVsFAsWcjkL0c+32NzMspZQqGfgcAgMBi5UzYEs22g2TRwfq8hmVWQyfaTTPaSOFCQT4v+D + mYyKL2mKUSiVknF4KK0Gui7wlFBdJDxKL6BEXMLBvrga6DiPoB4eOZmUkUhIiB+IiMVE7O11VgOJ4/KE + OgMDCePxLvZpqkjkzYvlL05oUQjxQL4oATBGEzGMvfOL/aimed9TFMLf80Piy2zb2PYj+FvC3d12CNzY + iMAvSbIhitZy0LKcRcLAttnZaXkg3aoM6vdZKhvdrsU/392Zz0GWlKU05w4fWQuMHP3U5A2q6qLXI5Ak + gk7HQqs15+CP2nQ56KOzGQn9hx8/NHiDIhM+3s/2nG94hlVvJri+Nl4GfXQ6Jd5JaZh4/+6WN3TaFh1v + jnp9xrFKeYLvpTEEYfRn0Ecnhnf0tt/WeEOD4jU6XrUywdXVGJeXD7i4GOE8f/930EeNMb0UBIc33NDx + ymWDXhJjnrBQuMfZmY7TU301kKHsRmHFQJZKEB5QLI6Qzw+Ro9C3rwOcnGirg8Hr6Z9Oyrpu7V90BMb8 + GyGmhwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ + Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA + GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2 + BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9 + /sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU + KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg + JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAg1JREFUOE+t1G1P2lAYBuDtN/mf+Dt+NPu4uDcWEyMKggxM3CIimMoUcAjIoLSFliJS + oLSnvXfOqZV24sYWmjwfSHku7ofz8hrAq7U+DFxnhbBoVMey2toqY1ktC/IEMog9hACm6cIYu9B1B0rP + Qb1BUK3YKJVsFAsWcjkL0c+32NzMspZQqGfgcAgMBi5UzYEs22g2TRwfq8hmVWQyfaTTPaSOFCQT4v+D + mYyKL2mKUSiVknF4KK0Gui7wlFBdJDxKL6BEXMLBvrga6DiPoB4eOZmUkUhIiB+IiMVE7O11VgOJ4/KE + OgMDCePxLvZpqkjkzYvlL05oUQjxQL4oATBGEzGMvfOL/aimed9TFMLf80Piy2zb2PYj+FvC3d12CNzY + iMAvSbIhitZy0LKcRcLAttnZaXkg3aoM6vdZKhvdrsU/392Zz0GWlKU05w4fWQuMHP3U5A2q6qLXI5Ak + gk7HQqs15+CP2nQ56KOzGQn9hx8/NHiDIhM+3s/2nG94hlVvJri+Nl4GfXQ6Jd5JaZh4/+6WN3TaFh1v + jnp9xrFKeYLvpTEEYfRn0Ecnhnf0tt/WeEOD4jU6XrUywdXVGJeXD7i4GOE8f/930EeNMb0UBIc33NDx + ymWDXhJjnrBQuMfZmY7TU301kKHsRmHFQJZKEB5QLI6Qzw+Ro9C3rwOcnGirg8Hr6Z9Oyrpu7V90BMb8 + GyGmhwAAAABJRU5ErkJggg== + + + + + iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA + CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ + Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA + GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2 + BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9 + /sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU + KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg + JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg== + + + \ No newline at end of file diff --git a/aot/Samples/Watchdog/WatchdogRuntime/Properties/AssemblyInfo.cs b/aot/Samples/Watchdog/WatchdogRuntime/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..7bdd00a --- /dev/null +++ b/aot/Samples/Watchdog/WatchdogRuntime/Properties/AssemblyInfo.cs @@ -0,0 +1,44 @@ +//------------------------------------------------------------------------------ +// Copyright (C) 2008 Invensys Systems Inc. All rights reserved. +// +// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY +// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +//------------------------------------------------------------------------------ + +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Runtime")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("ArchestrA")] +[assembly: AssemblyProduct("Runtime")] +[assembly: AssemblyCopyright("Copyright © Wonderware 2006")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(true)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("8f60c23a-adac-41fd-a589-8006d96dd206")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.1.0.0")] diff --git a/aot/Samples/Watchdog/WatchdogRuntime/WatchdogRuntime.cs b/aot/Samples/Watchdog/WatchdogRuntime/WatchdogRuntime.cs new file mode 100644 index 0000000..48e45f9 --- /dev/null +++ b/aot/Samples/Watchdog/WatchdogRuntime/WatchdogRuntime.cs @@ -0,0 +1,381 @@ +//------------------------------------------------------------------------------ +// Copyright (C) 2008 Invensys Systems Inc. All rights reserved. +// +// THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY +// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A +// PARTICULAR PURPOSE. +//------------------------------------------------------------------------------ + +using System; +using System.Runtime.InteropServices; +using System.Collections; +using ArchestrA.Core; +using ArchestrA.Toolkit; + +namespace ArchestrA.Toolkit.Watchdog +{ + [Guid("886e73ad-ddb7-45ca-8ca2-e652e1e9bafd")] + /// + /// Summary description for Watchdog + /// + public class WatchdogRuntime : RuntimeBase + { + #region Attributes - Toolkit generated code + // The following C# properties have been defined to simplify access to + // attribute values - do not modify the contents of this region with + // the code editor. + private CMxBoolean Timeout + { + get { return InternalReferenceOnly.Timeout; } + set { InternalReferenceOnly.Timeout.Set(value); } + } + + private CMxElapsedTime TimeSinceChange + { + get { return InternalReferenceOnly.TimeSinceChange; } + set { InternalReferenceOnly.TimeSinceChange.Set(value); } + } + + private CMxElapsedTime Timeout_Limit + { + get { return InternalReferenceOnly.Timeout_Limit; } + set { InternalReferenceOnly.Timeout_Limit.Set(value); } + } + + + + public __InputPrimitive1 InputPrimitive1 = null; + + public class __InputPrimitive1 : InputPrimBase + { + protected override void Initialize(SupportWrapper _Wrapper) + { + if (_Value == null) { _Value = new CMxVariant(Wrapper, "MonitoredBit.Value"); } + if (_DataType == null) { _DataType = new CMxDataType(Wrapper, "MonitoredBit.DataType"); } + + attrId = _Value.Attribute.shAttributeId; + primId = _Value.Attribute.shPrimitiveId; + dataType = _DataType.Value; + + base.Initialize(Wrapper); + } + + public SupportWrapper Wrapper = new SupportWrapper(); + + private CMxVariant _Value = null; + + public CMxVariant Value + { + get { if (_Value == null) { _Value = new CMxVariant(Wrapper, "MonitoredBit.Value"); } return _Value; } + set { if (_Value == null) { _Value = new CMxVariant(Wrapper, "MonitoredBit.Value"); } _Value.Set(value); } + } + + private CMxStatus _ReadStatus = null; + + public CMxStatus ReadStatus + { + get { if (_ReadStatus == null) { _ReadStatus = new CMxStatus(Wrapper, "MonitoredBit.ReadStatus"); } return _ReadStatus; } + set { if (_ReadStatus == null) { _ReadStatus = new CMxStatus(Wrapper, "MonitoredBit.ReadStatus"); } _ReadStatus.Set(value); } + } + + private CMxReference _InputSource = null; + + public CMxReference InputSource + { + get { if (_InputSource == null) { _InputSource = new CMxReference(Wrapper, "MonitoredBit.InputSource"); } return _InputSource; } + set { if (_InputSource == null) { _InputSource = new CMxReference(Wrapper, "MonitoredBit.InputSource"); } _InputSource.Set(value); } + } + + private CMxDataType _DataType = null; + + public CMxDataType DataType + { + get { if (_DataType == null) { _DataType = new CMxDataType(Wrapper, "MonitoredBit.DataType"); } return _DataType; } + } + + public AoAWrapper AoA = null; + + public void SuspendUpdatesList() + { + if (AoA == null) { AoA = new AoAWrapper(Wrapper, new string[] { "MonitoredBit.Value" }); } AoA.SuspendUpdatesList(); + } + + public void ActivateUpdatesList() + { + if (AoA == null) { AoA = new AoAWrapper(Wrapper, new string[] { "MonitoredBit.Value" }); } AoA.ActivateUpdatesList(); + } + + public __InputPrimitive1(AObjectBase baseClass) + { + Wrapper.baseClass = baseClass; + } + + } + + #endregion Attributes + + #region Internal Reference Only + //Toolkit code required to access the attributes declared in the Object Class + private WatchDog InternalReferenceOnly = null; + #endregion Internal Reference Only + + #region Declarations + //Declare Runtime Class Variables here. + //Variables declared in this region are available to all methods + //in the Runtime Class. + DateTime m_TimeOfLastChange; + bool m_LastInputValue; + + + #endregion Declarations + + + public WatchdogRuntime() + { + InternalReferenceOnly = new WatchDog(); + this.AObjectInstance = InternalReferenceOnly; + + #region Runtime Event Registration - Toolkit generated code + // Required region for Runtime Events - do not modify + // the contents of this region with the code editor. + base.RuntimeGetStatusDesc += new RuntimeGetStatusDescDelegate(WatchdogRuntime_RuntimeGetStatusDesc); + base.RuntimeSetScanState += new RuntimeSetScanStateDelegate(Watchdog_RuntimeSetScanState); + base.RuntimeExecute += new RuntimeExecuteDelegate(Watchdog_RuntimeExecute); + base.RuntimeShutdown += new RuntimeShutdownDelegate(Watchdog_RuntimeShutdown); + base.RuntimeStartup += new RuntimeStartupDelegate(Watchdog_RuntimeStartup); + base.RuntimeDynamic += new RuntimeDynamicSetHandlerDelegate(WatchdogRuntime_RuntimeDynamic); + base.RuntimeInitialize += new RuntimeInitializeDelegate(WatchdogRuntime_RuntimeInitialize); + #endregion Runtime Event Registration + + #region Runtime Set Handler Registration Toolkit generated code + // Required method for Runtime SetHandlers. + // Changes made using the code editor will appear in the Toolkit Editor. + // + // WARNING: Changes made to this region will result in a Shape Change. + + // TODO: Runtime SetHandler registration + this.RegisterRuntimeSetHandler("Timeout.Limit", new RuntimeSetHandlerDelegate(Timeout_LimitSetHandler)); + #endregion Runtime Set Handler Registration + + #region Primitive Wrapper Initialization - Toolkit generated code + InputPrimitive1 = new __InputPrimitive1(this); + #endregion Primitive Wrapper Initialization + + #region Primitive Advise only Activate Registration - Toolkit generated code + #endregion Primitive Advise only Activate Initialization + } + + private void WatchdogRuntime_RuntimeInitialize(object sender) + { + //------------------------------------------------------------------------------ + // TODO: Runtime - Initialize + // + // Do not read or write attribute values of this primitive during Initialize + //------------------------------------------------------------------------------ + } + + private void Watchdog_RuntimeExecute(object sender) + { + //------------------------------------------------------------------------------ + // 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 + + bool CurrentBitValue = (bool)InputPrimitive1.GetValue(); + DateTime Now = GetScanTime(); + + //Cache the current time internally if the monitored bit has just changed + if (CurrentBitValue != m_LastInputValue) + { + m_TimeOfLastChange = Now; //remember the current time + } + m_LastInputValue = CurrentBitValue; + + //Now update the calculated attributes: "TimeSinceChange" and "Timeout.Condition" + TimeSinceChange = Now - m_TimeOfLastChange; + Timeout = TimeSinceChange > Timeout_Limit; + } + + private void Watchdog_RuntimeShutdown(object sender) + { + //------------------------------------------------------------------------------ + // TODO: Runtime Event - Shutdown + // + // Clean up dynamic allocation, release open resources, etc. + //------------------------------------------------------------------------------ + + // Activate marked attributes before shutting down + AdviseOnlyActivateAttributes(); + } + + private void Watchdog_RuntimeStartup(object sender, RuntimeStartupEventArgs e) + { + //------------------------------------------------------------------------------ + // 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(); + + } + + private void AdviseOnlySuspendAttributes() + { + // Required Method for Advise only Active. + // Do not modify this method via the code editor. + // + // WARNING: Changes made to this method will be overwritten by the code generator. + + if (AdviseOnlyActiveEnabled) + { + } + } + + private void AdviseOnlyActivateAttributes() + { + // Required Method for Advise only Active. + // Do not modify this method via the code editor. + // + // WARNING: Changes made to this method will be overwritten by the code generator. + + if (AdviseOnlyActiveEnabled) + { + } + } + + private void Watchdog_RuntimeSetScanState(object sender, RuntimeSetScanStateEventArgs e) + { + //------------------------------------------------------------------------------ + // TODO: Runtime Event - SetScanState + // + // Perform actions when the object goes on or off scan. + //------------------------------------------------------------------------------ + } + + private void WatchdogRuntime_RuntimeGetStatusDesc(object sender, ref RuntimeGetStatusDescEventArgs e) + { + //------------------------------------------------------------------------------ + // 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) + { + case 10000: + e.status = GetText("Timeout.Limit must be a positive number."); + break; + default: + e.status = GetText((int)e.detailedErrorCode); + break; + } + } + + private void WatchdogRuntime_RuntimeDynamic(object sender, ref RuntimeSetHandlerEventArgs e) + { + + 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 + SetValue(e.attributeHandle.shAttributeId, e.attributeHandle.shPrimitiveId, e.Value); + LogWarning(string.Format("Uknown set handler for attribute '{0}'", attrName)); + + } + + private void Timeout_LimitSetHandler(object sender, ref RuntimeSetHandlerEventArgs e) + { + + if (e.Value < 0) + { + e.status.detail = 10000; + e.status.Category = MxStatusCategory.MxCategoryConfigurationError; + return; + } + + Timeout_Limit.SetHandlerValue = e; + } + + //TODO: Runtime SetHandler declaration + //private void Example_001SetHandler(object sender, ref RuntimeSetHandlerEventArgs e) + //{ + // Example_001 = e.Value; + //} + } +} + diff --git a/aot/Samples/Watchdog/WatchdogRuntime/WatchdogRuntime.csproj b/aot/Samples/Watchdog/WatchdogRuntime/WatchdogRuntime.csproj new file mode 100644 index 0000000..d68af3b --- /dev/null +++ b/aot/Samples/Watchdog/WatchdogRuntime/WatchdogRuntime.csproj @@ -0,0 +1,118 @@ + + + + Debug + AnyCPU + 9.0.21022 + 2.0 + {FCAA2DA3-97F2-4C42-BB09-6729738D6872} + Library + Properties + ArchestrA.Toolkit.Watchdog + WatchdogRuntime1 + true + ..\Watchdog.snk + + + + + 3.5 + v4.0 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + false + x86 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + x86 + + + + False + C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Toolkit.ArchestrAObjectSupport.dll + True + + + False + C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Core.dll + True + + + + + + + + + + + + + + + + + {0E30645D-B574-41BF-B302-64FEE3C8208A} + Watchdog + + + + + Watchdog.snk + + + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + true + + + + + + + + + + + \ No newline at end of file diff --git a/aot/dev-guide/01-overview.md b/aot/dev-guide/01-overview.md new file mode 100644 index 0000000..c38fd24 --- /dev/null +++ b/aot/dev-guide/01-overview.md @@ -0,0 +1,138 @@ +# Overview and Concepts + +This section gives you a general overview of the Wonderware ArchestrA Object Toolkit and its features. We recommend that you read this section in its entirety to familiarize yourself with the key concepts, and then continue with the other sections for detailed information on specific tasks. + +## About the ArchestrA Object Toolkit + +The ArchestrA Object Toolkit is an add-on to Microsoft Visual Studio that lets you create custom ArchestrA ApplicationObjects in C# code. It provides an easy-to-use graphical Object Designer while still giving you full control over the object’s source code. + +Using the ArchestrA Object Toolkit, you can: + +- Create custom ApplicationObjects for use in Wonderware Application Server without having to deal with its internals. +- Create a custom editor for your object that allows your users to easily configure the object’s attributes using the Application Server IDE. +- Create reusable primitives, code modules that you can reuse in multiple custom ApplicationObjects. +- Easily navigate to all sections of your object’s code using an Object Design View. +- Configure object attributes using an easy-to-use Object Designer. +- Build .aaPDF files and automatically import, instantiate and deploy them in your Galaxy for testing. + +> **Note** +> You cannot create DeviceIntegration Objects with this release of the ArchestrA Object Toolkit. For information on creating DeviceIntegration Objects, contact your Wonderware distributor. + +## About ApplicationObjects and Primitives + +**ApplicationObjects** are domain-specific objects that represent plant equipment and instrumentation such as pumps, valves, temperature transmitters, or conveyors. They usually get their source data from other objects, such as DeviceIntegration objects. + +Wonderware Application Server already includes some basic ApplicationObject templates, such as the $AnalogDevice object for a simple analog device. Using the ArchestrA Object Toolkit, you can create complex custom ApplicationObjects that represent specific types of equipment, for example, a pump system. These ApplicationObjects support various events that allow you to execute custom config time and run time code. You can also create a custom object editor for easy configuration. + +**Attributes** are the data items of an ApplicationObject or primitive. By reading from and writing to attributes, objects can exchange data with each other. (Unless specifically noted, when this manual talks about “attributes,” we mean these ArchestrA attributes, not C# attributes.) + +**Primitives** are modules containing code and attributes. Like the main ApplicationObject, they have their own config time and run time event handlers as well. You can think of them as the “building blocks” for your object. By “modularizing” your object into primitives, you can create a clear, logical structure and dynamically enable or disable functionality as needed. There are two types of primitives: + +- *Local primitives* are defined locally in an object and are only used in that single object. +- *Reusable primitives* are “stand-alone” primitives that can be reused in multiple ApplicationObjects. Organizing common functionality into reusable primitives makes it easier to maintain your code. The ArchestrA Object Toolkit includes predefined utility primitives for various tasks, such as historizing values to a database. You can also create custom reusable primitives for your objects. + +Both local and reusable primitives can be made “virtual.” This allows you to dynamically add and delete instances of the primitive at config time. If you don’t add any instances of the primitive, it doesn’t become part of the object instance and is not deployed at run time. This reduces the run time processing load because only the functionality that is actually needed gets deployed. + +All ApplicationObjects automatically contain the “Common” primitive, which provides common attributes and functionality that all objects need (for example, attributes for setting the object OnScan/OffScan, etc.) The Common primitive is hidden, and you can’t edit it in any way. + +For example, a simple ApplicationObject might have the following structure: + +The structure of an ApplicationObject or primitive, as composed of its attributes and child primitives, is also called its “shape.” + +## Workflow: Creating an ApplicationObject or Reusable Primitive + +The basic steps to create an ApplicationObject or reusable primitive are as follows: + +1. **Planning.** When developing an ApplicationObject, you should consider certain requirements and best practices. For more information, see Object Design Considerations. +2. **Creating a project in Visual Studio.** Working with an ArchestrA Object Toolkit project is similar to working with other projects in Visual Studio. For more information, see Working with Projects. +3. **Internationalizing the object** (optional). If your object will be used in different localized environments, you can define multilingual strings for your object’s messages and other text. At run time, the object can then use the appropriate local language strings for the environment it’s used in. It is best to internationalize any required messages right from the start and then refer to them as required as you write your code. For more information, see Internationalizing Objects. +4. **Defining the object or primitive.** In this step, you configure basic object properties and add the attributes (data items) that your object or primitive will use. You also add any code procedures that your object will need, such as run time set handlers or event handlers. Finally, you create a custom object editor that your users can use to configure the object’s properties in the Application Server IDE. + +For more information on defining ApplicationObjects and reusable primitives, see Defining an ApplicationObject, and Defining a Reusable Primitive. For information on configuring attributes, see Configuring Attributes. + +When coding your object, follow the “best practices” and guidelines outlined in Development Best Practices. + +5. **Building the object.** In this step, you create an .aaPDF object file that contains your custom ApplicationObject (or an .aaPRI file if you’re developing a reusable primitive). You can then import and use the object in Application Server. You can also import, instantiate and deploy the object automatically as part of the build process, and you can configure various build options. For more information, see Building and Versioning Objects. +6. **Testing and debugging the object.** If you encounter problems while testing your object, see Debugging Objects, for troubleshooting hints. + +The ArchestrA Object Toolkit includes some sample projects to help you get started. For more information, see Sample Projects. + +> **Important** +> To build objects, you must run Visual Studio with administrative privileges. + +## Tour of the User Interface + +The user interface of the ArchestrA Object Toolkit consists of: + +- **Additions to the regular Microsoft Visual Studio** **user interface:** a toolbar, an Object Design View and a Logger view. By default, these are always visible when an ArchestrA Object Toolkit project is opened in Visual Studio. +- An **Object Designer window** that you can open and close as required while working with an ArchestrA Object Toolkit project. + +The following sections describe each of these components. + +### Additions to the Visual Studio Interface + +When you create or open an ArchestrA Object Toolkit project in Visual Studio, the Visual Studio environment shows extra items. + +> **Note** +> When you create your first project after installing the ArchestrA Object Toolkit, the Object Design View and Logger View are not docked. We recommend that you dock the Object Design View to the left of the Visual Studio window, and the Logger view to the bottom (as shown above). + +#### ArchestrA Object Toolkit Toolbar + +The ArchestrA Object Toolkit toolbar lets you access all main features of the ArchestrA Object Toolkit. The individual features and icons are described throughout this documentation. + +#### Object Design View + +The Object Design View allows you to easily navigate your object’s code. Double-clicking on an item in the Object Design View automatically opens the code section that controls the respective aspect of your object. For example, the Object Design View might look like this: + +- **Attributes:** Double-click an attribute name to see its definition in the code. +- **Attribute set handlers and “Advise Only Active”** **code:** Double-click **Configtime Set Handler** or **Runtime Set** **Handler** to open the code section that contains the config time or run time set handler for an attribute (if enabled). Double-click **Advise only Active** to open the “Advise only Active” code section for an attribute (if enabled) +- **Config time/run time events:** Double-click an event name to open the code section linked to the event. Once you have added custom code for an event, its name is shown in bold type. +- **Custom editor:** Double-click **Editor** to open the object’s custom editor in the Visual Studio design view. +- **Object dictionary:** Double-click **Dictionary** to edit the object dictionary. Expand this item to see the content of the dictionary. + +To refresh the Object Design View after making changes to the code, click its **Refresh** icon. This automatically validates the code as well. + +To hide or re-open the Object Design View, click the **Object** **Design View** icon in the ArchestrA Object Toolkit toolbar. + +#### Logger View + +The Logger view shows the same ArchestrA Logger messages that you would see in the ArchestrA Log Viewer. Check this view for any errors and warnings that may be reported by the ArchestrA Object Toolkit. The Logger view is intended for quick reference. It does not offer the full functionality of the ArchestrA Log Viewer. + +To hide or re-open the Logger View, click the **Logger View** icon in the ArchestrA Object Toolkit toolbar. + +### Object Designer Window + +The Object Designer lets you easily edit and configure your object’s general properties, attributes and primitives. We recommend that you edit your objects using this editor. However, you can always edit all aspects of your object directly in the underlying code. + +The code and the data you see in the Object Designer are always synchronized. For example, when you change the properties of an attribute in the code, you see the updated property values the next time you open the Object Designer, and vice versa. + +#### Opening the Object Designer + +You can open and close the Object Designer as required while working with your project. You can also have the Object Designer open automatically when you open an ArchestrA Object Toolkit project in Visual Studio. + +**To open the Object Designer** + +1. Click the **Object Designer** icon in the ArchestrA Object Toolkit toolbar. + +**To have the Object Designer open automatically when opening a project** + +1. Open the Object Designer. +2. In the bottom left corner of the Object Designer, select the **Automatically launch editor** check box. +3. Click **OK**. + +#### Object Designer Panes + +The Object Designer contains the following panes: + +- **Shape pane:** This pane shows the structure (“shape”) of your object. You can edit your object here by adding and deleting attributes and primitives. +- **Configuration pane:** Use this pane to configure the item that is currently selected in the **Shape** pane. +- **Attributes pane:** This pane shows a list of all custom attributes in your object, including their configuration. You can expand this pane to see more information at once. Also, you can choose to see config time or run time attributes only. The abbreviated column headings mean the following: + +| Heading | Description | +| --- | --- | +| FA | “Frequently Accessed” option is enabled | +| CQ | “Calculated Quality” option is enabled | +| Cfg | Config time set handler is enabled | +| Run | Run time set handler is enabled | +| Al | Attribute is alarmed | +| His | Attribute is historized | diff --git a/aot/dev-guide/02-object-design.md b/aot/dev-guide/02-object-design.md new file mode 100644 index 0000000..98378f8 --- /dev/null +++ b/aot/dev-guide/02-object-design.md @@ -0,0 +1,56 @@ +# Object Design Considerations + +Before you start defining your object, you should plan its features and structure. You should: + +- Decide how to design the object’s structure by using primitives. +- Make a list of the attributes that your object and any of its primitives will need, and develop a naming structure. + +## Guidelines for Designing the Structure of Control-Oriented Objects + +This section describes basic guidelines for developing objects that perform feedback control actions at the supervisory level. The AnalogDevice, configured as an AnalogRegulator, and the DiscreteDevice objects that are provided with Wonderware Application Server provide good working examples of how to design such objects. + +Developing objects in accordance with these guidelines ensures that objects are structured in a manner that fits well within the overall architecture of ArchestrA, and that they offer a consistent structure to end users. + +In general, you should separate control objects into three primary blocks: Feedback processing, Control processing, and one or more Alarm processing blocks. + +- The **Feedback** processing block includes the attributes and logic for reading field inputs and processing them to derive a primary calculated result that is placed into an attribute called the “PV” (process value). The feedback processing should also include a “PVMode” attribute that determines whether the PV is calculated automatically or set manually. +- The **Control** processing block includes the attributes and logic for receiving setpoints or commands that result in output control actions. The control processing should also include a “CtrlMode” (control mode) attribute that determines whether the control actions are commanded manually or cascaded from another object. The run time set handler for the control attributes can then reject set requests coming from disallowed sources. +- The **Alarm** processing block(s) includes the attributes and logic for alarm detection for the feedback and control blocks. The feedback alarming determines whether the input(s) are abnormal or unexpected. The control alarming determines whether control actions are failing or have had unexpected results. You can implement these blocks of logic as part of the Feedback or Control processing blocks or separately, depending on what makes sense for your object. + +By using primitives, you can model these multiple blocks in a clean and easy way. The ArchestrA Object Toolkit also allows you to develop “virtual” primitives that allow you to add primitive instances as required at config time. For more information, see Working with Virtual Primitives. + +In many objects, it will be most appropriate to separate the object into a top-level primitive that brings in an optional child Control virtual primitive. When the user enables Control functionality, then the config time logic adds the Control primitive dynamically. Since alarms are commonly optional, it also makes sense to use virtual primitives for one or more blocks of alarm detection functionality. The $AnalogDevice object that is provided with Application Server provides a good example of these concepts. + +> **Note** +> When you arrange local primitives in a hierarchy (that is, embed primitives within other primitives, and so on), there is a limit to the number of levels the hierarchy can have. For more information, see Limitations to the Complexity of Primitive Hierarchies. + +### Limitations to the Complexity of Primitive Hierarchies + +When you arrange local primitives in a hierarchy (that is, embed primitives within other primitives, and so on), there is a limit to the number of levels the hierarchy can have. + +When you add a local primitive to an ApplicationObject, the ArchestrA Object Toolkit adds a subfolder to the solution folder that contains the code files for that primitive. When you add another primitive to that primitive, it creates a subfolder in the primitive subfolder, and so on. Each level in the primitive hierarchy corresponds to another level of folders in the ArchestrA Object Toolkit solution folder. (For more information on the content of the solution folder, see Working with Projects.) + +However, the Windows operating system imposes a limit on the maximum length of a file path. On current Windows versions, this limit is 260 characters for the complete path including all formatting characters. No path to any code file in any ArchestrA Object Toolkit project folder may exceed this limitation. Therefore, there is a limit to how many levels of primitives you can use. + +The exact number of levels depends on the path length of the base ArchestrA Object Toolkit solution folder and on the length of the primitive names. The shorter the primitive names, the shorter the folder names, and the more levels you can use. + +## Planning Attribute Usage + +Attributes are the data items of an object or primitive. By reading from and writing to attributes, objects can exchange data with each other. In addition, your objects can also have Inputs and Outputs to communicate with other attributes in the ArchestrA environment. + +Before you start developing your object, you should determine the following: + +- **Which attributes do you need?** As a guideline, only expose those data items as attributes that your users actually need to see and/or change. For data items that you’ll only need locally or temporarily in the object’s code, simply use local C# variables. Those attributes that you do expose should be organized and named in a way that is intuitive to your users. Also determine whether your attributes will require I/O capabilities. +- **What level of access should users have to these** **attributes?** There might be attributes that are only relevant at config time, but not at run time. For other attributes, you might want to allow run time write access only to users with certain privileges. + +In the ArchestrA Object Toolkit, you can use three strategies to control attribute structure and access: + +- **Developing a logical naming hierarchy.** You can use named and unnamed primitives as well as structured attribute names to organize attributes logically and only expose those attributes that the user really needs. For more information, see Creating a Logical Attribute Hierarchy. +- **Security classifications.** By specifying different security classifications for individual attributes, you can restrict attribute access to users with the right privileges. For more information, see ArchestrA Security Classifications. +- **Attribute categories.** By using different attribute categories, you can specify whether or not an attribute should be available and readable/writable at config time and/or run time. For more information, see ArchestrA Attribute Categories. + +## Performance Considerations + +There is no arbitrary limit to the number of primitives, attributes, and inputs/outputs that you can add to your ApplicationObject. As with all software, the more complex your object gets, the more resources it will need. Depending on your system resources, there will eventually be a practical limit where performance becomes unacceptable. However, under normal circumstances, this should not be an issue except for very large and complex ApplicationObjects. + +For additional restrictions on the complexity of primitive hierarchies, see Limitations to the Complexity of Primitive Hierarchies. diff --git a/aot/dev-guide/03-working-with-projects.md b/aot/dev-guide/03-working-with-projects.md new file mode 100644 index 0000000..f81e936 --- /dev/null +++ b/aot/dev-guide/03-working-with-projects.md @@ -0,0 +1,61 @@ +# Working with Projects + +When creating ApplicationObjects or reusable primitives, you manage your development work in *projects*. ArchestrA Object Toolkit projects are simply Visual Studio projects of a special type. You create and manage them just like other Visual Studio projects. + +You create a project for every ApplicationObject or reusable primitive that you want to create. Visual Studio then creates a solution folder with subfolders for the projects corresponding to each of your object’s components and primitives. That solution folder contains all code related to the ApplicationObject or reusable primitive you’re developing. + +## Creating a Project + +When you create a project, the ArchestrA Object Toolkit creates all files and basic structures that you need to define your ApplicationObject or reusable primitive. The steps to create a project are the same for ApplicationObjects and reusable primitives. + +**To create a project** + +1. Open Microsoft Visual Studio. +2. On the **File** menu, point to **New** and then click **Project**. The **New Project** dialog box appears. +3. In the **Project types** list, expand **Visual C#** and click **ArchestrA**. +4. In the **Templates** pane, click **ArchestrA Object**. +5. In the **Name** box, enter a name for the project. This is also used as the name of your object. You can change the object name later. +6. In the **Location** box, enter the path where you want the project folder to be created. +7. Leave the **Create directory for solution** check box selected as well. +8. Click **OK**. + +Visual Studio creates a solution folder for the ArchestrA Object Toolkit project. The solution folder contains the following subfolders: + +| Subfolder | Contents | +| --- | --- | +| | Code files that define the object shape and attributes | +| Configtime | Code files for the object’s config time (“package”) code | +| Editor | Code files for the custom object editor UI and code | +| Runtime | Code files for the object’s run time code | +| Output | Build output (.aaPDF or .aaPRI files, .aaDEF file). This folder is created when you build your project for the first time. | + +When you add a local primitive to an ApplicationObject, the ArchestrA Object Toolkit adds a subfolder to the solution folder that contains the code files for that primitive. The primitive folder, in turn, has different subfolders for config time and run time code similar to the ones described above. When you add another primitive to that primitive, the ArchestrA Object Toolkit creates a subfolder in the primitive subfolder, and so on. For limitations due to this approach, see Object Design Considerations. + +## Opening an Existing Project + +When you open an existing ArchestrA Object Toolkit project in Visual Studio, the ArchestrA Object Toolkit windows appear, and all related commands are available. When you open any other type of project, these windows and commands are not available, except for some commands that are not project-specific. + +**To open an existing project** + +1. On the **File** menu, point to **Open** and then click **Project/Solution**. The **Open Project** dialog box appears. +2. Select the solution file you want to open and click **Open**. + +Visual Studio opens the project. + +## Moving or Deleting Projects + +To move or delete an ArchestrA Object Toolkit project, simply move or delete the entire Visual Studio solution folder. When moving a project, pay attention to the following: + +- The Windows folder structure only allows paths to be a certain length. If you move a project with a long hierarchy of child primitives (which are stored in nested subfolders) to an already long path, some of the paths may become too long. +- After you have moved the project, check your code for any relative references to dependent files that may need updating. +- If you are moving a project from one computer to another, make sure that all references are available on the new computer. + +## Editing Projects in Code or in the ArchestrA Object Toolkit Designer + +The ArchestrA Object Toolkit provides a graphical Object Designer that makes it easy to configure the properties and attributes of your ApplicationObject (or reusable primitive). We recommend that you edit your objects using this Object Designer. However, you can always edit all aspects of your object directly in the underlying code. + +The code and the data you see in the Object Designer are always synchronized. For example, when you change the properties of an attribute in the code, you see the updated property values the next time you open the Object Designer, and vice versa. + +This manual describes how to edit ApplicationObjects and reusable primitives by using the Object Designer. For more information on editing properties and attributes in code, see the *ArchestrA Object Toolkit Reference Guide*. + +For information on opening the Object Designer interface, see Object Designer Window. diff --git a/aot/dev-guide/04-defining-application-objects.md b/aot/dev-guide/04-defining-application-objects.md new file mode 100644 index 0000000..344641d --- /dev/null +++ b/aot/dev-guide/04-defining-application-objects.md @@ -0,0 +1,619 @@ +# Defining an ApplicationObject + +Once you have created an ArchestrA Object Toolkit project, you can start defining your object. This section explains how to configure object properties and add primitives using the Object Designer, and how to add custom code using the Object Design View. For information on configuring attributes, see Configuring Attributes. + +Common steps when defining your object are: + +- Configuring the object’s names and description. See Configuring the Object's Names and Description. +- Adding code to the object’s various event handlers. See Configuring Event Handlers. +- Working with primitives to structure your object. See Working with Primitives. +- Adding a custom object editor that allows end users to configure the object in the ArchestrA IDE. See Adding a Custom Object Editor. +- Configuring associated files in case your object uses any external files or assemblies. See Configuring Associated Files. +- Configuring other object properties, including “Advise Only Active” support, the object’s behavior in the ArchestrA IDE, and dump/load or failover support for dynamic attributes. See Configuring Additional Object Properties. +- Adding object help that end users can access from the ArchestrA IDE. See Adding Object Help. + +If you have an existing ApplicationObject developed with a previous version of the ArchestrA Object Toolkit, you can easily import its shape by importing the object’s .aaDEF file. For more information, see Importing an .aaDEF File from a Previous Object Version. + +You can also configure object properties directly in the code. For more information, see the *ArchestrA Object Toolkit* *Reference Guide*. + +## Configuring the Object's Names and Description + +You can configure an object’s internal and external names and give it a meaningful description. The *internal name* is the name by which you can refer to the object from within its code. The object’s *external name* and description are used in the ArchestrA IDE. It is also used to create default names for object instances. + +You can also configure an object’s vendor name. This name shows the end user who created the object and is used to uniquely identify the object for upgrade purposes. + +For more information on ArchestrA naming conventions and restrictions, see Naming Conventions. + +> **Note** +> For brevity, do not use the word “Object” or “Template” in an object’s name. + +**To configure an object’s names and description** + +1. Open the Object Designer. +2. In the **Shape** pane, click the topmost node. The object properties appear in the **Configuration** pane. +3. In the **External Name** box, enter the object’s external name. The name must be ArchestrA compliant. The maximum length is 31 characters. +4. In the **Internal Name** box, enter the object’s internal name. The name must be C# compliant. The maximum length is 329 characters. +5. In the **Vendor Name** box, enter the vendor name. This name must not contain double-byte characters or any characters that are invalid in Windows file names. +6. In the **Description** box, enter the object description. The maximum length is 1024 characters. +7. Click **OK**. + +## Configuring Event Handlers + +Event handlers are the main place where you will add the custom code for your ApplicationObject. The object and each of its local primitives have a variety of config time and run time events that you can link with custom handler code. The following sections describe which events exist, and how you can associate them with code. + +You can also execute custom code when the value of an attribute is changed at config time or run time. For more information, see Configuring Config Time Set Handlers and Configuring Run Time Set Handlers. + +### Configuring Config Time Event Handlers + +ArchestrA ApplicationObjects support a number of “config time” events that are triggered when a user works with the object in the ArchestrA IDE. By implementing handlers for these events, you can link configuration actions with custom code. For example, you could execute certain code after an object instance is created. + +> **Note** +> Config time event handler code is executed only on the Galaxy Repository node. Therefore, it cannot directly interact with the user. For example, if you call a message box within an event handler, the message box appears on the Galaxy Repository node. + +All ApplicationObjects have the following standard config time event handlers enabled: + +| Event | Occurs | +| --- | --- | +| Intialize | When the object is initialized. Use this event handler for any custom initialization code. | +| Migrate | When derived templates or instances are migrated. See Migrating Objects. | +| PostCreate | After the object (instance or derived template) is created. | +| PreValidate | Before the object is validated (when the user has edited its configuration and saves it). | +| Validate | When the object is validated. Use this event handler for any custom validation code (for example, checking for invalid combinations of attribute values). | + +**To add code to a config time event handler** + +1. In the Object Design View, expand the **Configtime** folder. +2. Double-click the event name. The code section for the config time event handler appears. +3. Enter the code for the config time event handler. When you are done, save your changes. + +### Configuring Run Time Event Handlers + +ArchestrA ApplicationObjects support a number of run time events that are triggered as the object is executed at run time. By implementing handlers for these events, you can link custom code with these events. For example, you could execute certain code on every scan cycle. + +All ApplicationObjects have the following run time event handlers: + +| Event | Occurs | +| --- | --- | +| Execute | On every scan cycle of the hosting AppEngine while the object is OnScan. | +| GetStatusDesc | When the run time component requests a detailed message for an error, for example, after a set handler returns a failure. | +| Initialize | After the object is created in run time (usually after deployment, but also after a failover or after the bootstrap is restarted). Occurs before the Startup event. No attribute information is available at this time. | +| SetScanState | When the object’s scan state (OnScan/OffScan) is changed. | +| Shutdown | When the object is shutting down (usually after the object is set to OffScan, but during a failover OffScan may not be set). This event does not occur if the object goes off the network during a network failure. | +| Startup | When the object is being started (after the Initialize event and before it goes OnScan). You can use the event’s startup context to find out whether the object is starting up after a failover or other reasons. | + +**To add code to a run time event handler** + +1. In the Object Design View, expand the **Runtime** folder. +2. Double-click the event name. The code section for the run time event handler appears. +3. Enter the code for the run time event handler. When you are done, save your changes. + +## Working with Primitives + +By using primitives, you can structure your object’s code and attributes logically and efficiently. If you define a primitive as virtual, you can also enable or disable instances of it as required at config time. For more information, see Working with Virtual Primitives. + +> **Note** +> When you arrange local primitives in a hierarchy (that is, embed primitives within other primitives, and so on), there is a limit to the number of levels the hierarchy can have. For more information, see Limitations to the Complexity of Primitive Hierarchies. + +### Adding a Local Primitive + +Local primitives are defined locally in an object and are only used in that single object. + +**To add a local primitive** + +1. Open the Object Designer. +2. In the **Shape** pane, select the location where you want to add the primitive. For example, if you want to add a primitive to another primitive, select that primitive or one of its attributes. +3. In the **Shape** pane, click the down arrow next to the **Add** icon. +4. Click **Local Primitive**. The properties of the new primitive are shown in the **Configuration** pane. +5. In the **External Name** box, enter a unique external name for the primitive. This is the name by which other objects can access the primitive’s attributes. The name must be ArchestrA compliant. For applicable restrictions, see Naming Conventions. + +You can also leave it blank. For more information, see Naming Considerations for Primitives. + +6. In the **Internal Name** box, enter a unique internal name for the primitive. This is the name by which you can refer to the primitive in the object’s code. The name must be C# compliant. The maximum length is 329 characters. +7. If required, select the **Dump/Load support for Dynamic** **Attributes & Reusable Primitives** and **Failover support for** **Runtime Dynamic Attributes** check boxes. For more information on these options, see Configuring Dump/Load Support for Dynamic Attributes and Virtual Primitives and Configuring Failover Support for Run Time Dynamic Attributes. +8. Select the **Virtual** check box if the primitive should be virtual. For more information, see Working with Virtual Primitives. +9. If required, select the **Advanced Configuration** check box to specify additional options: +a. In the **Execution Group** list, select the execution group for the primitive. This determines the execution order of the object’s primitives within each scan of the AppEngine. For more information, see Configuring the Object’s Primitive Execution Order. +b. If required, use the **Primitive GUID**, **Package CLSID** and **Runtime CLSID** boxes to specify that the primitive should use other assemblies than the ones automatically generated by the ArchestrA Object Toolkit. For more information, see Associating Different Assemblies with an Object. +1. If required, configure associated files for the primitive. This works the same as configuring associated files for the main ApplicationObject. For more information, see Configuring Associated Files Manually. +2. Click **OK**, or go back to Step 2 to add more primitives. + +The Object Design View now shows the new primitive in the tree. It has its own sub-entries for attributes, config time and run time events. You can configure custom code for the primitive’s events and set handlers in the same way as you would configure it for the object itself. + +### Adding a Reusable Primitive + +A reusable primitive is a primitive that is intended to be included into multiple objects. By implementing common features as reusable primitives, you avoid code duplication. You can also add multiple instances of a reusable primitive to the same object. + +Using the ArchestrA Object Toolkit, you can create your own custom reusable primitives. For more information, see Defining a Reusable Primitive. + +Standard reusable primitives installed by Wonderware Application Server are available at C:\Program Files\Common Files\ArchestrA\ReusablePrimitives\ ArchestrA. + +On a 64-bit operating system, standard reusable primitives will be installed at C:\Program Files (x86)\Common Files\ArchestrA\ReusablePrimitives\ArchestrA. + +Technically, the Inputs and Outputs as well as the Alarm and History extensions that you can add in the Object Designer are reusable primitives as well. However, there are separate mechanisms in the Object Designer for adding and configuring these primitives. For more information, see: + +- Adding Inputs and Outputs for information on Inputs and Outputs +- Historizing an Attribute for information on the History primitive +- Making an Attribute Alarmable for information on the Alarm primitive + +**To add a reusable primitive to your object** + +1. Open the Object Designer. +2. In the **Shape** pane, select the location where you want to add the primitive. For example, if you want to add a primitive to another primitive, select that primitive or one of its attributes. +3. In the **Shape** pane, click the down arrow next to the **Add** icon. +4. Click **Reusable Primitive**. The **Add Existing (Predefined)** **Primitive** dialog box appears. +5. Select the .aaPRI file of the reusable primitive you want to add. Click **Open**. +6. The reusable primitive and its attributes appear in the **Shape** pane. The primitive’s properties are shown in the **Configuration** pane. +7. In the **External Name** box, enter a unique external name for the primitive. This is the name by which other objects can access the primitive’s attributes. The name must be ArchestrA compliant. For applicable restrictions, see Naming Conventions. + +You can also leave it blank. For more information, see Naming Considerations for Primitives. + +8. In the **Internal Name** box, enter a unique internal name for the primitive. This is the name by which you can refer to the primitive in the object’s code. The name must be C# compliant. The maximum length is 329 characters. +9. Select the **Virtual** check box if the primitive should be virtual. For more information, see Working with Virtual Primitives. +10. Click **OK**, or go back to Step 2 to add more primitives. + +The Object Design View now shows the new primitive in the tree. Unlike with a local primitive, you can’t configure custom code for the primitive’s events and set handlers because that code is already configured in the reusable primitive itself. + +#### Overriding and Locking Attributes of Reusable Primitives + +When you include a reusable primitive into another primitive or object, you may be able modify the default values and security classification of its attributes. This is called *overriding*. + +When appropriate, you can also lock these overridden values, which prevents them from being changed after the object is imported into a Galaxy. A common example is an object that is designed to monitor only Boolean items from the field. To do so, include an Input Primitive, override its “data type” attribute to Boolean, and lock it. + +### Deleting a Primitive + +You can delete primitives from your object. In that case, you must check whether the object still contains any references to the deleted primitive or its attributes, and change those references accordingly. + +**To delete a primitive** + +1. Open the Object Designer. +2. In the **Shape** pane, select the primitive you want to delete. +3. Click the **Delete** icon. A confirmation message appears. +4. Click **Yes** to delete the primitive. + +### Working with Virtual Primitives + +You can use a *virtual primitive* to implement a block of optional functionality that can be enabled as required by an end user. This ensures that only required primitives are actually deployed at run time, reducing overhead and processing load. + +You design and implement a virtual primitive in the same way as any other primitive. However, from the end user’s perspective, a virtual primitive does not appear to be part of the object by default. Instead, it is only made "real" at configuration time by programmatically adding instances of the virtual primitive to the object as needed. For more information, see the documentation on the AddPrimitive and DeletePrimitive methods in the *ArchestrA Object Toolkit* *Reference Guide*. + +For example, you might want to provide an optional Hi alarm for an object’s PV (process value). To do this, you would add a virtual primitive that contains the alarming functionality, and an attribute that enables or disables the Hi alarm. When the user enables that attribute at config time, you create an instance of the virtual primitive via a call in the attribute’s config time set handler. If the attribute stays disabled, you never create an instance of the primitive, and the primitive never gets deployed. + +You can create multiple instances of a virtual primitive in the same object. Each instance behaves like a separate primitive. For example, you could re-use the same Hi alarm primitive for multiple attributes by simply creating multiple instances of it. However, when you add the instances, you must provide a unique external and internal name for each instance to avoid naming conflicts. + +For an example of using virtual primitives, see the WatchDog sample object. It uses a virtual primitive for providing optional statistics calculations. See Sample Projects. + +You can also use virtual primitives to define “optional” attributes and “arrays” of related primitives. For more information, see the following sections. + +#### Defining "Optional" Attributes Using Virtual Primitives + +Using virtual primitives, you can include primitives (and their attributes) in an object only when they are really necessary. For example, if the monitoring of a particular input is optional, you can mark the input primitive as virtual and include it in the object only when a certain attribute (for example, “EnableInputMonitoring”) is set to true. To do this, you would include logic for creating or removing an instance of the virtual primitive in that attribute’s config time set handler. + +#### "Arrays" of Related Primitives + +Using the same technique as described above, you can easily monitor a variable number of inputs (for example, 0 to 4). The only difference is that you create more than one instance of the virtual primitive. Each primitive instance must have unique internal and external names so its attribute names do not collide with those of the other primitive instances. + +### Naming Considerations for Primitives + +This section explains how to use a primitive’s names and what happens if you change them. + +A primitive has two names: its *internal name* and its *external* *name*. In many cases, these two names will be identical. + +- The **internal name** is used to refer to the primitive from config time and run time code. Avoid changing this name after you’ve used it in code. If you do change it, you must manually update any references where the primitive name is passed as a string. + +Keep this name as short as possible. Long names can make source file and folder names excessively long, and may increase memory usage at run time. + +- The **external name** determines the names of the primitive’s attributes. For example, if you have an attribute named “Condition” in a primitive named “AlarmHi,” you can access the attribute as “AlarmHi.Condition” in the object’s namespace. If you change this name, references in the config time or run time code are not affected. However, you must update any references where it is passed as a string, for example, in the object’s custom editor. + +A primitive’s external name can be empty. In this case, the external name does not become part of the namespace that is visible to the end user. In the example above, if you have an attribute named “Condition” in a primitive with an empty external name, you can simply access that attribute as “Condition” in the object’s namespace. However, in that case, you must pay extra attention that no naming conflicts occur between the primitive’s attributes and any attributes of the containing object or primitive. + +## Adding a Custom Object Editor + +> **Note** +> This section is about creating the custom object editor for end users to configure your object in the ArchestrA IDE. For information on the ArchestrA Object Toolkit Object Designer that you use to define your object in Visual Studio, see Object Designer Window. + +By creating a custom object editor, you provide a graphical interface for configuring your object’s attributes. The custom object editor appears when the user opens the object for configuration in the ArchestrA IDE. It should allow the user to configure all configurable attributes of the object and its primitives. + +You can create multiple custom tab pages for your object editor. In the ArchestrA IDE, these custom tab pages appear alongside the standard tab pages that are shown for every object (**Object Information**, **Scripts**, **UDAs**, etc.). You can disable these standard tabs if you don’t need them. See Configuring the Object’s IDE Behavior. + +Your custom object editor can use standard controls from the Visual Studio toolbox or special ArchestrA controls. For information on adding the ArchestrA controls to Visual Studio, see Adding ArchestrA Controls to the Visual Studio Toolbox. + +Your editor can also include controls for configuring attributes of virtual primitives. In the ArchestrA IDE, these controls are automatically enabled or disabled depending on whether the virtual primitive instance exists or not. + +**To create the custom object editor** + +1. In the Object Design View, double-click the **Editor** folder. The custom object editor appears in the Visual Studio Design view. It already contains a tab page. This is the first custom tab page that appears when you edit your object in the ArchestrA IDE. +2. Add controls to the tab page. You can use Visual Studio’s standard UI design features for this. You can also: + - Drag attributes from the Object Design View onto the tab page. The ArchestrA Object Toolkit then automatically adds a standard label as well as ArchestrA controls for editing the value, security classification and lock status of that attribute. + - Drag object dictionary items from the Object Design View onto the tab page. The ArchestrA Object Toolkit then automatically adds a label that will show the correct localized value at run time. +1. If required, add more tab pages. +2. When you are done, save your work. + +### Adding ArchestrA Controls to the Visual Studio Toolbox + +You can add special ArchestrA controls to the Visual Studio toolbox so you can use them in your custom object editor. + +**To add ArchestrA controls to the Visual Studio toolbox** + +1. Right-click the Visual Studio toolbox and then click **Add** **Tab**. A new tab appears in the toolbox. Give it a descriptive name, such as “ArchestrA.” +2. Right-click the new tab and then click **Choose Items**. The **Choose Toolbox Items** window appears with the **.NET** **Components** tab selected. +3. Click **Browse**. Browse to the C:\Program Files\Wonderware\Toolkits\ArchestrA Object\Bin folder and select the ArchestraEditorFramework.dll file. + +On a 64-bit operating system, browse to the C:\Program Files (x86)\Wonderware\Toolkits\ArchestrA Object\Bin folder to select the file. + +4. Click **Open**. The ArchestrA controls are added to the list of controls. +5. In the **Name** column, check those ArchestrA controls that you want to see on your new tab. Click **OK**. + +The ArchestrA controls now appear on your new tab in the Visual Studio toolbox. + +### Changing the Attribute Reference of ArchestrA Controls + +You can change the attribute references of ArchestrA controls after you have added them to your object editor. To do this, set the control’s “Attribute” property to the external name of the attribute. You can also do this programmatically from config time code. This allows you, among other things, to configure multiple primitive instances using the same editor page. + +For example, to set the attribute reference of the control instance “aaTextBox1” to “Prim1.Attr1”, use this statement: + +```csharp +aaTextBox1.Attribute = "Prim1.Attr1"; +``` + +## Configuring Associated Files + +If your project contains references to custom files or libraries/assemblies, you must associate these “dependent files” with the object definition. This ensures that they are included when you build the object. The associated files become part of the .aaPDF object package file. When you later import the object on the target system, each associated file is automatically registered on that system based on its type. + +If you know that the required files will already be present on the target system, you can also tell the ArchestrA Object Toolkit to specifically ignore these files. In that case, the files are not included in the object package. This is handy for references to standard Windows or ArchestrA assemblies. + +There are two ways to configure associated files: + +- For files that *are* set up as references in Visual Studio (for example, custom or third-party assemblies), you set up rules using the Dependent File Manager. Rules are regular expressions that can cover multiple references. All files covered by a rule are then automatically added to the object’s **Associated Files** list. You must set up rules for all project references that you have set up in Visual Studio before you can build your object. +- For files that *are not* set up as project references in Visual Studio (for example, custom data files), you set up the association manually in the Object Designer’s **Associated** **Files** list. + +The following sections explain both options. + +### Setting up Rules for Dependent Files + +To associate files with your object that are set up as project references in Visual Studio (for example, custom or third-party assemblies), you set up rules using the Dependent File Manager. Rules are regular expressions that can cover multiple references. All files that are linked to the references covered by a rule are automatically added to the object’s **Associated Files** list. + +> **Note** +> The file and folder names of associated files must not contain any multi-byte characters. + +You can configure a default set of rules for all projects, and you can configure specific rules for a single project. + +- When you open the Dependent File Manager while no ArchestrA Object Toolkit project is opened, you can configure only the default rules for all projects. +- When you open the Dependent File Manager while an ArchestrA Object Toolkit project is opened, you can configure both the default rules for all projects as well as specific rules for the current project. + +You can set up rules before or after you have added the relevant references to your project in Visual Studio. In the latter case, the references automatically appear in the Dependent File Manager, and you can create rules for them very easily without having to type the reference again. See the following two sections for each method. + +Rules are checked in the order that they appear in the Dependent File Manager. After the ArchestrA Object Toolkit finds a rule that matches a particular reference, it ignores any subsequent rules that might also match that reference. + +You can also configure additional search paths for dependent files. See Configuring Additional Search Paths. + +> **Note** +> The **System** folder of the Dependent File Manager always contains a set of default rules for references to core system libraries. You can’t edit the rules in this folder. + +#### Setting up Rules for References that Don't Currently Exist in Visual Studio + +To set up rules for dependent files that you haven’t yet added as references in Visual Studio, use the following procedure. + +**To set up rules for dependent files manually** + +1. Click the **Dependent File Manager** icon in the ArchestrA Object Toolkit toolbar. The **Dependent File Manager** dialog box appears. +2. Create a rule. +a. In the **Rules** list, click either **This Object** or **All Objects**, depending on where you want the rule to apply. +b. Click the **Add** icon. A new rule appears in the list. +c. In the **Reference** box on the right, enter the reference expression to which this rule should apply. This can be a .NET regular expression. For example, if you are using references to “MyMathLib.Core.dll” and “MyMathLib.Data.dll,” you can enter “MyMathLib*” to cover both. +d. Select the **Ignore** check box if the dependent file(s) covered by this rule should be ignored. In that case, the files are not added to the object package file generated by the build process. Use this option if you know that the files will already be present on the target system. +e. In the **Vendor** box, enter the vendor name for the file(s). +f. In the **Type** list, select the file type. This determines if and how files covered by this rule are registered on the target system. The types work as follows: + +| Type | Description | +| --- | --- | +| Dictionary | An ArchestrA Dictionary (.aaDCT) file. | +| NETFrameworkAssembly | Strongly named .NET Framework Assembly. The file is installed into the Global Assembly Cache. | +| ComDLL | COM in-proc server DLL. The file is registered on the target system using regsvr32. | +| Normal | A normal file. Nothing is done on the target system except install the file. | +| ComEXE | COM local server EXE. The file is executed on the target system with the "/RegServer" parameter. | +| NTService | A file that runs as a Windows service. | +| MergeRegistryScript | A .reg file with registry information. The file is imported into the registry. | +| MsiMergeModule | A bundled subcomponent of an installer. | +| NETFrameworkAssemblyNIG | .NET Framework Assembly. The file is *not* installed into the Global Assembly Cache. | +| Unknown | Only applicable if you selected the **Ignore** check box. | + +a. Leave the **Browser** check box unchanged. This feature is reserved for future use. +b. Select the **Contains Embedded DEF** check box if the file contains the object’s aaDEF file as an embedded resource. Typically, you don’t need to use this setting because the aaDEF file is managed by the ArchestrA Object Toolkit automatically. +1. If the dependent files covered by the rule require dependent files themselves, add each of those files to the rule. For example, if you are using a COM DLL, the reference in the project is actually to the auto-generated interop assembly, but not the COM DLL itself. In that case, you would add the actual COM DLL file as a dependent file to the rule. Do the following for each file: +a. In the **Rules** list, select the rule. +b. Click the **Add** icon. A new file item appears in the list. +c. In the **Reference** box on the right, enter the complete path to the file, or click the browse button to select the file. +d. Configure the remaining options as described in the previous step. +1. Click **OK**, or go back to step 2 to create more rules. + +#### Setting up Rules for References that Currently Exist in Visual Studio + +To set up rules for dependent files that you have already configured as references in Visual Studio, use the following procedure. + +**To set up a rule for a reference already set up in Visual Studio** + +1. Click the **Dependent File Manager** icon in the ArchestrA Object Toolkit toolbar. The **Dependent File Manager** dialog box appears. +2. In the **Dependent Files** list, select the reference for which you want to set up a rule. References not currently covered by a rule are highlighted in black type. +3. Click either the **All Objects** or **This Object** button, depending on where you want the rule to apply. A new rule for this reference appears in the corresponding section of the **Rules** list. +4. Configure the remaining options as described in the previous procedure. + +#### Deleting and Re-Ordering Rules + +You can edit the rules list by deleting rules or changing their order. + +**To delete or re-order rules** + +1. Open the **Dependent File Manager**. +2. In the **Rules** list, select the desired rule. +3. Do one of the following: + - To delete the rule, click the **Delete** icon. + - To move the rule up or down in the list, click the arrow icons. +1. Click **OK**. + +#### Managing the Rules File for All Projects + +The default dependent files rules for all projects are stored in an XML file. You can specify which file to use. This allows you to save and use different sets of default rules. + +**To manage the rules file for all projects** + +1. Open the Dependent File Manager. +2. In the **All Objects Rules** area, manage the rules file as follows: + - To open a different rules file, click the browse button next to the **All Objects Rules File** box. + - To save the current rules configuration under the file name that is shown, click **Save**. + - To save the current rules configuration under a different file name, click the down arrow on the **Save** button and then select **Save As.** + - To set the currently shown file as the default file, click **Set Default**. + - To use the file that is set as the default file, click **Default**. + +### Configuring Associated Files Manually + +To associate files with your object that are not set up as project references in Visual Studio (for example, custom data files), you set up the association manually in the Object Designer’s **Associated Files** list. Files listed here are included in the object package file when you build the object, and optionally registered on the target system when you import the object. + +**To manually add associated files** + +1. Open the Object Designer. +2. In the **Shape** pane, click the topmost node. The object properties appear in the **Configuration** pane. +3. Click the downward arrow to the right of the **Associated** **Files** heading. The section expands. +4. Click the **Add** icon. The **Associated File** dialog box appears. +5. In the **Filename** box, enter the complete path to the file, or click the browse button to select the file. +6. In the **Type** list, select the file type. This determines if and how files covered by this rule are registered on the target system. The types work as follows: + +| Type | Description | +| --- | --- | +| Dictionary | An ArchestrA Dictionary (.aaDCT) file. | +| NETFrameworkAssembly | Strongly named .NET Framework Assembly. The file is installed into the Global Assembly Cache. | +| ComDLL | COM in-proc server DLL. The file is registered on the target system using regsvr32. | +| Normal | A normal file. Nothing is done on the target system except install the file. | +| ComEXE | COM local server EXE. The file is executed on the target system with the "/RegServer" parameter. | +| NTService | A file that runs as a Windows service. | +| MergeRegistryScript | A .reg file with registry information. The file is imported into the registry. | +| MsiMergeModule | A bundled subcomponent of an installer. | +| NETFrameworkAssemblyNIG | .NET Framework Assembly. The file is *not* installed into the Global Assembly Cache. | + +1. In the **Vendor** box, enter the vendor name for the file(s). +2. Select the **Needed at Config time**, **Needed at Run time** and **Needed by the Editor** check boxes depending on which components of your object use the file. +3. Leave the **Needed by the Browser** check box unchanged. This feature is reserved for future use. +4. Select the **Contains Embedded DEF** check box if the file contains the object’s aaDEF file as an embedded resource. Typically, you don’t need to use this setting because the aaDEF file is managed by the ArchestrA Object Toolkit automatically. +5. Click **OK**. + +**To edit or delete an associated file** + +> **Note** +> You can only edit or delete files that you manually added to the Associated Files list. To edit or delete a file that was added through a rule, use the Dependent File Manager. + +1. Open the **Associated Files** list. +2. Select the file you want to edit or delete. +3. Do one of the following: + - To edit the file, click the **Edit** icon. The **Associated File** dialog box appears. Edit the properties as described in the previous procedure. + - To delete the file, click the **Delete** icon and confirm the deletion. + +## Configuring Additional Object Properties + +You can configure various additional properties for your ApplicationObject: + +- You can enable dump/load support for dynamic attributes and virtual primitives as well as failover support for dynamic attributes. See Configuring Dump/Load Support for Dynamic Attributes and Virtual Primitives and Configuring Failover Support for Run Time Dynamic Attributes. +- You can enable “Advise Only Active” support for the object to reduce processing and network load when its attributes aren’t subscribed to. See Enabling “Advise Only Active” Support for the Object. +- You can set a minimum Application Server version to prevent users from importing your object into earlier versions. See Configuring the Object’s Minimum Application Server Version. +- You can set IDE Behavior options to control various aspects of the object’s behavior in the ArchestrA IDE. See Configuring the Object’s IDE Behavior. +- You can set the toolset that the object should be placed in when it is imported into the ArchestrA IDE. See Setting the Object’s Toolset. +- You can specify the execution order for the object’s primitives. See Configuring the Object’s Primitive Execution Order. + +The following sections explain each of these additional properties. + +### Configuring Dump/Load Support for Dynamic Attributes and Virtual Primitives + +You can enable dump/load support for config time dynamic attributes and virtual primitives in instances or derived templates of your ApplicationObject. These attributes and primitive instances are only added and configured at config time, so their status and configuration may be different in each object instance or derived template. Enabling dump/load support allows you to preserve this configuration when using the Galaxy Dump/Load and Export/Import features on those instances or derived templates. + +The dump/load support setting always applies to a specific hierarchy level. For example, when you enable it on the top hierarchy level of your ApplicationObject, it applies to dynamic attributes and virtual primitive instances created on that level. If your object uses child primitives, you must configure the setting separately for each of those primitives. + +Using the detailed AddAttribute and AddPrimitive methods, you can exclude specific dynamic attributes or virtual primitives from the dump/load support. For more information, see the *ArchestrA Object Toolkit* *Reference* *Guide*. + +> **Important** +> When you enable dump/load support, the ArchestrA Object Toolkit automatically adds an attribute named “InternalDumpLoadData1” to the object. Do not edit or remove this attribute. Otherwise, the dump/load support doesn’t work. + +**To enable dump/load support** + +1. Open the Object Designer. +2. In the **Shape** pane, click the object name. +3. In the **Configuration** pane, select the **Dump/Load support** **for Dynamic Attributes & Virtual Primitives** check box. +4. Click **OK**. + +### Configuring Failover Support for Run Time Dynamic Attributes + +You can enable failover support for run time dynamic attributes. This is relevant when using your ApplicationObject in a redundant environment with dual ApplicationEngines configured for failover. In such an environment, when the primary AppEngine fails, all of its hosted objects become available on the backup AppEngine. + +When failover support is enabled, any dynamic attributes created on your object during run time are preserved in case of such a failover. Otherwise, run time dynamic attributes are lost when the failover occurs and have to be recreated. + +The failover support setting always applies to a specific hierarchy level. For example, when you enable it on the top hierarchy level of your ApplicationObject, it applies to dynamic attributes created on that level. If your object uses child primitives, you must configure the setting separately for each of those primitives. + +Using the detailed AddAttribute method, you can exclude specific dynamic attributes from the failover support. For more information, see the *ArchestrA Object Toolkit* *Reference* *Guide*. + +You can also use failover support to restore dynamic attributes after a normal object startup, not just after a failover. For additional information and guidelines, see Ensuring Failover Support for Run Time Dynamic Attributes. + +> **Important** +> When you enable failover support, the ArchestrA Object Toolkit automatically adds an attribute named “_InternalFailoverData1” to the object. Do not edit or remove this attribute. Otherwise, the failover support doesn’t work. + +**To enable failover support** + +1. Open the Object Designer. +2. In the **Shape** pane, click the object name. +3. In the **Configuration** pane, select the **Failover support for** **Runtime Dynamic Attributes** check box. +4. Click **OK**. + +### Enabling "Advise Only Active" Support for the Object + +You can enable “Advise Only Active” support for your ApplicationObject. When “Advise Only Active” support is enabled, you can configure individual attributes to stop updating if noone is subscribing to them. This reduces the processing and network load. + +After enabling “Advise Only Active” support for the object, you still need to configure each individual attribute for “Advise Only Active” support as required. For more information, see Configuring “Advise Only Active” Support for an Attribute. + +**To enable “Advise Only Active” support for the object** + +1. Open the Object Designer. +2. In the **Shape** pane, click the object name. +3. In the **Configuration** pane, select the **Advise only Active** **supported** check box. +4. Click **OK**. + +### Configuring the Object's Minimum Application Server Version + +You can configure a minimum Application Server version for your ApplicationObject. This prevents users from importing the object into earlier versions of Application Server. + +> **Note** +> This version check is only performed in Application Server 3.1 and higher. + +**To configure the minimum Application Server version** + +1. Open the Object Designer. +2. In the **Shape** pane, click the object name. +3. In the **Configuration** pane, enter the minimum version in the **Min IAS Version** and **Patch** boxes. +4. Click **OK**. + +### Configuring the Object's IDE Behavior + +You can customize the object’s behavior in the ArchestrA IDE. For example, you can hide the object from certain views and disable some commands. + +**To configure the object’s IDE behavior** + +1. Open the Object Designer. +2. In the **Shape** pane, click the object name. +3. In the **Configuration** pane, select the **IDE Behavior** check box. A list of options appears. +4. In the **General** area, select the check boxes for the general options you want to enable: + - **Hide Tagname:** Hides the object’s tagname in the ArchestrA IDE views (Model, Deployment, Derivation). This option is only applicable if the object is contained. Otherwise, the tagname is shown even if this option is enabled. When the object’s tagname is hidden, users can only change its contained name in the ArchestrA IDE. + - **Hide Contained Name:** Hides the object’s contained name in the ArchestrA IDE views. + - **Disable ObjectViewer Menu:** Disables the **View in** **Object Viewer** menu option in the ArchestrA IDE. + - **Disable Template Derivation:** Makes it impossible to derive templates from the object. + - **Disable Instance Creation:** Makes it impossible to derive instances from the object. + - **Hide Standard Editor Tabs:** Hides the standard tabs (**Object Information**, **Scripts**, **UDAs**, etc.) in the custom object editor. Only your custom tabs are shown. +1. In the **Appearance** area, select the check boxes for the appearance options you want to enable: + - **Hide in Browser:** Hides the object in the Galaxy Browser. + - **Hide Template in Template Toolbox:** Hides the object template in the **Template Toolbox**. + - **Hide Instance in Model View:** Hides the object’s instances in the **Model** view. + - **Hide Instance in Deployment View:** Hides the object’s instances in the **Deployment** view. + - **Hide in Security Editor Object List:** Hides the object from the security group configuration (**Security Groups** tab in the **Configure Security** dialog box). +1. Click **OK**. + +### Setting the Object's Toolset + +You can specify which toolset the object is placed in when you import the object into the ArchestrA IDE. + +> **Note** +> You can configure the list of toolsets available for selection. See Configuring Toolset Names. + +**To set the object’s toolset** + +1. Open the Object Designer. +2. In the **Shape** pane, click the object name. The object properties appear in the **Configuration** pane. +3. In the **Toolset** list, click the toolset that the object should be placed in after importing. Alternatively, type a custom toolset name. +4. Click **OK**. + +#### Configuring Toolset Names + +You can configure the toolsets that you can select for your objects in the Object Designer. Toolset names are saved in an XML file and apply to all ArchestrA Object Toolkit projects on your system. You can also save this file in a central network location and share it across multiple systems. + +**To configure toolset names** + +1. In the ArchestrA Object Toolkit toolbar, click the **Options** icon. The **Options** dialog box appears. +2. In the left pane, click **Toolset Names**. The toolset list appears in the right pane. Default toolsets appear with a blue icon. You can’t edit these toolsets. +3. Configure the toolset names as follows: + - To add a toolset, click the **Add** icon and then click Toolset. In the **Name** box, enter a name for the toolset. The name must be ArchestrA compliant. + - To delete a toolset, select it, click the **Delete** icon, and confirm the deletion. + - To save the toolset names file or to open a different one, use the **Save** and browse buttons. + - To save the current rules configuration under a different file name, click the down arrow on the **Save** button and then select **Save As.** + - To set the currently shown file as the default file, click **Set Default**. + - To use the default file, click **Default**. +1. Click **OK**. + +### Configuring the Object's Primitive Execution Order + +You can configure an execution order for the primitives in an ApplicationObject by specifying one of ten execution groups for each primitive. The execution group specifies the order in which the primitive should be executed relative to other primitives in the object. For example, if primitive B depends on data calculated by primitive A, you would want to make sure that primitive A is executed before primitive B so that primitive B gets the latest data in each scan cycle of the AppEngine. To do this, you would place primitive A in an “earlier” execution group than primitive B. + +Available execution groups are “Custom 1” to “Custom 10.” Primitives in the “Custom 1” group are executed first, then primitives in the “Custom 2” group, and so on. + +Technically, all code that you implement at the ApplicationObject level, such as the object’s own Startup or Execute event handlers, is contained in a special primitive as well. Therefore, you can also set an execution group at the object level to specify when that code should be executed relative to the code of other primitives in the object. + +> **Note** +> You can configure the execution group of a reusable primitive when you develop the primitive, but you can’t change it after you have embedded the primitive in an ApplicationObject. + +**To configure the object’s primitive execution order** + +1. Open the Object Designer. +2. In the **Shape** pane, click the object name or a primitive. The object or primitive properties appear in the **Configuration** pane. +3. Select the **Advanced Configuration** check box. The **Advanced Configuration** section expands. +4. In the **Execution Group** list, select the execution group for the primitive. +5. Click **OK**. + +## Associating Different Assemblies with an Object + +An ApplicationObject consists of a number of different assemblies. For example, there is one assembly for config time code and another for run time code. These assemblies are tied to the main ApplicationObject by means of their CLSIDs. + +By default, when you create a new ArchestrA Object Toolkit project, the ArchestrA Object Toolkit automatically generates a project folder with subfolders and code files for each of these assemblies (see Creating a Project). These are the files that you open and edit as you work with the Object Designer and Object Design View. + +Initially, the ArchestrA Object Toolkit automatically configures the CLSIDs so that your object uses these new default assemblies. However, you can change these auto-configured CLSIDs to specify that your object should *not* use these default assemblies, but different ones. + +In most circumstances, if you’re creating an object completely from scratch in the current version of the ArchestrA Object Toolkit, you would not change the CLSID configuration, but simply keep the default values. But, for example, there might be situations where you would want to use an existing run time assembly that you created by some other means, such as a previous version of the ArchestrA Object Toolkit. By specifying that assembly’s CLSID, you can tell your ApplicationObject to use that assembly instead of the default assembly that’s part of the ArchestrA Object Toolkit project. + +If you change the CLSID configuration to use custom assemblies, you must manually include these assemblies as associated files so that they are installed and registered on the target system. For more information, see Configuring Associated Files. + +> **Note** +> Every time you increment your object’s major version, the CLSID configuration for the object and all child primitives is automatically reset to new, auto-generated values. Therefore, if you are using custom CLSIDs, you must restore them after each major version update. + +**To change an object’s CLSID configuration** + +1. Open the Object Designer. +2. In the **Shape** pane, click the object name. The object properties appear in the **Configuration** pane. +3. Select the **Advanced Configuration** check box. The **Advanced Configuration** section expands. +4. Enter the assembly CLSIDs as follows: +a. **Primitive GUID**: GUID of the main object assembly. Usually you won’t have to change this GUID. +b. **Package CLSID**: CLSID of the assembly that contains the config time code +c. **Runtime CLSID**: CLSID of the assembly that contains the run time code +d. **BRO CLSID**: Reserved for future use. Do not change this setting. +1. Click **OK**. + +## Adding Object Help + +The ArchestrA Object Toolkit does not provide a means to add object help to your object. However, you can use the standard means of the ArchestrA IDE to do this, and then export the object including the object help as an .aaPKG file. + +Your object help file must be a standard HTML file. + +**To add object help** + +1. Develop and test your object as usual. +2. Open the ArchestrA IDE and import your object’s .aaPDF file. The object template is now shown in the **Template** **Toolbox**. +3. Right-click the object template and select **Object Help**. The help window appears with a message that no object help file could be found. +4. Save your object help file under the name shown in the error message. For example, if the message says that no help file was found at “C:\Program Files\ArchestrA\Framework\FileRepository\MyGalaxy\Objects\551\Help\1033\help.htm,” save the help file in that folder and under that name. +5. Close the help window. Repeat step 3 to verify that your help file now appears. +6. Export your object as an .aaPKG file. + +The exported .aaPKG file now contains your original object as well as the help file that you manually copied into the help folder. When you import the .aaPKG file into a different galaxy, the help file is automatically imported and saved at the correct location. + +## Importing an .aaDEF File from a Previous Object Version + +If you have an existing ApplicationObject developed with a previous version of the ArchestrA Object Toolkit, you can easily re-create its shape by importing the object’s .aaDEF file. This saves time because you can reuse the existing object shape. + +To use this feature, you must use a newly created ArchestrA Object Toolkit project for which you haven’t defined any attributes or primitives yet. Otherwise, the .aaDEF import is disabled. + +**To import an existing .aaDEF file** + +1. Open the Object Designer. +2. Click the **Import aaDEF** button in the bottom. The **Browse** **for AADef Files** dialog box appears. +3. Select the .aaDEF file you want to import and click **Open**. + +The ArchestrA Object Toolkit imports the .aaDEF file. When the import is finished, the Object Designer shows the object shape as defined in the .aaDEF file. diff --git a/aot/dev-guide/05-defining-primitives.md b/aot/dev-guide/05-defining-primitives.md new file mode 100644 index 0000000..89ac558 --- /dev/null +++ b/aot/dev-guide/05-defining-primitives.md @@ -0,0 +1,35 @@ +# Defining a Reusable Primitive + +A reusable primitive is a primitive that is intended to be included into multiple objects. This allows you to share component-level code across objects. The Input and Output primitives that you can add in the Object Designer are good examples of how reusable primitives are beneficial. + +Using the ArchestrA Object Toolkit, you can create your own custom reusable primitives and use them in your objects. For more information on how to add a reusable primitive to an object, see Adding a Reusable Primitive. + +From a development perspective, creating a reusable primitive is very similar to creating an object. Therefore, this section describes only the procedures that are specific to developing a primitive. + +> **Note** +> Reusable primitives must be added to an object before you can import them into a Galaxy. You can’t import a reusable primitive alone. + +## Switching between Object/Primitive Mode + +When working on an ArchestrA Object Toolkit project, you can switch between ApplicationObject and reusable primitive mode at any time. For example, when you start working on an ApplicationObject but decide that you want to implement its functionality as a reusable primitive instead, you can switch to primitive mode. If you later change your mind and decide that you do want to implement it as an object after all, you can simply switch back to object mode. + +Any properties and features that are not relevant to the current mode are blocked from access in the Object Designer and Object Design View. However, they are still preserved in the project code, so when you switch back to the other mode, they are available again. + +**To switch between object and primitive mode** + +1. Open the Object Designer. +2. In the **Shape** pane, click the topmost node. The object properties appear in the **Configuration** pane. +3. In the **Category** list, select either **Application Object** or **Reusable Primitive**, depending on which mode you want. +4. Click **OK**. + +## Differences Between Editing Objects and Primitives + +When developing a reusable primitive, there are certain differences as compared to developing an ApplicationObject: + +- The Object Designer doesn’t have any fields for editing the minor version, toolset name or description. These settings are irrelevant for a reusable primitive. +- The **Configuration Event Handlers** and **IDE Behavior** sections are removed from the Object Designer. Both are irrelevant for a reusable primitive. (The standard config time event handlers are still available via the Object Design View.) +- A reusable primitive does not have its own setting for “Advise Only Active” support. “Advise Only Active” support is determined by the ApplicationObject that the primitive is used in. +- Reusable primitives don’t have their own custom editor. Any required configuration UI must be implemented in the editor of the object that contains it. +- The **Build & Import**, **Build & Instantiate** and **Build & Deploy** build modes are not available. They are not applicable to a reusable primitive. +- The **Increment Minor Version** versioning option is not applicable to reusable primitives. +- The output file created by the build process is an .aaPRI file, not an .aaPDF file. You must add the reusable primitive to an object before you can import it into a Galaxy. You can’t import a reusable primitive alone. diff --git a/aot/dev-guide/06-configuring-attributes.md b/aot/dev-guide/06-configuring-attributes.md new file mode 100644 index 0000000..a5b811f --- /dev/null +++ b/aot/dev-guide/06-configuring-attributes.md @@ -0,0 +1,651 @@ +# Configuring Attributes + +Attributes are the data items of an object or primitive. By reading from and writing to attributes, objects can exchange data with each other. + +You can configure attributes for an ApplicationObject or reusable primitive by using the ArchestrA Object Toolkit’s Object Designer. You can: + +- Add, edit and delete attributes and array attributes. See Adding Attributes to an Object or Primitive and Renaming or Deleting Attributes. +- Configure set handlers for attributes. See Configuring Config Time Set Handlers and Configuring Run Time Set Handlers. +- Make attributes historizable and alarmable. See Configuring Attribute Extensions. +- Add inputs and outputs to read and write data to and from the field. See Adding Inputs and Outputs. +- Configure “Advise Only Active” support for attributes. See Configuring “Advise Only Active” Support for an Attribute. + +You can also configure attributes directly in the code. For more information, see the *ArchestrA Object Toolkit Reference* *Guide*. + +Attributes that you configure using the ArchestrA Object Toolkit are different from the User-Defined Attributes (UDAs) that you can configure in the ArchestrA IDE. You can only view or edit their configuration in the ArchestrA IDE using your custom object editor, but not the standard UDAs page. + +Also, the ArchestrA attributes that we talk about here are not the same as C# attributes. Unless specifically noted, when this manual talks about “attributes,” we mean ArchestrA attributes, not C# attributes. + +## Adding Attributes to an Object or Primitive + +The easiest way to add attributes and array attributes to an ApplicationObject or reusable primitive is by using the Object Designer. + +**To add an attribute** + +1. Open the Object Designer. +2. In the **Shape** pane, select the location where you want to add the attribute. For example, if you want to add an attribute to a local primitive, select that primitive or one of its attributes. +3. In the **Shape** pane, click the down arrow next to the **Add** icon. +4. Click **Attribute**. The properties of the new attribute are shown in the **Configuration** pane. +5. In the **External Name** box, enter a unique external name for the attribute. This is the name by which other objects can access the attribute. The name must be ArchestrA compliant. See Naming Conventions for applicable restrictions. + +If you change this name later, you must manually update any references where the attribute name is passed as a string, for example, in the custom object editor. + +6. In the **Internal Name** box, enter a unique internal name for the attribute. This is the name by which you can refer to the attribute in the object’s code. The name must be C# compliant. The maximum length is 329 characters. + +If you change this name later, you must manually update any references where the attribute name is passed as a string. + +7. In the **Type** list, select a data type for the attribute. For available options, see ArchestrA Data Types. If the data type isn’t known in advance, select **Variant**. You can then set the data type as required using custom config time or run time code. +8. In the **Category** list, select a category for the attribute. The category determines who can write to the attribute and whether it is lockable in the template. It also determines whether the additional attribute options in the following steps are available or not. For more information, see ArchestrA Attribute Categories. +9. If you want to create custom config time and/or run time set handlers for the attribute, select the **Configuration Set** **Handler** and/or **Runtime Set Handler** check boxes. +10. Select the **Supports Calculated Quality and Calculated Time** check box if the object should be able to set the attribute’s quality and timestamp. This may be necessary if you use field data (with potentially Bad or Uncertain quality) to calculate the attribute’s value. If you clear this check box, the attribute’s quality is always Good, and the timestamp is always the object’s startup time. +11. Select the **Frequently Accessed** check box to mark the attribute as a “frequently accessed” attribute for the Galaxy Browser. (Users can enable a filter to only display these attributes in the Galaxy Browser.) +12. Select the **Advise only Active** check box if you want to implement “Advise Only Active” support for the attribute. For more information, see Configuring “Advise Only Active” Support for an Attribute. +13. In the **Value** box, enter the attribute’s default value. +14. Click the shield icon next to the **Value** box and select the attribute’s security classification. For available options, see ArchestrA Security Classifications. +15. To make the attribute an array: +a. Select the **Array** check box. The array properties appear. +b. In the **Array Length** box, enter the size of the array. +c. In the grid, enter default values for each array element. +1. Click **OK** to save the attribute, or go back to step 2 and add more attributes. + +### Creating a Default Attribute + +If you create an attribute with an external name of “PV,” this attribute is considered the object’s “default” attribute. This attribute is used when a reference only specifies the object name without any attribute name. For example, a script can refer to “Tank2Volume.PV” simply as “Tank2Volume”. The attribute “PV” is implied. + +### Creating a "Hidden" Attribute + +You can “hide” an attribute so that it doesn’t appear in the Galaxy Browser or Object Viewer by default. Other objects can still access the hidden attribute, but regular users won’t see it unless they explicitly choose to display hidden attributes. + +Some good reasons to create hidden attributes are: + +- To preserve private configuration data in the configuration database +- To preserve private run time data in the checkpoint file +- To allow private data to be transferred from the config time component to the run time component when the object is deployed + +**To create a hidden attribute** + +1. When defining the attribute in the Object Designer, prefix its external name with an underscore. For example, _MyHiddenAttribute. + +## Configuring Config Time Set Handlers + +You can configure a config time set handler for any attribute that can be written to at config time. The code in this set handler is executed every time a value is written to the attribute during configuration. The set handler can then accept the value and write it to the attribute, or reject it. For an example, see Example: Configuring a Config Time Set Handler. + +A set handler can also perform other actions, like modifying the values of other attributes or clamping a value. + +When rejecting a value, a config time set handler should not generate an alarm, event, or Logger message. Instead, return a localized message to the client. See the example in the section below. + +**To configure a config time set handler for an attribute** + +1. Make sure the **Configuration Set Handler** check box is selected in the attribute’s configuration. For more information, see Adding Attributes to an Object or Primitive. +2. In the Object Design View, expand the **Attributes** folder. +3. Expand the attribute name. +4. Double-click **Configtime Set Handler**. The code section for the config time set handler appears in the Visual Studio code editor. +5. Enter the code for the config time set handler. When you are done, save your changes. + +### Example: Configuring a Config Time Set Handler + +Assume you want to return a custom, localized error message to the configuration client if the requested value for an attribute “Attr1” is out of range. First, you set up the error message in the object dictionary. Let’s say you give it an ID of 10001 (IDs up to 10000 are reserved for standard messages). Then you code the config time set handler for Attr1 to look something like this: + +```csharp +if () +{ + Attr1 = e.value; // set the new value +} +else +{ + // Reject the value and set the error message if the value is out of range + e.Message = GetText(10001); // ID of your error message +} +``` + +Now, when an invalid message is written to the attribute at config time, the localized message corresponding to the ID 10001 is shown. + +## Configuring Run Time Set Handlers + +You can configure a run time set handler for any attribute that can be written to at run time. The code in this set handler is executed whenever anyone other than the primitive logic associated with that attribute attempts to write to it. The set handler can then accept the value and write it to the attribute, or reject it. + +A set handler can also perform other actions, for example, modify the values of other attributes or clamp a value. + +When the set handler is called at run time, it is passed not only the new value, but also information about the client making the call (whether the client is a user, another object, or another primitive within the same object). The set handler can take this information into account when deciding whether to accept the new value. + +When rejecting a value, run time set handlers should not generate an alarm, event, or Logger message. Instead, return an appropriate error code to the client. See the example in the section below. The MxStatusDetail enumeration provides a number of standard error codes that you should use if they fit your object’s error situations. + +**To configure a run time set handler for an attribute** + +1. Make sure the **Runtime Set Handler** check box is selected in the attribute’s configuration. For more information, see Adding Attributes to an Object or Primitive. +2. In the Object Design View, expand the **Attributes** folder. +3. Expand the attribute name. +4. Double-click **Runtime Set Handler**. The code section for the run time set handler appears in the Visual Studio code editor. +5. Enter the code for the run time set handler. When you are done, save your changes. + +### Example: Configuring a Run Time Set Handler + +Assume you want to return a custom, localized error message to the client if the requested value for an attribute “Attr1” is out of range. First, you set up the error message in the object dictionary. Let’s say you give it an ID of 10001 (IDs up to 10000 are reserved for standard messages). Then you code the run time set handler for Attr1 to look something like this: + +```csharp +if () +{ + Attr1 = e.value; // set the new value +} +else +{ + // Reject the value and set the error status if the value is out of range + e.status.detail = 10001; // ID of your error message + e.status.Category = MxStatusCategory.MxCategoryOperationalError; + e.status.detectedBy = MxStatusSource.MxSourceRespondingAutomationObject; +} +``` + +When the client receives the error, the GetStatusDesc run time event handler is triggered. By default it returns the localized message corresponding to the ID that you put into `e.status.detail`, which is automatically passed to GetStatusDesc as `e.DetailedErrorCode`: + +```csharp +switch (e.detailedErrorCode) +{ + default: + e.status = GetText((int)e.detailedErrorCode); + break; +} +``` + +## Configuring Dynamic Attribute Set Handlers + +The ArchestrA Object Toolkit allows you to dynamically create attributes at config time or run time. For more information, see the documentation on the AddAttribute and DeleteAttribute methods in the *ArchestrA Object Toolkit* *Reference Guide*. As with regular attributes, you can create set handler code for these “dynamic” attributes. The ArchestrA Object Toolkit provides a special code section for this. + +Technically, there is only one set handler for all dynamic attributes. However, when this set handler is called, the name of the attribute that it’s called for is passed as an argument. By checking this name, you can branch your code and use different set handler code for different dynamic attributes. + +**To edit the dynamic attribute set handler code** + +1. In the Object Design View, expand the **Configtime** or **Runtime** folder, depending on which set handler you want to edit. +2. Double-click **Dynamic Attributes Set Handler**. The set handler region for dynamic attributes appears in the code editor. +3. Enter any required code, and then save your changes. + +### Example: Configuring a Set Handler for a Dynamic Attribute + +Assume your object has three dynamic attributes at config time: DynAtt1, DynAtt2, and DynAtt3. You want to assure that DynAtt1 is only set to positive values, whereas any values are valid for the other two attributes. You would configure a set handler like the following: + +```csharp +string attrName = Get(e.attributeHandle.shAttributeId, e.attributeHandle.shPrimitiveId, EATTRIBUTEPROPERTY.idxAttribPropName); // Get name of attribute for which set was made +if (attrName == "DynAtt1") // In this case, reject negative values +{ + if (e.Value < 0) + { + e.Message = string.Format("Value for {0} must be positive", attrName); + } + else + { + SetValue(attrName, e.Value); + } + return; +} +SetValue(attrName, e.Value); // In all other cases, just set the value +``` + +## Configuring Attribute Extensions + +You can “extend” an attribute’s functionality in the following ways: + +- Historizing the attribute +- Making the attribute alarmable + +The following sections explain how to configure these extensions in the Object Designer. + +Technically, the extension features are implemented as primitives. The following sections also include reference information on these primitives’ attributes. + +### Historizing an Attribute + +You can enable history for attributes of the following data types: Float, Double, Integer, Boolean, String, CustomEnum, and ElapsedTime. When you do this, the attribute’s run time values are historized according to the settings of the engine that the object is deployed to. (If historization is disabled for the engine, no attribute values are historized even if history is enabled for the attribute.) + +> **Note** +> Some attribute categories don’t support historization. For example, attributes that exist only at config time can’t be historized. + +As a guideline, enable history only for those attributes that most of your users would want to historize. If your users want to historize additional attributes, they can always do so by setting up attribute extensions in the ArchestrA IDE. + +Technically, when you enable history for an attribute, a history primitive is added to the object. You can make this primitive virtual so that your users can choose whether or not they actually need the history functionality. For information on the primitive’s attributes, see Attributes of the History Primitive. + +**To enable history for an attribute** + +1. Open the Object Designer. +2. In the **Shape** pane, click the attribute name. +3. In the **Configuration** pane, select the **Historizable** check box. The historization options appear. Depending on the attribute’s data type, some options may be disabled. +4. Configure the history options for the attribute: +a. In the **Engineering Units** list, select the attribute that contains the engineering units string for the attribute. (The list shows all string attributes defined in your object.) +b. In the **Value Deadband** box, enter the value deadband (in engineering units) for historization. If the attribute value changes, the new value is only historized if it exceeds this deadband. +c. In the **Trend Scale Max** and **Trend Scale Min** boxes, enter the default maximum and minimum scale values for showing the attribute’s data in a trend. +d. In the **Forced Storage Period** box, enter a time interval in milliseconds. The attribute value is always historized at this interval, regardless of whether it has changed. A value of 0 disables this setting, that is, attribute values are only historized if and when they change. +e. In the **Interpolation Type** list, select the interpolation type to be used. +f. In the **Rate Deadband** box, enter a deadband rate for swinging door storage (if applicable). +g. In the **Roll Over Value** box, enter the rollover value (only applicable if Counter retrieval will be used for this attribute’s data). +h. In the **Sample Count** box, enter the number of samples to be stored in the Active Image buffer of the Historian. +i. In the **Description** box, enter a description to be stored for the attribute on the Historian. This can also be a reference to an attribute that contains the description. +j. Select the **Enable Swinging Door** check box to enable swinging door storage. +1. Select the **Virtual** check box to make the history primitive virtual. + +This automatically enables the **Add Attribute to** **enable/disable History** check box as well. When this check box is enabled, an additional attribute named “.Historized” is added with config time set handler code to enable and disable the history primitive. You can simply add this attribute to the custom object editor to allow your users to enable or disable history for the attribute. If you don’t want this attribute, clear the check box. + +2. To lock or unlock any history option, click the padlock icon next to its input box. Locked options can’t be changed at run time. +3. Click **OK**, or go back to step 2 and configure history for additional attributes. + +#### Attributes of the History Primitive + +You can use the following attributes of the History primitive to monitor or re-configure it at config time and run time. + +| Name | Type | Category | Description | +| --- | --- | --- | --- | +| _EngUnitsAttrName | String | PackageOnly_Lockable | Name of the attribute that defines the engineering units string for the value being historized. Only applies to numerical attributes. | +| _InterPolationTypeEnum | String[3] | Constant | Possible interpolation types: "Stairstep", "Linear", "SystemDefault" | +| _ValueAttrName | String | PackageOnly_Lockable | Name of the attribute whose values should be historized. | +| Description | String | Writeable_USC_Lockable | A brief description for the historized attribute. May be a literal string or a reference to another string attribute containing the description. The content is only considered to be a reference if the reference is of the form "me.AttrName". By default, the object’s “ShortDesc” attribute is used. (Value can’t be set at run time.) | +| EnableSwingingDoor | Boolean | Writeable_USC_Lockable | Enable or disable swinging door storage. (Value can’t be set at run time.) | +| ForceStoragePeriod | Integer | Writeable_USC_Lockable | The time interval, in milliseconds, at which the value is always stored, regardless of the value deadband setting. Effectively, this allows a continuous storage interval to be superimposed upon the value deadband mechanism. A value less than or equal to 0 disables this feature. As an example, a setting of 360000 indicates the value must be stored once per hour (measured from the time the object was last put OnScan). A value less than the host engine’s scan period causes the forced storage to occur every scan cycle. | +| InterpolationType | Custom Enum | Writeable_USC_Lockable | Interpolation type (Stairstep, Linear, SystemDefault, or None). (Value can’t be set at run time.) | +| RateDeadBand | Float | Writeable_USC_Lockable | Deadband rate for swinging door storage. (Value can’t be set at run time.) | +| RolloverValue | Float | Writeable_USC_Lockable | Rollover value for Counter retrieval. (Value can’t be set at run time.) | +| SampleCount | Integer | Writeable_USC_Lockable | Number of samples to be stored in Active Image. (Value can’t be set at run time.) | +| TrendHi | Float | Writeable_USC_Lockable | The default top of the trend scale for clients. Must be greater than or equal to TrendLo. | +| TrendLo | Float | Writeable_USC_Lockable | The default bottom of the trend scale for clients. Must be less than or equal to TrendHi. | +| ValueDeadBand | Float | Writeable_USC_Lockable | The amount, in engineering units, by which the value of the historized attribute must change in order for the new value to be historized. A value of 0 means that all new values are historized. Also, when the attribute’s quality changes, the value is always historized regardless of this setting. Only expose this attribute in the configuration environment for numerical datatypes such as Float, Double, or Integer. | + +### Making an Attribute Alarmable + +To configure alarms for an attribute, you create an additional Boolean attribute for each alarm type that you want to enable. Then, you enable the alarm extension and configure alarm options for each of these Boolean attributes. Finally, you create custom code that checks for the alarm conditions and changes the value of the these Boolean attributes accordingly to raise or clear the respective alarms. An alarm is active when the alarmed Boolean attribute is True, and inactive when it is False. + +For an example, see Example: Configuring a Value Alarm for an Attribute. + +> **Caution** +> Simply making an attribute alarmable does not ensure that the alarm condition is actually monitored at run time! You must create custom run time code that checks for the alarm condition and raises or clears the alarm as required. The alarm extension only *reports* the alarm to the alarm system, but it does not *detect* it on its own. + +As a guideline, configure only those alarms that most of your users would want to enable. If your users want to configure additional alarms, they can always do so by setting up attribute extensions in the ArchestrA IDE. + +Technically, when you make an attribute alarmable, an alarm primitive is added to the object. You can make this primitive virtual so that your users can choose whether or not they actually need the alarm functionality. For information on the primitive’s attributes, see Attributes of the Alarm Primitive. + +We recommend that you lock any alarm settings that you don’t expect your users to change (such as the alarm category). + +**To make an attribute alarmable** + +1. Open the Object Designer. +2. In the **Shape** pane, click the Boolean attribute name. +3. In the **Configuration** pane, select the **Alarmable** check box. +4. In the **Category** list, select the category to be shown for the alarm. Use the main categories as follows: + +| Category | Purpose | +| --- | --- | +| Value | Limit alarms (LoLo, Lo, Hi, HiHi) | +| Deviation | Deviation from a setpoint (major, minor) | +| ROC | Rate-of-change alarms (value changes slower or faster than expected) | +| Batch | Alarms or events associated with a batch process | +| Discrete | Discrete alarms | +| Process | Alarms or events associated with the physical process/plant | +| SPC | SPC alarms (out-of-spec, out-of-control, “run rules;” etc.) | +| System | Alarms or events associated with the automation system | +| Software | Alarms or events associated with a software operation/logic (such as “divide by zero” in a script) | + +1. In the **Priority** box, enter a priority for the alarm (0 = highest, 999 = lowest). +2. Optionally, in the **Engineering Units** list, select the attribute that contains the engineering units string for the attribute. (The list shows all string attributes defined in your object.) +3. Optionally, in the **Value** list, select the attribute whose value the alarm relates to. +4. Optionally, in the **Limit** list, select the attribute that contains the alarm limit value. +5. Optionally, in the **Description** list, select the attribute whose value should be used as the alarm description. +6. Select the **Virtual** check box to make the alarm primitive virtual. + +This automatically enables the **Add Attribute to** **enable/disable Alarm** check box as well. When this check box is enabled, an additional attribute named “.Alarmed” is added with config time set handler code to enable and disable the alarm primitive. You can simply add this attribute to the custom object editor to allow your users to enable or disable the alarm. If you don’t want this attribute, clear the check box. + +7. To lock or unlock any alarm option, click the padlock icon next to its input box. Locked options can’t be changed at run time. +8. Click **OK**, or go back to step 2 and configure alarms for additional attributes. + +#### Example: Configuring a Value Alarm for an Attribute + +Assume you want to set up a HiHi value alarm for an Integer attribute named “AlmAtt1.” To do this, you would follow these general steps: + +1. Create attributes to manage the alarm. You need at least the Boolean attribute that represents the alarm condition. In this example, we will also set up attributes for the limit value and description of the alarm. It’s convenient to group these attributes in a separate primitive. So, add a new local primitive with an empty external name and the following attributes: + +| Name | Data type | Description | +| --- | --- | --- | +| AlmAtt1.HiHi | Boolean | Indicates if the alarm condition is met | +| AlmAtt1.HiHi. Limit | Integer | HiHi limit value | +| AlmAtt1.HiHi. AlmDesc | String | Alarm description/comment | + +1. Make AlmAtt1.HiHi alarmable (see Making an Attribute Alarmable). Set the category to “ValueHiHi” and specify a priority. Set the **Value** attribute to “AlmAtt1,” the **Limit** attribute to “AlmAtt1.HiHi.Limit,” and the **Description** attribute to “AlmAtt1.HiHi.AlmDesc.” +2. Add code to the Execute run time event handler of the local primitive you added. The code should: + - Check the value of AlmAtt1 to see if it exceeds the value of AlmAtt1.HiHi.Limit. + - If yes, and AlmAtt1.HiHi is False (that is, the actual alarm condition has just occurred), set AlmAtt1.HiHi to True. If AlmAtt1.HiHi is already True, there is no need to set it again. + - If no, and AlmAtt1.HiHi is True (that is, the value has just returned to normal), set AlmAtt1.HiHi to False. If AlmAtt1.HiHi is already False, there is no need to set it again. + +Now, when the value of AlmAtt1 exceeds its limit at run time, the primitive code detects this and sets AlmAtt1.HiHi to True. Because you made AlmAtt1.HiHi alarmable, its alarm primitive detects this change in value and reports an alarm using the information that you configured (Category = HiHi, value = current value of AlmAtt1, etc.) + +#### Attributes of the Alarm Primitive + +You can use the following attributes of the Alarm primitive to monitor or re-configure it at config time and run time. + +| Name | Type | Category | Description | +| --- | --- | --- | --- | +| _AlmEngUnitsAttrName | String | PackageOnly_Lockable | Name of the attribute containing the Engineering Units string. | +| _AlmValueAttrName | String | PackageOnly_Lockable | Name of the attribute whose value is monitored for the alarm condition. | +| _CategoryEnum | String [14] | Constant | Possible values for the Category attribute: Discrete, Value LoLo, Value Lo, Value Hi, Value HiHi, DeviationMinor, DeviationMajor, ROC Lo, ROC Hi, SPC, Process, System, Batch, Software | +| _ConditionAttrName | String | PackageOnly_Lockable | Name of the Boolean attribute that represents the alarm condition. | +| _LimitAttrName | String | PackageOnly_Lockable | Name of the attribute that contains the limit value for the alarm condition. | +| Acked | Boolean | Calculated | Indicates whether the alarm is acknowledged. This attribute is updated when a user sets the AckMsg attribute. It is always set to false when a new alarm condition is detected (that is, when the InAlarm attribute changes from false to true). | +| AckMsg | String | Writeable_US | Operator acknowledgement comment. **Run time set handler:** Stores received text and sets the Acked attribute to true. Also sets the TimeAlarmAcked attribute to the current time. | +| AlarmInhibit | Boolean | Writeable_US | When true, the alarm is disabled. This attribute is intended to be written to typically by a script or user or input extension. Only the individual alarm is disabled. No other alarms are disabled in the same object or in any assigned or contained objects. | +| AlarmMode | CustomEnum | Calculated Retentive | Current alarm mode (based on the commanded mode). | +| AlarmModeCmd | CustomEnum | Writeable_US | Currently commanded alarm mode. | +| Category | CustomEnum | Writeable_USC_Lockable | Category of the alarm. The label of each alarm category is fixed. See the _CategoryEnum attribute for possible values. **Run time set handler:** Ensures that the value is between 1 and 15. | +| DescAttrName | String | Writeable_USC_Lockable | Description for the alarm condition. May be a literal string or a reference to another string attribute containing the description. The content is only considered to be a reference if the reference is of the form "me.AttrName". By default, the object’s “ShortDesc” attribute is used. | +| InAlarm | Boolean | Calculated | This bit represents the alarm state. This is exactly the same as the attribute in the host primitive that represents the alarm condition except when the alarm state is disabled. In that case, InAlarm is set to false regardless of the actual condition state. | +| Priority | Integer | Writeable_USC_Lockable | Priority of the alarm. Valid values are 0 to 999. 0 is the highest priority. | +| TimeAlarmAcked | Time | Calculated | Time stamp indicating the last time the alarm was acknowledged. | +| TimeAlarmOff | Time | Calculated | Time stamp indicating the last time the alarm went off. | +| TimeAlarmOn | Time | Calculated | Time stamp indicating the last time the alarm went on. | + +## Adding Inputs and Outputs + +By adding inputs and outputs to your objects or primitives, you can read and write data to and from other ArchestrA objects. For example, your object could have an input that reads data from an attribute of a DIObject, which in turn reads data from an item in a physical PLC. + +Technically, inputs and outputs are implemented not as single attributes, but as primitives that expose multiple attributes. However, you can add and configure them much like attributes in the Object Designer. There are three types of input/output primitives: + +- **Input:** Reads values from an external reference. +- **Output:** Writes values to an external reference. +- **Input/Output:** Reads and writes values to and from an external reference. Optionally, the input reference can be different from the output reference, that is, values can be written to a different address than the one they are read from. + +An instance of the relevant primitive is added for every input or output that you configure. To read and write the I/O data at run time, you simply use the attributes of each primitive instance. + +### Adding an Input + +Using an input, you can read single data values from an external input source. Often, that source will be a DeviceIntegration object attribute that represents a register or piece of data in a field device, but you can configure any attribute of any AutomationObject as the input source. The actual reference is usually configured by the end user. + +If you know the expected data type, specify it and lock it in the Object Designer after you add the input. Give the input a useful external name that indicates its purpose to the end user. + +When you add a static (non-virtual) input primitive, wrapper classes are added automatically. Use these wrappers to access the input values, quality, and status at run time. For example: + +```csharp +if (Input1.Value.Quality == DataQuality.DataQualityGood) +{ + double myValue = Input1.Value; +} +``` + +For virtual input primitives, you can use the primitive’s attributes instead. For more information, see Attributes of the Input Primitive. + +For more information on input primitive wrappers and using the InputPrimitive wrapper to create instances of a virtual input primitive, see the *ArchestrA Object Toolkit* *Reference* *Guide*. + +**To add an input** + +1. Open the Object Designer. +2. In the **Shape** pane, select the location where you want to add the input. For example, if you want to add an input to a local primitive, select that primitive or one of its attributes. +3. In the **Shape** pane, click the down arrow next to the **Add** icon. +4. Click **Input**. A primitive node for the input is added to the object tree in the **Shape** pane. The properties of the new input are shown in the **Configuration** pane of the Object Designer. +5. In the **External Name** box, enter a unique external name for the input. This is the name by which other objects can access the input. The name must be ArchestrA compliant. +6. In the **Internal Name** box, enter a unique internal name for the input. This is the name by which you can refer to the input in the object’s code. The name must be C# compliant. +7. Select the **Virtual** check box.if the new input primitive should be virtual. +8. In the **Shape** pane, click the **DataType** item underneath the new primitive node. The **Configuration** pane now shows the data type properties. +9. In the **Value** list, select the data type for the input. +10. In the **Shape** pane, click the **InputSource** item underneath the new primitive node. The **Configuration** pane now shows the input source properties. +11. In the **Value** box, enter the input source reference. +12. Click **OK**, or go back to step 2 to add more inputs. + +#### Attributes of the Input Primitive + +You can use the following attributes of the Input primitive to monitor or re-configure it at config time and run time. + +| Name | Type | Category | Description | +| --- | --- | --- | --- | +| DataType | Data Type | Writeable_C_Lockable | Specifies the expected data type of the Value attribute. If you know the data type in advance, you’ll probably lock this attribute in the primitive. **Config time set handler:** Sets the Type property of the Value attribute to the matching type. Only can be done on templates, not instances. | +| InputSource | Reference | Writeable_USC_Lockable | Identifies the target attribute from which the value and quality are to be read. **Run time set handler:** Unregisters the old reference. Registers the new reference, sets Value.Quality to “Initializing,” and ReadStatus to “OK” (if the object is off scan) or “Pending” (if on scan). | +| ReadStatus | Status | Calculated | Indicates the cause of any errors while reading data from the input reference. This is the Message Exchange status, not the status of communication to external devices such as PLCs. The status is updated on every execution. If data is successfully received, but cannot be coerced to the specified data type, ReadStatus is set to “Configuration Error.” ReadStatus is set to “OK” when the object is off scan, and to “Pending” when it goes on scan. When Quality is “Bad,” ReadStatus can be OK or in error. | +| Value | Variant | Calculated | The value received from the input reference. The Value attribute is “calculated” using data received by a Message Exchange GetAttribute call. Quality can be one of the following: • “Initializing” when the object goes on scan. • “Bad” if data is successfully received, but cannot be coerced to the specified data type. • “Bad” when the object goes off scan. • The reported quality of the external data in all other cases. | +| • | “Initializing” when the object goes on scan. | | | +| • | “Bad” if data is successfully received, but cannot be coerced to the specified data type. | | | +| • | “Bad” when the object goes off scan. | | | +| • | The reported quality of the external data in all other cases. | | | + +### Adding an Output + +Using an output, you can write single data values to an external output destination. Often, that destination will be a DeviceIntegration object attribute that represents a register or piece of data in a field device, but you can configure any attribute of any AutomationObject as the output destination. The actual reference is usually configured by the end user. + +If you know the expected data type, specify it and lock it in the Object Designer after you add the output. Give the output a useful external name that indicates its purpose to the end user. + +When you add a static (non-virtual) output primitive, wrapper classes are added automatically. Use these wrappers to write output values and monitor the write status at run time. For example, to write an output value: + +```csharp +Output1.Value = myValue; +``` + +Or, to check the write status in a subsequent scan cycle: + +```csharp +MxStatus stat = Output1.WriteStatus; +if (stat.Category == MxStatusCategory.MxCategoryOk) +{ + (... any required code ...) +} +``` + +For virtual output primitives, you can use the primitive’s attributes instead. For more information, see Attributes of the Output Primitive. + +For more information on output primitive wrappers and using the OutputPrimitive wrapper to create instances of a virtual output primitive, see the *ArchestrA Object Toolkit* *Reference Guide*. + +**To add an output** + +1. Open the Object Designer. +2. In the **Shape** pane, select the location where you want to add the output. For example, if you want to add an output to a local primitive, select that primitive or one of its attributes. +3. In the **Shape** pane, click the down arrow next to the **Add** icon. +4. Click **Output**. A primitive node for the output is added to the object tree in the **Shape** pane. The properties of the new output are shown in the **Configuration** pane of the Object Designer. +5. In the **External Name** box, enter a unique external name for the output. This is the name by which other objects can access the output. The name must be ArchestrA compliant. +6. In the **Internal Name** box, enter a unique internal name for the output. This is the name by which you can refer to the output in the object’s code. The name must be C# compliant. +7. Select the **Virtual** check box.if the new output primitive should be virtual. +8. In the **Shape** pane, click the **DataType** item underneath the new primitive node. The **Configuration** pane now shows the data type properties. +9. In the **Value** list, select the data type for the output. +10. In the **Shape** pane, click the **OutputDest** item underneath the new primitive node. The **Configuration** pane now shows the output destination properties. +11. In the **Value** box, enter the output destination reference. +12. Click **OK**, or go back to step 2 to add more outputs. + +#### Attributes of the Output Primitive + +You can use the following attributes of the Output primitive to monitor or re-configure it at config time and run time. + +| Name | Type | Category | Description | +| --- | --- | --- | --- | +| DataType | Data Type | Writeable_C_Lockable | Specifies the expected data type of the Value attribute. If you know the data type in advance, you’ll probably lock this attribute in the primitive. | +| OutputDest | Reference | Writeable_USC_Lockable | Identifies the target attribute to which the value is to be written. **Run time set handler:** Unregisters the old reference. Registers the new reference and sets WriteStatus to “OK” (if the object is off scan) or “Pending” (if on scan). | +| Value | Variant | Calculated | The value to be written to the output destination. **Run time set handler:** Caches the new value and initiates a SupervisorySetAttribute call to the output destination on the object’s next execution. | +| WriteStatus | Status | Writeable_S | Indicates the cause of any errors while writing data to the output destination. This is the Message Exchange status and also, if the output destination is a DeviceIntegration object, the status of communication to the external device (such as a PLC). Updated on each attempt to write a new value only. If data is successfully sent, but cannot be coerced to the specified data type, WriteStatus is set to “Configuration Error.” WriteStatus is set to “OK” when the object is off scan. On a new write attempt, WriteStatus is initially set to the temporary value “Pending” until the write either succeeds or fails. If the output destination is in a DeviceIntegration object, the “Pending” state remains until the DeviceIntegration object returns (asynchronously) the actual completion status to its target, usually an external field device. | + +### Adding an Input/Output + +Using an input/output, you can read and write single data values to and from an external location. You can specify an input source that is different from the output destination. This will be the case when the input is read back from a secondary source location that is different from the output destination. Some field devices may be set up with separate input and output locations for security or robustness purposes. + +The actual references are usually configured by the end user. If you know the expected data type, specify it and lock it in the Object Designer after you add the input/output. Give the input/output a useful external name that indicates its purpose to the end user. + +When you add a static (non-virtual) input/output primitive, wrapper classes are added automatically. Use these wrappers to read/write I/O values and monitor the I/O status at run time. + +For virtual input/output primitives, you can use the primitive’s attributes instead. For more information, see Attributes of the Input/Output Primitive. + +For more information on input/output primitive wrappers and using the InputOutputPrimitive wrapper to create instances of a virtual input/output primitive, see the *ArchestrA Object Toolkit* *Reference Guide*. + +**To add an input/output** + +1. Open the Object Designer. +2. In the **Shape** pane, select the location where you want to add the input/output. For example, if you want to add an input/output to a local primitive, select that primitive or one of its attributes. +3. In the **Shape** pane, click the down arrow next to the **Add** icon. +4. Click **Input/Output**. A primitive node for the input/output is added to the object tree in the **Shape** pane. The properties of the new input/output are shown in the **Configuration** pane of the Object Designer. +5. In the **External Name** box, enter a unique external name for the input/output. This is the name by which other objects can access the input/output. The name must be ArchestrA compliant. +6. In the **Internal Name** box, enter a unique internal name for the input/output. This is the name by which you can refer to the input/output in the object’s code. The name must be C# compliant. +7. Select the **Virtual** check box.if the new input/output primitive should be virtual. +8. In the **Shape** pane, click the **DataType** item underneath the new primitive node. The **Configuration** pane now shows the data type properties. +9. In the **Value** list, select the data type for the input/output. +10. In the **Shape** pane, click the **Reference** item underneath the new primitive node. The **Configuration** pane now shows the input/output reference properties. +11. In the **Value** box, enter the output destination reference. This reference is also used as the input source unless you configure a separate input source. +12. To configure an input source that is different from the output destination: +a. In the **Shape** pane, click the **SeparateFeedbackConfigured** item underneath the new primitive node. In the **Configuration** pane, select the **true/false** check box. +b. In the **Shape** pane, click the **ReferenceSecondary** item underneath the new primitive node. In the Configuration pane, enter the input source reference in the **Value** box. +1. Click **OK**, or go back to step 2 to add more inputs/outputs. + +#### Attributes of the Input/Output Primitive + +You can use the following attributes of the Input/Output primitive to monitor or re-configure it at config time and run time. + +| Name | Type | Category | Description | +| --- | --- | --- | --- | +| DataType | Data Type | Writeable_C_Lockable | Specifies the expected data type of the ReadValue and WriteValue attributes. If you know the data type in advance, you’ll probably lock this attribute in the primitive. | +| ReadStatus | Status | Calculated | Indicates the cause of any errors while reading data from the input reference. This is the Message Exchange status, not the status of communication to external devices such as PLCs. The status is updated on every execution. If data is successfully received, but cannot be coerced to the specified data type, ReadStatus is set to “Configuration Error.” ReadStatus is set to “OK” when the object is off scan, and to “Pending” when it goes on scan. When Quality is “Bad,” ReadStatus can be OK or in error. | +| ReadValue | Variant | Calculated | The value received from the input reference. The ReadValue attribute is “calculated” using data received by a Message Exchange GetAttribute call. Quality can be one of the following: • “Initializing” when the object goes on scan. • “Bad” if data is successfully received, but cannot be coerced to the specified data type. • “Bad” when the object goes off scan. • The reported quality of the external data in all other cases. | +| • | “Initializing” when the object goes on scan. | | | +| • | “Bad” if data is successfully received, but cannot be coerced to the specified data type. | | | +| • | “Bad” when the object goes off scan. | | | +| • | The reported quality of the external data in all other cases. | | | +| Reference | Reference | Writeable_USC_Lockable | Identifies the target attribute to which the value is to be written. If no separate input reference is specified, this also serves as the input reference. **Run time set handler:** Unregisters the old reference. Registers the new reference and sets WriteStatus to “OK” (if the object is off scan) or “Pending” (if on scan). | +| ReferenceSecondary | Reference | Writeable_USC_Lockable | If the SeparateFeedbackConfigured attribute is set to TRUE, ReferenceSecondary identifies the source attribute from which the value and quality are to be read. If left empty, both the input and output use the single location specified in the Reference attribute. **Run time set handler:** Unregisters the old reference. Registers the new reference, sets Value.Quality to “Initializing,” and ReadStatus to “OK” (if the object is off scan) or “Pending” (if on scan). **Config time set handler:** Only allows this attribute to be set if SeparateFeedbackConfigured is TRUE. | +| SeparateFeedback Configured | Boolean | PackageOnly_Lockable | Specifies whether the primitive receives input data from a source address that is different from the output destination. | +| WriteStatus | Status | Writeable_S | Indicates the cause of any errors while writing data to the output destination. This is the Message Exchange status and also, if the output destination is a DeviceIntegration object, the status of communication to the external device (such as a PLC). Updated on each attempt to write a new value only. If data is successfully sent, but cannot be coerced to the specified data type, WriteStatus is set to “Configuration Error.” WriteStatus is set to “OK” when the object is off scan. On a new write attempt, WriteStatus is initially set to the temporary value “Pending” until the write either succeeds or fails. If the output destination is in a DeviceIntegration object, the “Pending” state remains until the DeviceIntegration object returns (asynchronously) the actual completion status to its target, usually an external field device. | +| WriteValue | Variant | Calculated | The value to be written to the output destination. **Run time set handler:** Caches the new value and initiates a SupervisorySetAttribute call to the output destination on the object’s next execution. | + +## Supporting Buffered Data + +If a given attribute changes its value several times during a single scan cycle, the values of multiple data changes within a single scan typically are overwritten and only the last value is retrieved. This is called data folding. The Buffered Data feature ensures that there is no folding of data. + +AOT provides the ability to read and write buffered data by means of the following two .Net classes: + +- VtqBufferReader +- VtqBufferWriter + +> **Note** +> These classes are available in the ArchestrA.Toolkit.VtqBuffer.dll, a managed C++ assembly that comes with AOT. + +### Enabling Buffered Data for a Config-time Dynamic Attribute + +You can enable the buffer property of a config-time dynamic attribute either from the package code, or the editor code. + +For package code, use the following: + +```csharp +Set("Attribute1", EATTRIBUTEPROPERTY.idxAttribPropHasBuffer, true); +``` + +For editor code, use the following: + +```csharp +SetData("Attribute1", "hasbuffer", 1); +``` + +Enter false (or “0”) as the last parameter to disable the buffer property. + +> **Note** +> You can enable the buffer property and the VtqBufferWriter for OnObject config-time dynamic attributes. You can initialize VtqBufferReader for both OnObject and OffObject config-time dynamic attributes. Even if the config-time dynamic attribute is located on OnObject, you cannot use Editor functions SetData and GetData, and Runtime functions Set and Get, if the attribute reference contains an object name. For example, **myTestAOT_001.myuda**. + +### Initializing VtqBufferReader + +You need to declare VtqBufferReader to support buffer processing at run time. The VtqBufferReader class is derived from IEnumerable, which allows it to be used in a C# foreach statement. + +The VTQ value type may be Boolean, integer, float, double, string, data time, or time span. + +The following are examples of VTQ’s time stamp and quality: + +```csharp +DateTime TimeStamp +CMxDataQualith Quality +``` + +**To support buffer processing at run time** + +1. Declare a VtqBufferReader in your object’s Run-time class definition. For example: + +```csharp + VtqBufferReader Reader; +``` + +1. Initialize the VtqBufferReader in the Run-time Startup code. For example: + +```csharp + Reader = new VtqBufferReader(this, "me.Attribute1"); +``` + +1. Process the buffer in the Run-time Execute code. For example: + +```csharp + foreach (vtq in vtqBufReader) + { + // do something with vtq.Value, vtq.TimeStamp and vtq.Quality + } +``` + +### Using VtqBufferWriter + +The VtqBufferWriter class provides an assortment of AddVtq overloads, one of which is called multiple times to build a buffer of VTQs. Call Getbuffer to retrieve the accumulated buffer from the VtqBufferWriter. The buffer is returned as a custom structure contained in a CMxValue. GetBuffer empties the buffer in the underlying buffer writer. + +**To support writing a buffer at run time** + +1. Declare a VtqBufferWriter instance. For example: + +```csharp + VtqBufferWriter vtqBufWriter; +``` + +1. Initialize the VtqBufferWriter. For example: + +```csharp + vtqBufWriter = new VtqBufferWriter (); +``` + +1. Create instances of Value, Time, and Quality. For example: + +```csharp + Bool V = true; + DateTime T = DateTime.Now; + CMxDataQuality Q = new CMxDataQuality(DataQuality.DataQualityGood); +``` + +1. Add multiple VTQs to VtqBufferWriter. For example: + +```csharp + vtqBufWriter.AddVtq(V,T,Q); + vtqBufWriter.AddVtq(V,T,Q); + vtqBufWriter.AddVtq(V,T,Q); + vtqBufWriter.AddVtq(V,T,Q); + vtqBufWriter.AddVtq(V,T,Q); +``` + +1. Get the buffer from VtqBufferWriter and write to the buffered attribute. For example: + +```csharp + CMxValue mxvalBuffer = vtqBufWriter.GetBuffer(); + AttributeHandle attrHandle = GetAttributeHandle(“Attribute1”); + Set(attrHandle.shAttributeId, attrHandle.shPrimitiveId, EATTRIBUTEPROPERTY.idxAttribPropBuffer, mxvalBuffer); +``` + +## Configuring "Advise Only Active" Support for an Attribute + +You can implement “Advise Only Active” support for attributes in your objects and primitives. This allows you to configure individual attributes to stop updating if noone is subscribing to them. This reduces the processing and network load. + +When you enable “Advise Only Active” support for an attribute, the Application Server infrastructure continually monitors whether there are active subscriptions to that attribute. When there are no (or no more) subscriptions, it calls a special, attribute-specific method to notify the attribute that it should suspend updates. When the first subscription starts, Application Server calls the same method again to notify the attribute that it should resume updates. You can customize this method for each attribute to suspend or resume subscriptions to any data sources that the attribute uses. + +Typically, you would only implement “Advise Only Active” support for attributes that are associated with “live” updates from external sources, for example, an input or an attribute in another object that your object subscribes to via Message Exchange. For example, if noone is polling the value of a calculated attribute that uses an value from an input primitive, you could stop requesting the value so as to reduce the load on the associated I/O server and network. + +You can implement “Advise Only Active” support for all attribute types and categories that are available at run time. + +Note the following: + +- Before you can implement “Advise Only Active” support for individual attributes, you must enable it on the ApplicationObject level. For more information, see Enabling “Advise Only Active” Support for the Object. To use “Advise Only Active” in a reusable primitive, it must be enabled in the containing object. +- When you enable “Advise Only Active” support for an ApplicationObject, all Input and InputOutput primitives within the object (including its child primitives) are suspended automatically on startup. In most cases, this should fit your needs. However, if you have any attributes that are not configured for “Advise Only Active” and that require data from these Input or InputOutput primitives at each scan, you must activate these inputs at startup time by calling their ActivateUpdatesList() methods. For example, `Input1.ActivateUpdatesList();`. + +**To implement “Advise Only Active” support for an attribute** + +1. Enable the “Advise Only Active” option for the attribute: +a. Open the Object Designer. +b. In the **Shape** pane, click the attribute name. +c. In the **Configuration** pane, select the **Advise only Active** check box. +d. Click **OK**. +The ArchestrA Object Toolkit automatically adds a method named “*AttributeName*_AdviseOnlyActive()” to the run time code. This is the method that the Application Server infrastructure calls to notify the attribute that it should suspend or resume updates. + +1. In the Object Design View, expand the **Attributes** folder. Expand the attribute name. +2. Double-click the contained **Advise only Active** node. The “*AttributeName*_AdviseOnlyActive()” method section of the run time code file appears in the Visual Studio code editor. +3. The `if (suspending)` branch is executed when Application Server determines that there are no more subscriptions to the attribute. Enter code here to suspend updates from any data sources that the attribute uses. For example: + - If the data source is an Input or Input/Output primitive, call its SuspendUpdatesList() wrapper method. + - If the data source is an attribute in another object, use the CMxIndirect.Suspend() method. +1. The `else` branch is executed when subscriptions to the attribute start again. Enter code here to re-activate updates from any data sources that the attribute uses. For more information on available methods, see the *ArchestrA Object Toolkit* *Reference Guide*. +2. When you are done, save your work. + +## Renaming or Deleting Attributes + +You can rename or delete attributes even if other places in your object already refer to them. Note the following: + +- When you change the *internal name* of an attribute, references in your object are automatically updated. However, you must manually update any references where the internal name is passed as a string. +- When you change the *external name* of an attribute, you must manually update any references where the external name is passed as a string. This includes any references in the custom object editor or GetValue/SetValue calls. +- When you delete an attribute, references in your object are automatically checked and updated, but you must manually update any references where the internal or external name is passed as a string. diff --git a/aot/dev-guide/07-internationalizing.md b/aot/dev-guide/07-internationalizing.md new file mode 100644 index 0000000..93dfea9 --- /dev/null +++ b/aot/dev-guide/07-internationalizing.md @@ -0,0 +1,85 @@ +# Internationalizing Objects + +If your object will be used in localized environments, you can internationalize it by defining a multilingual dictionary that contains translated strings for the target locales. At run time, the object can retrieve the appropriate strings for the locale it is used in, and show those translated strings to the end user. + +## About Internationalizing Objects + +By internationalizing an object, you enable it to run in various language environments and use different translated text messages, prompts, etc. in each case. For example, assume that you develop a complex object with its own custom editor pages. Customers in North America would expect to see English editor pages. On the other hand, customers in South America might use the object on a Spanish operating system and expect to see the editor pages in Spanish. + +One way to do this is to create and maintain separate language versions of the object. However, this makes it very hard to maintain and update your code. A better way is to maintain one object version that will use the correct translated strings depending on the locale it is used in. + +To do this, you separate the object’s code (which works identically in all locales) from the translatable text phrases (which are different for each locale). The translatable content in the code is replaced with abstract phrase IDs. The object then retrieves the appropriate translated content for whatever phrase ID it needs, when it needs it. + +If an ApplicationObject contains local primitives, all local primitives use the object’s main dictionary. Reusable primitives, on the other hand, have their own dictionary. + +To internationalize your objects, the ArchestrA Object Toolkit provides: + +- An object dictionary that stores translated strings for each resource ID +- A function to retrieve translated strings for a resource ID + +For more information, see Configuring the Object Dictionary and Retrieving Localized Dictionary Strings. + +## Configuring the Object Dictionary + +For each translatable resource (“phrase”), the object dictionary defines an ID and translated strings for all locales that the object will be used in. You could visualize it as a table like the following: + +| Phrase ID | English | Spanish | German | +| --- | --- | --- | --- | +| idsWelcome | Welcome | Bienvenidos | Willkommen | +| idsValve1 | Valve 1 | Válvula 1 | Ventil 1 | +| ... | ... | ... | ... | + +When you request the phrase “idsWelcome” on an English operating system, you get the string “Welcome.” On a Spanish operating system, you get “Bienvenidos” instead, and so on. + +The object dictionary is saved as an XML file with the .aaDCT extension. By default, it contains only a sample entry, and you have to add phrases and translations before you can use it. + +You can edit the dictionary using any text editor or a special XML editor. For more information, see Dictionary File Format and Structure and Editing the Dictionary in Visual Studio. + +### Dictionary File Format and Structure + +The XML dictionary file has the following structure: + +```csharp + + + + English string + + + String translated into German + + ... more elements for other languages ... + + + ... elements ... + + +``` + +There is a single `Phrase_Index` element for every translatable string. Its `PhraseID` attribute defines the ID by which you can access the string. + +Each `Phrase_Index` element contains one `Language` element for each language-specific translation of the string. The `LangID` attribute of the `Language` element specifies the locale that the translation applies to. + +Each `Language` element contains a single `VALUE` element with the translated string for the specified locale. + +### Editing the Dictionary in Visual Studio + +You can directly edit the object dictionary using the built-in Visual Studio editor. + +**To edit the dictionary in Visual Studio** + +1. In the Object Design View, double-click **Dictionary**. Visual Studio opens a tab with the dictionary file. + +You can now add or edit strings according to the dictionary XML structure (see Dictionary File Format and Structure). + +## Retrieving Localized Dictionary Strings + +To retrieve a localized dictionary string at config time or run time, simply use the GetText method. For example: + +```csharp +GetText("idsError"); +``` + +This statement gets the translation for the dictionary entry with the ID “idsError” for the default locale of the process it is called from. For config time code, this is the default locale of the Galaxy,that is, the OS locale at the time the Galaxy was created. + +For more information, see the documentation on the GetText method in the *ArchestrA Object Toolkit Reference Guide*. diff --git a/aot/dev-guide/08-building-and-versioning.md b/aot/dev-guide/08-building-and-versioning.md new file mode 100644 index 0000000..36028ae --- /dev/null +++ b/aot/dev-guide/08-building-and-versioning.md @@ -0,0 +1,265 @@ +# Building and Versioning Objects + +By building your object, you create an .aaPDF object file that you can import and use in Wonderware Application Server. You can: + +- **Configure build options.** You can configure various options concerning the build process. +- **Validate your object.** This allows you to find errors that would cause problems when building or using the object but that can’t be discovered by Visual Studio’s standard checking process. +- **Manage object versions.** You can specify whether to increment the object’s major or minor version with a build. You can also override the auto-generated version number in the object properties. +- **Start the build process.** The ArchestrA Object Toolkit can automatically import, instantiate and deploy the object as part of the build process. +- **Analysing migration requirements.** If you are developing a new version of an existing object, the ArchestrA Object Toolkit can help you to structure the code for migrating the existing object. + +## Validating an Object + +Validating an object allows you to find errors that would cause problems when building or using the object but that can’t be discovered by Visual Studio’s standard checking process. This is particularly important if you have edited the object’s code directly. For example, you might try to assign a value of an invalid type to an attribute. This type of error is invisible to Visual Studio, but can be discovered by validating the object. + +Your object is validated automatically when: + +- You open the Object Designer. +- You build the object. +- You refresh the Object Design View. + +You can also start validation manually. + +The validation process reports any warnings and errors in the Logger view and, where appropriate, tries to fix the underlying issues. The warning and error messages are self-explanatory, so they are not duplicated here. + +If the validation process detects any errors, you must fix them before you can build or debug the object, use the Migrate analysis, open the Object Designer, or update the Object Design View. These features are disabled until you fix the errors and revalidate the object. + +**To start validation manually** + +1. In the ArchestrA Object Toolkit toolbar, click the **Validate** icon. + +## Configuring Build Options + +You can configure build options for all ArchestrA Object Toolkit projects or just the current project. + +- When you configure build options while no ArchestrA Object Toolkit project is opened, they apply as defaults for all ArchestrA Object Toolkit projects on that computer. When you move a project to a different computer, it uses the defaults configured on that computer. +- When you configure build options while an ArchestrA Object Toolkit project is opened, they apply to the current project and override the defaults. In this case, you can work with the defaults as follows: + - To restore a certain category of build options to its default values, click the **Default** button on its property page. + - To set the current values as the new default values for a certain category of build options, click the **Set** **Default** button on its property page. + +You can configure the following build options: + +- Output preferences to copy the build output to additional locations +- Galaxy preferences to specify the working Galaxy for the various build modes +- Additional seach paths for reusable primitives and dependent files + +### Configuring Output Preferences + +By default, the build output (.aaPDF or .aaPRI file) is saved in the \Output subfolder of your project folder. Optionally, the ArchestrA Object Toolkit can copy the build output to a custom location. When building a reusable primitive, the .aaPRI file can be copied to the common ArchestrA folder for reusable primitives. + +**To configure output preferences** + +1. In the ArchestrA Object Toolkit toolbar, click the **Options** icon. The **Options** dialog box appears with the **Build** category selected. +2. To copy the build output to a custom folder, select the **Copy output package to specified folder** check box and use the browse button to select the folder. +3. To copy reusable primitives to the common ArchestrA folder for reusable primitives after they have been built, select the **Copy reusable primitives to ArchestrA Common** check box. The base folder is always C:\Program Files\Common Files\ArchestrA\ReusablePrimitives. In that folder, the ArchestrA Object Toolkit creates a vendor subfolder based on the vendor name that you configured for the primitive. + +On a 64-bit operating system, the base folder is C:\Program Files (x86)\Common Files\ArchestrA\ReusablePrimitives. + +4. Click **OK**. + +### Configuring Galaxy Preferences + +When you build an object, the ArchestrA Object Toolkit can optionally import, instantiate and deploy the new object version in a Galaxy so that you can test it. For more information, see Building an Object. You can specify which Galaxy to use for this. + +**To configure Galaxy preferences** + +1. In the ArchestrA Object Toolkit toolbar, click the **Options** icon. The **Options** dialog box appears. +2. In the left pane, click **Galaxy**. The Galaxy options appear in the right pane. +3. In the **GR Node Name** box, enter the name of the Galaxy Repository node. In most cases, it will be best to use a Galaxy Repository on the local machine. Otherwise, the build process can’t automatically restart the Application Server processes to make sure that the latest object version gets used. +4. In the **Galaxy** list, enter or select the name of the Galaxy to use. +5. If security is enabled for the Galaxy, enter the credentials in the **User Name** and **Password** boxes. +6. In the **Assign to Area** box, enter the name of the Area object that instances of your object should be assigned to. +7. To test the Galaxy connection, click **Test**. +8. Click **OK**. + +### Configuring Additional Search Paths + +You can configure additional seach paths for dependent files. This gives you more flexibility because you can store your development files in multiple locations. + +**To configure additional search paths** + +1. In the ArchestrA Object Toolkit toolbar, click the **Options** icon. The **Options** dialog box appears. +2. In the left pane, click **Search Paths**. The **Locations** list appears in the right pane. +3. Edit the **Locations** list as follows: + - To add the first entry, enter the search path in the text box, or click the browse button and select a path. Press Enter to confirm. + - To add another entry, click the blank entry at the end of the list twice. The entry changes into editing mode. Enter the path as described above. + - To edit an existing entry, click it twice to change into editing mode, then make your changes as described above. +1. Click **OK**. + +## Managing an Object's Versions + +An ApplicationObject has a version number that consists of a major version and a minor version. For example, “1.3” where 1 is the major version and 3 is the minor version. This version number helps Wonderware Application Server distinguish object versions and detect any migration requirements. + +When you build your object, you can keep the current version number, or you can automatically increment the minor or major version. You can also specify the version numbers manually in the object properties. + +While developing an object, it is safest to have the major version number increment automatically on new builds. This helps avoid problems if you change the object shape but forget to increment the major version accordingly. + +### Building a New Minor Version of an Object + +You usually increment an object’s minor version after making small changes to the object code. For example, you should increment the minor version after fixing bugs or making optimizations. If you change the object shape in any way, you must increment the major version instead. + +When you build a new minor version of an object, you can choose to automatically restart Application Server processes. This is necessary if you have already imported a previous version of the object with the same major version into your Application Server working Galaxy. If you don’t restart the processes, Application Server continues to use the previous version even after you import the new minor version. + +Depending on which components of your object have changed, you must restart different processes: + +- After making changes to **config time** code, you must restart the **aaGR** and **IDE** processes. +- After making changes to **run time** code, you must restart the **Bootstrap** process. +- After making changes to **custom object editor** code, you must restart the **IDE** process. + +When you build a new minor version and restart the processes, the ArchestrA Object Toolkit performs the following steps in the order listed: + +1. Undeploys existing instances of the object +2. Deletes existing instances of the object +3. Deletes the existing object template(s) +4. Stops the processes +5. Builds the object +6. Restarts the processes +7. Performs any other steps as defined by the build mode (import. instantiate, deploy) + +The ArchestrA Object Toolkit can only restart processes running on the local machine. For example, if you are using a remote Galaxy Repository (GR) machine or if you have deployed your object to a remote machine, you must restart the relevant processes manually. To specify the GR node, see Configuring Galaxy Preferences. + +**To build a new minor version of an object** + +1. In the ArchestrA Object Toolkit toolbar, click the **Options** icon. The **Options** dialog box appears. +2. In the left pane, click **Version**. +3. Select the **Increment Minor Version** option. +4. Select the **Restart Bootstrap**, **Restart aaGR** and **Restart IDE** check boxes as required (see above). If you select **Restart** **aaGR**, **Restart IDE** is always selected as well. +5. Click **OK**. +6. Build your object. + +### Building a New Major Version of an Object + +You increment an object’s major version after making extensive changes to the object code, behavior and/or shape. For example, you should increment the major version after adding or renaming attributes. This alerts the user that the new version may not behave the same as previous versions, which might impact the user’s application. + +While you develop an object, we recommend that you use this setting to have the major version number increment automatically on new builds. This helps avoid problems if you change the object shape but forget to increment the major version accordingly. + +When you build an object with a new major version, you can choose to automatically delete the old version’s templates and instances from your working Galaxy. Alternatively, you can have the new version imported with the version number appended to the template name. This allows you to keep multiple versions of the same template in the Galaxy without having to manually rename existing templates. + +**To build a new major version of an object** + +1. In the ArchestrA Object Toolkit toolbar, click the **Options** icon. The **Options** dialog box appears. +2. In the left pane, click **Version**. +3. Select the **Increment Major Version** option. +4. Specify what to do with existing templates and instances if the ArchestrA Object Toolkit automatically imports the new object version into the Galaxy. + - To keep the old template version and import the new version with the version number appended to its name, select the **Append version number to template** **name** check box. + - To delete all previous versions of the object template (as determined by its vendor and object name), select the **Delete all templates with the same vendor and** **object name** check box. Any instances of these templates are deleted too. + - To delete all previous versions of the object template and import the new version with the version number appended to its name, select the **Delete all templates** **and append version number** check box. +1. Click **OK**. +2. Build your object. + +### Creating a New Build without Incrementing the Version Number + +You can create a new build without incrementing the object’s current version number. For example, you would do this if: + +- You are using an automated build system that only recompiles the project. +- You set the final version number manually before release and don’t want the final build to increment that number. + +When you build an object using this option, the only available build modes are **Build** and **Build & Swap**. + +**To build an object without incrementing the version number** + +1. In the ArchestrA Object Toolkit toolbar, click the **Options** icon. The **Options** dialog box appears. +2. In the left pane, click **Version**. +3. Select the **Retain current version number** option. +4. Click **OK**. +5. Build your object. + +### Manually Specifying the Version Number + +If you want to reset the auto-generated version number, you can manually specify the object’s version number. + +**To manually specify the version number** + +1. Open the Object Designer. +2. In the **Shape** pane, click the object name. The object properties appear in the **Configuration** pane on the right. +3. In the **Major Version** and **Minor Version** boxes, enter the object’s major and minor version. If you increment the major version, you should reset the minor version to 1. +4. Click **OK**. + +## Building an Object + +After you have set all build and versioning options and validated your object, you can build it. This creates an .aaPDF object file that you can import and use in Wonderware Application Server. + +The ArchestrA Object Toolkit can automatically import, instantiate and deploy the object as part of the build process. To specify this, use the **Mode** list in the ArchestrA Object Toolkit toolbar. + +The following build modes are available: + +| Build Mode | Description | +| --- | --- | +| **Build** | Creates an .aaPDF file of the object in the **\Output** subfolder of the Visual Studio solution folder. | +| **Build & Import** | Creates an .aaPDF file as outlined above, and then imports the template into the working Galaxy. | +| **Build & Inst** | Creates an .aaPDF file as outlined above, imports the template into the working Galaxy, derives a new template from it, and creates an instance from that template. The instance is assigned to the area configured in the Galaxy preferences (if any). | +| **Build & Deploy** | Creates an .aaPDF file as outlined above, imports the template into the working Galaxy, derives a new template from it, creates an instance from that template, and deploys it. The instance is assigned to the area configured in the Galaxy preferences (if any). | +| **Build & Swap** | Allows you to quickly swap the existing object assemblies in the Windows Global Assembly Cache (GAC). This is handy for debugging as it saves you the time for undeploying and redeploying an existing object instance. Don’t use this option if you have changed the object shape. Otherwise, unexpected results may occur. When you use this option, you must specify which processes to restart: • IDE if you have made changes to the custom object editor • IDE and aaGR if you have made changes to the config time code • Bootstrap if you have made changes to the run time code | +| • | IDE if you have made changes to the custom object editor | +| • | IDE and aaGR if you have made changes to the config time code | +| • | Bootstrap if you have made changes to the run time code | + +To specify the working Galaxy and Area object for importing, instantiating and deploying the object, see Configuring Galaxy Preferences. + +**To build an object** + +1. In the ArchestrA Object Toolkit toolbar, click the desired build mode in the **Mode** list. See above for available options. +2. Click the **Build** icon. + +The ArchestrA Object Toolkit now starts the build and performs any other actions specified by the build mode. Any errors or warnings are reported in the Logger pane. The build output (.aaPDF or .aaPRI file, aaDEF file) is stored in the Output subfolder of your project folder. + +## Migrating Objects + +When you import a new major version of an object template into Wonderware Application Server, existing instances of that object can be automatically migrated. This allows you to preserve their configuration in the new object version. + +This is very easy if the new object version uses the same attributes as the previous version. In this case, all attribute values are automatically copied over from the old version’s instances to the new version’s instances. + +However, you must create custom migration code if: + +- The new version has attributes that the old version doesn’t have, and vice versa; and/or +- The security classification of an attribute has changed in the new version. + +In this scenario, the custom migration code handles the mapping of attribute values between the old and new version. For example, if you have changed an attribute’s name from “Attribute1” to “AttributeA,” but the attribute still has the same purpose, the migration code could copy the value of Attribute1 (in the old version) to AttributeA (in the new version). + +The ArchestrA Object Toolkit can help you create the migration code by generating a list of which attributes were added, removed, or have changed. You simply select a previous object version, and the ArchestrA Object Toolkit inserts a code region containing the names of all attributes that have changed between the previous version and the current version you’re developing. You can then add migration code for each attribute. For a short example, see Example: Migrating a Previous Object Version. + +**To create a migration code section for a previous version.** + +1. In the ArchestrA Object Toolkit toolbar, click the **Migrate** icon. The **Browse for aaPDF and aaPRI Files** dialog box appears. +2. Select the .aaPDF file of the previous object version (or the .aaPRI file if you are developing a reusable primitive), and then click **Open**. You can now view the auto-generated migration analysis results. +3. In the Object Design View, expand the **Configtime** folder, and then double-click the **Migrate** item. The migration results section opens in the code editor. + +Note that the ArchestrA Object Toolkit has inserted a new code region showing the differences between the two versions. Enter any required migration code for the previous version here. For more information on available methods, see the *ArchestrA Object Toolkit Reference Guide*. + +The ArchestrA Object Toolkit has also automatically updated the ObjectAttributes.Migrate property to include the version number of the object that you selected in step 2. This tells Application Server that your ApplicationObject supports migrating from that version. For more information on this property, see the *ArchestrA Object Toolkit* *Reference Guide*. + +You can repeat this process for multiple previous versions of an object. The ArchestrA Object Toolkit generates a separate code region for each previous version. This allows you to have migration code for multiple previous versions in the same object. + +### Example: Migrating a Previous Object Version + +See the example code region of the Migrate config time event handler for a short example of migration code. In this example, major version 1 of the object had an attribute named “Eg_001,” which was renamed to “Example_001” in the current version. The migration code transfers the value and settings of the old attribute to the new attribute: + +```csharp +if (migrate.MajorVersion() == 1) +{ + //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.GetSecurityClassification("Eg_001"); //Gets Security Classification + + //Transfer primitive values + SetValue("Example_001.TrendHi", migrate.GetValue("Eg_001.TrendHi")); + Set("Example_001.TrendHi", EATTRIBUTEPROPERTY.idxAttribPropLocked, migrate.GetLocked("Eg_001.TrendHi")); + + //Automatically migrate all child primitives + migrate.AutoMigrateChildPrimitives = true; +} +``` + +Note the “if” condition at the beginning of the code. Using similar conditions, you can have additional, separate migration code sections for other previous major versions of the object. + +### Additional Guidelines for Migrating Objects + +Note the following when developing migration code for your objects: + +- Make sure that your migration code is aware of the presence or absence of child virtual primitives. +- When migrating attributes within a reusable primitive, the migration code must use the full primitive name to access the attribute in the original object being migrated from. You can use the OriginalPrimitiveFullName property in the MigrateHandler class for this purpose. For example: + +```csharp + migrate.GetValue(migrate.OriginalPrimitiveFullName + ".Attribute1") +``` diff --git a/aot/dev-guide/09-debugging.md b/aot/dev-guide/09-debugging.md new file mode 100644 index 0000000..8def0fd --- /dev/null +++ b/aot/dev-guide/09-debugging.md @@ -0,0 +1,49 @@ +# Debugging Objects + +The ArchestrA Object Toolkit allows you to attach the Visual Studio debugger to the Application Server processes running your object’s code. This allows you to troubleshoot and debug your objects. In order to use the debugging features, you must use the object on a computer that has Visual Studio installed. + +> **Caution** +> Never debug objects on a production system. Always use a development node with a local Galaxy for debugging. + +> **Caution** +> Never ship an object that was created from a debug build. These objects may require debug modules and may not function correctly in a production environment. + +There are two ways for attaching the debugger: + +- If you have already created a build with the required PDB files and instantiated or deployed the object on the local system, you can attach the debugger to the Application Server processes running the current object version and debug that version. +- If you’ve made changes to your object and want to debug the new version, you can attach the debugger as part of the build process and then debug the new version. + +## Attaching the Debugger to the Processes Running the Current Object Version + +If you want to debug the current version of an object that you have already instantiated or deployed on the local system, you can attach the debugger to the Application Server processes running the current object version. There are two prerequisites for this: + +- You must have created the required PDB (Program Database) files as part of the current build. +- Visual Studio must be able to find the PDB files. If necessary, set up the search paths in Visual Studio accordingly. + +For help on these points, refer to the Visual Studio documentation. + +**To attach the debugger to the processes running the current object version** + +1. In the ArchestrA Object Toolkit toolbar, click the **Debug** icon. The **Debug** dialog box appears. +2. Select one or more of the following check boxes: + - **Attach IDE Debugger** to debug custom editor code + - **Attach Configuration Debugger** to debug config time code + - **Attach Runtime Debugger** to debug run time code +1. Click **OK**. Visual Studio switches into debugging mode. You can now work with your object and use the debugging features as required. +2. To stop debugging, click the **Debug** icon in the ArchestrA Object Toolkit toolbar again. + +## Attaching the Debugger during the Build Process + +If you’ve made changes to your object and want to debug the new version, you can attach the debugger as part of the build process and then debug the new version. + +**To attach the debugger during the build process** + +1. In the ArchestrA Object Toolkit toolbar, click the **Options** icon. The **Options** dialog box appears with the **Build** category selected. +2. Select one or more of the following check boxes: + - **Attach IDE Debugger** to debug custom editor code + - **Attach Configuration Debugger** to debug config time code + - **Attach Runtime Debugger** to debug run time code +1. Click **OK**. +2. In the ArchestrA Object Toolkit toolbar, select a build mode in the **Mode** list. For example, to debug config time or custom editor code, **Build & Inst** is convenient. +3. Click the **Build** icon to launch the build. Once the build is finished, Visual Studio switches into debugging mode. You can now work with your object and use the debugging features as required. +4. To stop debugging, click the highlighted **Debug** icon in the ArchestrA Object Toolkit toolbar. diff --git a/aot/dev-guide/README.md b/aot/dev-guide/README.md new file mode 100644 index 0000000..b1fc027 --- /dev/null +++ b/aot/dev-guide/README.md @@ -0,0 +1,21 @@ +# AOT Developer Guide (Markdown) + +Converted from the AVEVA / Wonderware *ArchestrA Object Toolkit Development Guide* compiled HTML help. One file per chapter / appendix; ordering matches the original CHM table of contents. + +## Chapters + +- [Overview and Concepts](01-overview.md) — This section gives you a general overview of the Wonderware ArchestrA Object Toolkit and its features. We recommend that you read this section in its entirety to familiarize yourself with the key concepts, and then… +- [Object Design Considerations](02-object-design.md) — Before you start defining your object, you should plan its features and structure. You should: +- [Working with Projects](03-working-with-projects.md) — When creating ApplicationObjects or reusable primitives, you manage your development work in *projects*. ArchestrA Object Toolkit projects are simply Visual Studio projects of a special type. You create and manage them… +- [Defining an ApplicationObject](04-defining-application-objects.md) — Once you have created an ArchestrA Object Toolkit project, you can start defining your object. This section explains how to configure object properties and add primitives using the Object Designer, and how to add custom… +- [Defining a Reusable Primitive](05-defining-primitives.md) — A reusable primitive is a primitive that is intended to be included into multiple objects. This allows you to share component-level code across objects. The Input and Output primitives that you can add in the Object… +- [Configuring Attributes](06-configuring-attributes.md) — Attributes are the data items of an object or primitive. By reading from and writing to attributes, objects can exchange data with each other. +- [Internationalizing Objects](07-internationalizing.md) — If your object will be used in localized environments, you can internationalize it by defining a multilingual dictionary that contains translated strings for the target locales. At run time, the object can retrieve the… +- [Building and Versioning Objects](08-building-and-versioning.md) — By building your object, you create an .aaPDF object file that you can import and use in Wonderware Application Server. You can: +- [Debugging Objects](09-debugging.md) — The ArchestrA Object Toolkit allows you to attach the Visual Studio debugger to the Application Server processes running your object’s code. This allows you to troubleshoot and debug your objects. In order to use the… +- [Programming Techniques (Reference Guide)](appendix-a-ref-guide.md) — Use the following workflow and programming techniques to code within the ArchestrA Object Toolkit (AOT). +- [Development Best Practices](appendix-a-best-practices.md) — When developing your object, you should follow certain guidelines to ensure correct functionality and to avoid common pitfalls. See the following sections for guidelines and tips on developing config time code, run time… +- [Sample Projects](appendix-b-sample-projects.md) — The ArchestrA Object Toolkit comes with two sample ApplicationObjects: +- [ArchestrA Data Types](appendix-d-data-types.md) — Objects that you create using the ArchestrA Object Toolkit can have attributes of any standard data type that is supported in the ArchestrA environment. This appendix describes the available data types and provides some… +- [ArchestrA Security Classifications](appendix-e-security-classifications.md) — By default, new attributes are created with the “Free Access” security classification, which means that any user can write to them. You can restrict write access to an attribute by selecting a different security… +- [ArchestrA Attribute Categories](appendix-f-attribute-categories.md) — An attribute’s category determines which namespaces an attribute appears in, whether the attribute can be written to, and what type of client (users, scripts, etc.) can write to it. diff --git a/aot/dev-guide/appendix-a-best-practices.md b/aot/dev-guide/appendix-a-best-practices.md new file mode 100644 index 0000000..51ae7da --- /dev/null +++ b/aot/dev-guide/appendix-a-best-practices.md @@ -0,0 +1,259 @@ +# Development Best Practices + +When developing your object, you should follow certain guidelines to ensure correct functionality and to avoid common pitfalls. See the following sections for guidelines and tips on developing config time code, run time code, and the custom object editor. + +## General Guidelines + +Use the following general guidelines when developing your object. + +### Naming Conventions + +Use attribute and primitive names that are consistent within your object and with other objects in the ArchestrA environment. This makes it easier for operators and system engineers to browse the ArchestrA object namespace. + +#### Naming Restrictions + +- The following characters are invalid in ArchestrA names: (space) . + - * / \ = ( ) ` ~ ! % ^ & @ [ ] { } | : ; " , < > ? +- Non-English (“localized”) characters are supported in the external names of attributes, objects and primitives, but not in their internal names. +- You can use periods to create a logical naming hierarchy for attributes and primitives (see Creating a Logical Attribute Hierarchy). The maximum length of each identifier between periods is 32 characters. The maximum length of the entire name including all identifiers is 329 characters for attributes and 255 characters for primitives. + +#### ArchestrA Naming Standards and Abbreviations + +The following table lists a set of standards for naming the attributes and primitives of ArchestrA objects. While you may not be able to apply it universally, you should follow it whenever possible to promote consistency across ArchestrA objects. + +| Instead of | Use | Comment | +| --- | --- | --- | +| acknowledge | Ack | | +| acknowledged | Acked | | +| Address | Addr | | +| Alarm | Alarm | Don’t abbreviate. | +| Attribute | attr | | +| Automatic | auto | | +| Average | avg | | +| Cascade | casc | | +| command | cmd | OK to spell out “commandable” and “commanded.” | +| configuration | config | OK to spell out “configure” or “configured.” | +| connection | connection | Don’t abbreviate. | +| Control | ctrl | | +| controller | ctrlr | | +| Count | cnt | | +| dataaccess | DA | | +| description | desc | | +| destination | dest | | +| deviation | dev | | +| Different | diff | | +| Directory | dir | | +| dynamicdataexchange | DDE | | +| engineeringunits | EngUnits | | +| Enum | enumerationset | | +| EU | EngUnits | Use “EngUnits” | +| evaluation | eval | | +| External | external | Don’t abbreviate. | +| GloballyUniqueID | GUID | All uppercase | +| High | hi | | +| Identifier | id | | +| Interval | period | Don’t use “interval” to specify a time between cyclic events. Use “period” instead. | +| Low | lo | | +| Manual | man | | +| maximum | max | | +| message | msg | | +| Minimum | min | | +| mxreference | reference | | +| Number | cnt | “Cnt” is short for “count.” You can use “Number” if it refers to an index, not a count. For example, “TelephoneNumber” is OK because it specifies a literal number, not a count of telephones. | +| Object | object | Don’t abbreviate. | +| Output | OP | Abbreviation only used for PID controller | +| password | password | Don’t abbreviate. | +| processvalue | PV | | +| Put | set | Use “set” instead of “put.” | +| Queue | queue | Don’t abbreviate. | +| randomaccessmemory | RAM | | +| rateofchange | ROC | | +| Received | rcvd | | +| reference | reference | Don’t abbreviate. | +| Server | server | For attribute names, don’t abbreviate. For file names, OK to abbreviate to “svr.” | +| Setpoint | SP | Abbreviation only used for PID controller | +| Solicit | solicit | Don’t abbreviate. | +| Statistics | stats | | +| userdefinedattribute | UDA | | +| Value | value | Don’t abbreviate. | + +#### Additional Naming Guidelines + +- When a name contains multiple words, **begin each** **word with a capital letter**. For example, “Average Page Faults” becomes “PageFaultsAvg.” When one of the words itself is an acronym (for example, “CPU”), still capitalize the word following the acronym. For example, “CPU Load” becomes “CPULoad,” not “CPUload.” +- **Place adjectives after the noun.** This causes objects of interest (typically, the noun) to be grouped together in an alphabetical list. For example, use “FlowAvg,” “FlowMax,” and “FlowMin” instead of “AvgFlow,” “MaxFlow,” and “MinFlow.” +- Use **plural names for** attributes that are **arrays**. +- **Avoid unnecessary adjectives** when the noun itself is understood. For example, for an attribute that indicates the CPU load, don’t use “CPULoadCurrent” or the abbreviated “CPULoadCur” when “CPULoad” is enough. + +### Creating a Logical Attribute Hierarchy + +An object’s primitives naturally create a hierarchical namespace of attributes. Every attribute has a Hierarchical Name that includes the external name of the primitive that contains it. Without care, this namespace may expose the underlying primitive structure of the object to end users, which is usually undesirable from a useability standpoint. + +You can use two strategies to address this issue: unnamed primitives, and periods in attribute names. + +#### Using "Unnamed" Primitives + +When appropriate, primitives can be “unnamed,” that is, their external name is empty. This causes all of the primitive’s attributes to appear to belong to the primitive’s container (either the parent primitive or the object itself). + +#### Using Periods in Attribute Names + +By using a period in an attribute name, you can create a hierarchy within the object namespace that is independent of the object’s primitive structure. + +This is recommended when an attribute is related to a contained primitive. In these situations, the name of the attribute should always be the same as the contained primitive’s name, or extend the contained primitive’s name using a period. + +For example, if your object includes an alarm primitive named “AlarmHiHi,” you could create an object attribute named “AlarmHiHi.Condition” that sets the condition for the alarm. This allows the end user to refer to the alarm-related attributes in a consistent, intuitive way. + +### Working with the Logger + +Use the Logger only for tracing trapped software errors or diagnostics, and only use it sparingly in production objects. Do not use it to provide information that is intended for operators. Operators don’t typically look at the Logger information, but rely on alarm and quality information instead. + +If you use the Logger to trace diagnostic information, make sure that the logging does not continue indefinitely (for example, on every Application Engine scan). Otherwise, performance issues occur. + +If you use the Logger to provide debugging information during development, either remove the logging calls before releasing the object to production, or change them so that logging only occurs when a custom log flag is set. + +For more information on the Logger APIs, see the *ArchestrA* *Object Toolkit* *Reference Guide*. + +### Raising Data Change Events + +Wonderware Application Server supports generating Application Data Change events to report significant or unexpected data value changes to the alarm and event sub-system. To generate a Data Change event, use the SendEvent method of the object’s run time component. + +These events are intended for data changes that occur during the execute method of the object. They can be used to record data changes in event history. However, do not use them for data changes initiated by a run time user (“user sets”). This causes duplication, because these data changes are already logged by the ArchestrA infrastructure. + +If you implement these events, you may want to provide a configuration option to enable or disable them. Users may not always want them reported, especially in the case of “noisy” data. + +### Changing or Enforcing the Length of an Array + +ArchestrA array lengths are dynamic. Run time or config time clients can change the length of an array by writing a new set of values to the array. The array length can also be changed at any time by the object itself. To enforce a fixed array length, check incoming values by using a set handler. + +## Guidelines for Config Time Code Development + +Use the following guidelines for developing good config time code. + +### Ensuring Galaxy Dump/Load Support + +Make sure that your object can be processed by the IDE’s Galaxy Dump/Load feature without generating warnings. This features allows users of your object to dump object instances to a CSV file, modify their configuration, and then subsequently reload them. To ensure that this process works smoothly, you must follow certain rules: + +- **Keep all validation rules in the config time code.** Do not rely on the custom editor code to maintain the integrity of the object (for example, keeping two attributes consistent with each other). The Galaxy Load feature does not use the editor code when importing objects. It only calls the config time code’s OnValidate method. Therefore, any validation rules in the editor code are ignored during a Galaxy Load operation. +- **Set handlers must quietly accept a new value equal** **to the current value.** An object should not reject a set to an attribute when the value being set is the same as the previous value, even if the object’s configuration does not currently allow that attribute to be changed. Coding this way prevents "noise" when Galaxy Load is run. +- **Avoid "write-only" attributes that modify the** **object’s namespace.** An example of this is to have a set handler add, remove, or rename a primitive whose name was passed in as the value of a “write-only” attribute. At first, this appears to be a sensible way for an editor to pass a parameter to a config time method. However, if that information is not subsequently exposed as a readable attribute, there is not enough exposed information in a dumped CSV file to recreate the object from its configurable attributes when it is loaded. + +Instead, you could store the names of the desired primitives in an attribute containing an array of strings. This array can have an associated set handler that maintains the number of primitives and their names. In this case, the Galaxy Load feature can load the object successfully, because the exposed array contains all the information required for the config time logic to recreate the primitives. + +### Determining the Configuration Status + +Every ArchestrA object has an associated configuration status: Good, Bad, or Warning. This status is based on the individual statuses reported by the primitives within the object. To set the status, use the OnValidate config time event. + +The object status reported in the ArchestrA IDE is based on the worst status reported by any primitive within the object. + +- Only set the status to **Bad** to prevent an object from being deployed. In general, you should design an object so that it can be deployed successfully with minimal configuration, and only set an object’s status to Bad if deploying it in its current configuration would be impossible or dangerous. +- Use **Warning** status to mark an object as having a potentially incorrect, but still deployable configuration. For example, an object that still uses its default settings. + +### Changing an Attribute's Data Type at Config Time + +Sometimes you may need to change an attribute’s data type at configuration time. Normally, you will only do this for an attribute that you defined as a Variant (unspecified data type) in the Object Designer. + +To change the attribute’s data type, modify the attribute’s data type property. For more information, see the *ArchestrA* *Object Toolkit* *Reference Guide*. For example, set the attribute’s data type property to a value of MxDouble to indicate that the attribute’s type is Double. + +After changing the data type using the methods of the CMxVariant wrapper, the value is automatically initialized with the default value for that data type. If you change the data type using a Set call, you must initialize the new value manually. + +## Guidelines for Run Time Code Development + +Use the following guidelines for developing good run time code. + +### Returning Warnings During Deployment + +During deployment, objects can return a warning to the ArchestrA IDE user if the target environment is inconsistent with the object’s configuration. The object continues to run despite the warning. + +Returning warnings will rarely be necessary for ApplicationObjects, but if you want to do so, use the AddWarningMessage method. For more information, see the corresponding information in the *ArchestrA Object Toolkit* *Reference Guide*. + +### Avoiding Application Engine "Overscans" + +The Application Engine requires that runtime object method calls be nonblocking and relatively short in duration (on the order of 100 microseconds). You can create threads for slow or potentially blocking activities that would violate these requirements. However, make sure to terminate all threads when the object is shut down. + +### OnScan/OffScan Behavior + +You can define custom actions that are executed when your object goes OffScan. At a minimum, you should set the quality of any attributes that have the CalculatedQuality option enabled to Bad. When the object goes OnScan again, set the quality of these attributes back to Good. + +### Dealing with Quality + +Every attribute has an associated OPC-compliant data quality value that is a 16-bit word. The high-order byte is vendor-specific. In an ArchestrA environment, it is reserved for future use and currently always set to zero. The low-order byte specifies the OPC quality. It has three possible major quality states: Good, Uncertain, and Bad. + +The ArchestrA environment additionally treats one substate of the OPC “Bad” state as the special quality of “Initializing.” Intializing quality is Bad quality with the Initializing bit set. + +- If the quality of an attribute’s value is **Good**, the associated value can be trusted and used. However, the value could still be out of range or invalid (for example, NaN). Your object must check for these conditions separately. +- If the quality is **Uncertain**, the associated value can be used, but there is some doubt about the integrity of the value. For example, this could be the case when manually overriding an attribute that is normally calculated automatically. When using an input with Uncertain quality, do it with care and mark the resulting (calculated) attribute as Uncertain also. +- If the quality is **Bad**, there are a number of possible reasons. These include: + - The object that contains the attribute set its quality to Bad because insufficient or bad data was available. + - The infrastructure returns Bad quality for an attribute when the attribute cannot be accessed within Message Exchange. For example, the target attribute does not exist or communication is faulty. + - A field device may not be connected or accessible, resulting in Bad inputs that propagate through the system. +- **Initializing** quality is a form of Bad quality that requires special attention. It is temporary and only occurs while an object is initialized. It lasts until the object receives its first input data value. The quality then goes to Good, Bad (non-Initializing) or Uncertain. + +Before you use data values in calculations and logic, always check their quality. For example, it does not make sense to calculate the average of two values if one or both values have Bad quality, since Bad quality indicates that the value is not to be used or trusted. Instead, in this case, you should skip the calculation of the average and set the resulting attribute to Bad quality itself. + +The ArchestrA infrastructure does not automatically enforce a specific value (such as IEEE NaN) when quality is Bad, or a specific quality (such as Bad) when a value is NaN. Your object must check for these conditions before using any values in logic or calculations. For example, a float value read from a field device may have a value of NaN but Good quality. In that case, the object must be aware that the value may be unusable for a calculation. Conversely, a value read from a UDA attribute may be 4.3 but Bad quality. Again, the object must inspect the quality first, realize it is Bad, and take appropriate action. + +#### Best Practices for Dealing with Quality + +Best practices for dealing with quality include: + +- If an attribute’s value is set by the object’s run time logic, enable the **Supports Calculated Quality and Calculated** **Time** option for that attribute in the Object Designer. +- For static attributes (that is, attributes that you didn’t create programmatically), you can use the auto-generated wrapper to access the attribute’s quality. For example: + +```csharp +Attribute1.Quality = DataQuality.DataQualityGood; +``` + +- Set such attributes to Bad quality when the object goes OffScan. Set them to Initializing quality when the object goes OnScan. +- Do not use an input value with Bad (including Initializing) quality in a calculation. Instead, set the result quality Bad or Initializing (if input was Initializing) and leave the value at the last value. (For a float or double result, consider setting the result to NaN.) +- Do not use a NaN (float or double) input in a calculation. Instead, set the result to Bad quality and leave the result value at the last value, or set it to NaN if it is a float or double. +- If an illegal combination of input values exists, set the resulting quality to Bad. +- Optionally, provide an option to report a “bad value” alarm when a result value has Bad quality. Do not report a “bad value” alarm when a value has Initializing. Otherwise, transient alarms occur when the object goes OnScan. +- Do not trigger any other alarms when the quality of an attribute goes Bad. For example, do not trigger a PV change-of-state alarm when the PV goes to some default state after its quality goes Bad. Instead, always use a separate alarm for bad value reporting. +- Inputs with Uncertain quality can be used with care. Set the result to Uncertain quality also to indicate its questionable status. +- Do not generate Logger messages when setting an attribute to Bad quality in the cases outlined above. +- Do not attempt to change the quality of an input, output, or input/output by using its wrapper. This is not supported and may result in unexpected I/O values being written. + +### Dealing with Timestamps + +Observe the following guidelines when dealing with calculated attributes: + +- In most cases, it is appropriate to enable the **Supports** **Calculated Quality and Calculated Time** option for values whose value is calculated at run time. +- For attributes that are updated based on the value of an input or input/output, set the time of the attribute to the input value's time. This ensures that timestamps are propagated properly. +- When setting the value of a calculated attribute that is not connected to an input, it is usually best practice to set the time to the current time. For attributes that have the **Supports Calculated Quality and Calculated Time** option enabled, the system automatically does this when you set the value. +- When setting the value of an attribute based on the value from another object, make sure to set the time of the attribute to the time from the CMxIndirect value. This ensures that timestamps are propagated properly. + +### Dealing with Outputs on Object Startup + +When developing objects associated with field devices, such as a PLC, there are two main scenarios for what happens when the object starts executing at run time: + +- In the more common case, the object mirrors the PLC’s data. In this scenario, when starting or resuming run time execution, the object must initialize its own state to match the PLC data. The object only writes data to the PLC when an operator, script etc. requests such output. It must *not* automatically write any data to the PLC when it is started or shut down, set OnScan/OffScan, deployed/undeployed, etc. This should be the default scenario. +- Rarely, the inverse may be necessary, and the PLC should mirror the object’s data. In this scenario, when the object starts or resumes run time execution, it writes to the PLC to force the PLC to match the object’s data. For example, when resuming execution after a failure, the object might use checkpoint data to restore the state before the failure. This scenario is much less common since the PLC generally is in control upon restarts. + +In keeping with these scenarios, the utility primitives that do outputs (Output and InputOutput primitives) never do an output unless the object itself requests it. The object is in complete control of when outputs occur. Therefore, if you want to implement the second scenario, you must implement custom code that performs the outputs to initialize the field device. + +> **Note** +> You can check the ESTARTUPCONTEXT input parameter to the Startup run time event handler to see why the object is starting up (deployment, etc.). + +### Dealing with the Quarantine State + +When an unhandled software error is detected in a primitive, the object is placed in a quarantine state indicating a bug in the primitive code. As a result, the primitive’s set handlers, Execute method, and other methods are no longer called. The only remaining calls that the primitive can receive are those related to the shutdown or undeployment of its associated object. However, you can still read the object’s attributes to gather troubleshooting information about the object state at the time of the failure, because this doesn’t involve calling any methods. + +When an object is quarantined, the hosting engine raises an alarm that remains active until the object is undeployed. + +### Ensuring Failover Support for Run Time Dynamic Attributes + +Note the following guidelines for run time code when working with failover/checkpointing support for dynamic attributes: + + - Attribute information may become outdated if the dynamic attribute is modified after it is created. To ensure that attributes are re-created correctly after a failover, call the UpdateDynamicAttributeData() method immediately after changing an attribute’s name, data type, category, security classification or set handler flag at run time. For more information, see the *ArchestrA Object Toolkit* *Reference Guide*. + - After you change the value of a dynamic attribute, call the CheckpointDynamicAttributeData() method either immediately or during the next scan cycle. This ensures that the attribute’s values are kept current in the failover environment. For more information, see the *ArchestrA Object Toolkit* *Reference Guide*. + - To restore dynamic attributes and their values at run time startup, call the RestoreDynamicAttributes() method from the object’s Startup event handler. For more information, see the *ArchestrA Object Toolkit* *Reference Guide*. You can check the ESTARTUPCONTEXT input parameter to the Startup event handler to see why the object is starting up (deployment, failover, etc.). + +## Guidelines for Custom Editor Development + +Use the following guidelines for developing good code for your custom object editor. + +### Keeping Validation Rules out of the Editor Code + +Do not rely on the custom editor code to maintain the integrity of the object (for example, keeping two attributes consistent with each other). It should always be possible to create an object using a standalone configuration utility which configures the object’s attributes without any involvement by the object’s custom editor. Therefore, don’t put validation rules in the custom object editor code. Instead, put them in the OnValidate config time event that is provided for this purpose. + +### Creating a Complete Editor + +Make sure that your custom object editor allows the user to edit every non-hidden configurable attribute of your object. Remember that you may even have to add non-configurable attributes to the editor, because their security classification might still be editable. diff --git a/aot/dev-guide/appendix-a-ref-guide.md b/aot/dev-guide/appendix-a-ref-guide.md new file mode 100644 index 0000000..4db409a --- /dev/null +++ b/aot/dev-guide/appendix-a-ref-guide.md @@ -0,0 +1,1071 @@ +# Programming Techniques + +Use the following workflow and programming techniques to code within the ArchestrA Object Toolkit (AOT). + +## Programming Workflow + +Using the AOT, you can seamlessly modify the object shape as the object is coded. The AOT also supports changing the ArchestrA attribute data type and renaming ArchestrA attributes and child primitives. This functionality, referred to as round-tripping, has been implemented by configuring the object shape in code. The code is parsed at build time to form the object’s aaDEF file that defines its shape. + +Use the Object Designer to modify the the object shape code. The Designer parses the object shape from the code. Modifications made in the Object Designer are then written back to the code. The Object Designer also enables you to perform tasks that impact multiple code sections simultaneously, such as renaming ArchestrA attributes, adding local primitives, and making changes associated with modifying an object’s major version. + +The basic steps of the workflow are: + +1. Define the object shape using either the ArchestrA Object Toolkit Designer or in code directly. +2. Code the Configtime. +3. Code the Editor for the object. +4. Code the Runtime. +5. Build and import the object. +6. Test and debug the object. + +> **Note** +> We recommend that you define the object shape with the ArchestrA Object Toolkit Designer and use code only when necessary. Refer to Advanced Techniques for information on coding the shape of the object. + +## Configuring Internal and External Names + +Internal names apply to objects, primitives, and attributes. Internal names are used in code and must be C# compliant. + +Do not use .NET keywords, names of classes in the ArchestrA Object Toolkit, or names used in other libraries that are used in your code as internal names for objects, primitives, and attributes. + +Internal names are used in code to refer to the primitive or attribute in C# through provided wrapper classes. + +The maximum length of an object’s internal name is 255 characters. + +The external name is used in the ArchestrA IDE and can be used to create default names for object instances. Each name should be meaningful and suggest the meaning of the object, primitive, or attribute. + +External names must be ArchestrA compliant and cannot have any of the following characters: (space) + - * / \ = ( ) ` ~ ! % ^ & @ [ ] { } | : ; " , < > ? " + +> **Note** +> For the sake of brevity, do not use the word "Object" or "Template" in an object's name. + +## Providing Wrappers for Referencing ArchestrA Attributes + +Attribute wrappers provide the following functionality for non-dynamic local attributes and non-virtual child primitive attributes: + +- Strongly typed attribute references +- Automatic renaming of attribute references +- IntelliSense + +> **Note** +> Renaming an attribute property causes Visual Studio to rename all references to the attribute in code except for string based references. For example, renaming Attribute1 does not modify “GetValue(“Attribute1”)”. + +Modifying an attribute internal name using the Object Designer renames the Attribute property (known also as the attribute wrapper). + +Using the Object Designer to modify the child primitive internal name, that is, the fully scoped name of the referenced attribute, also renames the Attribute property. + +> **Note** +> Wrappers are updated each time the solution is parsed, that is, when the Object Designer is opened, the object is built, the Object Design View is refreshed, or Code Validate is selected. + +## Config Time Coding + +Use the following techniques to code for the Configtime project. + +The Configtime project is used to provide all logic related to configuring the attributes of the object within the Galaxy database. + +### Config Time Set Handler + +Use the config time set handler to implement any logic required for setting the value of an attribute at configuration time. + +This logic could include, for example, range checking and adding or removing virtual primitives. + +You can add a Configtime set handler to an attribute by adding a set handler delegate and associated method to the Configtime class. + +The Configtime class template provides commented out examples of a set handler delegate and method. + +The set handler registration and associated methods are not renamed when the attribute is renamed in code. To remove the set handler, comment out or delete the registration. The Set Handler method can exist without the set handler registration; however, the method is not called. + +In the following examples Attribute1 represents the internal and external name of the attribute. + +The Configtime set handler is triggered when an attribute is changed at configuration time. It can be used for validation or to trigger a special action such as adding virtual primitives. + +For additional information, see Configuring Run Time Set Handlers. + +### Set Handler Code + +Attribute1.SetHandlerValue enables the set handler code to appear the same for both array and non-array attributes. You can take more control of setting the value by using the following code examples: + +- Non-array attribute: + +```csharp + Attribute1 = e.Value; + +``` + +- Array attributes: + +```csharp + if (!e.IsArrayElement) + { + Attribute1 = e.Value; + } + else + { + Attribute1[e.attributeHandle.shIndex1] = e.Value; + } +``` + +### Performing Config Time Validation with the ConfigtimeValidate() Method + +Use this method to validate the entire object as a whole when it is being saved. The method can put the object in a warning or error state by using EPACKAGESTATUS enum. + +Example: + +```csharp +private void AOTObject4Configtime_ConfigtimeValidate(object sender, ref EPACKAGESTATUS status) + { + // By default set the object status to Good + if (HiLimit < LoLimit) + { + status = EPACKAGESTATUS.ePackageBad; + AddErrorMessage("Hi Limit must be greater than or equal to Lo Limit"); + } + else + { + status = EPACKAGESTATUS.ePackageGood; + } + } +``` + +### Adding a Virtual Primitive at Config Time with AddPrimitive + +You can test the ability to add an instance of a virtual primitive at config time using the following function (Boolean result): + +```csharp +bool CanAddPrimitive(string virtualPrimitiveName, string internalName, string externalName); +``` + +The following example uses CanAddPrimitive to check before adding a primitive: + +```csharp +if (CanAddPrimitive("c1", "MyCP1InternalName", "MyCP1ExternalName")) +{ +AddPrimitive("c1", "MyCP1InternalName", "MyCP1ExternalName"); +} +``` + +Where: + +- c1 is the internal name of the virtual primitive. +- MyCP1InternalName is the internal name of the Primitive Instance. +- MyCP1ExternalName is the external name of the primitive instance. + +You can add an instance of a virtual primitive at config time and check the result using PrimitiveResult.message as shown in the following example: + +```csharp +private void Attribute1SetHandler(object sender, ref ConfigtimeSetHandlerEventArgs e) +{ +Attribute1.SetHandlerValue = e; + +if (e.Value) +{ +if (!AddPrimitive("c1", "MyCP1InternalName", "MyCP1ExternalName")) +{ +e.Message = PrimitiveResult.message; +return; // Add failed +} +} +} +``` + +Where: + +- c1 is the internal name of the virtual primitive +- MyCP1InternalName is the internal name of the Primitive instance +- MyCP1ExternalName is the external name of the Primitive instance +- Attribute1 is a Boolean Attribute with a config time set handler. + +> **Note** +> PrimitiveResult.message returns a message only on failure. To return status, use PrimitiveResult.status (EPRIMITIVEOPSTATUS). + +Use to following example to iterate through the child primitives or child virtual primitives: + +```csharp +object primitives; +this.Site.ChildVirtualPrimitives(ThisPrimitive, out primitives); +foreach (IPrimitiveShape ips in (IEnumerable)primitives) +{ + LogInfo(ips.FullName); +} +``` + +### Removing a Virtual Primitive at Config Time with DeletePrimitive + +You can test the ability to delete an instance of a virtual primitive at config time using the following function (Boolean result): + +```csharp +bool CanDeletePrimitive(string internalName); +``` + +> **Note** +> CanDelete checks the lock status of the primitive being deleted. + +Example: + +```csharp +if (CanDeletePrimitive("MyCP1InternalName")) +{ +DeletePrimitive("MyCP1InternalName"); +} +``` + +Where: + +MyCP1InternalName is the primitive instance being deleted. + +You can delete an instance of a virtual primitive at config time and check the result using PrimitiveResult.message as shown in the following example: + +```csharp +private void Attribute1SetHandler(object sender, ref ConfigtimeSetHandlerEventArgs e) +{ +Attribute1.SetHandlerValue = e; + +if (!e.Value) +{ +if (!DeletePrimitive("MyCP1InternalName")) +{ +e.Message = PrimitiveResult.message; +return; // Delete failed +} +} +} +``` + +Where: + +- c1 is the internal name of the virtual primitive. +- MyCP1InternalName is the internal name of the Primitive instance. +- MyCP1ExternalName is the external name of the primitive instance. +- Attribute1 is a Boolean attribute with a config time set handler. + +> **Note** +> PrimitiveResult.message only returns a message on failure. To return status use PrimitiveResult.status (EPRIMITIVEOPSTATUS). + +### Accessing Data in Attributes at Config Time + +For static attributes, use attribute wrappers based on internal name to read/write value. + +For dynamic attributes or attributes in a virtual primitive, use the GetValue and SetValue methods. + +**Examples:** + +If the static float attribute is named HiLimit: + +```csharp +float myVal; +myVal = HiLimit; +``` + +If the dynamic float attribute is named HiLimit: + +```csharp +float myVal; +myVal = GetValue(“HiLimit”); +``` + +### Accessing Data in Other Primitives at Config Time + +For static primitives, use primitives and attributes wrappers based on internal name to read/write value. + +For attributes in a virtual primitive, use the GetValue and SetValue methods. + +**Examples:** + +To access a float attribute with an internal name of HiLimit, of a static child primitive with the internal name Limits: + +```csharp +float myVal; +myVal = Limits.HiLimit; +``` + +To access a float attribute with an external name of HiLimit, of an instance of a virtual child primitive with the external name Limits: + +```csharp +float myVal; +myVal = GetValue(“Limits.HiLimit”); +``` + +### Adding and Deleting Dynamic Attributes at Config Time + +Use the following code to add/remove a dynamic attribute. + +```csharp +bool status = AddAttribute("dynAttr1", MxAttributeCategory.MxCategoryCalculated, MxDataType.MxDouble, false); +DeleteAttribute("dynAttr1"); + +``` + +For more information on these methods, see the *ArchestrA* *Object Toolkit Reference Guide*. + +## Run Time Coding + +Use the following techniques to code for run time. For more information on these methods, see the *ArchestrA Object* *Toolkit Reference Guide*. + +### Runtime SetHandler + +Use a run time set handler to implement any logic required to set an attribute value at run time, including range checking and accepting or rejecting the set. + +You can add a run time set handler to an attribute by adding a set handler delegate and associated method to the Runtime class. + +The Runtime class template provides commented out examples of a set handler delegate and method. + +The set handler registration and associated methods are not renamed when the attribute is renamed in code. To remove the set handler, comment out or delete the registration. The Set Handler method can exist without the set handler registration; however, the method is not called. + +In the following examples Attribute1 represents the attribute internal and external name. + +The run time set handler registration appears in the Runtime class in the following region: + +```csharp +#region Runtime Set Handler Registration - Toolkit generated code +#endregion Runtime Set Handler Registration +``` + +The run time Set Handler registration for Attribute1 appears as: + +```csharp +this.RegisterRuntimeSetHandler("Attribute1.ex", new RuntimeSetHandlerDelegate(Attribute1SetHandler)); +``` + +**Remarks** + +The delegate is registered to the external name of the Attribute. In this example, the text "Attribute1.ex" represents the external name for Attribute1. + +The run time set handler method for Attribute1 appears at the end of the Runtime class as: + +```csharp +private void Attribute1SetHandler(object sender, ref RuntimeSetHandlerEventArgs e) +{ +Attribute1.SetHandlerValue = e; +} +``` + +For additional information, see Configuring Run Time Set Handlers. + +### Set Handler Code + +Attribute1.SetHandlerValue enables the set handler code to appear the same for both array and non-array Aattributes. You can take more control of setting the value by using the following code examples: + +- Non-array attribute: + +```csharp + Attribute1 = e.Value; + +``` + +- Array attributes: + +```csharp +if (!e.IsArrayElement) + { + Attribute1 = e.Value; + } + else + { + Attribute1[e.attributeHandle.shIndex1] = e.Value; + } +``` + +#### SetInfo Structure Event Arguments + +Event arguments to provide the run time set handler event with the required data: + +```csharp +public class RuntimeSetHandlerEventArgs : SetHandlerEventArgs +{ + // an attribute to pass in the Set Info: + SetInfo attributeInfo; + + // an attribute to pass out the status: + MxStatus status; + + // Constructor + RuntimeSetHandlerEventArgs(AttributeHandle pAttributeHandle, SetInfo pInfo, MxStatus _status, IMxValue pMxValue); +} +``` + +### Coding a RuntimeExecute() Method + +Use this method to get inputs, perform calculations, set outputs, and set alarm Booleans. + +> **Note** +> This is the most important run time method, but it needs to be efficient and not time-consuming, or it could cause scan overruns. + +**Example:** + +If the object is called Test: + +Test_RuntimeExecute() + +### Returning an Error Status String at Run Time + +**Use the RuntimeGetStatusDesc method to return an error message string associated with a previously returned error code from a sethandler.** + +**Example:** + +```csharp +private void xxx_RuntimeGetStatusDesc(object sender, ref RuntimeGetStatusDescEventArgs e) + { + //---------------------------------------------- + + // 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; + } + } +``` + +#### RuntimeGetStatusDesc Event + +Delegates added to this event are called when the event is fired by ArchestrA: + +```csharp +event RuntimeGetStatusDescDelegate RuntimeGetStatusDesc; +``` + +### Event Handler for Get Status Description + +Use the following to provide the GetStatusDescription event with the required data: + +```csharp +class RuntimeGetStatusDescEventArgs : EventArgs +{ + // an attribute to pass out the detailed error code: + short detailedErrorCode; + + // an attribute to pass out the status: + string status; + + // Constructor: + RuntimeGetStatusDescEventArgs(); +} +``` + +### Manipulating Data Quality at Run Time + +Use code to read data quality from and write data quality to attributes. + +**Example:** + +```csharp +myAttribute = Input1.Value.Value; +myAttribute.Quality = Input1.Value.Quality; + +if( myAttribute.Quality.isBad ) +{ +// then do something like set alarm +... +} +``` + +### Manipulating the Timestamp at Run Time + +Use code to read and write the time stamp at run time. + +**Example:** + +```csharp +myAttribute = Input1.Value.Value; +myAttribute.Time = Input1.Value.Time; +``` + +### Getting Input (I/O) Values Using Utility Primitives at Run Time + +Use code to read input value, status and quality from Input or InputOutput utility primitives. Use wrapper classes if the utility primitive is static; otherwise, use GetValue. + +**Examples:** + +Input primitive: + +```csharp +myAttribute = Input1.Value.Value; +CMxStatus myStatus = Input1.ReadStatus; +``` + +InputOutput primitive: + +```csharp +myAttribute = InputOutput1.ReadValue; +CMxStatus myStatus = InputOutput1.ReadStatus; +myAttribute.Quality = InputOutput1.ReadValue.Quality; +myAttribute.Time = InputOutput1.ReadValue.Time; +``` + +### Setting Output (I/O) Values Using Utility Primitives at Run Time + +Code utility primitives to write output value and read status from Output or InputOutput Utility Primitive. Use wrapper classes if the Utility Primitive is static; otherwise, use SetValue. + +**Examples:** + +Output primitive: + +```csharp +Output1.Value = myValue; +Output1.Value.Time = myTime; +``` + +InputOutput primitive: + +```csharp +InputOutput1.WriteValue = myValue; +InputOutput1.WriteValue.Time = myTime; +``` + +Writing to the Quality of the Input, Output, or InputOutput primitive wrapper is not supported. The Quality of Value, WriteValue, and ReadValue is read-only. For example, attempting to set InputOutput1.WriteValue.Quality = SomeAttribute.Quality may result in an erroneous value (InputOutput1.WriteValue.Value) to be written to the output location. + +### Accessing Data in Attributes at Run Time + +For static attributes, use attribute wrappers based on the internal name to read or write values, quality, and time stamps. + +**Example:** + +If attribute is called Attribute1, just use Attribute1 in code. + +```csharp +int i = Attribute1; +``` + +For dynamic attributes or attributes in a virtual primitive, use the GetValue and SetValue methods. + +**Example:** + +For virtuals and dynamics: + +```csharp +GetValue("attribute1"); +``` + +or + +```csharp +GetValue( primitiveId, attributeId); +``` + +See the AObjectBase class definition for further details on the GetValue member. + +### Accessing Data in Other Primitives at Run Time + +For static primitives, use primitives and attributes wrappers based on the internal name to read/write value, quality, and time stamp. + +For attributes in a virtual primitive, use the GetValue and SetValue methods. + +**Examples:** + +```csharp +prim1.attribute1 = 23.0; // for static primitives and attributes +int i = GetValue("prim1.attribute1"); // for dynamic primitives and attributes +SetValue("prim1.attribute1",23.0); // for dynamic primitives and attributes +``` + +### Adding and Deleting Dynamic Attributes at Run Time + +Use the following code to add/remove a dynamic attribute in run time code. + +```csharp +bool status = AddAttribute("dynAttr1", MxAttributeCategory.MxCategoryCalculated, MxDataType.MxDouble, false); +DeleteAttribute("dynAttr1"); +``` + +### Supporting AdviseOnlyActive at Run Time + +Application Server can suspend the input polling required for an attribute when that attribute is not currently being used, such as when it is not being viewed by a client, alarmed, script-referenced, or historized. For more information on the AddAttribute methods and overloads, see the *ArchestrA* *Object Toolkit Reference Guide*. + +The Advise Only Active feature of the run time infrastructure determes whether an attribute is currently being used or not, and can suspend and activate that attribute at the appropriate time. + +The ApplicationObject must determine which attributes are eligible candidates to be suspended when not being used. The ApplicationObject must also turn off the input polling required for an attribute when suspended, and turn the input polling back on when the attribute is activated. + +To enable AdviseOnlyActive: + +1. Determine whether or not the Object should support Advise Only Active functionality. If so, enable the **Advise** **Only Active supported** check box in the Object Editor. +2. Determine for each primitive being developed what attributes are eligible for Advise Only Active functionality. These typically will only be attributes that are updated or associated with “live” updates from external sources, usually from input type primitives. They can also be subscriptions using MX. +3. In either the code or the object editor, set “Advise Only Active” in the selected attributes to True. + +> **Note** +> In the Runtime Startup method, the auto-generated code checks whether AdviseOnlyActiveEnabled is enabled for the object. If AdviseOnlyActiveEnabled is enabled , the auto-generated code calls SuspendLocalAttribute() for each attribute supporting Advise Only Active. + +1. Implement the body of the provided AttributeName_AdviseOnlyActive() method for each attribute supporting Advise Only Active: +a. The method shell is auto-generated. +b. Fill in code in this method to take necessary actions to activate or suspend updates of polled data related to the specified attribute being activated. Typically, an Input primitive or InputOutput primitive wrapper is called, such as: + +```csharp + + Input1.ActivateUpdatesList() + + InputOutput1.ActivateUpdatesList() +``` + +1. You can also choose to take other actions, including: +a. Activate/suspend updates on an attribute in another object using CMxIndirect.Activate() or CMxIndirect.Suspend(). +b. Activate/suspend updates on an attribute in another primitive using the ActivatePrimitiveAttribute() or SuspendPrimitiveAttribute() methods. + +> **Note** +> In Runtime Shutdown method, if AdviseOnlyActiveEnabled is enabled, the auto-generated code calls ActivateLocalAttribute() for each attribute supporting AdviseOnlyActive. + +#### AdviseOnlyActiveEnabled + +Use this method or property to determine whether the object has AdviseOnlyActive functionality enabled. If disabled, the object must not call functions to use AdviseOnlyActive. The AOT prevents functions such as SuspendLocalAttribute() from being used if AdviseOnlyActive functionality is disabled. This method or property determines if AdviseOnlyActive functionality is enabled. + +### Other AOT Wrappers for AdviseOnlyActive + +In addition to the wrappers indicated in the previous section, the AOT adds the following wrapper function for AdviseOnlyActive. + +#### IO Utilities + +Input and InputOutput utility primitives class wrappers provide methods to SuspendUpdatesList() and ActivateUpdatesList() that suspend and activate the input polling for the utility primitive. + +### Triggering an Alarm at RunTime + +Set the Boolean attribute representing the alarm to True to trigger the alarm. Set the attribute to False to clear the alarm condition. + +**Example:** + +```csharp +myCondition = true; +``` + +> **Note** +> The Boolean attribute must have an alarm extension added to it in the Object Designer. + +## Providing Access to External Attributes (BindTo) + +The BindTo method of RuntimeBase provides a simplified method for accessing attributes in other objects at run time using CMxIndirect. For more information, see CMxIndirect. + +You can use BindTo to: + +- Read the value, time, and quality of an attribute or property. +- Set the value and time of an attribute. Quality cannot be set. + +The Value, Quality, Datatype, Length, and Time of the external attribute can be accessed by the properties: + +```csharp +myIndirect.Value +myIndirect.DataQualityOfLastRead +myIndirect.Value.GetDataType +myIndirect.Value.Length +myIndirect.TimeStampOfLastRead +``` + +Like value, time can be set across object boundaries. You can access time without having to access value, but you must do this by binding to the Time property directly. + +**Example:** + +```csharp +myIndirect = RuntimeBase.BindTo( “obj.attr.time”, “”); +myIndirect.Value = DateTime.Now(); +myTime = myIndirect.Value; // where myTime is a System.DateTime variable +``` + +You can set both time and value together in one call: + +```csharp +myIndirect.Set( x, myTime ); +``` + +Value and time can be set together as a pair. + +**Example:** + +```csharp +private CMxIndirect myIndirect = null; +. +. +. +myIndirect = BindTo("MyTestObject.Attribute1", "", true); +if (myIndirect != null ) +{ +myIndirect.Set( 180, DateTime.Now() ); // sets V, T in one call +} +``` + +The developer can get both Time and Value together in one call: + +```csharp +if (myindirect.StatusOfLastRead.success == -1 && myindirect.StatusOfLastRead.Category == MxStatusCategory.MxCategoryOk) +{ + myIndirect.Get( out x, out myTime, out myQuality ); +} +``` + +After the BindTo operation, check the status before accessing the value as shown in the previous example. + +> **Note** +> Declaring the CMxIndirect in the Runtime Declarations Section makes the indirect available to all methods in the Runtime, that is, to Startup and Execute. + +### CMxIndirect + +Used for referencing external attributes. For more information, see Providing Access to External Attributes (BindTo). + +```csharp +public class CMxIndirect +{ +public CMxIndirect(string _fullRefString, string _context, IMxSupervisoryConnection _superConn, RuntimeBase _rb, int _refHandle, short _statusId, int _statusIndex); + + public MxStatus CallBackStatus { get; } + public string Context { get; } + public short DataQuality { get; } + public string FullReferenceString { get; } + public bool IsGood { get; } + public int RefHandle { get; } + public MxStatus Status { get; } + public short StatusId { get; } + public int StatusIndex { get; } + public CMxValue Value { get; set; } + public CMxTime Time { get; set; } + public void Set { CMxValue value, CMxTime time }; + public void Get { out CMxValue value, out CMxTime time, out short quality }; +} +``` + +## Associating an ArchestrA Editor Control with an Attribute in Code + +Normally, ArchestrA editor controls are statically configured to point to a single attribute to be configured on the editor tab. + +However, on occassion, and especially with virtual primitives, it is useful to dynamically bind the editor control to a particular attribute by setting the Attribute property of the control. + +For example, with a text box control, the following shows how to set the attribute name in code: + +```csharp +aaTextBox1.Attribute = "myAttribute1"; +``` + +### Referencing Attributes Using GetValue and SetValue + +The AOT enables the use of SetValue and GetValue to reference the following types of attributes: + +- Child primitive attributes +- Dynamic attributes +- Virtual primitive attributes + +You can reference these attributes using SetValue and GetValue with a relative string reference. The string reference is relative to the primitive that contains the code, and can be prefixed with the following modifiers: + +- “me” +- “myparent” +- “myobject” + +> **Note** +> The prefix “me” is implied when no prefix is provided. + +The GetValue and SetValue methods use the primitive external name and attribute external name as shown in the following example: + +```csharp +GetValue(PrimitiveExternalName.AttributeExternalName) +``` + +Examples included in this section are based on the following hierarchy: + +### Local References + +To reference any local attributes, use the attribute name with no prefixes or scope. + +Using the me prefix explicitly sets the reference to local and can be used to make it clear what type of reference is required. + +Either of the following statements in Child2 gets the value of AOTObjectx1.Child2.Attribute1: + +```csharp +GetValue("Attribute1"); +GetValue("me.Attribute1"); +``` + +### Referencing Down (child) + +To reference attributes of a child primitive, prefix the reference string with the name of the child primitives. + +The following statement in Child2 gets the value of AOTObjectx1.Child2.Child4.Attribute1: + +```csharp +GetValue("Child4.Attribute1"); +``` + +The following statement in AOTobjectx1 gets the value of AOTObjectx1.Child2.Child4.Attribute1: + +```csharp +GetValue("Child2.Child4.Attribute1"); +``` + +### Referencing Up (parent) + +To reference attributes of a parent primitive use the myparent prefix. + +The following statement in Child2 gets the value of AOTObjectx1.Attribute1: + +```csharp +GetValue("myparent.Attribute1"); +``` + +The following statement in Child4 gets the value of AOTObjectx1.Child2.Attribute1 + +```csharp +GetValue("myparent.Attribute1"); +``` + +The myparent prefix cannot be used more than once in a reference. To reference attributes of objects or primitives more than one level higher, you must use myobject to locate the reference to the top of the hierarchy and then work relative to that location. + +The following statement in Child4 gets the value of AOTObjectx1.Attribute1: + +```csharp +GetValue("myobject.Attribute1"); +``` + +The following statement in Child4 gets the value of AOTObjectx1.Child1.Child3.Attribute1: + +```csharp +GetValue("myobject.Child1.Child3.Attribute1"); +``` + +### Array Usage + +```csharp +// Increment the 3rd element of an array +FloatArray1[3]++; +// Increment all the elements of an array +for (short counter = 1; counter <= FloatArray2.Length; counter++) +{ + FloatArray2[counter]++; +} +``` + +## The External Build Process + +The build process is made up of many stages. In general, these stages all occur as a single event. + +Sometimes you may want to execute only part of the build process or to add additional events in the middle of the process. To support this, you can start a solution build from the command line as well as repackage the object with the Packager application. + +> **Note** +> The project must be built before you execute the Packager, because the Packager requires the aaDEF file and associated assemblies create by the build. + +### Command Line Recompile Object + +Perform these processes from a command prompt with the Visual Studio Environment variables loaded. + +**Build Process - Recompile (debug version)** + +```csharp +C:\>devenv "C:\ Projects\AOTObject88\AOTObject88.sln" /build Debug +``` + +**Build Process - Recompile (release version)** + +```csharp +C:\>devenv "C:\ Projects\AOTObject88\AOTObject88.sln" /build Release +``` + +### Command Line Repackage Object + +The AOT includes a utility called Packager. + +The Packager packages the object using the files created by the build, that is, it packages the aaDEF files and assemblies created by the build. This allows a build process to repackage the aaPDF after the object is rebuilt using the command line build. + +You can start the Packager as a Windows Form application or execute it from the command line using the following switches: + +/q - command line mode, no Form. + +/f - The name of a text file containing information needed by DesignServer to repackage the Object. + +The file is automatically generated in the Output directory when the AOT builds the object using the name DesignServerInfo.txt. It contains the name of the root aaDEF file and all of the paths to the core object dlls as relative paths, that is, the project is portable. + +**Example** + +```csharp +C:\Program Files\ArchestrA\Toolkits\AOT\Bin>packager /q /f "C:\ Projects\AOTObject90\Output\designserverinfo.txt" /a "C:\Utility Dlls\" +``` + +> **Note** +> This feature allows you to modify the aaDEF file and repackage the Object. + +## Advanced Techniques + +Use these techniques to configure an object or primitive completely in code using C# attributes. Using the integrated Object Desiger causes these C# attributes declarations to be automatically added to the code. + +### Configuring an ArchestrA Attribute in Code + +You can add ArchestrA attributes to the object. They can be used locally in code as C# variables. + +The ArchestrA attributes are declared in the object project as C# variables using a CMx Data Type. + +When the object is parsed, properties are automatically added to the Runtime and Configtime class for each ArchestrA attribute defined in the Object class. Parsing occurs while: + +- Refreshing the AOT Object Design View +- Opening the AOT Object Designer +- Saving an object in the AOT Object Designer +- Executing build or code validation + +The attribute properties allow you to access ArchestrA attributes as though they were strongly typed C# values. + +When you reference the ArchestrA attribute in code, the property provides a C# typed wrapper to the attribute using SetValue and GetValue access. The wrapper provides access to Quality, Time, Data Type, and Array Length. + +The following table lists the data types and associated C# conversions. + +| ArchestrA Data Type | C# Data Type | +| --- | --- | +| Boolean | bool | +| Integer | int | +| Float | float | +| Double | double | +| Time | DateTime | +| Elapsed Time | TimeSpan | +| String | string | +| Big String | string | +| Attribute Reference | string | +| Custom Enumeration | string array | +| DataType | ArchestrA.Core.MxDataType | +| Custom Structure | ArchestrA.Core.MxCustomStruct | +| MxStatus | ArchestrA.Core.MxStatus | +| Variant | CMxValue | +| InternalDumpLoadData | ArchestrA.Core.MxCustomStruct (special) | +| InternalFailoverData | ArchestrA.Core.MxCustomStruct (special) | + +> **Note** +> There is no direct conversion from an internationalized string to a C# type. The internationalized string can be represented as an internationalized string structure (string value, locale) or by setting the locale for the attribute, which then allows you to reference the attribute as a C# string. + +The variable declaration can be decorated with C# attributes to enable the configuration of the following attribute properties (excluding special data types): + +- External Name +- Category +- Security +- Calculated Quality and Time +- Frequently Accessed +- Alarm Extension +- History Extension + +> **Note** +> The special data types of CMxInternalDumpLoadData and CMxInternalFailoverData are created and maintained by the toolkit. These data types are not intended for general use. These ArchestrA attributes store data for recreating dynamic attributes and child primitive instances on dump/load and failover. + +#### Specifying the ArchestrA Attribute Array Length + +You can set and get the array length of an attribute array (static) at config time or run time using the following syntax: + +**Syntax** + +```csharp +AttributeName.Length = n; +n = AttributeName.Length; +``` + +**Parameters** + +AttributeName + +Represents the array attribute name. + +n + +Represents an integer value. + +**Remarks** + +You can set the array length of a dynamic attribute array at config time or run time using one of the following Get and Set methods: + +```csharp +n = GetNumElements("AttributeName"); +n = GetNumElements(AttributeID, PrimitiveID); +SetNumElements("AttributeName", n); +SetNumElements(AttributeID, PrimitiveID, n); +``` + +Where, AttributeName is the array attribute name and n is an integer value. + +You can apply the GetNumElements and SetNumElements methods to attributes. However, when you rename an attribute using the Object Designer, the attribute name referenced by these methods is not updated. + +### Referencing Attributes from the Editor of the Object + +To reference attributes directly from the Editor Project of the object, you must implement the GetData() and SetData() methods provided by the framework. + +Even if the config-time dynamic attribute is located on OnObject, you cannot use Editor functions SetData and GetData, and Runtime functions Set and Get, if the attribute reference contains an object name. For example, **myTestAOT_001.myuda**. + +For more information, see Enabling Buffered Data for a Config-time Dynamic Attribute. + +In the examples, Attribute1 is a float array with four elements, Attribute2 represents is a float. + +**Attribute Get Example:** + +```csharp +//Get an Attribute value +float MyData2 = (float)Convert.ToDecimal(GetData("Attribute2")); +``` + +**Attribute Set Example:** + +```csharp +//Set an Attribute value +SetData("Attribute2", 9.0); +``` + +**Array Attribute Get Example:** + +```csharp +//Get a single value of an Array Attribute +float MyData = (float)Convert.ToDecimal(GetData("Attribute1[1]")); +//Get an Array Attribute +object[] MyArrayValues = new object[4]; +MyArrayValues = (object[])GetData("Attribute1"); +``` + +**Array Attribute Set Example** + +```csharp +//Set an Array Attribute using a locally declared array +object[] MyArrayValues = new object[4]; +MyArrayValues[0] = 1.0; +MyArrayValues[1] = 1.1; +MyArrayValues[2] = 1.2; +MyArrayValues[3] = 1.3; +SetData("Attribute1", MyArrayValues); +``` + +> **Note** +> The array index is 1-based. There are no errors or warnings to indicate that a zero value has been passed to the array index from the editor of the object. + +### Local Attribute Wrappers + +Based on the attribute category, AOT adds an Attribute property to the Configtime class or the Runtime class for each attribute declared in the Object class. You can use the local attribute wrapper to access attributes using the attributes name attribute_internalname. + +The following code example represents an auto-generated Attribute property added to the Configtime or Runtime class for an attribute that supports read and write. In the example, the Set statement would be excluded if the attribute were read-only. + +```csharp +private CMxBoolean Attribute1 +{ +get { return InternalReferenceOnly.Attribute1; } +set { InternalReferenceOnly.Attribute1.Set(value); } +} +``` + +The get property provides access to the attribute wrapper and allows you to access the features of the wrapper, such as quality and security. + +The set property is limited to setting the value. This is how the property is used when the attribute is on the left side of an assignment operator, for example, Attribute1 = 10. You can assign values using this short method. It provides type checking and automatic type conversion of the value. + +The property does not provide any other set access to the wrapper. + +The following table shows the relationship between the attribute category and the attribute properties Get and Set added to the Configtime and Runtime classes. + +| Attribute Category | Configtime Class | Runtime Class | +| --- | --- | --- | +| PackageOnly | Get and Set | - - | +| PackageOnly_Lockable | Get and Set | - - | +| Constant | Get Only | Get Only | +| Writeable_C_Lockable | Get and Set | Get Only | +| Writeable_UC | Get and Set | Get and Set | +| Writeable_UC_Lockable | Get and Set | Get and Set | +| Writeable_USC | Get and Set | Get and Set | +| Writeable_USC_Lockable | Get and Set | Get and Set | +| Calculated | - - | Get and Set | +| Calculated_Retentive | - - | Get and Set | +| Writeable_S | - - | Get and Set | +| Writeable_U | - - | Get and Set | +| Writeable_US | - - | Get and Set | +| SystemInternal | Unsupported | Unsupported | +| SystemSetsOnly | Unsupported | Unsupported | +| SystemWriteable | Unsupported | Unsupported | diff --git a/aot/dev-guide/appendix-b-sample-projects.md b/aot/dev-guide/appendix-b-sample-projects.md new file mode 100644 index 0000000..a9ba4c2 --- /dev/null +++ b/aot/dev-guide/appendix-b-sample-projects.md @@ -0,0 +1,131 @@ +# Sample Projects + +The ArchestrA Object Toolkit comes with two sample ApplicationObjects: + +- Monitor object +- WatchDog object + +By default, the projects for these objects are installed in the C:\Program Files\Wonderware\Toolkits\ArchestrA Object\Samples folder. You can examine these objects to learn more about the C# code generated by the ArchestrA Object Toolkit. This appendix gives a short overview of what these objects do and what their structure looks like. + +> **Note** +> On a 64-bit operating system, projects for these objects are installed in C:\Program Files (x86)\Wonderware\Toolkits\ArchestrA Object\Samples. + +## The Monitor Object + +The Monitor object is a very simple ApplicationObject that reads an external input value and calculates its average. It also allows the user to output a new value that is below a configurable limit. It has no custom config time code and no alarm or history settings. + +### Object Structure + +The Monitor object uses the following primitives: + +- InputOutput primitive to read and write the external value; external name: PVInputOutput + +The Monitor object has the following custom attributes: + +| Name | Type | Category | Description | Additional Settings | +| --- | --- | --- | --- | --- | +| PV | Float | Writeable_US | Process value | Calculated Quality, Frequently Accessed, Run Time Set Handler | +| PVHiLimit | Float | Writeable_USC | Limit value for PV output | | +| PVInputAvg | Double | CalculatedRetentive | Average value | Calculated Quality | +| ResetInputAvg | Boolean | Writeable_US | Resets the average value | Run Time Set Handler | + +### Custom Object Editor + +The custom editor of the Monitor object has only one custom tab with controls to configure the following attributes: + +- PVHiLimit +- PVInputOutput.Reference +- PVInputOutput.SeparateFeedbackConfigured +- PVInputOutput.ReferenceSecondary + +### Run Time Code + +The Monitor object has the following custom run time code: + +- **SetScanState event:** + - When going OnScan, set the quality of calculated attributes to Initializing. + - When going OffScan, set the quality of calculated attributes to Bad. +- **Execute event:** + - Get the new input value and write it to the PV attribute. + - Set the PV attribute’s quality to the quality of the new input value. + - Calculate the new average value and write it to the PVInputAvg attribute. +- **GetStatusDesc event:** Return messages for custom error codes. +- **Set handler for PV attribute:** Check that new value is less than PVHiLimit. +- **Set handler for ResetInputAvg:** Reset the average calculation. + +## The WatchDog Object + +The WatchDog object demonstrates basic input/output, alarming, and historization. It also shows how to use virtual primitives. The object: + +- Monitors whether an input bit has changed. +- Calculates the time since the bit last changed. +- Raises an alarm if this time exceeds a timeout limit. +- Historizes this time. +- Provides optional statistics via a virtual primitive: average and maximum time since last change, time of last timeout, total number of timeouts. + +### Object Structure + +The WatchDog object uses the following primitives: + +- Input primitive to read the external bit that should be monitored; external name: MonitoredBit +- Alarm primitive +- History primitive +- Custom virtual local primitive to calculate statistics; external name: Stats + +The WatchDog object has the following custom attributes: + +| Name | Type | Category | Description | Additional Settings | +| --- | --- | --- | --- | --- | +| TimeSinceChange | ElapsedTime | Calculated | Time since the MonitoredBit value last changed state | Historizable | +| Timeout.Limit | ElapsedTime | Writeable_USC_Lockable | Limit value for timeout alarm | Frequently Accessed, Run Time and Config Time Set Handlers | +| Timeout | Boolean | Calculated | Set when timeout has occurred | Alarmable | +| Stats.Enable | Boolean | PackageOnly_Lockable | Enable/disable Stats virtual primitive | Config Time Set Handler | + +The Stats virtual primitive has the following custom attributes: + +| Name | Type | Category | Description | Additional Settings | +| --- | --- | --- | --- | --- | +| Stats.DelayAverage | ElapsedTime | Calculated | Average time since last change | | +| Stats.DelayMax | ElapsedTime | Calculated | Maximum time since last change | | +| Stats.TimeoutCnt | Integer | Calculated | Timeout count | Historizable | +| Stats.LastTimeout | Time | Calculated | Time of last timeout | | +| Stats.Reset | Boolean | Writeable_U | Reset statistics | Run Time Set Handler | + +### Custom Object Editor + +The custom editor of the WatchDog object has two custom tabs with controls to configure the following: + +- **General tab:** + - Input bit (MonitoredBit.InputSource) + - Enable statistics (Stats.Enable) + - Enable history and alarms for attributes +- **Advanced tab:** + - History and alarm settings for attributes + +### Config Time Code + +The WatchDog object has the following custom config time code: + +- **Set handler for Stats.Enable attribute:** Enable/disable the Stats virtual primitive. +- **Set handler for Timeout.Alarmed attribute:** Enable/disable the timeout alarm primitive. +- **Set handler for Timeout.Limit attribute:** Check that the new value is positive. +- **Set handler for TimeSinceChanged.Historized** **attribute:** Enable/disable the history primitive for the TimeSinceChanged attribute. + +### Object Run Time Code + +The WatchDog object has the following custom run time code: + +- **Startup event:** Initialize the time of last change. +- **Execute event:** + - Get the new input value. + - Calculate the time since the last change and write it to the TimeSinceChanged attribute. + - If the time exceeds the timeout limit, raise an alarm by setting the Timeout.Condition attribute to true. +- **GetStatusDesc event:** Return messages for custom error codes. +- **Set handler for Timeout.Limit attribute:** Check that the new value is positive. + +### Stats Primitive Run Time Code + +The Stats virtual primitive has the following custom run time code: + +- **Execute event:** Calculate statistics (average/maximum time since last change, timeout count, last timeout time) and write them to the appropriate attributes. +- **Set handler for Reset attribute:** Reset all statistics attributes. diff --git a/aot/dev-guide/appendix-d-data-types.md b/aot/dev-guide/appendix-d-data-types.md new file mode 100644 index 0000000..a74ca44 --- /dev/null +++ b/aot/dev-guide/appendix-d-data-types.md @@ -0,0 +1,193 @@ +# ArchestrA Data Types + +Objects that you create using the ArchestrA Object Toolkit can have attributes of any standard data type that is supported in the ArchestrA environment. This appendix describes the available data types and provides some notes on their recommended use. + +## List of ArchestrA Data Types + +The ArchestrA environment supports the following data types. The defaults are used at startup time or when there is no data available. For notes on using each type correctly, see Using Data Types Correctly. + +For additional information on the operations supported by each data type, see the class documentation in the *ArchestrA* *Object Toolkit* *Reference Guide*. + +| Data Type | Valid Values | Notes | +| --- | --- | --- | +| Boolean | True, False (default: False) | | +| Integer | -2147483648 to 2147483647, signed (default: 0) | | +| Float | 3.40282 E+38 to -3.40282 E+38, signed (default: NaN) | 32-bit IEEE single-precision floating point, used when 6-7 significant digits are needed. Smallest representable absolute value is 1.175 E-38. | +| Double | 1.79769 E+308 to -1.79769 E+308, signed (default: NaN) | 64-bit IEEE double-precision floating point, used when 15-16 significant digits are needed. Smallest representable absolute value is 2.23 E-308. | +| String | 0 to 1024 characters, default: empty string | Variable-length Unicode string, size: 4 + 2*n bytes (n = number of characters) | +| Time | Microsoft FILETIME values (default: “zero time”) | 64-bit FILETIME value in UTC (Coordinated Universal Time). Represents the number of 100-millisecond ticks since January 1, 1601, 00:00:00 (“zero time”). | +| Elapsed Time | Number of 100-ms ticks, signed (default: 0) | Stored as a 64-bit FILETIME structure. For example, -1 corresponds to a duration of “-00:00:00.0000001”. | +| Attribute Reference | Valid reference strings (default: empty string and null handle) | Standard structure containing a reference string and MxHandle (bound or unbound). A string of "---" results in a null handle, and no warning is generated when the object is validated (that is, when the user saves the object configuration). A string of "---.---" results in a null handle, but a warning is generated on validation. | +| MxStatus | Default: Success | Standard structure containing access status information for a Message Exchange call. | +| Data Type | Enumeration, see notes (default: MxNoData) | Data type of an attribute. Valid enumeration values are: MxNoData, MxBoolean, MxInteger, MxFloat, MxDouble, MxString, MxTime, MxElapsedTime, MxReference, MxStatus, MxDataType, MxSecurityClassification, MxQuality, MxCustomEnum, MxCustomStruct, MxInternationalizedString and MxBigString. | +| Custom Enumeration | Default: ordinal=1, String=String1 | Enumerations start at the value 1. Zero is not a valid ordinal value for an enumeration. | +| Custom Structure | Default: GUID = 0, length = 0. | Provides support for custom data in the form of a GUID and byte array. | +| Internationalized String | 0 to 1024 characters, default: empty string | A vector of strings and corresponding locale IDs in the configuration database. An MxString at runtime. | +| Big String | 0 to 2147483647 characters, default: empty string | Variable-length Unicode string, size: 4 + 2*n bytes (n = number of characters) | +| Variant | N/A | Use this data type if the actual type of an attribute cannot be determined in advance. | + +## Coercion Rules for ArchestrA Data Types + +In some cases, ArchestrA data types can be “coerced” when reading from or writing to an attribute. This means that the client can specify a different data type than the attribute actually has. The value is implicitly converted from the specified data type to the data type required by the attribute. + +For example, if an output configured for Boolean values sends a value to an Integer attribute, the write operation succeeds and the Boolean value is automatically converted to a 0 or 1. + +Coercion is only supported for some combinations of data types. Trying to use coercion for unsupported combinations results in an exception being thrown. Also, coercion generally fails in case of an overflow, that is, if the value is outside the valid range of the target type. + +The following tables list the supported combinations and required value formats. + +### Coercion from Boolean Values + +| To ... | Values / Notes | +| --- | --- | +| Integer | False = 0, True = 1 | +| Float, Double | False = 0.0, True = 1.0 | +| String, Big String | “false” or “true” | + +### Coercion from Integer Values + +| To ... | Values / Notes | +| --- | --- | +| Boolean | 0 is False, non-zero is True. | +| Float, Double | Value is preserved as is. | +| String, Big String | Value is formatted as string. | +| Elapsed Time | Interpreted as number of seconds. | +| Enumeration types | Interpreted as ordinal value of enumeration. | + +### Coercion from Float or Double Values + +| To ... | Values / Notes | +| --- | --- | +| Boolean | 0.0 is False, non-zero is True. | +| Double (from Float) | Value is preserved as is. | +| Float (from Double) | Values less than the minimum absolute Float value of 1.17549E-38 result in a value of Float 0.0, that is, precision may be lost. | +| Integer | Value is rounded. | +| String, Big String | Value is formatted as string. | +| Elapsed Time | Value is interpreted as number of seconds and rounded. | +| Enumeration types | Interpreted as ordinal value of enumeration. | + +### Coercion from String or Big String Values + +| To ... | Values / Notes | +| --- | --- | +| Boolean | “False” (any case) is False, “True“ (any case) is True. All other values result in an error. | +| Float, Double | String must use the following format: [whitespace][sign][digits][.digits] [{d\|D\|e\|E}][sign][digits]. Precision may be lost. A string of “NaN” (any case) results in an IEEE NaN value. | +| Integer | String must represent a valid signed or unsigned Integer. | +| Elapsed Time | String must use the following format: [-[DDDDDD.] [HH:MM:]SS[.fffffff], where DDDDDD is from 0 to 999999, HH is from 0 to 23, MM is from 0 to 59, SS is from 0 to 59, fffffff is fractional seconds (one through seven digits). Parts in brackets are optional. | +| Time | String must use correct date/time syntax for the current locale. | +| Data Type | String must be a valid enumeration label (“MxInteger”, “MxFloat”, etc.) | +| Custom Enumeration | Interpreted as string part of enumeration. No checking is done to determine if the string is valid. | +| Reference | String is set as reference string. No syntax checking is done. | + +### Coercion from Time Values + +| To ... | Values / Notes | +| --- | --- | +| String, Big String | Value is formatted according to the time format specified by the current locale. “Zero time” (1/1/1601, 00:00:00) results in a blank string. | + +### Coercion from Elapsed Time Values + +| To ... | Values / Notes | +| --- | --- | +| Integer | Converted to number of seconds. | +| Float, Double | Converted to number of seconds. | +| String, Big String | String uses the following format: [-]DDDDDD HH:MM:SS.fffffff | + +### Coercion from MxStatus Values + +| To ... | Values / Notes | +| --- | --- | +| String, Big String | String is generated from the Category and Detail information of the MxStatus value. If Category is OK, the string is empty. | + +### Coercion from Data Type Values + +| To ... | Values / Notes | +| --- | --- | +| Integer, Float, Double | Converted to ordinal value. | +| String, Big String | Converted to type label, for example, “MxInteger” | +| Elapsed Time | Value is interpreted as number of seconds and rounded. | +| Enumeration types | Interpreted as ordinal value of enumeration. | + +### Coercion from Custom Enumeration Values + +| To ... | Values / Notes | +| --- | --- | +| Integer, Float, Double | Converted to ordinal value. | +| String, Big String | Converted to string value, for example, “MyEnum1” | + +### Coercion from Custom Structure Values + +| To ... | Values / Notes | +| --- | --- | +| String, Big String | Qualifier (GUID) is converted to string. | + +## Using Data Types Correctly + +Follow these guidelines on using specific data types. + +### Custom Enumeration vs. Integer + +When defining an attribute that contains enumeration values, use the Custom Enumeration data type, not Integer. + +There are two criteria to distinguish an enumeration attribute from a simple Integer attribute: + +- In an enumeration, each possible value has a specific meaning and represents a mode, state, etc. +- The values of an enumeration cannot be meaningfully compared using comparison operators (>, <, <=, >=). + +For each Custom Enumeration attribute, you must define a second attribute containing an array of strings that defines the possible enumeration values. Often, these values shouldn’t be changed by the end user. If this is the case, set the array attribute’s category to Constant so that users can’t modify it. + +### Absolute and Elapsed Times + +Use the Elapsed Time data type for storing an “elapsed time,” that is, an amount of time. Avoid using Integer or Float attributes with associated units of measure (like seconds, minutes...) for this purpose. The only exception is very short amounts of time expressed in milliseconds. These can be stored as an Integer value. + +Elapsed Time and Time attributes have a standard string representation. The ArchestrA framework automatically converts them to and from strings. They do not require an associated engineering unit. + +### Internationalized String + +Use the Internationalized String data type to define string attributes that contain translations of a string for multiple target languages. A good example would be attributes containing an Engineering Unit name. + +Use the Object Designer to define the default value for US English. + +At config time, you can use the methods of the CMxInternationalizedString class to get and set the string values for each locale. For more information, see the *ArchestrA Object Toolkit* *Reference Guide*. For example: + +```csharp +//Get a string value using locale 1033 +string temp = Attribute1.GetString(1033); +//Write a string value using locale 1033 +Attribute1.SetString(1033, "MyString"); +//Create a local copy of an Internationalized String +InternationalizedString[] temp = Attribute1.GetInternationalizedStrings(); +``` + +You can’t modify InternationalizedString attributes at run time. + +### Big String + +The Big String data type is designed to let you create reasonably large strings beyond the 1,024 character limitation of the String data type. Theoretically, it allows you to create strings up to 2,147,483,647 characters in length. In practice, available system memory and system performance impose much lower limits. A reasonable practical maximum for a single attribute of this type would be around 10 MB. + +### Attribute References + +Use the Attribute Reference data type to store the fully qualified name of an attribute. For example, the Input and Output primitives use attributes of this type to hold the input source or output destination. + +You can read and write attribute references as strings. However, they are different from strings. They also include binding (location) information to improve the startup performance of the messaging system. Therefore, don’t use simple strings to store reference information. + +You can use two default values for an attribute reference to indicate that the reference is unspecified: + +- Use “---.---” to indicate that the user must specify a reference. If the user doesn’t specify a reference, this default value causes a warning when the object’s configuration is validated. +- Use “---” to indicate that the reference is optional. This default value does not cause a warning when the object’s configuration is validated. + +You will rarely need to create attributes of this data type. In most cases, you will simply use the existing Input and Output primitives for communicating with other objects. + +### Variant (Unspecified) Data Type + +Use the Variant data type if the actual type of an attribute cannot be determined in advance. You can then include custom config time code that lets the user select the actual data type while configuring the object. The data type can also be modified when the object starts up at runtime. + +An example of this is the Input primitive. This primitive gets data from another object, regardless of its type, and stores the value in its “Value” attribute. The data type of the value attribute therefore depends on the type of data that the input primitive is being used to retrieve. + +In certain cases, it may be helpful to configure and persist the datatype itself (Boolean, Float, String, etc.) as an attribute. To do this, there is a special data type called “Data Type.” For example, the Input and Output primitives include an attribute of this type to configure the desired type of their value attribute. + +### Arrays + +You can configure attributes of any data type as arrays. When defining your object in the Object Designer, you can specify the initial number of elements and the initial value of each element. + +The size of an array can be changed at config time or run time. If you want to fix the size of an array, you must create config time and run time set handlers that ensure that the size of the array is not changed. diff --git a/aot/dev-guide/appendix-e-security-classifications.md b/aot/dev-guide/appendix-e-security-classifications.md new file mode 100644 index 0000000..45856d7 --- /dev/null +++ b/aot/dev-guide/appendix-e-security-classifications.md @@ -0,0 +1,18 @@ +# ArchestrA Security Classifications + +By default, new attributes are created with the “Free Access” security classification, which means that any user can write to them. You can restrict write access to an attribute by selecting a different security classification. For example, you can specify that the user must have a certain permission in order to write to the attribute, or that the write operation must be verified by a second user. + +> **Important** +> Security classifications are only effective if security is enabled in the Galaxy. + +The ArchestrA infrastructure supports the following security classifications: + +| Security Classification | Description | +| --- | --- | +| FreeAccess | Any user can write to these attributes. Use this classification for attributes that trigger safety or time critical tasks that could be hampered by an untimely logon request. For example, halting a failing process. | +| Operate | Users need Operate permissions to write to these attributes. Use this classification for attributes that operators write to during normal day-to-day operations. | +| SecuredWrite | When writing to these attributes, users must re-enter their logon information. The new value is only written if the logon information is correct and the user has Operate permissions for the attribute. Use this classification for attributes that operators write to during normal day-to-day operations, but that require an extra level of security. | +| VerifiedWrite | When writing to these attributes, users must re-enter their logon information, and another user must confirm the write by entering his or her logon information as well. The new value is only written if the two users are different, the logon information for both users is correct, and both users have Operate permissions for the attribute. Use this classification for attributes that require very tight security and whose values should not be changed based on the decision of one person alone. | +| Tune | Users need Tune permissions to write to these attributes. Use this classification if an attribute is a configuration parameter that might be tuned by an engineer during normal system operations. For example, an alarm setpoint, PID sensitivity, etc. | +| Configure | Users need Configure permissions to write to these attributes, and the object must be OffScan for the write to succeed. Use this classification if a change to the attribute would be considered a significant configuration change. For example, the I/O addresses of an object. | +| ReadOnly | These attributes can not be written to at run time at all, regardless of the user’s permissions. | diff --git a/aot/dev-guide/appendix-f-attribute-categories.md b/aot/dev-guide/appendix-f-attribute-categories.md new file mode 100644 index 0000000..97ec883 --- /dev/null +++ b/aot/dev-guide/appendix-f-attribute-categories.md @@ -0,0 +1,57 @@ +# ArchestrA Attribute Categories + +An attribute’s category determines which namespaces an attribute appears in, whether the attribute can be written to, and what type of client (users, scripts, etc.) can write to it. + +You should only allow as much access to an attribute as necessary. For example: + +- An attribute that is used only by config time logic to add or remove Virtual Primitives should be given a category that prevents it from becoming part of the run time namespace (for example, PackageOnly). +- An attribute that doesn’t make sense to configure in an editor should be given a category (for example, Calculated) that prevents it from becoming part of the config time namespace (and the custom object editor). +- An attribute that needs to be configured and deployed but is not allowed to be modified at runtime should be given a category that prevents users or other objects from writing to it (for example, Writeable_C_Lockable). + +Some attribute categories allow an attribute to be *locked*. This means that IDE users can lock the attribute in a template to protect its configured value from being changed in derived instances or templates. The value of a locked attribute cannot be modified, not even internally by the object’s code. + +In general, you should make attributes lockable whenever possible. Lockable attributes allow users to enforce standards and can simplify system maintenance. Locking data also helps minimize the size of a system’s configuration database, which improves the speed of configuration tasks. + +> **Note** +> An exception is raised if an object’s logic attempts to modify a locked attribute. Therefore, before modifying a lockable attribute in your code, check whether it is locked. + +The following table describes each attribute category. + +| Category Name | Description | +| --- | --- | +| PackageOnly | Only exists at config time. Not deployed. | +| PackageOnly_Lockable | Only exists at config time. Not deployed. Can be locked. | +| Calculated | Only exists at run time. Not externally writeable by users or other objects. Run time changes are not persisted to disk by the AppEngine. | +| Calculated_Retentive | Only exists at run time. Not externally writeable by users or other objects. Run time changes are persisted to disk by the AppEngine. | +| Constant | Defined by an object developer. Never changes. Exists at config time and run time. | +| Writeable_U | Exists at config time and run time, but only the Security Classification is configurable. Only externally writeable by users at run time. | +| Writeable_S | Only exists at run time. Only externally writeable by other objects at run time. | +| Writeable_US | Exists at config time and run time, but only Security Classification is configurable. Externally writeable by users or other objects at run time. | +| Writeable_UC | Exists at config time and run time. Only externally writeable by users at run time. | +| Writeable_UC_Lockable | Exists at config time and run time. Only externally writeable by users at run time. Can be locked. | +| Writeable_USC | Exists at config time and run time. Externally writeable by users or other objects at run time. | +| Writeable_USC_Lockable | Exists at config time and run time. Externally writeable by users or other objects. Can be locked. | +| Writeable_C_Lockable | Exists at config time and run time. Not writeable at run time, even by the object itself. Can be locked. | + +An attribute’s category also determines whether the attribute supports various other options, such as a default value or historization. See the following table for details. + +| Attribute Category | Can set security classification | Can have config time set handler | Can have run time set handler | Can be marked as “Frequently Accessed” | Supports “Calculated Quality and Time” | Default value can be set | Supports alarms and history1 | Supports “Advise Only Active” | +| --- | --- | --- | --- | --- | --- | --- | --- | --- | +| PackageOnly | N | Y | N | N | N | Y | N | N | +| PackageOnly_Locakable | N | Y | N | N | N | Y | N | N | +| Constant | N | N | N | Y | N | Y | N | N | +| Writeable_C_Lockable | N | Y | N | Y | N | Y | N | N | +| Writeable_UC | Y | Y | Y | Y | Y | Y | Y | Y | +| Writeable_UC_Lockable | Y | Y | Y | Y | Y | Y | Y | Y | +| Writeable_USC | Y | Y | Y | Y | Y | Y | Y | Y | +| Writeable_USC_Lockable | Y | Y | Y | Y | Y | Y | Y | Y | +| Calculated | N | N | Y | Y | Y | N | Y | Y | +| Calculated_Retentive | N | N | Y | Y | Y | N | Y | Y | +| Writeable_S | N | N | Y | Y | Y | N | Y | Y | +| Writeable_U | Y | N | Y | Y | Y | N | Y | Y | +| Writeable_US | Y | N | Y | Y | Y | N | Y | Y | +| SystemInternal | N | N | Y | N | N | Y | N | N | +| SystemSetsOnly | N | N | Y | N | N | N | N | N | +| SystemWriteable | N | N | Y | N | Y | Y | Y | Y | + +1 Only non-array Boolean attributes can be alarmed. Only non-array attributes of the following types can be historized: Double, Float, Integer, Boolean, String, Custom Enumeration, and ElapsedTime, diff --git a/aot/reference/AObjectBase.md b/aot/reference/AObjectBase.md new file mode 100644 index 0000000..4bb1f7f --- /dev/null +++ b/aot/reference/AObjectBase.md @@ -0,0 +1,981 @@ +# AObjectBase Class + +Namespace: `ArchestrA.Toolkit` + +AObjectBase class is the base class of the ConfigtimeBase and RuntimeBase classes. + +Provides common functionality for configtime and runtime classes like Dictionary access, Logger access, Attribute Get and Put, Register and Unregister of Configtime/Runtime sethandlers. + +**Syntax** + +```csharp +public class AObjectBase : _APrimitiveBase +``` + +## AObjectBase Properties + +### AObjectInstance Property + +Provides access to set/get the instance of the object class. + +**Syntax** + +```csharp +public object AObjectInstance { get; set; } +``` + +**Returns** + +object + +### ClassName Property + +Provides access to the name of the object class. + +**Syntax** + +```csharp +public string ClassName { get; } +``` + +**Returns** + +string + +### DictionaryInstance Property + +Provides access to the Dictionary for this object. + +**Syntax** + +```csharp +public Dictionary DictionaryInstance { get; } +``` + +**Returns** + +Dictionary + +### MajorVersion Property + +Provides access to the major version of this object. + +**Syntax** + +```csharp +public string MajorVersion { get; } +``` + +**Returns** + +string + +### MinorVersion Property + +Provides access to the minor version of this object. + +**Syntax** + +```csharp +public string MinorVersion { get; } +``` + +**Returns** + +string + +### Runtime Property + +Provides indication if the object is currently in runtime or configtime. + +**Syntax** + +```csharp +public bool Runtime { get; } +``` + +**Returns** + +bool + +true: when executing in runtime code. + +false: when executing in configtime code. + +### Tagname Property + +Provides access to the Tagname of the object. + +**Syntax** + +```csharp +public string Tagname { get; } +``` + +**Returns** + +string + +## AObjectBase Methods + +### AddErrorMessage Method + +Provides a method to add an error message to the site. + +**Syntax** + +```csharp +public void AddErrorMessage(string message); +``` + +**Parameters** + +**`message`** + +string value that holds the message. + +### AddWarningMessage Method + +Provides a method to add a warning message to the site. + +**Syntax** + +```csharp +public void AddWarningMessage(string message); +``` + +**Parameters** + +**`message`** + +string value that holds the message. + +### AttributeExists Method + +Provides a method to check the existence of an Attribute by name. + +**Syntax** + +```csharp +public bool AttributeExists(string fullName); +``` + +**Parameters** + +**`fullName`** + +Attribute external name. + +**Returns** + +bool + +### FormatError Method (Exception) + +Provides a method to generate a formatted exception string from an exception. + +**Syntax** + +```csharp +protected string FormatError(Exception ex); +``` + +**Parameters** + +**`ex`** + +Exception value to be formatted. + +**Returns** + +string + +### FormatError Method (string, Exception) + +Provides a detailed method to generate a formatted exception string from an exception and add additional information to the exception string. + +**Syntax** + +```csharp +protected string FormatError( +string localMessage, +Exception ex +); +``` + +**Parameters** + +**`localMessage`** + +Additional information to add to the exception message. + +**`ex`** + +Exception value to be formatted. + +**Returns** + +string + +This is a concatenation of the localMessage string and the formatted exception string. + +### Get Method (string, EATTRIBUTEPROPERTY) + +Provides a method to get the value of an Attribute’s property by name. + +**Syntax** + +```csharp +public CMxValue Get( +string fullName, +EATTRIBUTEPROPERTY property +); +``` + +**Parameters** + +**`fullName`** + +Attribute external name. + +**`property`** + +Attribute property to access. + +**Returns** + +CMxValue + +### Get Method (short, short, EATTRIBUTEPROPERTY) + +Provides a method to get the value of an Attribute’s property by ID and primitive ID. + +**Syntax** + +```csharp +public CMxValue Get( +short attributeId, +short primitiveId, +EATTRIBUTEPROPERTY propertyId +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID. + +**`propertyId`** + +Attribute property to access. + +**Returns** + +CMxValue + +### GetAttributeHandle Method + +Provides a method to get an Attribute handle by name. + +**Syntax** + +```csharp +public AttributeHandle GetAttributeHandle(string fullName); +``` + +**Parameters** + +**`fullName`** + +Attribute external name. + +**Returns** + +AttributeHandle + +### GetIsLocked Method (string) + +Provides a method to get the Lock Status of an attribute by name. + +**Syntax** + +```csharp +public bool GetIsLocked(string fullName); +``` + +**Parameters** + +**`fullName`** + +Attribute external name. + +**Returns** + +bool + +true: if the attribute is locked. + +false: if the attribute is unlocked. + +### GetIsLocked Method (short, short) + +Provides a method to get the Lock Status of an attribute by ID and primitive ID. + +**Syntax** + +```csharp +public bool GetIsLocked( +short attributeId, +short primitiveId +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID. + +**Returns** + +bool + +true: if the attribute is locked. + +false: if the attribute is unlocked. + +### GetName Method + +Provides a method to get the name of an attribute by ID and primitive ID. + +**Syntax** + +```csharp +public string GetName( +short attributeId, +short primitiveId +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID. + +**Returns** + +string + +### GetNumElements Method (string) + +Provides a method to get the number of elements of an attribute by name. + +**Syntax** + +```csharp +public int GetNumElements(string fullName); +``` + +**Parameters** + +**`fullName`** + +Attribute external name. + +**Returns** + +int + +Returns -1 in case of a non-array attribute. + +### GetNumElements Method (short, short) + +Provides a method to get the number of elements of an attribute by ID and primitive ID. + +**Syntax** + +```csharp +public int GetNumElements( +short attributeId, +short primitiveId +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID. + +**Returns** + +int + +Returns -1 in case of a non-array attribute. + +### GetPrimitiveID Method + +Provides a method to get a primitive ID by name. + +**Syntax** + +```csharp +public short GetPrimitiveID(string primName); +``` + +**Parameters** + +**`primName`** + +Primitive internal name. + +**Returns** + +short + +### GetSecurityClassification Method (string) + +Provides a method to get the Security Classification of an attribute by name. + +**Syntax** + +```csharp +public MxSecurityClassification GetSecurityClassification(string fullName); +``` + +**Parameters** + +**`fullName`** + +Attribute external name. + +**Returns** + +MxSecurityClassification + +### GetSecurityClassification Method (short, short) + +Provides a method to get the Security Classification of an attribute by ID and primitive ID. + +**Syntax** + +```csharp +public MxSecurityClassification GetSecurityClassification( +short attributeId, +short primitiveId +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID. + +**Returns** + +MxSecurityClassification + +### GetText Method (int) + +Provides a method to get a string from the dictionary by int ID. + +**Syntax** + +```csharp +public string GetText(int phraseId); +``` + +**Parameters** + +**`phraseId`** + +PhraseId that exists in the dictionary. + +**Returns** + +string + +### GetText Method (string) + +Provides a method to get a string from the dictionary by string ID. + +**Syntax** + +```csharp +public string GetText(string phraseId); +``` + +**Parameters** + +**`phraseId`** + +PhraseId that exists in the dictionary. + +**Returns** + +string + +### GetType Method (string) + +Provides a method to get the type of an attribute by name. + +**Syntax** + +```csharp +public MxDataType GetType(string fullName); +``` + +**Parameters** + +**`fullName`** + +Attribute external name. + +**Returns** + +MxDataType + +### GetType Method (short, short) + +Provides a method to get the type of an attribute by ID and primitive ID. + +**Syntax** + +```csharp +public MxDataType GetType( +short attributeId, +short primitiveId +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID. + +**Returns** + +MxDataType + +### GetValue Method (string) + +Provides a method to get the value of an Attribute by name. + +**Syntax** + +```csharp +public CMxValue GetValue(string fullName); +``` + +**Parameters** + +**`fullName`** + +Attribute external name. + +**Returns** + +CMxValue + +### GetValue Method (short, short) + +Provides a method to get the value of an Attribute by attribute ID and primitive ID. + +**Syntax** + +```csharp +public CMxValue GetValue( +short attributeId, +short primitiveId +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID. + +**Returns** + +CMxValue + +### LogError Method + +Provides a method to write an error message to the logger. + +**Syntax** + +```csharp +public void LogError(string _message); +``` + +**Parameters** + +**`_message`** + +string value that holds the error message to be logged. + +### LogException Method + +Provides a method to write a formatted exception to the logger. + +**Syntax** + +```csharp +public void LogException(Exception ex); +``` + +**Parameters** + +**`ex`** + +Exception value to be logged. + +### LogInfo Method + +Provides a method to write an information message to the logger. + +**Syntax** + +```csharp +public void LogInfo(string _message); +``` + +**Parameters** + +**`_message`** + +string value that holds information to be logged. + +### LogTrace Method + +Provides a method to write a trace message to the logger. + +**Syntax** + +```csharp +public void LogTrace(string _message); +``` + +**Parameters** + +**`_message`** + +string value that holds trace message to be logged. + +### LogWarning Method + +Provides a method to write a warning message to the logger. + +**Syntax** + +```csharp +public void LogWarning(string _message); +``` + +**Parameters** + +**`_message`** + +string value that holds warning message to be logged. + +### RegisterConfigtimeSetHandler Method + +Provides a method to register the configtime set handler of an Attribute by name. + +**Syntax** + +```csharp +public void RegisterConfigtimeSetHandler( +string _attrName, +ConfigtimeSetHandlerDelegate _handler +); +``` + +**Parameters** + +**`_attrName`** + +Attribute external name. + +**`_handler`** + +Handle of configtime set handler delegate. + +### RegisterRuntimeSetHandler Method + +Provides a method to register a runtime set handler to an Attribute by name. + +**Syntax** + +```csharp +public void RegisterRuntimeSetHandler( +string attrName, +RuntimeSetHandlerDelegate handler +); +``` + +**Parameters** + +**`attrName`** + +Attribute external name. + +**`handler`** + +Handle of runtime set handler delegate. + +### Set Method (string, EATTRIBUTEPROPERTY, object) + +Provides a method to set the value of a property of an Attribute by Attribute name. + +**Syntax** + +```csharp +public void Set( +string fullName, +EATTRIBUTEPROPERTY property, +object value +); +``` + +**Parameters** + +**`fullName`** + +Attribute external name. + +**`property`** + +Property type. + +**`value`** + +Value to set. + +### Set Method (short, short, EATTRIBUTEPROPERTY, CMxValue) + +Provides a method to set the value of a property of an Attribute by ID and primitive ID. + +**Syntax** + +```csharp +public void Set( +short attributeId, +short primitiveId, +EATTRIBUTEPROPERTY propertyId, +CMxValue val +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID. + +**`propertyId`** + +Property type. + +**`val`** + +Value to set. + +### SetNumElements Method (string, int) + +Provides a method to set the number of elements of an Attribute by name. + +**Syntax** + +```csharp +public void SetNumElements( +string fullName, +int numElements +); +``` + +**Parameters** + +**`fullName`** + +Attribute external name. + +**`numElements`** + +Number of elements to set. + +### SetNumElements Method (short, short, int) + +Provides a method to set the number of elements of an Attribute by ID and primitive ID. + +**Syntax** + +```csharp +public void SetNumElements( +short attributeId, +short primitiveId, +int numElements +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID. + +**`numElements`** + +Number of elements to set. + +### SetValue Method (string, object) + +Provides a method to set the value of an Attribute by name. + +**Syntax** + +```csharp +public void SetValue( +string fullName, +object value +); +``` + +**Parameters** + +**`fullName`** + +Attribute external name. + +**`value`** + +Value to set. + +### SetValue Method (short, short, CMxValue) + +Provides a method to set the value of an Attribute by attribute Id and primitive Id. + +**Syntax** + +```csharp +public void SetValue( +short attributeId, +short primitiveId, +CMxValue val +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID. + +**`val`** + +Value to set. + +### StoreObject Method + +Provides a method to encode a C# object into a custom structure. + +**Syntax** + +```csharp +public MxCustomStruct StoreObject( +int id, +object obj +); +``` + +**Parameters** + +**`id`** + +ID of the CustomStruct. + +**`obj`** + +C# object to be stored. + +**Returns** + +MxCustomStruct + +### UnregisterConfigtimeSetHandler Method + +Provides a method to unregister the configtime set handler of an Attribute by name. + +**Syntax** + +```csharp +public void UnregisterConfigtimeSetHandler(string _attrName); +``` + +**Parameters** + +**`_attrName`** + +Attribute external name. + +### UnregisterRuntimeSetHandler Method + +Provides a method to unregister the runtime set handler of an Attribute by name. + +**Syntax** + +```csharp +public void UnregisterRuntimeSetHandler(string attrName); +``` + +**Parameters** + +**`attrName`** + +Attribute external name. diff --git a/aot/reference/CMxArrayBase.md b/aot/reference/CMxArrayBase.md new file mode 100644 index 0000000..f08d818 --- /dev/null +++ b/aot/reference/CMxArrayBase.md @@ -0,0 +1,73 @@ +# CMxArrayBase Class + +Namespace: `ArchestrA.Toolkit` + +CMxArrayBase is derived from CMxType and provides the default implementation for all array types. + +**Syntax** + +```csharp +public abstract class CMxArrayBase : CMxType +``` + +## CMxArrayBase Properties + +### DefLength Property + +Provides a property to return a int of the default value. + +**Syntax** + +```csharp +protected abstract int DefLength { get; set; }; +``` + +**Returns** + +int + +### Length Property + +Provides a property to get and set the Length. + +**Syntax** + +```csharp +public int Length { get; set; } +``` + +**Returns** + +int + +## CMxArrayBase Constructors + +### CMxArrayBase Constructor + +Provides a default constructor. + +**Syntax** + +```csharp +public CMxArrayBase(); +``` + +### CMxArrayBase Constructor (SupportWrapper, string) + +Provides a constructor to initialize the class for use in a primitive wrapper. + +**Syntax** + +```csharp +public CMxArrayBase(SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +[in] SupportWrapper. + +**`_attributeRef`** + +[in] string value that holds attribute reference. diff --git a/aot/reference/CMxArrayT.md b/aot/reference/CMxArrayT.md new file mode 100644 index 0000000..c6c7945 --- /dev/null +++ b/aot/reference/CMxArrayT.md @@ -0,0 +1,33 @@ +# CMxArray Class + +Namespace: `ArchestrA.Toolkit` + +CMxArray is derived from CMxArrayBase. It is a template class that can be implemented for each type to be supported to provide type safe data access. + +**Syntax** + +```csharp +public abstract class CMxArray : CMxArrayBase +``` + +## CMxArray Constructor + +### CMxArray + +Provides a constructor to initialize the class for use in a primitive wrapper. + +**Syntax** + +```csharp +public CMxArray(SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +[in] SupportWrapper. + +**`_attributeRef`** + +[in] string value that holds the attribute reference. diff --git a/aot/reference/CMxBigString.md b/aot/reference/CMxBigString.md new file mode 100644 index 0000000..b2afa9b --- /dev/null +++ b/aot/reference/CMxBigString.md @@ -0,0 +1,141 @@ +# CMxBigString Class + +Namespace: `ArchestrA.Toolkit` + +CMxBigString is derived from CMxString and provides support for BigString Attributes. + +**Syntax** + +```csharp +public class CMxBigString : CMxString +``` + +## CMxBigString Constructors + +### CMxBigString Constructor + +Provides a default constructor. + +**Syntax** + +```csharp +public CMxBigString(); +``` + +### CMxBigString Constructor string + +Provides a constructor to initialize the object with a string. + +**Syntax** + +```csharp +public CMxBigString (string v); +``` + +**Parameters** + +**`v`** + +[in] string to be set. + +### CMxBigString Constructor SupportWrapper, string + +Provides a constructor to initialize the class for use in a primitive wrapper. + +**Syntax** + +```csharp +public CMxBigString (SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +[in] SupportWrapper. + +**`_attributeRef`** + +[in] string value that holds the attribute reference. + +## CMxBigString Operator Overloads + +### CMxValue Operator Overload CMxBigString + +Provides an operator to convert CMxBigString to CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(CMxBigString val); +``` + +**Parameters** + +**`val`** + +[in] CMxBigString value to convert to CMxValue. + +**Returns** + +CMxValue + +### String Operator Overload CMxBigString + +Provides an operator to convert CMxBigString to string. + +**Syntax** + +```csharp +public static implicit operator string(CMxBigString val); +``` + +**Parameters** + +**`val`** + +[in] CMxBigString value to convert to string. + +**Returns** + +string + +### CMxBigString Operator Overload CMxValue + +Provides an operator to convert CMxValue to CMxBigString. + +**Syntax** + +```csharp +public static implicit operator CMxBigString(CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue value to convert to CMxBigString. + +**Returns** + +CMxBigString + +### CMxBigString Operator Overload string + +Provides an operator to convert string to CMxBigString. + +**Syntax** + +```csharp +public static implicit operator CMxBigString(string val); +``` + +**Parameters** + +**`val`** + +[in] string value to convert to CMxBigString. + +**Returns** + +CMxBigString diff --git a/aot/reference/CMxBigStringArray.md b/aot/reference/CMxBigStringArray.md new file mode 100644 index 0000000..f3da8ba --- /dev/null +++ b/aot/reference/CMxBigStringArray.md @@ -0,0 +1,147 @@ +# CMxBigStringArray Class + +Namespace: `ArchestrA.Toolkit` + +CMxBigStringArray is derived from CMxStringArray and provides support for BigString Array Attributes. + +**Syntax** + +```csharp +public class CMxBigStringArray : CMxStringArray +``` + +## CMxBigStringArray Constructors + +### CMxBigStringArray Constructor int + +Provides a constructor to initialize the array to a default length. + +**Syntax** + +```csharp +public CMxBigStringArray(int length); +``` + +**Parameters** + +**`length`** + +[in] integer value that holds the array length. + +### CMxBigStringArray Constructor string[ ] + +Provides a constructor to initialize the class with a string array default value. + +**Syntax** + +```csharp +public CMxBigStringArray (string[] value); +``` + +**Parameters** + +**`value`** + +[in] string[ ]. + +### CMxBigStringArray Constructor SupportWrapper, string + +Provides a constructor to initialize the class for use in a primitive wrapper. + +**Syntax** + +```csharp +public CMxBigStringArray (SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +[in] SupportWrapper. + +**`_attributeRef`** + +[in] string value that holds the attribute reference. + +## CMxBigStringArray Operator Overloads + +### CMxValue Operator Overload CMxBigStringArray + +Provides an operator to convert CMxBigStringArray to CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(CMxBigStringArray val); +``` + +**Parameters** + +**`val`** + +[in] CMxBigStringArray value to convert to CMxValue. + +**Returns** + +CMxValue + +### String[] Operator Overload CMxBigStringArray + +Provides an operator to convert CMxBigStringArray to string array. + +**Syntax** + +```csharp +public static implicit operator string[](CMxBigStringArray val); +``` + +**Parameters** + +**`val`** + +[in] CMxBigStringArray value to convert to string[ ]. + +**Returns** + +string[ ] + +### CMxBigStringArray Operator Overload CMxValue + +Provides an operator to convert CMxValue to CMxBigStringArray. + +**Syntax** + +```csharp +public static implicit operator CMxBigStringArray (CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue value to convert to CMxBigStringArray. + +**Returns** + +CMxBigStringArray + +### CMxBigStringArray Operator Overload string[ ] + +Provides an operator to convert string array to CMxBigStringArray. + +**Syntax** + +```csharp +public static implicit operator CMxBigStringArray (string[] val); +``` + +**Parameters** + +**`val`** + +[in] string[ ] value to convert to CMxBigStringArray. + +**Returns** + +CMxBigStringArray diff --git a/aot/reference/CMxBoolean.md b/aot/reference/CMxBoolean.md new file mode 100644 index 0000000..376e418 --- /dev/null +++ b/aot/reference/CMxBoolean.md @@ -0,0 +1,164 @@ +# CMxBoolean Class + +Namespace: `ArchestrA.Toolkit` + +CMxBoolean is derived from CMxCommon and provides support for Boolean Attributes. + +**Syntax** + +```csharp +public class CMxBoolean : CMxCommon +``` + +## CMxBoolean Property + +### Value Property + +Provides a property to get and set the value as a bool. + +**Syntax** + +```csharp +public bool Value { get; set; } +``` + +**Returns** + +bool + +## CMxBoolean Constructors + +### CMxBoolean Constructor + +**Syntax** + +```csharp +public CMxBoolean(); +``` + +### CMxBoolean Constructor (bool) + +**Syntax** + +```csharp +public CMxBoolean(bool v); +``` + +**Parameters** + +**`v`** + +[in] bool value to be set. + +### CMxBoolean Constructor (SupportWrapper, string) + +**Syntax** + +```csharp +public CMxBoolean(SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +[in] SupportWrapper. + +**`_attributeRef`** + +[in] string value that holds the attribute reference. + +## CMxBoolean Method + +### Set Method + +Provides a method to set the value of the Attribute from a CMxBoolean. + +**Syntax** + +```csharp +public void Set(CMxBoolean val); +``` + +**Parameters** + +**`val`** + +[in] CMxBoolean value to be set. + +## CMxBoolean Operator Overloads + +### CMxBoolean Operator Overload (bool) + +**Syntax** + +```csharp +public static implicit operator CMxBoolean(bool x); +``` + +**Parameters** + +**`x`** + +[in] bool value to convert to CMxBoolean. + +**Returns** + +CMxBoolean + +### CMxValue Operator Overload + +Provides an operator to convert a CMxBoolean into a CMxValue. + +```csharp +Syntax +public static implicit operator CMxValue(CMxBoolean val); +``` + +**Parameters** + +**`val`** + +[in] CMxBoolean value to convert to CMxValue. + +**Returns** + +CMxValue + +### bool Operator Overload + +Provides an operator to convert a CMxBoolean into a bool. + +**Syntax** + +```csharp +public static implicit operator bool(CMxBoolean val); +``` + +**Parameters** + +**`val`** + +[in] CMxBoolean value to convert to bool. + +**Returns** + +bool + +### CMxBoolean Operator Overload (CMxValue) + +**Syntax** + +```csharp +public static implicit operator CMxBoolean(CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue value to convert to CMxBoolean. + +**Returns** + +CMxBoolean diff --git a/aot/reference/CMxBooleanArray.md b/aot/reference/CMxBooleanArray.md new file mode 100644 index 0000000..1205595 --- /dev/null +++ b/aot/reference/CMxBooleanArray.md @@ -0,0 +1,195 @@ +# CMxBooleanArray Class + +Namespace: `ArchestrA.Toolkit` + +CMxBooleanArray is derived from CMxArray and provides support for Boolean Array Attributes. + +**Syntax** + +```csharp +public class CMxBooleanArray : CMxArray +``` + +## CMxBooleanArray Properties + +### Value Property + +Provides a property to get and set the value as a bool array. + +**Syntax** + +```csharp +public bool[] Value { get; set; } +``` + +**Returns** + +bool[ ] + +### Property to Get and Set Bool Value using the [ ] operator + +Provide a property to get and set the bool value of an element using [ ] operator. + +**Syntax** + +```csharp +public bool this[short i] { get; set; } +``` + +**Returns** + +bool + +## CMxBooleanArray Constructors + +### CMxBooleanArray Constructor (int) + +Constructor that initializes the array to a default length. + +**Syntax** + +```csharp +public CMxBooleanArray(int length); +``` + +**Parameters** + +**`length`** + +[in] int value that holds the length of the array. + +### CMxBooleanArray Constructor (bool[ ]) + +Provides a constructor to initialize the array with a bool array. + +**Syntax** + +```csharp +public CMxBooleanArray(bool[] value); +``` + +**Parameters** + +**`value`** + +[in] bool [ ] value to be set. + +### CMxBooleanArray Constructor (SupportWrapper, string) + +Provides a constructor to initialize the class for use in a primitive wrapper. + +**Syntax** + +```csharp +public CMxBooleanArray (SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +[in] SupportWrapper. + +**`_attributeRef`** + +[in] string value that holds the attribute reference. + +## CMxBooleanArray Method + +### Set Method + +Provides a method to set the value of the Attribute from a CMxBooleanArray. + +**Syntax** + +```csharp +public void Set(CMxBooleanArray newValue); +``` + +**Parameters** + +**`newValue`** + +[in] CMxBooleanArray value to be set. + +## CMxBooleanArray Operator Overloads + +### CMxBooleanArray Operator Overload (bool[ ]) + +Provides an operator to convert a bool array into a CMxBooleanArray. + +**Syntax** + +```csharp +public static implicit operator CMxBooleanArray(bool[] val); +``` + +**Parameters** + +**`val`** + +[in] bool [ ] value to convert to CMxBooleanArray. + +**Returns** + +CMxBooleanArray + +### CMxValue Operator Overload + +Provides an operator to convert a CMxBooleanArray into a CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(CMxBooleanArray val); +``` + +**Parameters** + +**`val`** + +[in] CMxBooleanArray value to convert to CMxValue. + +**Returns** + +CMxValue + +### Bool[ ] Overload + +Provides an operator to convert a CMxBooleanArray into a bool array. + +**Syntax** + +```csharp +public static implicit operator bool[](CMxBooleanArray val); +``` + +**Parameters** + +**`val`** + +[in] CMxBooleanArray value to convert to bool[]. + +**Returns** + +bool[ ] + +### CMxBooleanArray Operator Overload (CMxValue) + +Provides an operator to convert a CMxValue into a CMxBooleanArray. + +**Syntax** + +```csharp +static implicit operator CMxBooleanArray(CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue value to convert to CMxBooleanArray. + +**Returns** + +CMxBooleanArray diff --git a/aot/reference/CMxCommon.md b/aot/reference/CMxCommon.md new file mode 100644 index 0000000..e73ffc5 --- /dev/null +++ b/aot/reference/CMxCommon.md @@ -0,0 +1,59 @@ +# CMxCommon Class + +Namespace: `ArchestrA.Toolkit` + +CMxCommon is derived from CMxType and provides the default implementation for all non-array types. + +**Syntax** + +```csharp +public abstract class CMxCommon : CMxType +``` + +## CMxCommon Property + +### DefaultValue Property + +Provides a property to hold the default value. + +**Syntax** + +```csharp +public object defaultValue; +``` + +**Returns** + +object + +## CMxCommon Constructors + +### CMxCommon Constructor + +Provides a default constructor. + +**Syntax** + +```csharp +CMxCommon(); +``` + +### CMxCommon Constructor (SupportWrapper, string) + +Provides a constructor to initialize the class for use in a primitive wrapper. + +**Syntax** + +```csharp +public CMxCommon(SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +[in] SupportWrapper. + +**`_attributeRef`** + +[in] string value that holds attribute reference. diff --git a/aot/reference/CMxCustomEnum.md b/aot/reference/CMxCustomEnum.md new file mode 100644 index 0000000..a683293 --- /dev/null +++ b/aot/reference/CMxCustomEnum.md @@ -0,0 +1,219 @@ +# CMxCustomEnum Class + +Namespace: `ArchestrA.Toolkit` + +CMxCustomEnum is derived from CMxCommon and provides support for Enum Attributes. + +**Syntax** + +```csharp +public class CMxCustomEnum : CMxCommon +``` + +## CMxCustomEnum Properties + +### Value Property + +Provides a property to get and set the ordinal value as a short. + +**Syntax** + +```csharp +public short Value { get; set; } +``` + +**Returns** + +short + +### Text Property + +Provides a property to get and set the text value as a string. + +**Syntax** + +```csharp +public string Text { get; set; } +``` + +**Returns** + +string + +## CMxCustomEnum Constructors + +### CMxCustomEnum Constructor + +Provides a default constructor. + +**Syntax** + +```csharp +public CMxCustomEnum(); +``` + +### CMxCustomEnum Constructor (string, int) + +Provides a constructor to initialize the class with the name of an array and its depth relative to the owning object. + +**Syntax** + +```csharp +public CMxCustomEnum(string arrayAttribute, int depth); +``` + +**Parameters** + +**`arrayAttribute`** + +[in] string value that holds the name of the string array attribute. + +**`depth`** + +[in] int value that holds the depth of the string array attribute primitive. + +### CMxCustomEnum Constructor (SupportWrapper, string) + +Provides a constructor to initialize the class for use in a primitive wrapper. + +**Syntax** + +```csharp +public CMxCustomEnum(SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +[in] SupportWrapper. + +**`_attributeRef`** + +[in] string value that holds the attribute reference name. + +### CMxCustomEnum Constructor (string, int, short) + +Provides a constructor to initialize the class with the name of an array, its depth relative to the owning object and the default ordinal as a short. + +**Syntax** + +```csharp +public CMxCustomEnum(string arrayAttribute, int depth, short val); +``` + +**Parameters** + +**`arrayAttribute`** + +String value that holds the name of the referenced string array attribute. + +**`depth`** + +Int value that holds the depth. + +The depth assigned to the reference determines the location of the String Array reference (0 represents the local Primitive, -1 represents the Parent, -2 represents the Parents Parent and so on.) + +**`val`** + +Short value that holds the value index. + +## CMxCustomEnum Method + +### Set Method + +Provides a method to set the value of the Attribute from a CMxCustomEnum. + +**Syntax** + +```csharp +public void Set(CMxCustomEnum val); +``` + +**Parameters** + +**`val`** + +[in] CMxCustomEnum instance value to be set. + +## CMxCustomEnum Operator Overloads + +### CMxValue Operator Overload + +Provides an operator to convert a CMxCustomEnum into a CMxValue + +**Syntax** + +```csharp +public static implicit operator CMxValue(CMxCustomEnum val); +``` + +**Parameters** + +**`val`** + +[in] CMxCustomEnum value to convert to CMxValue. + +**Returns** + +CMxValue + +### Short Operator Overload + +Provides an operator to convert a CMxCustomEnum into a ordinal short. + +**Syntax** + +```csharp +public static implicit operator short(CMxCustomEnum val); +``` + +**Parameters** + +**`val`** + +[in] CMxCustomEnum value to convert to short. + +**Returns** + +short + +### CMxCustomEnum Operator Overload (CMxValue) + +Provides an operator to convert a CMxValue into a CMxCustomEnum. + +**Syntax** + +```csharp +public static implicit operator CMxCustomEnum(CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue value to convert to CMxCustomEnum. + +**Returns** + +CMxCustomEnum + +### CMxCustomEnum Operator Overload (short) + +Provides an operator to convert an ordinal short into a CMxCustomEnum. + +**Syntax** + +```csharp +public static implicit operator CMxCustomEnum(short x); +``` + +**Parameters** + +**`x`** + +[in] short value to convert to CMxCustomEnum. + +**Returns** + +CMxCustomEnum diff --git a/aot/reference/CMxCustomEnumArray.md b/aot/reference/CMxCustomEnumArray.md new file mode 100644 index 0000000..ff23cad --- /dev/null +++ b/aot/reference/CMxCustomEnumArray.md @@ -0,0 +1,269 @@ +# CMxCustomEnumArray Class + +Namespace: `ArchestrA.Toolkit` + +CMxCustomEnumArray is derived from CMxArray and provides support for Enum Array Attributes. + +**Syntax** + +```csharp +public class CMxCustomEnumArray : CMxArray +``` + +## CMxCustomEnumArray Properties + +### Text Property + +Provides an EnumText to allow accessing elements as strings. + +**Syntax** + +```csharp +public EnumText Text; +``` + +**Returns** + +EnumText + +### Value Property + +Provides a property to get and set the values of the ordinals as a short array. + +**Syntax** + +```csharp +public short[] Value { get; set; } +``` + +**Returns** + +short[ ] + +### Property to get and set the value of an ordinal + +Provides a property to get and set the value of an ordinal element by short index. + +**Syntax** + +```csharp +public short this[short i] { get; set; } +``` + +**Returns** + +short + +## CMxCustomEnumArray Constructors + +### CMxCustomEnumArray Constructor (string, int, short[ ]) + +Provides a constructor to initialize the class with the name of an array, its depth relative to the owning object and an array of ordinals as short. + +**Syntax** + +```csharp +public CMxCustomEnumArray(string arrayAttribute, int depth, short[] value); +``` + +**Parameters** + +**`arrayAttribute`** + +[in] string value that holds the name of the string array attribute. + +**`depth`** + +[in] int value that holds the relative depth of the string array attribute primitive. + +The depth assigned to the reference determines the location of the String Array reference (0 represents the local Primitive, -1 represents the Parent, -2 represents the Parents Parent and so on.) + +**`value`** + +[in] short[ ] value that holds the ordinal values. + +### CMxCustomEnumArray Constructor (string, int, int) + +Provides a constructor to initialize the class with the name of an array, its depth relative to the owning object and the default length. + +**Syntax** + +```csharp +public CMxCustomEnumArray(string arrayAttribute, int depth, int length); +``` + +**Parameters** + +**`arrayAttribute`** + +[in] string value that holds the name of the string array attribute. + +**`depth`** + +[in] int value that holds the relative depth of the string array attribute primitive. + +The depth assigned to the reference determines the location of the String Array reference (0 represents the local Primitive, -1 represents the Parent, -2 represents the Parents Parent and so on.) + +**`length`** + +[in] int value that holds the array length. + +### CMxCustomEnumArray Constructor (SupportWrapper, string) + +Provides a constructor to initialize the class for use in a primitive wrapper. + +**Syntax** + +```csharp +public CMxCustomEnumArray(SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +[in] SupportWrapper. + +**`_attributeRef`** + +[in] string value that holds the attribute reference. + +## CMxCustomEnumArray Methods + +### GetString Method + +Provides a method to get the value of an element from an ordinal as a short. + +**Syntax** + +```csharp +public string GetString(short i); +``` + +**Parameters** + +**`i`** + +[in] short value that holds the index. + +**Returns** + +string + +### SetString Method + +Provides a method to set the value of an element from a string. + +**Syntax** + +```csharp +public void SetString(short i, string value); +``` + +**Parameters** + +**`i`** + +[in] short value that holds the index. + +**`value`** + +[in] string value to be set. + +### Set Method + +Provides a method to set the value of the Attribute from a CMxCustomEnumArray. + +**Syntax** + +```csharp +public void Set(CMxCustomEnumArray newValue); +``` + +**Parameters** + +**`newValue`** + +[in] CMxCustomEnumArray value to be set. + +## CMxCustomEnumArray Operator Overloads + +### CMxCustomEnumArray Operator Overload (short[ ]) + +Provides an operator to convert a short array into a CMxCustomEnumArray. + +**Syntax** + +```csharp +public static implicit operator CMxCustomEnumArray(short[] val); +``` + +**Parameters** + +**`val`** + +[in] short[ ] value to convert to CMxCustomEnumArray. + +**Returns** + +CMxCustomEnumArray + +### CMxValue Operator Overload + +Provides an operator to convert a CMxCustomEnumArray into CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(CMxCustomEnumArray val); +``` + +**Parameters** + +**`val`** + +[in] CMxCustomEnumArray value to convert to CMxValue. + +**Returns** + +CMxValue + +### Short Operator Overload + +Provide an operator to convert a CMxCustomEnumArray into a short array. + +**Syntax** + +```csharp +public static implicit operator short[](CMxCustomEnumArray val); +``` + +**Parameters** + +**`val`** + +[in] CMxCustomEnumArray value to convert to short[ ]. + +**Returns** + +short[ ] + +### CMxCustomEnumArray Operator Overload + +Provides a operator to convert a CMxValue into a CMxCustomEnumArray. + +**Syntax** + +```csharp +public static implicit operator CMxCustomEnumArray(CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue value to convert to CMxCustomEnumArray. + +**Returns** + +CMxCustomEnumArray diff --git a/aot/reference/CMxCustomStruct.md b/aot/reference/CMxCustomStruct.md new file mode 100644 index 0000000..a783879 --- /dev/null +++ b/aot/reference/CMxCustomStruct.md @@ -0,0 +1,205 @@ +# CMxCustomStruct Class + +Namespace: `ArchestrA.Toolkit` + +CMxCustomStruct is derived from CMxCommon and provides support for custom data in the form of a guid and byte array. + +**Syntax** + +```csharp +public class CMxCustomStruct : CMxCommon +``` + +## CMxCustomStruct Property + +### Value Property + +Provides a property to get and set the value as an MxCustomStruct. + +**Syntax** + +```csharp +public MxCustomStruct Value { get; set; } +``` + +**Returns** + +MxCustomStruct + +## CMxCustomStruct Constructors + +### CMxCustomStruct Constructor + +Provides a default constructor. + +**Syntax** + +```csharp +public CMxCustomStruct(); +``` + +### CMxCustomStruct Constructor (int) + +Provides a constructor to initialize struct with an ID. + +**Syntax** + +```csharp +public CMxCustomStruct(int id); +``` + +**Parameters** + +**`id`** + +[in] int value that holds the ID. + +### CMxCustomStruct Constructor (SupportWrapper, string) + +Provides a constructor to initialize the class for use in a primitive wrapper. + +**Syntax** + +```csharp +public CMxCustomStruct(SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +[in] SupportWrapper. + +**`_attributeRef`** + +[in] string value that holds the attribute reference. + +## CMxCustomStruct Method + +### GetObject Method + +Provides a method to retrieve a serialized C# object from the data in a CMxCustomStruct. + +**Syntax** + +```csharp +public object GetObject(); +``` + +**Returns** + +object + +### StoreObject Method + +Provides a method to serialize and store a C# object into the data of a CMxCustomStruct. + +Syntax + +```csharp +public void StoreObject(object obj); +``` + +**Parameters** + +**`obj`** + +[in] C# object to be stored. + +### Set Method + +Provides a method to set the value of the Attribute from a CMxCustomStruct. + +**Syntax** + +```csharp +public void Set(CMxCustomStruct val); +``` + +**Parameters** + +**`val`** + +[in] CMxCustomStruct value to be set. + +## CMxCustomStruct Operator Overloads + +### CMxValue Operator Overload + +Provides an operator to convert a CMxCustomStruct into a CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(CMxCustomStruct val); +``` + +**Parameters** + +**`val`** + +[in] CMxCustomStruct value to convert to CMxValue. + +**Returns** + +CMxValue + +### MxCustomStruct Operator Overload + +Provides an operator to convert a CMxCustomStruct into a MxCustomStruct. + +**Syntax** + +```csharp +public static implicit operator MxCustomStruct(CMxCustomStruct val); +``` + +**Parameters** + +**`val`** + +[in] CMxCustomStruct value to convert to MxCustomStruct. + +**Returns** + +MxCustomStruct + +### CMxCustomStruct Operator Overload (CMxValue) + +Provides an operator to convert a CMxValue into a CMxCustomStruct. + +**Syntax** + +```csharp +public static implicit operator CMxCustomStruct(CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue value to convert to CMxCustomStruct. + +**Returns** + +CMxCustomStruct + +### CMxCustomStruct Operator Overload (MxCustomStruct) + +Provides an operator to convert a MxCustomStruct into a CMxCustomStruct. + +**Syntax** + +```csharp +public static implicit operator CMxCustomStruct(MxCustomStruct x); +``` + +**Parameters** + +**`x`** + +[in] MxCustomStruct value to convert to CMxCustomStruct. + +**Returns** + +CMxCustomStruct diff --git a/aot/reference/CMxCustomStructArray.md b/aot/reference/CMxCustomStructArray.md new file mode 100644 index 0000000..f0ab0e2 --- /dev/null +++ b/aot/reference/CMxCustomStructArray.md @@ -0,0 +1,215 @@ +# CMxCustomStructArray Class + +Namespace: `ArchestrA.Toolkit` + +CMxCustomStructArray is derived from CMxArray and provides support for an array of custom data in the form of a guid and byte array. + +**Syntax** + +```csharp +public class CMxCustomStructArray : CMxArray +``` + +## CMxCustomStructArray Properties + +### Value Property + +Provides a property to get and set the value as an MxCustomStruct array. + +**Syntax** + +```csharp +public MxCustomStruct[] Value { get; set; } +``` + +**Returns** + +MxCustomStruct[ ] + +### Property to get and set value as a MxCustomStruct + +Provides a property to get and set the value of an element as an MxCustomStruct. + +**Syntax** + +```csharp +public MxCustomStruct this[short i] { get; set; } +``` + +**Returns** + +MxCustomStruct + +## CMxCustomStructArray Constructors + +### CMxCustomStructArray Constructor (int) + +Provides a constructor to initialize the CustomStructArray with a length. + +**Syntax** + +```csharp +public CMxCustomStructArray(int length); +``` + +**Parameters** + +**`length`** + +[in] int value that holds the length of the array. + +### CMxCustomStructArray Constructor (int, int) + +Provides a constructor to initialize CustomStructArray with an ID and length. + +**Syntax** + +```csharp +public CMxCustomStructArray(int id, int length); +``` + +**Parameters** + +**`id`** + +[in] int value that holds the ID. + +**`length`** + +[in] int value that holds the array length. + +### CMxCustomStructArray Constructor (MxCustomStruct[ ]) + +Provides a constructor to initialize CustomStructArray with an array of MxCustomStruct. + +**Syntax** + +```csharp +public CMxCustomStructArray(MxCustomStruct[] value); +``` + +**Parameters** + +**`value`** + +[in] MxCustomStruct[ ] value to be set. + +### CMxCustomStructArray Constructor (SupportWrapper, string) + +Provides a constructor to initialize the class for use in a primitive wrapper. + +**Syntax** + +```csharp +public CMxCustomStruct(SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +[in] SupportWrapper. + +**`_attributeRef`** + +[in] string value that holds the attribute reference. + +## CMxCustomStructArray Method + +### Set Method + +Provides a method to set the value of the Attribute from a CMxCustomStructArray. + +**Syntax** + +```csharp +public void Set(CMxCustomStructArray newValue);’ +``` + +**Parameters** + +**`newValue`** + +[in] CMxCustomStructArray value to be set. + +## CMxCustomStructArray Operator Overloads + +### CMxValue Operator Overload + +Provides an operator to convert a CMxCustomStructArray into a CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(CMxCustomStructArray val); +``` + +**Parameters** + +**`val`** + +[in] CMxCustomStructArray value to convert to CMxValue. + +**Returns** + +CMxValue + +### MxCustomStruct [ ]Operator Overload + +Provides an operator to convert a CMxCustomStructArray into a MxCustomStruct array. + +**Syntax** + +```csharp +public static implicit operator MxCustomStruct[] (CMxCustomStructArray val); +``` + +**Parameters** + +**`val`** + +[in] CMxCustomStructArray value to convert to MxCustomStruct[ ]. + +**Returns** + +MxCustomStruct[ ] + +### CMxCustomStructArray Operator Overload + +Provides an operator to convert a CMxValue into a CMxCustomStructArray. + +**Syntax** + +```csharp +public static implicit operator CMxCustomStructArray(CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue value to convert to CMxCustomStructArray. + +**Returns** + +CMxCustomStructArray + +### CMxCustomStructArray Operator Overload + +Provides an operator to convert a MxCustomStruct array into a CMxCustomStructArray. + +**Syntax** + +```csharp +public static implicit operator CMxCustomStructArray(MxCustomStruct[] val); +``` + +**Parameters** + +**`val`** + +[in] MxCustomStruct[ ] value to convert to CMxCustomStructArray. + +**Returns** + +CMxCustomStructArray diff --git a/aot/reference/CMxDataQuality.md b/aot/reference/CMxDataQuality.md new file mode 100644 index 0000000..4d58c8d --- /dev/null +++ b/aot/reference/CMxDataQuality.md @@ -0,0 +1,231 @@ +# CMxDataQuality Class + +Namespace: `ArchestrA.Toolkit` + +A wrapper class for handling MxDataQuality. Indicates the data quality of an associated value as the OPC-compliant data quality word. + +**Syntax** + +```csharp +public class CMxDataQuality +``` + +**Remarks** + +The high order byte is reserved by ArchestrA (do not use) as allowed by the OPC specification. + +## CMxDataQuality Property + +### Quality Property + +Provides a property to store the quality as a short. + +**Syntax** + +```csharp +public short quality; +``` + +**Returns** + +short + +## CMxDataQuality Constructors + +### CMxDataQuality Constructor + +Provides a constructor that creates a data quality with a default initial value (bad). + +**Syntax** + +```csharp +public CMxDataQuality(); +``` + +### CMxDataQuality Constructor DataQuality + +Provides a constructor to create a data quality with an initial value of DataQuality type. + +**Syntax** + +```csharp +public CMxDataQuality(DataQuality dataQuality); +``` + +**Parameters** + +**`dataQuality`** + +[in] DataQuality value to be set. + +### CMxDataQuality Constructor OpcQuality + +Provides a constructor to create a data quality with an initial value of OpcQuality type. + +**Syntax** + +```csharp +public CMxDataQuality(OpcQuality opcQuality); +``` + +**Parameters** + +**`opcQuality`** + +[in] OpcQuality value to be set. + +### CMxDataQuality Constructor short + +Provides a constructor to create a data quality with an initial value of short type. + +**Syntax** + +```csharp +public CMxDataQuality(short q); +``` + +**Parameters** + +**`q`** + +[in] short. + +## CMxDataQuality Methods + +### IsBad Method + +Provides a method to check if the current quality is bad. + +**Syntax** + +```csharp +public bool isBad { get; } +``` + +**Returns** + +bool + +### IsGood Method + +Provides a method to check if the current quality is good. + +**Syntax** + +```csharp +public bool isGood { get; } +``` + +**Returns** + +bool + +### IsInitializing Method + +Provides a method to check if the current quality is initializing. + +**Syntax** + +```csharp +public bool isInitializing { get; } +``` + +**Returns** + +bool + +### IsUncertain Method + +Provides a method to check if the current quality is uncertain. + +**Syntax** + +```csharp +public bool isUncertain { get; } +``` + +**Returns** + +bool + +## CMxDataQuality Operator Overloads + +### CMxValue Operator Overload CMxDataQuality + +Provides an operator that converts from CMxDataQuality to CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(CMxDataQuality x); +``` + +**Parameters** + +**`x`** + +[in] CMxDataQuality value to convert to CMxValue. + +**Returns** + +CMxValue + +### DataQuality Operator Overload CMxDataQuality + +Provides an operator that converts from CMxDataQuality to DataQuality. + +**Syntax** + +```csharp +public static implicit operator DataQuality(CMxDataQuality x); +``` + +**Parameters** + +**`x`** + +[in] CMxDataQuality value to convert to DataQuality. + +**Returns** + +DataQuality + +### CMxDataQuality Operator Overload DataQuality + +Provides an operator that converts from DataQuality to CMxDataQuality. + +**Syntax** + +```csharp +public static implicit operator CMxDataQuality(DataQuality x); +``` + +**Parameters** + +**`x`** + +[in] DataQuality value to convert to CMxDataQuality. + +**Returns** + +CMxDataQuality + +### CMxDataQuality Operator Overload OpcQuality + +Provides an operator that converts from OpcQuality to CMxDataQuality. + +**Syntax** + +```csharp +public static implicit operator CMxDataQuality(OpcQuality x); +``` + +**Parameters** + +**`x`** + +[in] OpcQuality value to convert to CMxDataQuality. + +**Returns** + +CMxDataQuality diff --git a/aot/reference/CMxDataType.md b/aot/reference/CMxDataType.md new file mode 100644 index 0000000..55b30ea --- /dev/null +++ b/aot/reference/CMxDataType.md @@ -0,0 +1,171 @@ +# CMxDataType Class + +Namespace: `ArchestrA.Toolkit` + +CMxDataType is derived from CMxCommon and provides support for MxDataType Attributes. + +**Syntax** + +```csharp +public class CMxDataType : CMxCommon +``` + +## CMxDataType Property + +### Value Property + +Provides a property to get and set the value as an MxDataType. + +**Syntax** + +```csharp +public MxDataType Value { get; set; } +``` + +**Returns** + +MxDataType + +## CMxDataType Constructors + +### CMxDataType Constructor + +Provides a default constructor. + +**Syntax** + +```csharp +public CMxDataType(); +``` + +### CMxDataType Constructor (MxDataType) + +Provides a constructor to initialize the class with a MxDataType default value. + +**Syntax** + +```csharp +public CMxDataType (MxDataType v); +``` + +**Parameters** + +**`v`** + +[in] MxDataType value to be set. + +### CMxDataType Constructor (SupportWrapper, string) + +Provides a constructor to initialize the class for use in a primitive wrapper. + +**Syntax** + +```csharp +public CMxDataType (SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +SupportWrapper. + +**`_attributeRef`** + +string value that holds the attribute reference. + +## CMxDataType Method + +### Set Method + +Provides a method to set the value of the Attribute from a CMxDataType. + +**Syntax** + +```csharp +public void Set(CMxDataType val); +``` + +**Parameters** + +**`val`** + +[in] CMxDataType value to be set + +## CMxDataType Operator Overloads + +### CMxDataType Operator Overload (MxDataType) + +Provides an operator to convert a MxDataType into a CMxDataType. + +**Syntax** + +```csharp +public static implicit operator CMxDataType(MxDataType x); +``` + +**Parameters** + +**`x`** + +[in] MxDataType value to convert to CMxDataType. + +**Returns** + +CMxDataType + +### CMxValue Operator Overload + +Provides an operator to convert a CMxDataType into a CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(CMxDataType val); +``` + +**Parameters** + +**`val`** + +[in] CMxDataType value to convert to CMxValue. + +**Returns** + +CMxValue + +### MxDataType Operator Overload + +Provides an operator to convert a CMxDataType into a MxDataType. + +**Syntax** + +```csharp +public static implicit operator MxDataType(CMxDataType val); +``` + +**Parameters** + +**`val`** + +[in] CMxDataType value to convert to MxDataType. + +**Returns** + +MxDataType + +### CMxDataType Operator Overload (CMxValue) + +Provides an operator to convert a CMxValue into a CMxDataType. + +**Syntax** + +```csharp +public static implicit operator CMxDataType(CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue value to convert to CMxDataType. diff --git a/aot/reference/CMxDataTypeArray.md b/aot/reference/CMxDataTypeArray.md new file mode 100644 index 0000000..a6531be --- /dev/null +++ b/aot/reference/CMxDataTypeArray.md @@ -0,0 +1,195 @@ +# CMxDataTypeArray Class + +Namespace: `ArchestrA.Toolkit` + +CMxDataTypeArray is derived from CMxArray and provides support for MxDataType Array Attributes. + +**Syntax** + +```csharp +public class CMxDataTypeArray : CMxArray +``` + +## CMxDataTypeArray Properties + +### Value Property + +Provides a property to get and set the value as a MxDataType array. + +**Syntax** + +```csharp +public MxDataType[] Value { get; set; } +``` + +**Returns** + +MxDataType[ ] + +### Property to Get and Set the MxDatatype using the [ ] Operator + +Provides a property to get and set the MxDataType value of an element using [ ] operator. + +**Syntax** + +```csharp +public MxDataType this[short i] { get; set; } +``` + +**Returns** + +MxDataType + +## CMxDataTypeArray Constructors + +### CMxDataTypeArray Constructor (int) + +Provides a constructor to initialize the array to a default length. + +**Syntax** + +```csharp +public CMxDataTypeArray(int length); +``` + +**Parameters** + +**`length`** + +[in] int value that holds the length of the array. + +### CMxDataTypeArray Constructor (MxDataType[ ]) + +Provides a constructor to initialize the class with a MxDataType array. + +**Syntax** + +```csharp +public CMxDataTypeArray (MxDataType[] value); +``` + +**Parameters** + +**`value`** + +[in] MxDataType[ ] value to be set. + +### CMxDataTypeArray Constructor (SupportWrapper, string) + +Provides a constructor to initialize the class for use in a primitive wrapper. + +**Syntax** + +```csharp +public CMxDataTypeArray (SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +[in] SupportWrapper. + +**`_attributeRef`** + +[in] string value that holds the attribute reference. + +## CMxDataTypeArray Method + +### Set Method + +Provides a method to set the value of the Attribute from a CMxDataTypeArray. + +**Syntax** + +```csharp +public void Set(CMxDataTypeArray newValue); +``` + +**Parameters** + +**`newValue`** + +[in] CMxDataTypeArray value to be set + +## CMxDataTypeArray Operator Overloads + +### CMxDataTypeArray Operator Overload (MxDataType[ ]) + +Provides a operator to convert a MxDataType array into a CMxDataTypeArray. + +**Syntax** + +```csharp +public static implicit operator CMxDataTypeArray(MxDataType[] val); +``` + +**Parameters** + +**`val`** + +[in] MxDataType[ ] value to convert to CMxDataTypeArray. + +**Returns** + +CMxDataTypeArray + +### CMxValue Operator Overload + +Provides an operator to convert a CMxDataTypeArray into a CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(CMxDataTypeArray val); +``` + +**Parameters** + +**`val`** + +[in] CMxDataTypeArray value to convert to CMxValue. + +**Returns** + +CMxValue + +### MxDataType Operator Overload + +Provides an operator to convert a CMxDataTypeArray into a MxDataType array. + +**Syntax** + +```csharp +public static implicit operator MxDataType[](CMxDataTypeArray val); +``` + +**Parameters** + +**`val`** + +[in] CMxDataTypeArray value to convert to MxDataType[ ]. + +**Returns** + +MxDataType[ ] + +### CMxDataTypeArray Operator Overload (CMxValue) + +Provides an operator to convert a CMxValue into a CMxDataTypeArray. + +**Syntax** + +```csharp +public static implicit operator CMxDataTypeArray (CMxValue val); +``` + +**Parameters** + +**`val`** + +CMxDataTypeArray + +**Returns** + +[in] CMxValue value to convert to DataTypeArray. diff --git a/aot/reference/CMxDouble.md b/aot/reference/CMxDouble.md new file mode 100644 index 0000000..a975b51 --- /dev/null +++ b/aot/reference/CMxDouble.md @@ -0,0 +1,175 @@ +# CMxDouble Class + +Namespace: `ArchestrA.Toolkit` + +CMxDouble is derived from CMxCommon and provides support for Double Attributes. + +**Syntax** + +```csharp +public class CMxDouble : CMxCommon +``` + +## CMxDouble Property + +### Value Property + +Provides a property to get and set the value as a double. + +**Syntax** + +```csharp +public double Value { get; set; } +``` + +**Returns** + +double + +## CMxDouble Constructors + +### CMxDouble Constructor + +Provides a default constructor. + +**Syntax** + +```csharp +public CMxDouble(); +``` + +### CMxDouble Constructor (double) + +Provides a constructor to initialize the class with a double default value. + +**Syntax** + +```csharp +public CMxDouble (double v); +``` + +**Parameters** + +**`v`** + +[in] double value to be set. + +### CMxDouble Constructor (SupportWrapper, string) + +Provides a constructor to initialize the class for use in a primitive wrapper. + +**Syntax** + +```csharp +public CMxDouble (SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +[in] SupportWrapper. + +**`_attributeRef`** + +[in]string value that holds attribute reference. + +## CMxDouble Method + +### Set Method + +Provides a method to set the value of the Attribute from a CMxDouble. + +**Syntax** + +```csharp +public void Set(CMxDouble val); +``` + +**Parameters** + +**`val`** + +[in] CMxDouble value to be set. + +## CMxDouble Operator Overloads + +### CMxDouble Operator Overload (double) + +Provides an operator to convert a double into a CMxDouble. + +**Syntax** + +```csharp +public static implicit operator CMxDouble(double x); +``` + +**Parameters** + +**`x`** + +[in] double value to convert to CMxDouble. + +**Returns** + +CMxDouble + +### CMxValue Operator Overload + +Provides an operator to convert a CMxDouble into a CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(CMxDouble val); +``` + +**Parameters** + +**`val`** + +[in] CMxDouble value to convert to CMxValue. + +**Returns** + +CMxValue + +### Double Operator Overload + +Provides an operator to convert a CMxDouble into a double. + +**Syntax** + +```csharp +public static implicit operator double (CMxDouble val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue value to convert to double. + +**Returns** + +double + +### CMxDouble Operator Overload (CMxValue) + +Provides an operator to convert a CMxValue into a CMxDouble. + +**Syntax** + +```csharp +public static implicit operator CMxDouble (CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue value to convert to CMxDouble. + +**Returns** + +CMxDouble diff --git a/aot/reference/CMxDoubleArray.md b/aot/reference/CMxDoubleArray.md new file mode 100644 index 0000000..e5d4b83 --- /dev/null +++ b/aot/reference/CMxDoubleArray.md @@ -0,0 +1,195 @@ +# CMxDoubleArray Class + +Namespace: `ArchestrA.Toolkit` + +CMxDoubleArray is derived from CMxArray and provides support for Double Array Attributes. + +**Syntax** + +```csharp +public class CMxDoubleArray : CMxArray +``` + +## CMxDoubleArray Properties + +### Value Property + +Provides a property to get and set the value as a double array. + +**Syntax** + +```csharp +public double [] Value { get; set; } +``` + +**Returns** + +double [ ] + +### Property to Get and Set Double Value using [ ] Operator + +Provides a property to get and set the double value of an element using [ ] operator. + +**Syntax** + +```csharp +public double this[short i] { get; set; } +``` + +**Returns** + +double + +## CMxDoubleArray Constructors + +### CMxDoubleArray Constructor (int) + +Provides a constructor to initialize the array to a default length. + +**Syntax** + +```csharp +public CMxDoubleArray(int length); +``` + +**Parameters** + +**`length`** + +[in] int value that holds the length of array. + +### CMxDoubleArray Constructor (double[ ]) + +Provides a constructor to initialize the class with a double array default value. + +**Syntax** + +```csharp +public CMxDoubleArray(double [] value); +``` + +**Parameters** + +**`value`** + +[in] double [ ] value to be set. + +### CMxDoubleArray Constructor (SupportWrapper, string) + +Provides a constructor to initialize the class for use in a primitive wrapper. + +**Syntax** + +```csharp +public CMxDoubleArray (SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +[in] SupportWrapper. + +**`_attributeRef`** + +[in] string value that holds the attribute reference. + +## CMxDoubleArray Method + +### Set Method + +Provides a method to set the value of the Attribute from a CMxDoubleArray. + +**Syntax** + +```csharp +public void Set(CMxDoubleArray newValue); +``` + +**Parameters** + +**`newValue`** + +[in] CMxDoubleArray value to be set. + +## CMxDoubleArray Operator Overloads + +### CMxDoubleArray Operator Overload (double[ ]) + +Provides an operator to convert a double array into a CMxDoubleArray. + +**Syntax** + +```csharp +public static implicit operator CMxDoubleArray(double [] val); +``` + +**Parameters** + +**`val`** + +[in] double [ ] value to convert to CMxDoubleArray. + +**Returns** + +CMxDoubleArray + +### CMxValue Operator Overload + +Provides an operator to convert a CMxDoubleArray into a CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(CMxDoubleArray val); +``` + +**Parameters** + +**`val`** + +[in] CMxDoubleArray value to convert to CMxValue. + +**Returns** + +CMxValue + +### Double Operator Overload + +Provides an operator to convert a CMxDoubleArray into a double array. + +**Syntax** + +```csharp +public static implicit operator double [](CMxDoubleArray val); +``` + +**Parameters** + +**`val`** + +[in] CMxDoubleArray value to convert to double []. + +**Returns** + +double + +### CMxDoubleArray Operator Overload (CMxValue) + +Provides an operator to convert a CMxValue into a CMxDoubleArray. + +**Syntax** + +```csharp +public static implicit operator CMxDoubleArray(CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue value to convert to CMxDoubleArray. + +**Returns** + +CMxDoubleArray diff --git a/aot/reference/CMxElapsedTime.md b/aot/reference/CMxElapsedTime.md new file mode 100644 index 0000000..1b40b1e --- /dev/null +++ b/aot/reference/CMxElapsedTime.md @@ -0,0 +1,423 @@ +# CMxElapsedTime Class + +Namespace: `ArchestrA.Toolkit` + +CMxElapsedTime is derived from CMxCommon and provides support for Elapsed time/Timespan Attributes. + +**Syntax** + +```csharp +public class CMxElapsedTime : CMxCommon +``` + +## CMxElapsedTime Property + +### Value Property + +Provides a property to get and set the value as a TimeSpan. + +**Syntax** + +```csharp +public TimeSpan Value { get; set; } +``` + +**Returns** + +TimeSpan + +## CMxElapsedTime Constructors + +### CMxElapsedTime Constructor + +Provides a default constructor. + +**Syntax** + +```csharp +public CMxElapsedTime(); +``` + +### CMxElapsedTime Constructor (TimeSpan) + +Provides a constructor to initialize the class with a TimeSpan default value. + +**Syntax** + +```csharp +public CMxElapsedTime (TimeSpan v); +``` + +**Parameters** + +**`v`** + +[in] TimeSpan value to be set. + +### CMxElapsedTime Constructor (string) + +Provides a constructor to initialize the class with a formatted time string default value. + +**Syntax** + +```csharp +public CMxElapsedTime(string timeString); +``` + +**Parameters** + +**`timeString`** + +[in] string value that holds the time. + +### CMxElapsedTime Constructor (SupportWrapper, string) + +Provides a constructor that initializes the class for use in a primitive wrapper. + +**Syntax** + +```csharp +public CMxElapsedTime (SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +[in] SupportWrapper. + +**`_attributeRef`** + +[in] string value that holds the attribute reference. + +## CMxElapsedTime Method + +### Set Method + +Sets the value of the Attribute from a CMxElapsedTime. + +**Syntax** + +```csharp +public void Set(CMxElapsedTime val); +``` + +**Parameters** + +**`val`** + +[in] CMxElapsedTime value to be set. + +## CMxElapsedTime Operator Overloads + +### CMxElapsedTime Operator Overload (TimeSpan) + +Provides an operator to convert a MxDataType into a CMxElapsedTime. + +**Syntax** + +```csharp +public static implicit operator CMxElapsedTime(TimeSpan x); +``` + +**Parameters** + +**`x`** + +[in] TimeSpan value to convert to CMxElapsedTime. + +**Returns** + +CMxElapsedTime + +### CMxValue Operator Overload + +Provides an operator to convert a CMxElapsedTime into a CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(CMxElapsedTime val); +``` + +**Parameters** + +**`val`** + +[in] CMxElapsedTime value to convert to CMxValue. + +**Returns** + +CMxValue + +### TimeSpan Operator Overload + +Provides an operator to convert a CMxElapsedTime into a MxDataType. + +**Syntax** + +```csharp +public static implicit operator TimeSpan (CMxElapsedTime val); +``` + +**Parameters** + +**`val`** + +[in] CMxElapsedTime value to convert to TimeSpan. + +**Returns** + +TimeSpan + +### CMxElapsedTime Operator Overload (CMxValue) + +Provides an operator to convert a CMxValue into a CMxElapsedTime. + +**Syntax** + +```csharp +public static implicit operator CMxElapsedTime (CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue value to convert to CMxElapsedTime. + +**Returns** + +CMxElapsedTime + +### - Operator Overload (CMxElapsedTime) + +Provides an operator to subtract a CMxElapsedTime from a CMxElapsedTime. + +**Syntax** + +```csharp +public static TimeSpan operator -(CMxElapsedTime t); +``` + +**Parameters** + +**`t`** + +[in] CMxElapsedTime value. + +**Returns** + +TimeSpan + +### - Operator Overload (CMxElapsedTime, TimeSpan) + +Provides an operator to subtract a TimeSpan from a CMxElapsedTime. + +**Syntax** + +```csharp +public static TimeSpan operator -(CMxElapsedTime t1, TimeSpan t2); +``` + +**Parameters** + +**`t1`** + +[in] CMxElapsedTime value. + +**`t2`** + +[in] TimeSpan value. + +**Returns** + +TimeSpan + +### != Operator Overload + +Provides an operator to compare a CMxElapsedtime with a TimeSpan. + +**Syntax** + +```csharp +public static bool operator !=(CMxElapsedTime t1, TimeSpan t2); +``` + +**Parameters** + +**`t1`** + +[in] CMxElapsedTime value. + +**`t2`** + +[in] TimeSpan value. + +**Returns** + +bool + +### + Operator Overload (CMxElapsedTime) + +Provides an operator to add a CMxElapsedTime to a TimeSpan. + +**Syntax** + +```csharp +public static TimeSpan operator +(CMxElapsedTime t); +``` + +**Parameters** + +**`t`** + +[in] CMxElapsedTime value. + +**Returns** + +TimeSpan + +### + Operator Overload (CMxElapsedTime, TimeSpan) + +Provides an operator to add a TimeSpan to a CMxElapsedTime. + +**Syntax** + +```csharp +public static TimeSpan operator +(CMxElapsedTime t, TimeSpan ts); +``` + +**Parameters** + +**`t`** + +[in] CMxElapsedTime value. + +**`ts`** + +[in] TimeSpan value. + +**Returns** + +TimeSpan + +### < Operator Overload + +Provides an operator to test if a CMxElapsedTime is less than a TimeSpan. + +**Syntax** + +```csharp +public static bool operator <(CMxElapsedTime t1, TimeSpan t2); +``` + +**Parameters** + +**`t1`** + +[in] CMxElapsedTime value. + +**`t2`** + +[in] TimeSpan. + +**Returns** + +bool + +### <= Operator Overload + +Provides an operator to test if a CMxElapsedTime is less than or equal to a TimeSpan. + +**Syntax** + +```csharp +public static bool operator <=(CMxElapsedTime t1, TimeSpan t2); +``` + +**Parameters** + +**`t1`** + +[in] CMxElapsedTime value. + +**`t2`** + +[in] TimeSpan value. + +**Returns** + +bool + +### == Operator Overload + +Provides an operator to test if a CMxElapsedTime and a TimeSpan are equal. + +**Syntax** + +```csharp +public static bool operator ==(CMxElapsedTime t1, TimeSpan t2); +``` + +**Parameters** + +**`t1`** + +[in] CMxElapsedTime value. + +**`t2`** + +[in] TimeSpan value. + +**Returns** + +bool + +### > Operator Overload + +Provides an operator to test if a CMxElapsedTime is greater than a TimeSpan. + +**Syntax** + +```csharp +public static bool operator >(CMxElapsedTime t1, TimeSpan t2); +``` + +**Parameters** + +**`t1`** + +[in] CMxElapsedTime value. + +**`t2`** + +[in] TimeSpan value. + +**Returns** + +bool + +### >= Operator Overload + +Provides an operator to test if a CMxElapsedTime is greater than or equal to a TimeSpan. + +**Syntax** + +```csharp +public static bool operator >=(CMxElapsedTime t1, TimeSpan t2); +``` + +**Parameters** + +**`t1`** + +[in] CMxElapsedTime value. + +**`t2`** + +[in] TimeSpan value. + +**Returns** + +bool diff --git a/aot/reference/CMxElapsedTimeArray.md b/aot/reference/CMxElapsedTimeArray.md new file mode 100644 index 0000000..8b8d9dc --- /dev/null +++ b/aot/reference/CMxElapsedTimeArray.md @@ -0,0 +1,213 @@ +# CMxElapsedTimeArray Class + +Namespace: `ArchestrA.Toolkit` + +CMxElapsedTimeArray is derived from CMxArray and provides support for Elapsed time/Timespan Array Attributes. + +**Syntax** + +```csharp +public class CMxElapsedTimeArray : CMxArray +``` + +## CMxElapsedTimeArray Properties + +### Value Property + +Provides a property to get and set the value as a TimeSpan array. + +**Syntax** + +```csharp +public TimeSpan[] Value { get; set; } +``` + +**Returns** + +TimeSpan[ ] + +### Property to Get and Set the TimeSpan Value using the [ ] Operator + +Provides a property to get and set the TimeSpan value of an element using [ ] operator. + +**Syntax** + +```csharp +public TimeSpan this[short i] { get; set; } +``` + +**Returns** + +TimeSpan + +## CMxElapsedTimeArray Constructors + +### CMxElapsedTimeArray Constructor (int) + +Provides a constructor to initialize the array to a default length. + +**Syntax** + +```csharp +public CMxElapsedTimeArray(int length); +``` + +**Parameters** + +**`length`** + +[in] int value that holds the array length. + +### CMxElapsedTimeArray Constructor (TimeSpan) + +Provide a constructor to initialize the class with a TimeSpan array. + +**Syntax** + +```csharp +public CMxElapsedTimeArray (TimeSpan[] value); +``` + +**Parameters** + +**`value`** + +[in] TimeSpan[ ] value to be set. + +### CMxElapsedTimeArray Constructor (string) + +Provides a constructor to initialize the class with a formatted time string array. + +**Syntax** + +```csharp +public CMxElapsedTimeArray (string[] value); +``` + +**Parameters** + +**`value`** + +[in] string[ ] value to be set. + +### CMxElapsedTimeArray Constructor + +Provides a constructor to initialize the class for use in a primitive wrapper. + +**Syntax** + +```csharp +public CMxElapsedTimeArray (SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +[in] SupportWrapper. + +**`_attributeRef`** + +[in] string that holds the attribute reference. + +## CMxElapsedTimeArray Method + +### Set Method + +Sets the value of the Attribute from a CMxElapsedTimeArray. + +**Syntax** + +```csharp +public void Set(CMxElapsedTimeArray newValue); +``` + +**Parameters** + +**`newValue`** + +[in] CMxElapsedTimeArray value to be set. + +## CMxElapsedTimeArray Operator Overloads + +### CMxElapsedTimeArray Operator Overload (TimeSpan) + +Provides an operator to convert a TimeSpan array into a CMxElapsedTimeArray. + +**Syntax** + +```csharp +public static implicit operator CMxElapsedTimeArray(TimeSpan[] val); +``` + +**Parameters** + +**`val`** + +[in] TimeSpan[ ] value to convert to + +CMxElapsedTimeArray. + +**Returns** + +CMxElapsedTimeArray + +### CMxValue Operator Overload + +Provides an operator to convert a CMxElapsedTimeArray into a CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(CMxElapsedTimeArray val); +``` + +**Parameters** + +**`val`** + +[in] CMxElapsedTimeArray value to convert to CMxValue. + +**Returns** + +CMxValue + +### TimeSpan Operator Overload + +Provides an operator to convert a CMxElapsedTimeArray into a TimeSpan array. + +**Syntax** + +```csharp +public static implicit operator TimeSpan[](CMxElapsedTimeArray val); +``` + +**Parameters** + +**`val`** + +[in] CMxElapsedTimeArray value to convert to TimeSpan[ ]. + +**Returns** + +TimeSpan[ ] + +### CMxElapsedTimeArray Operator Overload (CMxValue) + +Provides an operator to convert a CMxValue into a CMxElapsedTimeArray. + +**Syntax** + +```csharp +public static implicit operator CMxElapsedTimeArray (CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue value to convert to CMxElapsedTimeArray. + +**Returns** + +CMxElapsedTimeArray diff --git a/aot/reference/CMxFloat.md b/aot/reference/CMxFloat.md new file mode 100644 index 0000000..3401700 --- /dev/null +++ b/aot/reference/CMxFloat.md @@ -0,0 +1,175 @@ +# CMxFloat Class + +Namespace: `ArchestrA.Toolkit` + +CMxFloat is derived from CMxCommon and provides support for float Attributes. + +**Syntax** + +```csharp +public class CMxFloat : CMxCommon +``` + +## CMxFloat Property + +### Value Property + +Provides a property to get and set the value as a float. + +**Syntax** + +```csharp +public float Value { get; set; } +``` + +**Returns** + +float + +## CMxFloat Constructors + +### CMxFloat Constructor + +Provides a default constructor. + +**Syntax** + +```csharp +public CMxFloat(); +``` + +### CMxFloat Constructor (float) + +Provides a constructor to initialize the class with a float default value. + +**Syntax** + +```csharp +CMxFloat(float v); +``` + +**Parameters** + +**`v`** + +[in] float value to be set. + +### CMxFloat Constructor (SupportWrapper, string) + +Provides a constructor to initialize the class for use in a primitive wrapper. + +**Syntax** + +```csharp +public CMxFloat(SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +[in] SupportWrapper. + +**`_attributeRef`** + +[in] string value that holds the attribute reference. + +## CMxFloat Method + +### Set Method + +Provides a method to set the value of the Attribute from a CMxFloat. + +**Syntax** + +```csharp +public void Set(CMxFloat val); +``` + +**Parameters** + +**`val`** + +[in] CMxFloat value to be set. + +## CMxFloat Operator Overloads + +### CMxFloat Operator Overload (float) + +Provides an operator to convert a float into a CMxFloat. + +**Syntax** + +```csharp +public static implicit operator CMxFloat(float x); +``` + +**Parameters** + +**`x`** + +[in] float value to convert to CMxFloat. + +**Returns** + +CMxFloat + +### CMxValue Operator Overload + +Provides an operator to convert a CMxFloat into a CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(CMxFloat val); +``` + +**Parameters** + +**`val`** + +[in] CMxFloat to convert to CMxValue. + +**Returns** + +CMxValue + +### Float Operator Overload + +Provides an operator to convert a CMxFloat into a float. + +**Syntax** + +```csharp +public static implicit operator float(CMxFloat val); +``` + +**Parameters** + +**`val`** + +[in] CMxFloat to convert to float. + +**Returns** + +float + +### CMxFloat Operator Overload (CMxValue) + +Provides an operator to convert a CMxValue into a CMxFloat. + +**Syntax** + +```csharp +public static implicit operator CMxFloat(CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue value to convert to CMxFloat. + +**Returns** + +CMxFloat diff --git a/aot/reference/CMxFloatArray.md b/aot/reference/CMxFloatArray.md new file mode 100644 index 0000000..cfa0dda --- /dev/null +++ b/aot/reference/CMxFloatArray.md @@ -0,0 +1,195 @@ +# CMxFloatArray Class + +Namespace: `ArchestrA.Toolkit` + +CMxFloatArray is derived from CMxArray and provides support for float Array Attributes. + +**Syntax** + +```csharp +public class CMxFloatArray : CMxArray +``` + +## CMxFloatArray Properties + +### Value Property + +Provides a property to get and set the value as a float array. + +**Syntax** + +```csharp +public float [] Value { get; set; } +``` + +**Returns** + +float [ ] + +### Property to get and set using [ ] operator + +Provides a property to get and set the float value of an element using [ ] operator. + +**Syntax** + +```csharp +public float this[short i] { get; set; } +``` + +**Returns** + +float + +## CMxFloatArray Constructors + +### CMxFloatArray Constructor (int) + +Provides a constructor to initialize the array to a default length. + +**Syntax** + +```csharp +public CMxFloatArray(int length); +``` + +**Parameters** + +**`length`** + +[in] integer value that holds array length. + +### CMxFloatArray Constructor (float[ ]) + +Provides a constructor to initialize the class with a float array. + +**Syntax** + +```csharp +public CMxFloatArray(float[] value); +``` + +**Parameters** + +**`value`** + +[in] float[ ] value. + +### CMxFloatArray Constructor (SupportWrapper, string) + +Provides a constructor to initialize the class for use in a primitive wrapper. + +**Syntax** + +```csharp +public CMxFloatArray (SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +[in] SupportWrapper. + +**`_attributeRef`** + +[in] string value that holds the attribute reference. + +## CMxFloatArray Method + +### Set Method + +Provides a method to set the value of the Attribute from a CMxFloat Array. + +**Syntax** + +```csharp +public void Set(CMxFloatArray newValue); +``` + +**Parameters** + +**`newValue`** + +[in] CMxFloatArray value to be set. + +## CMxFloatArray Operator Overloads + +### CMxFloatArray Operator Overload (float[ ]) + +Provides an operator to convert a float array into a CMxFloatArray. + +**Syntax** + +```csharp +public static implicit operator CMxFloatArray(float[] val); +``` + +**Parameters** + +**`val`** + +[in] float[ ] value to convert to CMxFloatArray. + +**Returns** + +CMxFloatArray + +### CMxValue Operator Overload + +Provides an operator to convert a CMxFloatArray into a CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(CMxFloatArray val); +``` + +**Parameters** + +**`val`** + +[in] CMxFloatArray value to convert to CMxValue. + +**Returns** + +CMxValue + +### Float Operator Overload + +Provides an operator to convert a CMxFloatArray into a float array. + +**Syntax** + +```csharp +public static implicit operator float[](CMxFloatArray val); +``` + +**Parameters** + +**`val`** + +[in] CMxFloatArray value to convert to float[]. + +**Returns** + +float[ ] + +### CMxFloatArray Operator Overload (CMxValue) + +Provides an operator to convert a CMxValue into a CMxFloatArray. + +**Syntax** + +```csharp +public static implicit operator CMxFloatArray(CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue value to convert to CMxFloatArray. + +**Returns** + +CMxFloatArray diff --git a/aot/reference/CMxIndirect.md b/aot/reference/CMxIndirect.md new file mode 100644 index 0000000..a002ed3 --- /dev/null +++ b/aot/reference/CMxIndirect.md @@ -0,0 +1,155 @@ +# CMxIndirect Class + +Namespace: `ArchestrA.Toolkit` + +CMxIndirect is a support class that allows a user to connect to an external attribute and read/write its value. + +**Syntax** + +```csharp +public class CMxIndirect : CMxIndirectBase +``` + +## CMxIndirect Properties + +### Value Property + +Allows a user to read/write the value of the referenced attribute. + +**Syntax** + +```csharp +public CMxValue Value { get; set; } +``` + +**Returns** + +CMxValue + +### DataQualityOfLastRead Property + +There are several methods that cause the value of the referenced attribute to be read, that is, Value, TestRead but they do not directly return the data quality. This property contains the data quality of the last read attribute so that it can be used. + +**Syntax** + +```csharp +public CMxDataQuality DataQualityOfLastRead { get; } +``` + +**Returns** + +CMxDataQuality + +### StatusOfLastRead Property + +There are several methods that cause the value of the referenced attribute to be read, that is, Value, TestRead but do not directly return the status. This property contains the status of the last read so that it can be checked. + +**Syntax** + +```csharp +public MxStatus StatusOfLastRead { get; } +``` + +**Returns** + +MxStatus + +### TestRead Property + +TestRead performs a read check on the indirect but does not return the value. It returns true if the status of the read was successful. The data quality and full status can be accessed by DataQualityOfLastRead and StatusOfLastRead. + +**Syntax** + +```csharp +public bool TestRead { get; } +``` + +**Returns** + +bool + +### TimeStampOfLastRead Property + +There are several methods that cause the value of the referenced attribute to be read, that is, Value, TestRead but do not directly return the timestamp. This property contains the timestamp of the last read so that it can be used. + +**Syntax** + +```csharp +DateTime TimeStampOfLastRead { get; } +``` + +**Returns** + +DateTime + +## CMxIndirect Constructor + +### CMxIndirect Constructor string,string,IMxSupervisoryConnection3,RuntimeBase, int,short,int + +This is an internal constructor intended for use only in BindTo. + +**Syntax** + +```csharp +CMxIndirect(string _fullRefString, string _context, IMxSupervisoryConnection3 _superConn, RuntimeBase _rb, int _refHandle, short _statusId, int _statusIndex) +``` + +**Parameters** + +**`_fullRefString`** + +[in] Full reference string of the attribute to bind to. + +**`_context`** + +[in] Context of the reference. + +**`_superConn`** + +[in] A supervisory connection to the runtime. + +**`_rb`** + +[in] handle to the RuntimeBase class instance that created this indirect. + +**`_refHandle`** + +[in] The ArchestrA reference handle of the registered reference. + +**`_statusId`** + +[in] The attribute id of the dynamic array that holds the write status. + +**`_statusIndex`** + +[in] The index of the element in the dynamic status array that this reference uses. + +## CMxIndirect Method + +### Get Method + +Provides a method to get the value, timestamp, and data quality of the referenced attribute in a single operation. + +**Syntax** + +```csharp +public bool Get(out CMxValue value, out DateTime timeStamp, out CMxDataQuality quality); +``` + +**Parameters** + +**`value`** + +[out] the value of the reference attribute. + +**`timestamp`** + +[out] the timestamp of the reference attribute. + +**`quality`** + +[out] the data quality of the reference attribute. + +**Returns** + +bool diff --git a/aot/reference/CMxIndirectBase.md b/aot/reference/CMxIndirectBase.md new file mode 100644 index 0000000..fe30522 --- /dev/null +++ b/aot/reference/CMxIndirectBase.md @@ -0,0 +1,273 @@ +# CMxIndirectBase Class + +Namespace: `ArchestrA.Toolkit` + +CMxIndirectBase is an inherited class that provides methods and properties common to the two types of Indirects: CMxIndirect and CMxIndirectWriteOnly. + +**Syntax** + +```csharp +public class CMxIndirectBase +``` + +## CMxIndirectBase Properties + +### Context Property + +The context that was used to create the indirect. + +**Syntax** + +```csharp +public string Context { get; } +``` + +**Returns** + +string + +### FullReferenceString Property + +The reference string that was used to create the CMXIndirectBase instance. + +**Syntax** + +```csharp +public string FullReferenceString { get; } +``` + +**Returns** + +string + +### HasTimedOut Property + +Indirects contains a timer that tracks how long it successfully connected to its remote attribute. If this time is longer than the TimeOut value, then this property returns true. + +**Syntax** + +```csharp +public bool HasTimedOut { get; } +``` + +**Returns** + +bool + +### RefHandle Property + +The RefHandle is the ArchestrA id for the reference bound to this Indirect. + +**Syntax** + +```csharp +public int RefHandle { get; } +``` + +**Returns** + +int + +### StatusId Property + +The status of a write is written to a dynamic attribute array. This is attribute id of the dynamic array. + +**Syntax** + +```csharp +public short StatusId { get; } +``` + +**Returns** + +short + +### StatusIndex Property + +The status of a write is written to a dynamic attribute array. This is the index of the element of that array that this indirect will write its status to. + +**Syntax** + +```csharp +public int StatusIndex { get; } +``` + +**Returns** + +int + +### StatusOfLastWrite Property + +This returns the status value of the last write attempt from the dynamic attribute array. + +A user can monitor this value to seen when a write has completed, successfully or otherwise. + +**Syntax** + +```csharp +public MxStatus StatusOfLastWrite { get; } +``` + +**Returns** + +MxStatus + +### TimeOut Property + +Allows the user the set the TimeOut used by HasTimedOut. + +**Syntax** + +```csharp +public TimeSpan TimeOut { get; set; } +``` + +**Returns** + +TimeSpan + +## CMxIndirectBase Constructor + +### CMxIndirectBase Constructor string, string, ArchestrA.Core.IMxSupervisoryConnection3, RuntimeBase, int, short, int + +This is an internal constructor intended for use only by derived classes. + +**Syntax** + +```csharp +CMxIndirectBase(string _fullRefString, string _context, ArchestrA.Core.IMxSupervisoryConnection3 _superConn, RuntimeBase _rb, int _refHandle, short _statusId, int _statusIndex) +``` + +**Parameters** + +**`_fullRefString`** + +[in] Full reference string of the attribute to bind to. + +**`_context`** + +[in] Context of the reference. + +**`_superConn`** + +[in] A supervisory connection to the runtime. + +**`_rb`** + +[in] A handle to the RuntimeBase class instance that created this indirect. + +**`_refHandle`** + +[in] The ArchestrA reference handle of the registered reference. + +**`_statusId`** + +[in] The attribute id of the dynamic array that holds the write status's. + +**`_statusIndex`** + +[in] The index of the element in the dynamic status array that this reference uses. + +## CMxIndirectBase Methods + +### Activate Method + +Activates a suspended indirect. + +**Syntax** + +```csharp +public bool Activate(); +``` + +**Returns** + +bool + +### Activate Method(ArchestrA.MessageExchange.IMxCallback2) + +Activates a suspended indirect and allows the user to supply a callback variable. + +**Syntax** + +```csharp +public bool Activate(ArchestrA.MessageExchange.IMxCallback2 callback) +``` + +**Parameters** + +**`callback`** + +[in] The callback supplied by the user to be called when the Activate has finished. + +**Returns** + +bool + +### Set Method(CMxValue, DateTime) + +Writes the value and timestamp to the indirect in a single operation. + +**Syntax** + +```csharp +public bool Set(CMxValue value, DateTime timeStamp) +``` + +**Parameters** + +**`value`** + +[in] The value to be written. + +**`timeStamp`** + +[in] The timestamp for the value. + +**Returns** + +bool + +### Suspend Method + +Suspends an active indirect. + +**Syntax** + +```csharp +public bool Suspend() +``` + +**Returns** + +bool + +### Suspend Method (ArchestrA.MessageExchange.IMxCallback2) + +Suspends an active indirect and allows the user to supply a callback variable. + +**Syntax** + +```csharp +public bool Suspend(ArchestrA.MessageExchange.IMxCallback2 callback) +``` + +**Parameters** + +**`callback`** + +[in] The callback supplied by the user to be called when the Suspend has finished. + +**Returns** + +bool + +### Unbind Method + +Unbinds the indirect, releasing the ArchestrA reference and dynamic status array index. + +**Syntax** + +```csharp +public void Unbind() +``` diff --git a/aot/reference/CMxIndirectWriteOnly.md b/aot/reference/CMxIndirectWriteOnly.md new file mode 100644 index 0000000..5bd83db --- /dev/null +++ b/aot/reference/CMxIndirectWriteOnly.md @@ -0,0 +1,69 @@ +# CMxIndirectWriteOnly Class + +Namespace: `ArchestrA.Toolkit` + +CMxIndirectWriteOnly is a support class that allows a user to connect to an external attribute and write its value. This type of indirect has less overhead than one that is readable as well as writable. + +**Syntax** + +```csharp +public class CMxIndirectWriteOnly : CMxIndirectBase +``` + +## CMxIndirectWriteOnly Property + +### Value Property + +Allows a user to set the value of the referenced attribute. + +**Syntax** + +```csharp +public CMxValue Value { set; } +``` + +**Returns** + +CMxValue + +## CMxIndirectWriteOnly Constructor + +### CMxIndirectWriteOnly Constructor string, string, IMxSupervisoryConnection3, RuntimeBase, int, short, int + +This is an internal constructor intended for use only in BindToWriteOnly. + +**Syntax** + +```csharp +CMxIndirectWriteOnly(string _fullRefString, string _context, IMxSupervisoryConnection3 _superConn, RuntimeBase _rb, int _refHandle, short _statusId, int _statusIndex) +``` + +**Parameters** + +**`_fullRefString`** + +[in] Full reference string of the attribute to bind to. + +**`_context`** + +[in] Context of the reference. + +**`_superConn`** + +[in] A supervisory connection to the runtime. + +**`_rb`** + +[in] handle to the RuntimeBase class instance that created this indirect. + +**`_refHandle`** + +[in] The ArchestrA reference handle of the registered reference. + +**`_statusId`** + +[in] The attribute id of the dynamic array that holds the write status's. + +**`_statusIndex`** + +[in] The index of the element in the dynamic status array that this reference uses. diff --git a/aot/reference/CMxInteger.md b/aot/reference/CMxInteger.md new file mode 100644 index 0000000..df18ca0 --- /dev/null +++ b/aot/reference/CMxInteger.md @@ -0,0 +1,175 @@ +# CMxInteger Class + +Namespace: `ArchestrA.Toolkit` + +CMxInteger is derived from CMxCommon and provides support for Integer Attributes. + +**Syntax** + +```csharp +public class CMxInteger : CMxCommon +``` + +## CMxInteger Property + +### Value Property + +Provides a property to get and set the value as an int. + +**Syntax** + +```csharp +public int Value { get; set; } +``` + +**Returns** + +int + +## CMxInteger Constructors + +### CMxInteger Constructor + +Provides a default constructor. + +**Syntax** + +```csharp +public CMxInteger(); +``` + +### CMxInteger Constructor (int) + +Provides a constructor to initialize the class with an int. + +**Syntax** + +```csharp +public CMxInteger (int v); +``` + +**Parameters** + +**`v`** + +[in] int value to be set. + +### CMxInteger Constructor (SupportWrapper, string) + +Provides a constructor to initialize the class for use in a primitive wrapper. + +**Syntax** + +```csharp +public CMxInteger (SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +[in] SupportWrapper. + +**`_attributeRef`** + +[in] string value that holds the attribute reference. + +## CMxInteger Method + +### Set Method + +Provides a method to set the value of the Attribute from a CMxInteger. + +**Syntax** + +```csharp +public void Set(CMxInteger val); +``` + +**Parameters** + +**`val`** + +[in] CMxInteger value to be set. + +## CMxInteger Operator Overloads + +### CMxInteger Operator Overload (int) + +Provides an operator to convert an int into a CMxInteger. + +**Syntax** + +```csharp +public static implicit operator CMxInteger(int x); +``` + +**Parameters** + +**`x`** + +[in] int value to convert to CMxInteger. + +**Returns** + +CMxInteger + +### CMxValue Operator Overload + +Provides an operator to convert a CMxInteger into a CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(CMxInteger val); +``` + +**Parameters** + +**`val`** + +[in] CMxInteger value to convert to CMxValue. + +**Returns** + +CMxValue + +### int Operator Overload (CMxInteger) + +Conversion operator that converts from CMxInteger to int. + +**Syntax** + +```csharp +public static implicit operator int (CMxInteger val); +``` + +**Parameters** + +**`val`** + +[i] CMxInteger value to convert to int. + +**Returns** + +int + +### CMxInteger Operator Overload (CMxValue) + +Provides an operator to convert a CMxValue into a CMxInteger. + +**Syntax** + +```csharp +public static implicit operator CMxInteger (CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue value to convert to CMxInteger. + +**Returns** + +CMxInteger diff --git a/aot/reference/CMxIntegerArray.md b/aot/reference/CMxIntegerArray.md new file mode 100644 index 0000000..d778376 --- /dev/null +++ b/aot/reference/CMxIntegerArray.md @@ -0,0 +1,195 @@ +# CMxIntegerArray Class + +Namespace: `ArchestrA.Toolkit` + +CMxIntegerArray is derived from CMxArray and provides support for Integer Array Attributes. + +**Syntax** + +```csharp +public class CMxIntegerArray : CMxArray +``` + +## CMxIntegerArray Properties + +### Value Property + +Provides a property to get and set the value as an int array. + +**Syntax** + +```csharp +public int Value { get; set; } +``` + +**Returns** + +int[ ] + +### Property to Get and Set the Int Value using the [ ] Operator + +Provides a property to get and set the int value of an element using[ ] operator. + +**Syntax** + +```csharp +public int this[short i] { get; set; } +``` + +**Returns** + +int + +## CMxIntegerArray Constructors + +### CMxIntegerArray Constructor (int) + +Provides a constructor to initialize the array to a default length. + +**Syntax** + +```csharp +public CMxIntegerArray(int length); +``` + +**Parameters** + +**`length`** + +[in] integer value that holds the length of the array. + +### CMxIntegerArray Constructor (int[ ]) + +Provides a constructor to initialize the class with an int array. + +**Syntax** + +```csharp +public CMxIntegerArray(int [] value); +``` + +**Parameters** + +**`value`** + +[in] int array value to be set. + +### CMxIntegerArray Constructor (SupportWrapper, string) + +Provide a constructor to initialize the class for use in a primitive wrapper. + +**Syntax** + +```csharp +public CMxIntegerArray (SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +[in] SupportWrapper. + +**`_attributeRef`** + +[in] string value that holds the attribute reference. + +## CMxIntegerArray Method + +### Set Method + +Provides a method to set the value of the Attribute from a CMxIntegerArray. + +**Syntax** + +```csharp +public void Set(CMxIntegerArray newValue); +``` + +**Parameters** + +**`newValue`** + +[in] CMxIntegerArray instance value to be set. + +## CMxIntegerArray Operator Overloads + +### CMxIntegerArray Operator Overload (int[ ]) + +Provides an operator to convert an int array into a CMxInteger Array. + +**Syntax** + +```csharp +public static implicit operator CMxIntegerArray(int [] val); +``` + +**Parameters** + +**`val`** + +[in] int [ ] value to convert to CMxIntegerArray. + +**Returns** + +CMxIntegerArray + +### CMxValue Operator Overload + +Provides an operator to convert a CMxInteger Array into a CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(CMxIntegerArray val); +``` + +**Parameters** + +**`val`** + +[in] CMxIntegerArray to convert to CMxValue. + +**Returns** + +CMxValue + +### int[ ] Operator Overload + +Provides an operator to convert a CMxIntegerArray into an int array. + +**Syntax** + +```csharp +public static implicit operator int [](CMxIntegerArray val); +``` + +**Parameters** + +**`val`** + +[in] CMxIntegerArray to convert to int []. + +**Returns** + +int[ ] + +### CMxIntegerArray Operator Overload (CMxValue) + +Provides an operator to convert a CMxValue into a CMxIntegerArray. + +**Syntax** + +```csharp +public static implicit operator CMxIntegerArray(CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue to convert to CMxIntegerArray. + +**Returns** + +CMxIntegerArray diff --git a/aot/reference/CMxInternalDumpLoadData.md b/aot/reference/CMxInternalDumpLoadData.md new file mode 100644 index 0000000..834e853 --- /dev/null +++ b/aot/reference/CMxInternalDumpLoadData.md @@ -0,0 +1,59 @@ +# CMxInternalDumpLoadData Class + +Namespace: `ArchestrA.Toolkit` + +CMxInternalDumpLoadData class is derived from CMxCustomStruct and provides support for dump/load at Configtime. + +**Syntax** + +```csharp +public class CMxInternalDumpLoadData : CMxCustomStruct +``` + +## CMxInternalDumpLoadData Property + +### StructID Property + +Provides a property to indicate the struct ID for CMxInternalDumpLoadData. + +**Syntax** + +```csharp +public const int structId = 369875326; +``` + +**Returns** + +int + +## CMxInternalDumpLoadData Constructors + +### CMxInternalDumpLoadData Constructor + +Provides a default constructor. + +**Syntax** + +```csharp +public CMxInternalDumpLoadData(); +``` + +### CMxInternalDumpLoadData Constructor SupportWrapper, string + +Provides a constructor to initialize the class for use in a primitive wrapper. + +**Syntax** + +```csharp +public CMxInternalDumpLoadData(SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +[in] SupportWrapper. + +**`_attributeRef`** + +[in] string value that holds the attribute reference. diff --git a/aot/reference/CMxInternalFailoverData.md b/aot/reference/CMxInternalFailoverData.md new file mode 100644 index 0000000..8d39c07 --- /dev/null +++ b/aot/reference/CMxInternalFailoverData.md @@ -0,0 +1,59 @@ +# CMxInternalFailoverData Class + +Namespace: `ArchestrA.Toolkit` + +CMxInternalFailoverData class is derived from CMxCustomStruct and provides support for failover at Runtime. + +**Syntax** + +```csharp +public class CMxInternalFailoverData : CMxCustomStruct +``` + +## CMxInternalFailoverData Property + +### StructID Property + +Provides a property to indicate the struct ID for CMxInternalFailoverData. + +**Syntax** + +```csharp +public const int structId = 369875325; +``` + +**Returns** + +int + +## CMxInternalFailoverData Constructors + +### CMxInternalFailoverData Constructor + +Provides a default constructor. + +**Syntax** + +```csharp +public CMxInternalFailoverData (); +``` + +### CMxInternalFailoverData Constructor SupportWrapper, string + +Provides a constructor to initialize the class for use in a primitive wrapper. + +**Syntax** + +```csharp +public CMxInternalFailoverData (SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +[in] SupportWrapper + +**`_attributeRef`** + +[in] string value that holds the attribute reference. diff --git a/aot/reference/CMxInternationalizedString.md b/aot/reference/CMxInternationalizedString.md new file mode 100644 index 0000000..b8df235 --- /dev/null +++ b/aot/reference/CMxInternationalizedString.md @@ -0,0 +1,235 @@ +# CMxInternationalizedString Class + +Namespace: `ArchestrA.Toolkit` + +CMxInternationalizedString is derived from CMxCommon and provides support for Internationalized string Attributes. + +**Syntax** + +```csharp +public class CMxInternationalizedString : CMxCommon +``` + +## CMxInternationalizedString Properties + +### Value Property + +Provides a property to get and set the value as an MxDataType. + +**Syntax** + +```csharp +public MxDataType Value { get; set; } +``` + +**Returns** + +MxDataType + +### Locale Property + +Provides a method return a string of the default value. + +**Syntax** + +```csharp +public int Locale { get; set; } +``` + +**Returns** + +int + +## CMxInternationalizedString Constructors + +### CMxInternationalizedString Constructor + +Provides a default constructor. + +**Syntax** + +```csharp +public CMxInternationalizedString (); +``` + +### CMxInternationalizedString Constructor CMxValue + +Provides a constructor that initializes the class with a CMxValue default Value. + +**Syntax** + +```csharp +public CMxInternationalizedString (CMxValue v); +``` + +**Parameters** + +**`v`** + +[in] CMxValue instance value. + +### CMxInternationalizedString Constructor string + +Provides a constructor that initializes the class with a string default Value. + +**Syntax** + +```csharp +public CMxInternationalizedString (string v); +``` + +**Parameters** + +**`v`** + +[in] string value. + +### CMxInternationalizedString Constructor SupportWrapper, string + +Provides a constructor that initializes the class for use in a primitive wrapper. + +**Syntax** + +```csharp +public CMxInternationalizedString (SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +[in] SupportWrapper + +**`_attributeRef`** + +[in] string value that holds the attribute reference. + +## CMxInternationalizedString Methods + +## GetString Method + +## SetString Method + +## Set Method + +## CMxInternationalizedString Operator Overloads + +### CMxValue Operator Overload + +Provides an operator that converts from CMxInternationalizedString to CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(CMxInternationalizedString val); +``` + +**Parameters** + +**`val`** + +[in] CMxInternationalizedString instance. + +**Returns** + +CMxValue + +### CMxString Operator Overload + +Provides an operator that converts from CMxInternationalizedString to CMxString. + +**Syntax** + +```csharp +public static implicit operator CMxString(CMxInternationalizedString val); +``` + +**Parameters** + +**`val`** + +[in] CMxInternationalizedString instance. + +**Returns** + +CMxString + +### string operator Overload + +Provides an operator that converts from CMxInternationalizedString to string. + +**Syntax** + +```csharp +public static implicit operator string(CMxInternationalizedString val); +``` + +**Parameters** + +**`val`** + +[in] CMxInternationalizedString instance value. + +**Returns** + +string + +### CMxInternationalizedString Operator Overload CMxString + +Provides an operator that converts from CMxString to CMxInternationalizedString. + +**Syntax** + +```csharp +public static implicit operator CMxInternationalizedString(CMxString val); +``` + +**Parameters** + +**`val`** + +[in] CMxString instance value. + +**Returns** + +CMxInternationalizedString + +### CMxInternationalizedString Operator Overload CMxValue + +Provides an operator that converts from CMxValue to CMxInternationalizedString. + +**Syntax** + +```csharp +public static implicit operator CMxInternationalizedString(CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue value. + +**Returns** + +CMxInternationalizedString + +### CMxInternationalizedString Operator Overload string + +Provides an operator that converts from string to CMxInternationalizedString. + +**Syntax** + +```csharp +public static implicit operator CMxInternationalizedString(string x); +``` + +**Parameters** + +**`x`** + +[in] string. + +**Returns** + +CMxInternationalizedString diff --git a/aot/reference/CMxInternationalizedStringArray.md b/aot/reference/CMxInternationalizedStringArray.md new file mode 100644 index 0000000..6ccf9e5 --- /dev/null +++ b/aot/reference/CMxInternationalizedStringArray.md @@ -0,0 +1,317 @@ +# CMxInternationalizedStringArray Class + +Namespace: `ArchestrA.Toolkit` + +CMxInternationalizedStringArray is derived from CMxArray and provides support for Arrays of Internationalized Strings. + +**Syntax** + +```csharp +public class CMxInternationalizedStringArray : CMxArray +``` + +## CMxInternationalizedStringArray Properties + +### Locale Property + +Provides a property to gets or set the current locale. + +**Syntax** + +```csharp +public int Locale { get; set; } +``` + +**Returns** + +int + +### Value Property + +Provides a property to get and set the value of the current locale as an array of strings. + +**Syntax** + +```csharp +public string[] Value { get; set; } +``` + +**Returns** + +string[ ] + +### Property to get and set current locale as a string + +Provides a property to get and set value of a specified element of the current locale as a string. + +**Syntax** + +```csharp +public string this[short i] { get; set; } +``` + +**Returns** + +string + +## CMxInternationalizedStringArray Constructors + +### CMxInternationalizedStringArray Constructor int + +Provides a constructor to initialize the array to a default length. + +**Syntax** + +```csharp +public CMxInternationalizedStringArray(int length); +``` + +**Parameters** + +**`length`** + +[in] int value that holds the array length. + +### CMxInternationalizedStringArray Constructor string[] + +Provides a constructor to initialize the array with an array of strings. + +**Syntax** + +```csharp +public CMxInternationalizedStringArray(string[] value); +``` + +**Parameters** + +**`value`** + +[in] string[ ]. + +### CMxInternationalizedStringArray Constructor SupportWrapper, string + +Provides a constructor to initialize the class for use in a primitive wrapper. + +**Syntax** + +```csharp +public CMxInternationalizedStringArray(SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +[in] SupportWrapper. + +**`_attributeRef`** + +[in] string value that holds the attribute reference. + +## CMxInternationalizedStringArray Methods + +### GetString Method + +Provides a method to get the value of an element by locale. + +**Syntax** + +```csharp +public string GetString(short index, int _locale); +``` + +**Parameters** + +**`index`** + +[in] index of the element. + +**`locale`** + +[in] int value that holds the locale. + +**Returns** + +string + +### GetStrings Method + +Provides a method to get the value of all elements by locale. + +**Syntax** + +```csharp +public string[] GetStrings(int _locale); +``` + +**Parameters** + +**`locale`** + +[in] Int value that holds the locale. + +**Returns** + +string[ ] + +### SetString Method + +Provides a method to set the value of a element by locale. + +**Syntax** + +```csharp +public void SetString(short index, int _locale, string val); +``` + +**Parameters** + +**`index`** + +[in] index of the element. + +**`locale`** + +[in] Int value that holds the locale to be set. + +**`val`** + +[in] string that holds the value to be set. + +### Set Method + +Provides a method to set the value of the Attribute from a CMxInternationalizedStringArray. + +**Syntax** + +```csharp +public void Set(CMxInternationalizedStringArray newValue); +``` + +**Parameters** + +**`val`** + +[in] CMxInternationalizedStringArray value to be set. + +## CMxInternationalizedStringArray Operator Overloads + +### string[ ] Operator Overload + +Provides an operator that converts from CMxInternationalizedStringArray to string array. + +**Syntax** + +```csharp +public static implicit operator string[](CMxInternationalizedStringArray val); +``` + +**Parameters** + +**`val`** + +[in] CMxInternationalizedStringArray instance value. + +**Returns** + +string[ ] + +### CMxValue Operator Overload + +Provides an operator that converts from CMxInternationalizedStringArray to CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(CMxInternationalizedStringArray val); +``` + +**Parameters** + +**`val`** + +[in] CMxInternationalizedStringArray instance value. + +**Returns** + +CMxValue + +### CMxStringArray Operator Overload + +Provides an operator that converts from CMxInternationalizedStringArray to CMxStringArray. + +**Syntax** + +```csharp +public static implicit operator CMxStringArray(CMxInternationalizedStringArray val); +``` + +**Parameters** + +**`val`** + +[in] CMxInternationalizedStringArray instance value. + +**Returns** + +CMxStringArray + +### CMxInternationalizedStringArray Operator Overload CMxStringArray + +Provides an operator that converts from CMxStringArray to CMxInternationalizedStringArray. + +**Syntax** + +```csharp +public static implicit operator CMxInternationalizedStringArray(CMxStringArray val); +``` + +**Parameters** + +**`val`** + +[in] CMxStringArray instance value. + +**Returns** + +CMxInternationalizedStringArray + +### CMxInternationalizedStringArray Operator Overload CMxValue + +Provides an operator that converts from CMxValue to CMxInternationalizedStringArray. + +**Syntax** + +```csharp +public static implicit operator CMxInternationalizedStringArray(CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue instance value. + +**Returns** + +CMxInternationalizedStringArray + +### CMxInternationalizedStringArray Operator Overload string[ ] + +Provides an operator that converts from string array to CMxInternationalizedStringArray. + +**Syntax** + +```csharp +public static implicit operator CMxInternationalizedStringArray(string[] val); +``` + +**Parameters** + +**`val`** + +[in] string[ ]. + +**Returns** + +CMxInternationalizedStringArray diff --git a/aot/reference/CMxReference.md b/aot/reference/CMxReference.md new file mode 100644 index 0000000..08785ff --- /dev/null +++ b/aot/reference/CMxReference.md @@ -0,0 +1,175 @@ +# CMxReference Class + +Namespace: `ArchestrA.Toolkit` + +CMxReference is derived from CMxCommon and provides support for Reference Attributes. + +**Syntax** + +```csharp +public class CMxReference : CMxCommon +``` + +## CMxReference Property + +### Value Property + +Provides a property to get or set the value as a full reference string. + +**Syntax** + +```csharp +public string Value { get; set; } +``` + +**Returns** + +string + +## CMxReference Constructors + +### CMxReference Constructor + +Provides a default constructor. + +**Syntax** + +```csharp +public CMxReference (); +``` + +### CMxReference Constructor string + +Provides a constructor to initialize the class with a full reference string. + +**Syntax** + +```csharp +public CMxReference (string v); +``` + +**Parameters** + +**`v`** + +[in] string value that holds the reference. + +### CMxReference Constructor SupportWrapper, string + +Provides a constructor to initialize the class for use in a primitive wrapper. + +**Syntax** + +```csharp +public CMxReference (SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +[in] SupportWrapper. + +**`_attributeRef`** + +[in] string value that holds the attribute reference. + +## CMxReference Method + +### Set Method + +Provides a method to set the value of the Attribute from a CMxReference. + +**Syntax** + +```csharp +public void Set(CMxReference val); +``` + +**Parameters** + +**`val`** + +[in] CMxReference value. + +## CMxReference Operator Overloads + +### CMxReference Operator Overload string + +Provides an operator that converts from full reference string to CMxReference. + +**Syntax** + +```csharp +public static implicit operator CMxReference (string x); +``` + +**Parameters** + +**`x`** + +[in] string to convert to CMxReference. + +**Returns** + +CMxReference + +### CMxValue Operator Overload + +Provides an operator that converts from CMxReference to CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(CMxReference val); +``` + +**Parameters** + +**`val`** + +[in] CMxReference value to convert to CMxValue. + +**Returns** + +CMxValue + +### string Operator Overload + +Provides an operator that converts from CMxReference to full reference string. + +**Syntax** + +```csharp +public static implicit operator string (CMxReference val); +``` + +**Parameters** + +**`val`** + +[in] CMxReference value to convert to string. + +**Returns** + +string + +### CMxReference Operator Overload CMxValue + +Provides an operator that converts from CMxValue to CMxReference. + +**Syntax** + +```csharp +public static implicit operator CMxReference (CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue value to convert to CMxReference. + +**Returns** + +CMxReference diff --git a/aot/reference/CMxReferenceArray.md b/aot/reference/CMxReferenceArray.md new file mode 100644 index 0000000..e995f59 --- /dev/null +++ b/aot/reference/CMxReferenceArray.md @@ -0,0 +1,195 @@ +# CMxReferenceArray Class + +Namespace: `ArchestrA.Toolkit` + +CMxReferenceArray is derived from CMxArray and provides support for Reference Array Attributes. + +**Syntax** + +```csharp +public class CMxReferenceArray : CMxArray +``` + +## CMxReferenceArray Properties + +### Value Property + +Provides a property to get or set the value as a string array. + +**Syntax** + +```csharp +public string[] Value { get; set; } +``` + +**Returns** + +string[ ] + +### Property to Get and Set an Element using the [ ] Operator + +Provides a property to get or set the string value of an element using [ ] operator. + +**Syntax** + +```csharp +public string this[short i] { get; set; } +``` + +**Returns** + +string + +## CMxReferenceArray Constructors + +### CMxReferenceArray Constructor int + +Provides a constructor to initialize the array to a default length. + +**Syntax** + +```csharp +public CMxReferenceArray(int length); +``` + +**Parameters** + +**`length`** + +[in] int value that holds the array length. + +### CMxReferenceArray Constructor string[ ] + +Provides a constructor to initialize the class with a string array default value. + +**Syntax** + +```csharp +public CMxReferenceArray (string[] value); +``` + +**Parameters** + +**`value`** + +[in] string[ ]. + +### CMxReferenceArray Constructor SupportWrapper, string + +Provides a constructor to initialize the class for use in a primitive wrapper. + +**Syntax** + +```csharp +public CMxReferenceArray (SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +[in] SupportWrapper. + +**`_attributeRef`** + +[in] int value that holds the array length. + +## CMxReferenceArray Method + +### Set Method + +Provides a method to set the value of the Attribute from a CMxReferenceArray. + +**Syntax** + +```csharp +public void Set(CMxReferenceArray newValue); +``` + +**Parameters** + +**`newValue`** + +[in] CMxReferenceArray instance value. + +## CMxReferenceArray Operator Overloads + +### CMxReferenceArray Operator Overload string[ ] + +Provides an operator that converts from string array to CMxReferenceArray. + +**Syntax** + +```csharp +public static implicit operator CMxReferenceArray(string [] val); +``` + +**Parameters** + +**`val`** + +[in] string [ ]. + +**Returns** + +CMxReferenceArray + +### CMxValue Operator Overload + +Provides an operator that converts from CMxReferenceArray to CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(CMxReferenceArray val); +``` + +**Parameters** + +**`val`** + +[in] CMxReferenceArray instance value. + +**Returns** + +CMxValue + +### String[ ] Operator Overload + +Provides an operator that converts from CMxReferenceArray to string array. + +**Syntax** + +```csharp +public static implicit operator string [](CMxReferenceArray val); +``` + +**Parameters** + +**`val`** + +[in] CMxReferenceArray instance value. + +**Returns** + +string [ ] + +### CMxReferenceArray Operator Overload CMxValue + +Provides an operator that converts from CMxValue to CMxReferenceArray. + +**Syntax** + +```csharp +public static implicit operator CMxReferenceArray (CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue instance value. + +**Returns** + +CMxReferenceArray diff --git a/aot/reference/CMxStatus.md b/aot/reference/CMxStatus.md new file mode 100644 index 0000000..3970edf --- /dev/null +++ b/aot/reference/CMxStatus.md @@ -0,0 +1,175 @@ +# CMxStatus Class + +Namespace: `ArchestrA.Toolkit` + +CMxStatus is derived from CMxCommon and provides support for MxStatus Attributes. + +**Syntax** + +```csharp +public class CMxStatus : CMxCommon +``` + +## CMxStatus Property + +### Value Property + +Provides a Property to get and set the value as an MxStatus. + +**Syntax** + +```csharp +public MxStatus Value { get; set; } +``` + +**Returns** + +MxStatus + +## CMxStatus Constructors + +### CMxStatus Constructor + +Provides a default constructor. + +**Syntax** + +```csharp +public CMxStatus(); +``` + +### CMxStatus Constructor MxStatus + +Provides a constructor to initialize the class with an MxStatus. + +**Syntax** + +```csharp +public CMxStatus (MxStatus v); +``` + +**Parameters** + +**`v`** + +[in] MxStatus value to be set. + +### CMxStatus Constructor SupportWrapper, string + +Provides a constructor to initialize the class for use in a primitive wrapper. + +**Syntax** + +```csharp +public CMxStatus (SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +[in] SupportWrapper value to be set. + +**`_attributeRef`** + +[in] string value that holds the attribute reference. + +## CMxStatus Method + +### Set Method + +Provides a method to set the value of the Attribute from a CMxStatus. + +**Syntax** + +```csharp +public void Set(CMxStatus val); +``` + +**Parameters** + +**`val`** + +[in] CMxStatus value to be set. + +## CMxStatus Operator Overloads + +### CMxStatus Operator Overload MxStatus + +Provides an operator that converts from MxStatus to CMxStatus. + +**Syntax** + +```csharp +public static implicit operator CMxStatus(MxStatus x); +``` + +**Parameters** + +**`x`** + +[in] MxStatus value to convert to CMxStatus. + +**Returns** + +CMxStatus + +### CMxStatus Operator Overload CMxValue + +Provides an operator that converts from CMxValue to CMxStatus. + +**Syntax** + +```csharp +public static implicit operator CMxStatus(CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue value to convert to CMxStatus. + +**Returns** + +CMxStatus + +### CMxValue Operator Overload CMxStatus + +Provides an operator that converts from CMxStatus to CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue (CMxStatus val); +``` + +**Parameters** + +**`val`** + +[in] CMxStatus value to convert to CMxValue. + +**Returns** + +CMxValue + +### MxStatus Operator Overload CMxStatus + +Provides an operator that converts from CMxStatus to MxStatus. + +**Syntax** + +```csharp +public static implicit operator MxStatus (CMxStatus val); +``` + +**Parameters** + +**`val`** + +[in] CMxStatus value to convert to MxStatus. + +**Returns** + +MxStatus diff --git a/aot/reference/CMxStatusArray.md b/aot/reference/CMxStatusArray.md new file mode 100644 index 0000000..ef11c30 --- /dev/null +++ b/aot/reference/CMxStatusArray.md @@ -0,0 +1,195 @@ +# CMxStatusArray Class + +Namespace: `ArchestrA.Toolkit` + +CMxStatusArray is derived from CMxArray and provides support for MxStatus Array Attributes. + +**Syntax** + +```csharp +public class CMxStatusArray : CMxArray +``` + +## CMxStatusArray Properties + +### Value Property + +Provides a Property to get and set the value as a MxStatus array. + +**Syntax** + +```csharp +public MxStatus[] Value { get; set; } +``` + +**Returns** + +MxStatus[ ] + +### Property to Get and Set the MxStatus Value using the [ ] Operator + +Provide a property to get and set the MxStatus value of an element using [] Operator. + +**Syntax** + +```csharp +public MxStatus this[short i] { get; set; } +``` + +**Returns** + +MxStatus + +## CMxStatusArray Constructors + +### CMxStatusArray Constructor int + +Provides a constructor to initialize the array to a default length. + +**Syntax** + +```csharp +public CMxStatusArray(int length); +``` + +**Parameters** + +**`length`** + +[in] integer value that holds the array length. + +### CMxStatusArray Constructor MxStatus[ ] + +Provides a constructor to initialize the class with an MxStatus array default value. + +**Syntax** + +```csharp +public CMxStatusArray (MxStatus[] value); +``` + +**Parameters** + +**`value`** + +[in] MxStatus[ ] value to be set. + +### CMxStatusArray Constructor SupportWrapper, string + +Provides a constructor to initialize the class for use in a primitive wrapper. + +**Syntax** + +```csharp +public CMxStatusArray (SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +[in] SupportWrapper. + +**`_attributeRef`** + +[in] string value that holds the attribute reference. + +## CMxStatusArray Method + +### Set Method + +Provides a method to set the value of the Attribute from a CMxStatusArray. + +**Syntax** + +```csharp +public void Set(CMxStatusArray newValue); +``` + +**Parameters** + +**`newValue`** + +[in] CMxStatusArray value to be set. + +## CMxStatusArray Operator Overloads + +### CMxStatusArray Operator Overload MxStatus[ ] + +Provides an operator that converts from MxStatus array to CMxStatusArray. + +**Syntax** + +```csharp +public static implicit operator CMxStatusArray(MxStatus[] val); +``` + +**Parameters** + +**`val`** + +[in] MxStatus[ ] value to convert to CMxStatusArray. + +**Returns** + +CMxStatusArray + +### CMxStatusArray Operator Overload CMxValue + +Provides an operator that converts from CMxValue to CMxStatusArray. + +**Syntax** + +```csharp +public static implicit operator CMxStatusArray(CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue value to convert to CMxStatusArray. + +**Returns** + +CMxStatusArray + +### MxStatus[ ] Operator Overload CMxStatusArray + +Provides an operator that converts from CMxStatusArray to a MxStatus array. + +**Syntax** + +```csharp +public static implicit operator MxStatus[](CMxStatusArray val); +``` + +**Parameters** + +**`val`** + +[in] CMxStatusArray value to convert to MxStatus[ ]. + +**Returns** + +MxStatus[ ] + +### CMxValue Operator Overload CMxStatusArray + +Provides an operator that converts from CMxStatusArray to CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(CMxStatusArray val); +``` + +**Parameters** + +**`val`** + +[in] CMxStatusArray value to convert to CMxValue. + +**Returns** + +CMxValue diff --git a/aot/reference/CMxString.md b/aot/reference/CMxString.md new file mode 100644 index 0000000..786d716 --- /dev/null +++ b/aot/reference/CMxString.md @@ -0,0 +1,175 @@ +# CMxString Class + +Namespace: `ArchestrA.Toolkit` + +CMxString is derived from CMxCommon and provides support for string Attributes. + +**Syntax** + +```csharp +public class CMxString : CMxCommon +``` + +## CMxString Property + +### Value Property + +Provides a property to get and set the value as a string. + +**Syntax** + +```csharp +public string Value { get; set; } +``` + +**Returns** + +string + +## CMxString Constructors + +### CMxString Constructor + +Provides a default constructor. + +**Syntax** + +```csharp +public CMxString(); +``` + +### CMxString Constructor string + +Provides a constructor to initialize the class with a string. + +**Syntax** + +```csharp +public CMxStatus (string v); +``` + +**Parameters** + +**`v`** + +[in] string value to be set. + +### CMxString Constructor SupportWrapper, string + +Provides a constructor to initialize the class for use in a primitive wrapper. + +**Syntax** + +```csharp +public CMxString (SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +[in] SupportWrapper. + +**`_attributeRef`** + +[in] string value that holds the attribute reference. + +## CMxString Method + +### Set Method + +Provides a method to set the value of the Attribute from a CMxString. + +**Syntax** + +```csharp +public void Set(CMxString val); +``` + +**Parameters** + +**`val`** + +[in] CMxString value to be set. + +## CMxString Operator Overloads + +### CMxString Operator Overload string + +Provides an operator that converts from string to CMxString. + +**Syntax** + +```csharp +public static implicit operator CMxString (string x); +``` + +**Parameters** + +**`x`** + +[in] string value to convert to CMxString. + +**Returns** + +CMxString + +### CMxString Operator Overload CMxValue + +Provides an operator that converts from CMxValue to CMxString. + +**Syntax** + +```csharp +public static implicit operator CMxString (CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue value to convert to CMxString. + +**Returns** + +CMxString + +### CMxValue Operator Overload CMxString + +Provides an operator that converts from CMxString to CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(CMxString val); +``` + +**Parameters** + +**`val`** + +[in] CMxString value to convert to CMxValue. + +**Returns** + +CMxValue + +### string Operator Overload CMxString + +Provides an operator that converts from CMxString to string. + +**Syntax** + +```csharp +public static implicit operator string (CMxString val); +``` + +**Parameters** + +**`val`** + +[in] CMxString value to convert to string. + +**Returns** + +string diff --git a/aot/reference/CMxStringArray.md b/aot/reference/CMxStringArray.md new file mode 100644 index 0000000..4bc7308 --- /dev/null +++ b/aot/reference/CMxStringArray.md @@ -0,0 +1,195 @@ +# CMxStringArray Class + +Namespace: `ArchestrA.Toolkit` + +CMxStringArray is derived from CMxArray and provides support for string Array Attributes. + +**Syntax** + +```csharp +public class CMxStringArray : CMxArray +``` + +## CMxStringArray Properties + +### Value Property + +Provides a property to get and set the value as a string array. + +**Syntax** + +```csharp +public string[] Value { get; set; } +``` + +**Returns** + +string[ ] + +### Property to Get and Get the String using the [ ] Operator + +Provides a property to get and set the string value of an element using [] Operator. + +**Syntax** + +```csharp +public string this[short i] { get; set; } +``` + +**Returns** + +string + +## CMxStringArray Constructors + +### CMxStringArray Constructor int + +Provides a constructor to initialize the array to a default length. + +**Syntax** + +```csharp +public CMxStringArray(int length); +``` + +**Parameters** + +**`length`** + +[in] integer value that holds the array length. + +### CMxStringArray Constructor string[ ] + +Provides a constructor to initialize the class with a string array default value. + +**Syntax** + +```csharp +public CMxStringArray(string[] value); +``` + +**Parameters** + +**`value`** + +[in] string[ ] value + +### CMxStringArray Constructor SupportWrapper, string + +Provides a constructor to initialize the class for use in a primitive wrapper. + +**Syntax** + +```csharp +public CMxStringArray (SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +[in] SupportWrapper. + +**`_attributeRef`** + +[in] string value that holds the attribute reference. + +## CMxStringArray Method + +### Set Method + +Provides a method to set the value of the Attribute from a CMxStringArray. + +**Syntax** + +```csharp +public void Set(CMxStringArray newValue); +``` + +**Parameters** + +**`newValue`** + +[in] CMxStringArray value to be set. + +## CMxStringArray Operator Overloads + +### CMxStringArray Operator Overload string[ ] + +Provides an operator that converts from string array to CMxStringArray. + +**Syntax** + +```csharp +public static implicit operator CMxStringArray (string[] val); +``` + +**Parameters** + +**`val`** + +[in] string[ ] to convert to CMxStringArray. + +**Returns** + +CMxStringArray + +### CMxStringArray Operator Overload CMxValue + +Provides an operator that converts from CMxValue to CMxStringArray. + +**Syntax** + +```csharp +public static implicit operator CMxStringArray (CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue value to convert to CMxStringArray. + +**Returns** + +CMxStringArray + +### string[ ] Operator Overload CMxStringArray + +Provides an operator that converts from CMxStringArray to string array. + +**Syntax** + +```csharp +public static implicit operator string[](CMxStringArray val); +``` + +**Parameters** + +**`val`** + +[in] CMxStringArray value to convert to string array. + +**Returns** + +string[ ] + +### CMxValue Operator Overload CMxStringArray + +Provides an operator that converts from CMxStringArray to CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(CMxStringArray val); +``` + +**Parameters** + +**`val`** + +[in] CMxStringArray value to convert to CMxValue. + +**Returns** + +CMxValue diff --git a/aot/reference/CMxTime.md b/aot/reference/CMxTime.md new file mode 100644 index 0000000..d080302 --- /dev/null +++ b/aot/reference/CMxTime.md @@ -0,0 +1,407 @@ +# CMxTime Class + +Namespace: `ArchestrA.Toolkit` + +CMxTime is derived from CMxCommon and provides support for Time/DateTime Attributes. + +**Syntax** + +```csharp +public class CMxTime : CMxCommon +``` + +## CMxTime Property + +### Value Property + +Provides a property to get and set the value as a DateTime. + +**Syntax** + +```csharp +public DateTime Value { get; set; } +``` + +**Returns** + +DateTime + +## CMxTime Constructors + +### CMxTime Constructor + +Provides a default constructor. + +**Syntax** + +```csharp +public CMxTime(); +``` + +### CMxTime Constructor DateTime + +Provides a constructor to initialize the class with a DateTime default value. + +**Syntax** + +```csharp +public CMxTime (DateTime v); +``` + +**Parameters** + +**`v`** + +[in] DateTime instance value to be set. + +### CMxTime Constructor string + +Provides a constructor to initialize the class with a formatted time string default value. + +**Syntax** + +```csharp +public CMxTime(string v); +``` + +**Parameters** + +**`v`** + +[in] string value to be set. + +### CMxTime Constructor SupportWrapper, string + +Provides a constructor to initialize the class for use in a primitive wrapper. + +**Syntax** + +```csharp +public CMxTime (SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +[in] SupportWrapper. + +**`_attributeRef`** + +[in] string value that holds the attribute reference. + +## CMxTime Method + +### Set Method + +Provides a method to set the value of the Attribute from a CMxTime. + +**Syntax** + +```csharp +public void Set(CMxTime val); +``` + +**Parameters** + +**`val`** + +[in] CMxTime value to be set. + +## CMxTime Operator Overloads + +### CMxTime Operator Overload DateTime + +Provides an operator that converts from DateTime to CMxTime. + +**Syntax** + +```csharp +public static implicit operator CMxTime(DateTime x); +``` + +**Parameters** + +**`x`** + +[in] DateTime value to convert to CMxTime. + +**Returns** + +CMxTime + +### CMxTime Operator Overload CMxValue + +Provides an operator that converts from CMxValue to CMxTime. + +**Syntax** + +```csharp +public static implicit operator CMxTime (CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue value to convert to CMxTime. + +**Returns** + +CMxTime + +### CMxValue Operator Overload CMxTime + +Provides an operator that converts from CMxTime to CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(CMxTime val); +``` + +**Parameters** + +**`val`** + +[in] CMxTime value to convert to CMxValue. + +**Returns** + +CMxValue + +### DateTime Operator Overload CMxTime + +Provides an operator that converts from CMxTime to DateTime. + +**Syntax** + +```csharp +public static implicit operator DateTime (CMxTime val); +``` + +**Parameters** + +**`val`** + +[in] CMxTime value to convert to DateTime. + +**Returns** + +DateTime + +### - Operator Overload CMxTime, DateTime (TimeSpan) + +Provides an operator to subtract a DateTime from a CMxTime. + +**Syntax** + +```csharp +public static TimeSpan operator -(CMxTime t1, DateTime t2); +``` + +**Parameters** + +**`t1`** + +[in] CMxTime value. + +**`t2`** + +[in] DateTime value. + +**Returns** + +TimeSpan + +### - Operator Overload CMxTime, TimeSpan (DateTime) + +Provides an operator to subtract a TimeSpan from a CMxTime. + +**Syntax** + +```csharp +public static DateTime operator -(CMxTime t1, TimeSpan t2); +``` + +**Parameters** + +**`t1`** + +[in] CMxTime value. + +**`t2`** + +[in] TimeSpan value. + +**Returns** + +DateTime + +### != Operator Overload CMxTime, DateTime (bool) + +Provides an operator to check if a CMxTime and DateTime are not equal. + +**Syntax** + +```csharp +public static bool operator !=(CMxTime t1, DateTime t2); +``` + +**Parameters** + +**`t1`** + +[in] CMxTime value. + +**`t2`** + +[in] DateTime value. + +**Returns** + +bool + +### + Operator Overload CMxTime, TimeSpan (DateTime) + +Provides an operator to add a TimeSpan to a CMxTime. + +**Syntax** + +```csharp +public static DateTime operator +(CMxTime t, TimeSpan ts); +``` + +**Parameters** + +**`t`** + +[in] CMxTime value. + +**`ts`** + +[in] TimeSpan value. + +**Returns** + +DateTime + +### < Operator Overload CMxTime, DateTime (bool) + +Provides an operator to check if a CMxTime is less than a DateTime. + +**Syntax** + +```csharp +public static bool operator <(CMxTime t1, DateTime t2); +``` + +**Parameters** + +**`t1`** + +[in] CMxTime value. + +**`t2`** + +[in] DateTime value. + +**Returns** + +bool + +### <= Operator Overload CMxTime, DateTime (bool) + +Provides an operator to check if a CMxTime is less than or equal to a DateTime. + +**Syntax** + +```csharp +public static bool operator <=(CMxTime t1, DateTime t2); +``` + +**Parameters** + +**`t1`** + +[in] CMxTime value. + +**`t2`** + +[in] DateTime value. + +**Returns** + +bool + +### == Operator Overload CMxTime, DateTime (bool) + +Provides an operator to check if a CMxTime is equal to a DateTime. + +**Syntax** + +```csharp +public static bool operator ==(CMxTime t1, DateTime t2); +``` + +**Parameters** + +**`t1`** + +[in] CMxTime value. + +**`t2`** + +[in] DateTime value. + +**Returns** + +bool + +### > Operator Overload CMxTime, DateTime (bool) + +Provides an operator to check if a CMxTime is greater than a DateTime. + +**Syntax** + +```csharp +public static bool operator >(CMxTime t1, DateTime t2); +``` + +**Parameters** + +**`t1`** + +[in] CMxTime value. + +**`t2`** + +[in] DateTime value. + +**Returns** + +bool + +### >= Operator Overload CMxTime, DateTime (bool) + +Provides an operator to check if a CMxTime is greater than or equal to a DateTime. + +**Syntax** + +```csharp +public static bool operator >=(CMxTime t1, DateTime t2); +``` + +**Parameters** + +**`t1`** + +[in] CMxTime value. + +**`t2`** + +[in] DateTime value. + +**Returns** + +bool diff --git a/aot/reference/CMxTimeArray.md b/aot/reference/CMxTimeArray.md new file mode 100644 index 0000000..357d723 --- /dev/null +++ b/aot/reference/CMxTimeArray.md @@ -0,0 +1,211 @@ +# CMxTimeArray Class + +Namespace: `ArchestrA.Toolkit` + +CMxTimeArray is derived from CMxArray and provides support for Time/DateTime Array Attributes. + +**Syntax** + +```csharp +public class CMxTimeArray : CMxArray +``` + +## CMxTimeArray Properties + +### Value Property + +Provides a property to get and set the value as a DateTime array. + +**Syntax** + +```csharp +public DateTime[] Value { get; set; } +``` + +**Returns** + +DateTime[ ] + +### Property to get and set the DateTime using [ ] operator + +Provides a property to get and set the DateTime value of an element using [ ] operator. + +**Syntax** + +```csharp +public DateTime this[short i] { get; set; } +``` + +**Returns** + +DateTime + +## CMxTimeArray Constructors + +### CMxTimeArray Constructor int + +Provides a constructor to initialize the array to a default length. + +**Syntax** + +```csharp +public CMxTimeArray(int length); +``` + +**Parameters** + +**`length`** + +[in] integer value that holds the array length. + +### CMxTimeArray Constructor DateTime[ ] + +Provides a constructor to initialize the class with a DateTime array default value. + +**Syntax** + +```csharp +public CMxTimeArray (DateTime[] value); +``` + +**Parameters** + +**`value`** + +[in] DateTime[ ]. + +### CMxTimeArray Constructor string[ ] + +Provides a constructor to initialize the class with a formatted time string array default value. + +**Syntax** + +```csharp +public CMxTimeArray (string[] value); +``` + +**Parameters** + +**`value`** + +[in] string[ ] value. + +### CMxTimeArray Constructor SupportWrapper, string + +Provides a constructor to initialize the class for use in a primitive wrapper. + +**Syntax** + +```csharp +public CMxTimeArray (SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +[in] SupportWrapper. + +**`_attributeRef`** + +[in] string value that holds the attribute reference. + +## CMxTimeArray Method + +### Set Method + +Provides a method to set the value of the Attribute from a CMxTimeArray. + +**Syntax** + +```csharp +public void Set(CMxTimeArray newValue); +``` + +**Parameters** + +**`newValue`** + +[in] CMxTimeArray value to be set. + +## CMxTimeArray Operator Overloads + +### CMxTimeArray Operator Overload DateTime[ ] + +Provides an operator that converts from DateTime array to CMxTimeArray. + +**Syntax** + +```csharp +public static implicit operator CMxTimeArray(DateTime[] val); +``` + +**Parameters** + +**`val`** + +[in] DateTime[ ] value to convert to CMxTimeArray. + +**Returns** + +CMxTimeArray + +### CMxTimeArray Operator Overload CMxValue + +Provides an operator that converts from CMxValue to CMxTimeArray. + +**Syntax** + +```csharp +public static implicit operator CMxTimeArray (CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue value to convert to CMxTimeArray. + +**Returns** + +CMxTimeArray + +### DateTime[ ] Operator Overload CMxTimeArray + +Provides an operator that converts from CMxTimeArray to DateTime array. + +**Syntax** + +```csharp +public static implicit operator DateTime[](CMxTimeArray val); +``` + +**Parameters** + +**`val`** + +[in] CMxTimeArray value to convert to DateTime[ ]. + +**Returns** + +DateTime[ ] + +### CMxValue Operator Overload CMxTimeArray + +Provides an operator that converts from CMxTimeArray to CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(CMxTimeArray val); +``` + +**Parameters** + +**`val`** + +[in] CMxTimeArray value to convert to CMxValue. + +**Returns** + +CMxValue diff --git a/aot/reference/CMxType.md b/aot/reference/CMxType.md new file mode 100644 index 0000000..1eca46e --- /dev/null +++ b/aot/reference/CMxType.md @@ -0,0 +1,347 @@ +# CMxType Class + +Namespace: `ArchestrA.Toolkit` + +CMxType is an abstract class that provides the methods and properties available to all classes for supporting CMx{type}{Array} style classes. + +**Syntax** + +```csharp +public abstract class CMxType +``` + +## CMxType Properties + +### Attribute Property + +Provides a property to hold information about the Attribute from ArchestrA. + +**Syntax** + +```csharp +protected AttributeHandle attribute; +``` + +**Returns** + +AttributeHandle + +### AttributeRef Property + +Provides a property to hold the attribute reference string when CMxType classes are used to implement properties of Primitive Attributes. + +**Syntax** + +```csharp +protected string attributeRef; +``` + +**Returns** + +string + +### Owner Property + +Provides a property to hold a handle to the owner of the object which also provides access to ArchestrA Site pointers. + +**Syntax** + +```csharp +protected AObjectBase owner; +``` + +**Returns** + +AObjectBase + +### Runtime Property + +Provides a property to hold an indication that the object is currently servicing the Runtime. + +**Syntax** + +```csharp +protected bool runtime; +``` + +**Returns** + +bool + +### RuntimeSite2 Property + +Provides a property to hold a handle to the IPrimitiveRuntimeSite2 site for the current attribute when the object is correctly configured at Runtime. + +**Syntax** + +```csharp +protected IPrimitiveRuntimeSite2 runtimeSite2; +``` + +**Returns** + +IPrimitiveRuntimeSite2 + +### Attribute Property + +Provides a property to get and set the AttributeHandle. + +**Syntax** + +```csharp +AttributeHandle Attribute { get; set; } +``` + +**Returns** + +AttributeHandle + +### Category Property + +Provides a property to get the MxAttributeCategory. + +**Syntax** + +```csharp +public virtual MxAttributeCategory Category { get; } +``` + +**Returns** + +MxAttributeCategory + +### Checkpoint Property + +Provides a property to Checkpoint the attribute at runtime. + +**Syntax** + +```csharp +public bool Checkpoint { set; } +``` + +**Returns** + +bool + +### DataType Property + +Provides a property to get the MxDataType. + +**Syntax** + +```csharp +public virtual MxDataType DataType { get; } +``` + +**Returns** + +MxDataType + +### DefValue Property + +Provides a property to return the default value as a string. + +**Syntax** + +```csharp +public abstract string DefValue { get; } +``` + +**Returns** + +string + +### LiteMode Property + +Provides a property to indicate if the class is running disconnected from ArchestrA. + +> **Note** Disconnected refers to an instance of a wrapper that is not associated with an ArchestrA Attribute (that is a CMxValue that is declared locally in the class). + +**Syntax** + +```csharp +public bool LiteMode { get; } +``` + +**Returns** + +bool + +### Locked Property + +Provides a property to get and set the lock of the Attribute. + +**Syntax** + +```csharp +public bool Locked { get; set; } +``` + +**Returns** + +bool + +### MxValue Property + +Provides a property to get and set the IMxValue of the Attribute. + +**Syntax** + +```csharp +public virtual IMxValue mxValue { get; set; } +``` + +**Returns** + +MxValueClass + +### Quality Property + +Provides a property to get and set the Quality of the Attribute. + +**Syntax** + +```csharp +public abstract CMxDataQuality Quality { get; set; } +``` + +**Returns** + +CMxDataQuality + +### Time Property + +Provides a property to get and set the Time of the Attribute. + +**Syntax** + +```csharp +public abstract CMxTime Time { get; set; } +``` + +**Returns** + +CMxTime + +### Security Property + +Provides a property to get and set the Security of the Attribute. + +**Syntax** + +```csharp +public virtual MxSecurityClassification Security { get; set; } +``` + +**Returns** + +MxSecurityClassification + +### SetHandlerValue Property + +Provides a property to set the value from a SetHandlerEventArgs value. + +**Syntax** + +```csharp +public virtual SetHandlerEventArgs SetHandlerValue { set; } +``` + +**Returns** + +SetHandlerEventArgs + +## CMxType Constructor + +### CMxType Constructor + +Provides a constructor to initialize the class for use in a primitive wrapper. + +**Syntax** + +```csharp +public CMxType(SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +[in] SupportWrapper. + +**`_attributeRef`** + +[in] string value that holds the attribute reference. + +## CMxType Methods + +### Initialize Method + +Provides a method to initialize the attribute with ArchestrA information. + +**Syntax** + +```csharp +public void Initialize(AttributeHandle _attribute, AObjectBase _owner, bool _runtime); +``` + +**Parameters** + +**`_attribute`** + +[in] AttributeHandle handle as a parameter. + +**`_owner`** + +[in] base class object of type AObjectBase. + +**`_runtime`** + +[in] bool value to indicate Runtime or not. + +### CheckConnect Method + +Provides a method to verify and connect to ArchestrA if needed for primitive wrappers. + +**Syntax** + +```csharp +protected void CheckConnect(); +``` + +### PadMiliseconds Method + +Provides a method to get the ArchestrA style milliseconds as a string from a TimeSpan. + +**Syntax** + +```csharp +protected string PadMiliseconds(TimeSpan ts); +``` + +**Parameters** + +**`ts`** + +[in] TimeSpan value. + +**Returns** + +string + +### UpdateArrayLength Method + +Provides a method to set the length of an array to a new length. + +**Syntax** + +```csharp +protected void UpdateArrayLength(int newLength); +``` + +**Parameters** + +**`newlength`** + +[in] int value that holds the new length of the array. diff --git a/aot/reference/CMxValue.md b/aot/reference/CMxValue.md new file mode 100644 index 0000000..d9cd867 --- /dev/null +++ b/aot/reference/CMxValue.md @@ -0,0 +1,1906 @@ +# CMxValue Class + +Namespace: `ArchestrA.Toolkit` + +A wrapper class that represents an MxValue. Includes the fundamental variant object that contains a single data value or single array of data values of like type. MxValue is used to get and set data within the ArchestrA framework. + +**Syntax** + +```csharp +public class CMxValue +``` + +## CMxValue Properties + +### Length Property + +Provides a property to get the length of the value. + +**Syntax** + +```csharp +int Length { get; } +``` + +**Returns** + +int + +Returns 0 if the value is a non-array type. + +### Value Property + +Provides a property to get IMxValue for compatibility with the existing methods. + +**Syntax** + +```csharp +IMxValue Value { get; } +``` + +**Returns** + +IMxValue + +## CMxValue Constructors + +### CMxValue Constructor + +Provides a constructor to create an empty CMxValue. + +**Syntax** + +```csharp +public CMxValue(); +``` + +### CMxValue Constructor IMxValue + +Provides a constructor to create a CMxValue with the value from an existing IMxValue. + +**Syntax** + +```csharp +public CMxValue(IMxValue val); +``` + +**Parameters** + +**`val`** + +[in] IMxValue to be set. + +### CMxValue Constructor object + +Provides a constructor to create a CMxValue with the value of a C# object. + +**Syntax** + +```csharp +public CMxValue(object val); +``` + +**Parameters** + +**`val`** + +[in] Supported datatypes: CMxValue, CMxType, System.Boolean, System.Int32, System.Single, System.Double, System.String, System.DateTime, System.TimeSpan, System.Int16, ArchestrA.Toolkit.EnumOrdinal, ArchestrA.Toolkit.MxCustomStruct, ArchestrA.Core.MxDataType, ArchestrA.Core.MxDataType, ArchestrA.Core.MxSecurityClassification, ArchestrA.Core.InternationalizedString, ArchestrA.Core.DataQuality, ArchestrA.Toolkit.CMxDataQuality and ArchestrA.Core.MxReference. + +## CMxValue Methods + +### Clone Method + +Provides a method to create a copy of an existing CMxValue which includes creating a copy of the internal IMxValue class. + +**Syntax** + +```csharp +public Clone(out CMxValue ppMxValue); +``` + +**Parameters** + +**`ppMxValue`** + +[out} fills the ppMxValue with the current CMxValue. + +### Empty Method + +Provides a method to call Empty on the IMxValue. + +**Syntax** + +```csharp +public void Empty(); +``` + +### DateTimeToFileTime Method + +Provides a method to convert a DateTime into a _FILETIME. Converts the current System.DateTime object to a Windows file time. + +**Syntax** + +```csharp +public static _FILETIME DateTimeToFileTime(DateTime date); +``` + +**Parameters** + +**`date`** + +[in] DateTime value. + +**Returns** + +_FILETIME + +### DateTimeToVBFT Method + +Provides a method to convert a DateTime into a VBFILETIME. + +**Syntax** + +```csharp +public static VBFILETIME DateTimeToVBFT(DateTime date); +``` + +**Parameters** + +**`date`** + +[in] DateTime value. + +**Returns** + +VBFILETIME + +### FileTimeToDateTime Method + +Provides a method to convert a _FILETIME to a DateTime. + +**Syntax** + +```csharp +public static DateTime FileTimeToDateTime(_FILETIME val); +``` + +**Parameters** + +**`val`** + +[in] __FILETIME value. + +**Returns** + +DateTime + +### VBFIToDateTime Method + +Provides a method to convert VBFILETIME to DateTime. + +**Syntax** + +```csharp +public static DateTime VBFTToDateTime(VBFILETIME val); +``` + +**Parameters** + +**`val`** + +[in] VBFILETIME value. + +**Returns** + +DateTime + +### TimeSpanToVBLI Method + +Provides a method to convert a TimeSpan to VB_LARGE_INTEGER. + +**Syntax** + +```csharp +public static VB_LARGE_INTEGER TimeSpanToVBLI(TimeSpan span); +``` + +**Parameters** + +**`span`** + +[in] TimeSpan value. + +**Returns** + +VB_LARGE_INTEGER + +### VBLIToTimeSpan Method + +Provides a method to convert VB_LARGE_INTEGER to TimeSpan. + +**Syntax** + +```csharp +public static TimeSpan VBLIToTimeSpan(VB_LARGE_INTEGER val); +``` + +**Parameters** + +**`val`** + +[in] VB_LARGE_INTEGER value. + +**Returns** + +TimeSpan + +### GetBoolean Method + +Provides a method to get the value as a Boolean. + +**Syntax** + +```csharp +public bool GetBoolean(); +``` + +**Returns** + +bool + +### GetBooleanArray Method + +Provides a method to get the value as a Boolean array. + +**Syntax** + +```csharp +public bool[] GetBooleanArray(); +``` + +**Returns** + +bool[ ] + +### GetClassID Method + +Provides a method to get the Class ID of the IMxValue. + +**Syntax** + +```csharp +public void GetClassID(out Guid pClassID); +``` + +**Parameters** + +**`pClassID`** + +[out] fills the pClassID with the Class ID of the IMxValue. + +### GetCustomEnum Method + +Provides a method to get a custom enum as a text value, ordinal, id of the primitive that owns the array of strings, id of the array of strings. + +**Syntax** + +```csharp +public void GetCustomEnum(out string pValue, out short pOrdinal, out short pPrimitiveId, out +short pAttributeId); +``` + +**Parameters** + +**`pValue`** + +[out] fills the pValue with the current CMXCustomEnum text. + +**`pOrdinal`** + +[out] fills the pOrdinal with the current CMXCustomEnum ordinal. + +**`pPrimitiveId`** + +[out] fills the pPrimitiveId with the primitive ID of the referred string array attribute. + +**`pAttributeId`** + +[out] fills the pAttributeId with the attribute ID of the referred string array attribute. + +### GetCustomEnumArray Method + +Provides a method to get an array of ordinals of a CustomEnum. + +**Syntax** + +```csharp +public short[] GetCustomEnumArray(); +``` + +**Returns** + +short[ ] + +### GetCustomEnumOrdinal Method + +Provides a method to get the ordinal of a CustomEnum. + +**Syntax** + +```csharp +public short GetCustomEnumOrdinal(); +``` + +**Returns** + +short + +### GetCustomEnumString Method + +Provides a method to get the text value of a CustomEnum. + +**Syntax** + +```csharp +public string GetCustomEnumString(); +``` + +**Returns** + +string + +### GetCustomStruct Method + +Provides a method to get the value as an MxCustomStruct. + +**Syntax** + +```csharp +public MxCustomStruct GetCustomStruct(); +``` + +**Returns** + +MxCustomStruct + +### GetCustomStructArray Method + +Provides a method to get the value as an MxCustomStruct Array. + +**Syntax** + +```csharp +public MxCustomStruct[] GetCustomStructArray(); +``` + +**Returns** + +MxCustomStruct[ ] + +### GetCustomStructVB Method + +Provides a method to get the value as a guid and byte array. + +**Syntax** + +```csharp +public void GetCustomStructVB(out int pGuid, ref byte[] pStruct); +``` + +**Parameters** + +**`pGuid`** + +[out] fills the pGuid with the current CMXCustomStructArray guid. + +**`pStruct`** + +[out] fills the pStruct with the current CMXCustomStructArray data. + +### GetDataType Method + +Provides a method to get the type of the data. + +**Syntax** + +```csharp +public MxDataType GetDataType(); +``` + +**Returns** + +MxDataType + +### GetDimensionCount Method + +Provides a method to get the number of dimensions. + +**Syntax** + +```csharp +public void GetDimensionCount(out short nDimensions); +``` + +**Parameters** + +**`nDimensions`** + +[out] fills the nDimensions with the dimension count of the IMxValue. + +### GetDimensionSize Method + +Provides a method to access the DimensionSize of IMxValue. + +**Syntax** + +```csharp +public void GetDimensionSize(out int pSize); +``` + +**Parameters** + +**`pSize`** + +[out] fills the pSize with the dimension size of the IMxValue. + +### GetDouble Method + +Provides a method to get the value as a double. + +**Syntax** + +```csharp +public double GetDouble(); +``` + +**Returns** + +double + +### GetDoubleArray Method + +Provides a method to get the value as a double array. + +**Syntax** + +```csharp +public double[] GetDoubleArray(); +``` + +**Returns** + +double[ ] + +### GetElapsedTime Method + +Provides a method to get the value as a TimeSpan. + +**Syntax** + +```csharp +public dTimeSpan GetElapsedTime(); +``` + +**Returns** + +TimeSpan + +### GetElapsedTimeArray Method + +Provides a method to get the value as a TimeSpan array. + +**Syntax** + +```csharp +public TimeSpan[] GetElapsedTimeArray(); +``` + +**Returns** + +TimeSpan[ ] + +### GetElement Method + +Provides a method to get a single element of an array as a CMxValue by index. + +**Syntax** + +```csharp +public void GetElement(int index1, out CMxValue pMxValue); +``` + +**Parameters** + +**`index1`** + +[in] index of the array element. + +**`pMxValue`** + +[out] fills the pMxValue with the array element. + +### GetFloat Method + +Provides a method to get the value as a float. + +**Syntax** + +```csharp +public float GetFloat(); +``` + +**Returns** + +float + +### GetFloatArray Method + +Provides a method to get the value as a float array. + +**Syntax** + +```csharp +public float[] GetFloatArray(); +``` + +**Returns** + +float[ ] + +### GetInteger Method + +Provides a method to get the value as an int. + +**Syntax** + +```csharp +public int GetInteger(); +``` + +**Returns** + +int + +### GetIntegerArray Method + +Provides a method to get the value as an int array. + +**Syntax** + +```csharp +public int[] GetIntegerArray(); +``` + +**Returns** + +int[ ] + +### GetInternationalString Method + +Provides a method to get the value by locale. + +**Syntax** + +```csharp +public string GetInternationalString(int locale); +``` + +**Parameters** + +**`locale`** + +[in] locale number of the language/culture. + +**Returns** + +string + +### GetInternationalStrings Method + +Provides a method to get the value as an array of InternationalizedStrings. + +**Syntax** + +```csharp +public InternationalizedString[] GetInternationalStrings(); +``` + +**Returns** + +InternationalizedString[ ] + +### GetMxDataQuality Method + +Provides a method to get the Data Quality as a short. + +**Syntax** + +```csharp +public short GetMxDataQuality(); +``` + +**Returns** + +short + +### GetMxDataType Method + +Provides a method to get the value as a MxDataType. + +**Syntax** + +```csharp +public MxDataType GetMxDataType(); +``` + +**Returns** + +MxDataType + +### GetMxDataTypeArray Method + +Provides a method to get the value as a MxDataType array. + +**Syntax** + +```csharp +public MxDataType[] GetMxDataTypeArray(); +``` + +**Returns** + +MxDataType[ ] + +### GetMxReference Method + +Provides a method to get the value as a IMxReference. + +**Syntax** + +```csharp +public IMxReference GetMxReference(); +``` + +**Returns** + +IMxReference + +### GetMxReferenceArrayAsStrings Method + +Provides a method to get the value of a reference array as an array of strings. + +**Syntax** + +```csharp +public string[] GetMxReferenceArrayAsStrings(); +``` + +**Returns** + +string[ ] + +### GetMxReferenceAsString Method + +Provides a method to get the value of a reference as a string. + +**Syntax** + +```csharp +public string GetMxReferenceAsString(); +``` + +**Returns** + +string + +### GetMxSecurityClassification Method + +Provides a method to get the value as a MxSecurityClassification. + +**Syntax** + +```csharp +public MxSecurityClassification GetMxSecurityClassification(); +``` + +**Returns** + +MxSecurityClassification + +### GetMxSecurityClassificationArray Method + +Provides a method to get the value as a MxSecurityClassification array. + +**Syntax** + +```csharp +public MxSecurityClassification[] GetMxSecurityClassificationArray(); +``` + +**Returns** + +MxSecurityClassification[ ] + +### GetMxStatus Method + +Provides a method to get the value as a MxStatus. + +**Syntax** + +```csharp +public MxStatus GetMxStatus(); +``` + +**Returns** + +MxStatus + +### GetMxStatusArray Method + +Provides a method to get the value as a MxStatus array. + +**Syntax** + +```csharp +public MxStatus[] GetMxStatusArray(); +``` + +**Returns** + +MxStatus[ ] + +### GetSizeMax Method + +Provides a method to get the max size as a _ULARGE_INTEGER. + +**Syntax** + +```csharp +public void GetSizeMax(out _ULARGE_INTEGER pcbSize); +``` + +**Parameters** + +**`pcbSize`** + +[out] fills the pcbSize with the IMxValue max size. + +### GetString Method + +Provides a method to get the value as a string. + +**Syntax** + +```csharp +public string GetString(); +``` + +**Returns** + +string + +### GetStringArray Method + +Provides a method to get the value as a string array. + +**Syntax** + +```csharp +public string[] GetStringArray(); +``` + +**Returns** + +string[ ] + +### GetTime Method + +Provides a method to get the value as a DateTime. + +**Syntax** + +```csharp +public DateTime GetTime(); +``` + +**Returns** + +DateTime + +### GetTime Method + +Provides a method to get the value as a DateTime (compatible with IMxValue syntax.) + +**Syntax** + +```csharp +public void GetTime(out DateTime pVal); +``` + +**Parameters** + +**`pVal`** + +[out] fills the DateTime parameter by converting the Windows file time to its equivalent local time. + +### GetTimeArray Method + +Provides a method to get the value as a DateTime array. + +**Syntax** + +```csharp +public DateTime[] GetTimeArray(); +``` + +**Returns** + +DateTime[ ] + +### IsArray Method + +Provides a method to indicate if the value is an array. + +**Syntax** + +```csharp +public bool IsArray(); +``` + +**Returns** + +bool + +### IsDirty Method + +Provides a method to access IMxValue IsDirty. + +**Syntax** + +```csharp +public void IsDirty(); +``` + +### PutBoolean Method + +Provides a method to set the value from a Boolean. + +**Syntax** + +```csharp +public void PutBoolean(bool newVal); +``` + +**Parameters** + +**`newVal`** + +[in] bool value to be set. + +### PutBooleanArray Method + +Provides a method to set the value from a Boolean array. + +**Syntax** + +```csharp +public void PutBooleanArray(bool[] values); +``` + +**Parameters** + +**`values`** + +[in] bool[ ] value to be set. + +### PutCustomEnum Method + +Provides a method to set the value from a text string, ordinal, primitive ID, and atttribute ID. + +**Syntax** + +```csharp +public void PutCustomEnum(string Value, short ordinal, short primitiveId, short attributeId); +``` + +**Parameters** + +**`Value`** + +[in] Text to set to the CMxCustomEnum. + +**`ordinal`** + +[in] Ordinal position to be set. + +**`primitiveId`** + +[in] primitive id of the referenced string array attribute. + +**`attributeId`** + +[in] Attribute id of the referenced string array attribute CMxValue Class. + +### PutCustomEnumArray Method + +Provides a method to set the value from an array of shorts indicating the ordinal. + +**Syntax** + +```csharp +public void PutCustomEnumArray(short[] values); +``` + +**Parameters** + +**`values`** + +[in] Sets the CMxCustomEnumArray with the ordinal values. + +### PutCustomEnumOrdinal Method + +Provides a method to set the value of the ordinal. + +**Syntax** + +```csharp +public void PutCustomEnumOrdinal(short ordinal); +``` + +**Parameters** + +**`ordinal`** + +[in] Sets the CMxCustomEnum ordinal value. + +### PutCustomStruct Method + +Provides a method to set the value from a MxCustomStruct. + +**Syntax** + +```csharp +public void PutCustomStruct(MxCustomStruct cs); +``` + +**Parameters** + +**`cs`** + +[in] MxCustomStruct value to be set. + +### PutCustomStructArray Method + +Provides a method to set the value from a MxCustomStruct array. + +**Syntax** + +```csharp +public void PutCustomStructArray(MxCustomStruct[] values); +``` + +**Parameters** + +**`values`** + +[in] MxCustomStruct[ ] value to be set. + +### PutCustomStructVBArray Method + +Provides a method to set the value from a guid and byte array. + +**Syntax** + +```csharp +public void PutCustomStructVB(int guid, byte[] pStruct); +``` + +**Parameters** + +**`guid`** + +[in] int value that holds guid to be set. + +**`pStruct`** + +[in] byte[ ] value to be set. + +### PutDouble Method + +Provides a method to set the value from a double. + +**Syntax** + +```csharp +public void PutDouble(double newVal); +``` + +**Parameters** + +**`newVal`** + +[in] double value to be set. + +### PutDoubleArray Method + +Provides a method to set the value from a double array. + +**Syntax** + +```csharp +public void PutDoubleArray(double[] values); +``` + +**Parameters** + +**`values`** + +[in] double[ ] value to be set. + +### PutElapsedTime Method + +Provides a method to set the value from a TimeSpan. + +**Syntax** + +```csharp +public void PutElapsedTime(TimeSpan ts); +``` + +**Parameters** + +**`ts`** + +[in] TimeSpan value to be set. + +### PutElapsedTimeArray Method + +Provides a method to set the value from a TimeSpan array. + +**Syntax** + +```csharp +public void PutElapsedTimeArray(TimeSpan[] values); +``` + +**Parameters** + +**`values`** + +[in] TimeSpan[ ] value to be set. + +### PutElement Method + +Provides a method to set the value of an element from a CMxValue by index. + +**Syntax** + +```csharp +public void PutElement(int index, CMxValue pMxValue); +``` + +**Parameters** + +**`index`** + +[in] index value. + +**`pMxValue`** + +[in] value to be set at the specified index. + +### PutFloat Method + +Provides a method to set the value from a float. + +**Syntax** + +```csharp +public void PutFloat(float newVal); +``` + +**Parameters** + +**`newVal`** + +[in] float value to be set. + +### PutFloatArray Method + +Provides a method to set the value from a float array. + +**Syntax** + +```csharp +public void PutFloatArray(float[] values); +``` + +**Parameters** + +**`values`** + +[in] float[ ] value to be set. + +### PutInteger Method + +Provides a method to set the value from an int. + +**Syntax** + +```csharp +public void PutInteger(int newVal); +``` + +**Parameters** + +**`newVal`** + +[in] integer value to be set. + +### PutIntegerArray Method + +Provides a method to set the value from an int array. + +**Syntax** + +```csharp +public void PutIntegerArray(int[] values); +``` + +**Parameters** + +**`values`** + +[in] integer[ ] value to be set. + +### PutInternationalString Method + +Provides a method to set the value of a specified locale from a string. + +**Syntax** + +```csharp +public void PutInternationalString(int locale, string InternationalizedString); +``` + +**Parameters** + +**`locale`** + +[in] integer value to be set. + +**`InternationalizedString`** + +[in] string value to be set. + +### PutInternationalStringVB Method + +Provides a method to set the value from an InternationalizedString array. + +**Syntax** + +```csharp +public void PutInternationalStringsVB(InternationalizedString[] ppsa); +``` + +**Parameters** + +**`ppsa`** + +[in] InternationalizedString[ ] value to be set. + +### PutMxDataQuality Method + +Provides a method to set the value from an OpcQuality. + +**Syntax** + +```csharp +public void PutMxDataQuality(OpcQuality newVal); +``` + +**Parameters** + +**`newVal`** + +[in] OpcQuality value to be set. + +### PutMxDataQuality Method + +Provides a method to set the value from a short quality. + +**Syntax** + +```csharp +public void PutMxDataQuality(short newVal); +``` + +**Parameters** + +**`newVal`** + +[in] short value to be set. + +### PutMxDataType Method + +Provides a method to set the value from a MxDataType. + +**Syntax** + +```csharp +public void PutMxDataType(MxDataType newVal); +``` + +**Parameters** + +**`newVal`** + +[in] MxDataType value to be set. + +### PutMxDataTypeArray Method + +Provides a method to set the value from a MxDataType array. + +**Syntax** + +```csharp +public void PutMxDataTypeArray(MxDataType[] values); +``` + +**Parameters** + +**`values`** + +[in] MxDataType[ ] values to be set. + +### PutMxReference Method + +Provides a method to set the value from a IMxReference. + +**Syntax** + +```csharp +public void PutMxReference(IMxReference newVal); +``` + +**Parameters** + +**`newVal`** + +[in] IMxReference value to be set. + +### PutMxReferenceArrayAsStrings Method + +Provides a method to set the value of a reference array from an array of strings. + +**Syntax** + +```csharp +public void PutMxReferenceArrayAsStrings(string[] values); +``` + +**Parameters** + +**`values`** + +[in] string[ ] value to set the reference string of CMxReferenceArray. + +### PutMxReferenceAsString Method + +Provides a method to set the value of a reference from a string. + +**Syntax** + +```csharp +public void PutMxReferenceAsString(string newVal); +``` + +**Parameters** + +**`newVal`** + +[in] string value to be set. + +### PutMxSecurityClassification Method + +Provides a method to set the value from a MxSecurityClassification. + +**Syntax** + +```csharp +public void PutMxSecurityClassification(MxSecurityClassification newVal); +``` + +**Parameters** + +**`newVal`** + +[in] MxSecurityClassification value to be set. + +### PutMxSecurityClassificationArray Method + +Provides a method to set the value from a MxSecurityClassification array. + +**Syntax** + +```csharp +public void PutMxSecurityClassificationArray(MxSecurityClassification[] newVal); +``` + +**Parameters** + +**`newVal`** + +[in] MxSecurityClassification[ ] value to be set. + +### PutMxStatus Method + +Provides a method to set the value from a MxStatus. + +**Syntax** + +```csharp +public void PutMxStatus(MxStatus newVal); +``` + +**Parameters** + +**`newVal`** + +[in] MxStatus value to be set. + +### PutMxStatusArray Method + +Provides a method to set the value from a MxStatus array. + +**Syntax** + +```csharp +public void PutMxStatusArray(MxStatus[] values); +``` + +**Parameters** + +**`values`** + +[in] MxStatus[ ] value to be set. + +### PutString Method + +Provides a method to set the value from a string. + +**Syntax** + +```csharp +public void PutString(string newVal); +``` + +**Parameters** + +**`newVal`** + +[in] string value to be set to CMxString. + +### PutStringArray Method + +Provides a method to set the value from a string array. + +**Syntax** + +```csharp +public void PutStringArray(string[] values); +``` + +**Parameters** + +**`values`** + +[in] string[ ] value to be set. + +### PutTime Method + +Provides a method to set the value from a DateTime. + +**Syntax** + +```csharp +public void PutTime(DateTime val); +``` + +**Parameters** + +**`val`** + +[in] DateTime value to be set. + +### PutTimeArray Method + +Provides a method to set the value from a DateTime array. + +**Syntax** + +```csharp +public void PutTimeArray(DateTime[] values); +``` + +**Parameters** + +**`values`** + +[in] DateTime[ ] value to be set. + +### ToString Method + +Provides a method to output the value as a string. + +**Syntax** + +```csharp +public override string ToString(); +``` + +**Returns** + +string + +## CMxValue Operator Overloads + +### Integer Operator Overload + +Provides a conversion operator to convert from CMxValue to int. + +**Syntax** + +```csharp +public static implicit operator int(CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue to convert to integer. + +**Returns** + +int + +### Float Operator Overload + +Provides a conversion operator to convert from CMxValue to float. + +**Syntax** + +```csharp +public static implicit operator float(CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue to convert to float. + +**Returns** + +float + +### Double Operator Overload + +Provides a conversion operator to convert from CMxValue to a double. + +**Syntax** + +```csharp +public static implicit operator double(CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue to convert to double. + +**Returns** + +double + +### TimeSpan Operator Overload + +Provides a conversion operator to convert from CMxValue to TimeSpan. + +**Syntax** + +```csharp +public static implicit operator TimeSpan(CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue to convert to ElapsedTime. + +**Returns** + +TimeSpan + +### MxCustomStruct Operator Overload + +Provides a conversion operator to convert from CMxValue to MxCustomStruct. + +**Syntax** + +```csharp +public static implicit operator MxCustomStruct(CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue to convert to MxCustomStruct. + +**Returns** + +MxCustomStruct + +### EnumOrdinal Operator Overload + +Provides a conversion operator to convert from CMxValue to EnumOrdinal. + +**Syntax** + +```csharp +public static implicit operator EnumOrdinal(CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue to convert to EnumOrdinal. + +**Returns** + +EnumOrdinal + +### MxDataType Operator Overload + +Provides a conversion operator to convert from CMxValue to MxDataType + +**Syntax** + +```csharp +public static implicit operator MxDataType(CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue to convert to MxDataType. + +**Returns** + +MxDataType + +### MxStatus Operator Overload + +Provides a conversion operator to convert from CMxValue to MxStatus. + +**Syntax** + +```csharp +public static implicit operator MxStatus(CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue to convert to MxStatus. + +**Returns** + +MxStatus + +### String Overload + +Provides a conversion operator to convert from CMxValue to string. + +**Syntax** + +```csharp +public static implicit operator string(CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue to convert to string. + +**Returns** + +string + +### MxSecurityClassification Operator Overload + +Provides a conversion operator to convert from CMxValue to MxSecurityClassification + +**Syntax** + +```csharp +public static implicit operator MxSecurityClassification(CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue to convert to MxSecurityClassification. + +**Returns** + +MxSecurityClassification + +### DateTime Operator Overload + +Provides a conversion operator to convert from CMxValue to DateTime. + +**Syntax** + +```csharp +public static implicit operator DateTime(CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue to convert to DateTime. + +**Returns** + +DateTime + +### MxValueClass Operator Overload + +Provides a conversion operator to convert from CMxValue to MxValueClass. + +**Syntax** + +```csharp +public static implicit operator MxValueClass(CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue to convert to MxValueClass. + +**Returns** + +MxValueClass + +### CMxValue Operator Overload (bool) + +Provides a conversion operator to convert from bool to CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(bool val); +``` + +**Parameters** + +**`val`** + +[in] bool value to convert to CMxValue. + +**Returns** + +CMxValue + +### CMxValue Operator Overload (DateTime) + +Provides a conversion operator to convert from DateTime to CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(DateTime val); +``` + +**Parameters** + +**`val`** + +[in] DateTime value to convert to CMxValue. + +**Returns** + +CMxValue + +### CMxValue Operator Overload (double) + +Provides a conversion operator to convert from double to CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(double val); +``` + +**Parameters** + +**`val`** + +[in] double value to convert to CMxValue. + +**Returns** + +CMxValue + +### CMxValue Operator Overload (float) + +Provides a conversion operator to convert from float to CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(float val); +``` + +**Parameters** + +**`val`** + +[in] float value to convert to CMxValue. + +**Returns** + +CMxValue + +### CMxValue Operator Overload (int) + +Provides a conversion operator to convert from int to CMxValue + +**Syntax** + +```csharp +public static implicit operator CMxValue(int val); +``` + +**Parameters** + +**`val`** + +[in] int value to convert to CMxValue. + +**Returns** + +CMxValue + +### CMxValue Operator Overload (MxDataType) + +Provides a conversion operator to convert from MxDataType to CMxValue + +**Syntax** + +```csharp +public static implicit operator CMxValue(MxDataType val); +``` + +**Parameters** + +**`val`** + +[in] MxDataType value to convert to CMxValue. + +**Returns** + +CMxValue + +### CMxValue Operator Overload (MxSecurityClassification) + +Provides a conversion operator to convert from MxSecurityClassification to CMxValue + +**Syntax** + +```csharp +public static implicit operator CMxValue(MxSecurityClassification val); +``` + +**Parameters** + +**`val`** + +[in] MxSecurityClassification value to convert to CMxValue. + +**Returns** + +CMxValue + +### CMxValue Operator Overload (MxStatus) + +Provides a conversion operator to convert from MxStatus to CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(MxStatus val); +``` + +**Parameters** + +**`val`** + +[in] MxStatus value to convert to CMxValue. + +**Returns** + +CMxValue + +### CMxValue Operator Overload (OpcQuality) + +Provides a conversion operator to convert from OpcQuality to CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(OpcQuality val); +``` + +**Parameters** + +**`val`** + +[in] OpcQuality value to convert to CMxValue. + +**Returns** + +CMxValue + +### CMxValue Operator Overload (string) + +Provides a conversion operator to convert from string to CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(string val); +``` + +**Parameters** + +**`val`** + +[in] string value to convert to CMxValue. + +**Returns** + +CMxValue + +### CMxValue Operator Overload (TimeSpan) + +Provides a conversion operator to convert from TimeSpan to CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(TimeSpan val); +``` + +**Parameters** + +**`val`** + +[in] TimeSpan value to convert to CMxValue. + +**Returns** + +CMxValue diff --git a/aot/reference/CMxVariant.md b/aot/reference/CMxVariant.md new file mode 100644 index 0000000..cdd71f1 --- /dev/null +++ b/aot/reference/CMxVariant.md @@ -0,0 +1,151 @@ +# CMxVariant Class + +Namespace: `ArchestrA.Toolkit` + +CMxVariant class is derived from CMxCommon and provides support for variant Attributes. + +**Syntax** + +```csharp +public class CMxVariant : CMxCommon +``` + +## CMxVariant Property + +### Value Property + +Provides a property to get and set the value as a string. + +**Syntax** + +```csharp +public CMxValue Value { get; set; } +``` + +**Returns** + +CMxValue + +## CMxVariant Constructors + +### CMxVariant Constructor + +Provides a default constructor. + +**Syntax** + +```csharp +public CMxVariant(); +``` + +### CMxVariant Constructor CMxValue + +Provides a constructor to initialize the object with a CMxValue. + +**Syntax** + +```csharp +public CMxVariant(CMxValue v); +``` + +**Parameters** + +**`v`** + +[in] CMxValue value. + +### CMxVariant Constructor SupportWrapper, string + +Provides a constructor to initialize the class for use in a primitive wrapper. + +**Syntax** + +```csharp +public CMxStatus (SupportWrapper _wrapper, string _attributeRef); +``` + +**Parameters** + +**`_wrapper`** + +[in] SupportWrapper. + +**`_attributeRef`** + +[in] string value that holds the attribute reference. + +## CMxVariant Methods + +### Set Method + +Provide a method to set the value of the Attribute from a CMxVariant + +**Syntax** + +```csharp +public void Set(CMxVariant val); +``` + +**Parameters** + +**`val`** + +[in] CMxVariant value to be set. + +### SetDataType Method + +Provides a method to set the MxDataType of the Attribute. + +**Syntax** + +```csharp +public void SetDataType(MxDataType dtype); +``` + +**Parameters** + +**`dtype`** + +[in] MxDataType value to be set. + +## CMxVariant Operator Overloads + +### CMxValue Operator Overload CMxVariant + +Provides an operator that converts from CMxVariant to CMxValue. + +**Syntax** + +```csharp +public static implicit operator CMxValue(CMxVariant val); +``` + +**Parameters** + +**`val`** + +[in] CMxVariant value to convert to CMxValue. + +**Returns** + +CMxValue + +### CMxVariant Operator Overload CMxValue + +Provides an operator that converts from CMxValue to CMxVariant. + +**Syntax** + +```csharp +public static implicit operator CMxVariant(CMxValue val); +``` + +**Parameters** + +**`val`** + +[in] CMxValue value to convert to CMxVariant. + +**Returns** + +CMxVariant diff --git a/aot/reference/CMxVariantArray.md b/aot/reference/CMxVariantArray.md new file mode 100644 index 0000000..b9cb15d --- /dev/null +++ b/aot/reference/CMxVariantArray.md @@ -0,0 +1,171 @@ +# CMxVariantArray Class + +Namespace: `ArchestrA.Toolkit` + +CMxVariantArray is derived from CMxArray and provides support for Variant Array Attributes. + +**Syntax** + +```csharp +public class CMxVariantArray : CMxArrayConfigtime_ConfigtimeDynamic for this event. + +Add a separate case to implement set handler code for each your dynamic attributes in this delegate. + +**Syntax** + +```csharp +public event ConfigtimeDynamicSetHandlerDelegate ConfigtimeDynamic; +``` + +**Remarks** + +This is a common set handler for all the configtime dynamic attributes. Object developer has to handle code separately for each dynamic attribute as required. + +### ConfigtimeInitialize Event + +This event fires at the time of Object Initialization. + +The toolkit automatically generates code to register the delegate Configtime_ConfigtimeInitialize for this event. + +Any custom initialization can be done here, including caching of attribute values, primitive IDs and so on. + +**Syntax** + +```csharp +public event ConfigtimeInitializeDelegate ConfigtimeInitialize; +``` + +### ConfigtimeMigrate Event + +ConfigtimeMigrate event is fired when importing a template into a Galaxy that contains a previous version of the template. The template of the previous version must be derived or instantiated for migrate to execute. + +The toolkit automatically generates code to register the delegate Configtime_ConfigtimeMigrate for this event. + +Using the MigrateHandler parameter, user can access the previous version's attribute information in this delegate. + +**Syntax** + +```csharp +public event MigrateDelegate ConfigtimeMigrate; +``` + +### ConfigtimeValidate Event + +ConfigtimeValidate event is fired when the Object is validated. + +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. + +The toolkit automatically generates code to register the delegate Configtime_ConfigtimeValidate for this event. + +**Syntax** + +```csharp +public event ConfigtimeValidateDelegate ConfigtimeValidate; +``` + +### PostAssign Event + +PostAssign event will be fired for a child object after it is assigned to a parent node. The Child node has to be configured to support the PostAssign event. + +The toolkit automatically generates code to register the delegate Configtime_PostAssign for this event. + +**Syntax** + +```csharp +public event GeneralDelegate PostAssign; +``` + +### PostAssignTo Event + +PostAssignTo event will be fired for a parent object after a child node is assigned to it. The Parent node has to be configured to support the PostAssignTo event. + +The toolkit automatically generates code to register the delegate Configtime_PostAssignTo for this event. + +**Syntax** + +```csharp +public event GeneralDelegate PostAssignTo; +``` + +### PostCheckIn Event + +PostCheckIn event is fired after an Object is checked-in. + +The toolkit automatically generates code to register the delegate Configtime_PostCheckIn for this event. + +**Syntax** + +```csharp +public event SupportEventDelegate PostCheckIn; +``` + +### PostCreate Event + +PostCreate event is fired after an object (or derived template) is created. + +The toolkit automatically generates code to register the delegate Configtime_PostCreate for this event. + +One purpose for implementing this method is to ensure that the initial state of the primitive is valid. + +**Syntax** + +```csharp +public event ObjectEventDelegate PostCreate; +``` + +### PostDelete Event + +PostDelete event is fired after the object is deleted. + +The toolkit automatically generates code to register the delegate Configtime_PostDelete for this event. + +**Syntax** + +```csharp +public event SupportEventDelegate PostDelete; +``` + +### PostDeploy Event + +PostDeploy event is fired after the object is deployed. + +The toolkit automatically generates code to register the delegate Configtime_PostDeploy for this event. + +**Syntax** + +```csharp +public event SupportEventDelegate PostDeploy; +``` + +### PostRename Event + +PostRename event is fired after the object is renamed. + +The toolkit automatically generates code to register the delegate Configtime_PostRename for this event. + +**Syntax** + +```csharp +public event RenameDelegate PostRename; +``` + +### PostUnassign Event + +PostUnassign event will be fired on the child object after it is unassigned from its parent. + +The toolkit automatically generates code to register the delegate Configtime_PostUnassign for this event. + +**Syntax** + +```csharp +public event GeneralDelegate PostUnassign; +``` + +### PostUnassignFrom Event + +PostUnassignFrom event will be fired on the parent object after a child object is unassigned from it. + +The toolkit automatically generates code to register the delegate Configtime_PostUnassignFrom for this event. + +**Syntax** + +```csharp +public event GeneralDelegate PostUnassignFrom; +``` + +### PostUndeploy Event + +PostUndeploy will be fired after the object is undeployed. + +The toolkit automatically generates code to register the delegate Configtime_PostUndeploy for this event. + +**Syntax** + +```csharp +public event SupportEventDelegate PostUndeploy; +``` + +### PreAssignTo Event + +PreAssignTo will be fired on a parent object before the child object is assigned to it. + +The toolkit automatically generates code to register the delegate Configtime_PreAssignTo for this event. + +**Syntax** + +```csharp +public event GeneralDelegate PreAssignTo; +``` + +### PreCheckIn Event + +PreCheckIn event will be fired before the object is checked-in. + +The toolkit automatically generates code to register the delegate Configtime_PreCheckIn for this event. + +**Syntax** + +```csharp +public event SupportEventDelegate PreCheckIn; +``` + +### PreDelete Event + +PreDelete event is fired before the object is deleted. + +The toolkit automatically generates code to register the delegate Configtime_PreDelete for this event. + +**Syntax** + +```csharp +public event SupportEventDelegate PreDelete; +``` + +### PreDeploy Event + +PreDeploy event is fired before the object is deployed. + +The toolkit automatically generates code to register the delegate Configtime_PreDeploy for this event. + +**Syntax** + +```csharp +public event DeployDelegate PreDeploy; +``` + +### PreRename Event + +PreRename event is fired before the object is renamed. + +The toolkit automatically generates code to register the delegate Configtime_PreRename for this event. + +**Syntax** + +```csharp +public event RenameDelegate PreRename; +``` + +### PreUnassign Event + +PreUnassign event is fired before the object is unassigned. + +The toolkit automatically generates code to register the delegate Configtime_PreUnassign for this event. + +**Syntax** + +```csharp +public event GeneralDelegate PreUnassign; +``` + +### PreUndeploy Event + +PreUndeploy event is fired before the object is undeployed. + +The toolkit automatically generates code to register the delegate Configtime_PreUndeploy for this event. + +**Syntax** + +```csharp +public event ConfigtimeValidateDelegate ConfigtimeValidate; +``` + +### PreValidate Event + +PreValidate event is fired before the object is validated. + +The toolkit automatically generates code to register the delegate Configtime_PreValidate for this event. + +**Syntax** + +```csharp +public event ObjectEventDelegate PreValidate; +``` + +## Nested Type: InputOutputPrimitive Class + +This class provides a wrapper for InputOutput Primitive. + +**Syntax** + +```csharp +public class InputOutputPrimitive : ConfigtimeBase.PrimitiveWrapper +``` + +### InputOutputPrimitive Properties + +### InputOutputPrimitive Constructor + +### InputOutputPrimitive Methods + +## Nested Type: InputPrimitive Class + +This class provides a wrapper for Input Primitive. + +**Syntax** + +```csharp +public class InputPrimitive : ConfigtimeBase.PrimitiveWrapper +``` + +### InputPrimitive Properties + +### InputPrimitive Constructor + +### InputPrimitive Methods + +## Nested Type: OutputPrimitive Class + +This class provides a wrapper for Output Primitive. + +**Syntax** + +```csharp +public class OutputPrimitive : ConfigtimeBase.PrimitiveWrapper +``` + +### OutputPrimitive Properties + +### OutputPrimitive Constructor + +### OutputPrimitive Methods + +## Nested Type: PrimitiveWrapper Class + +Base class of all IO Wrappers. + +**Syntax** + +```csharp +public class PrimitiveWrapper +``` + +### PrimitiveWrapper Property + +### PrimitiveWrapper Constructor + +### PrimitiveWrapper Methods + +## Nested Type: AttrOpStatus Struct + +Provides access to the result value associated with the following Attribute operations. + +- AddAttribute +- DeleteAttribute + +**Syntax** + +```csharp +public struct AttrOpStatus +``` + +### AttrOpStatus Attributes + +## Nested Type: PrimOpStatus Struct + +Provides access to the result value associated with the following Primitive operations to remove the need to add message parameters for each operation. + +- AddPrimitive +- CanAddPrimitive +- CanRenamePrimitive +- GetVirtualPrimitiveIdByInternalName +- DeletePrimitive +- RenamePrimitive + +**Syntax** + +```csharp +public struct PrimOpStatus +``` + +### PrimOpStatus Attributes diff --git a/aot/reference/ConfigtimeSetHandlerEventArgs.md b/aot/reference/ConfigtimeSetHandlerEventArgs.md new file mode 100644 index 0000000..0874f35 --- /dev/null +++ b/aot/reference/ConfigtimeSetHandlerEventArgs.md @@ -0,0 +1,13 @@ +# ConfigtimeSetHandlerEventArgs Class + +Namespace: `ArchestrA.Toolkit` + +ConfigtimeSetHandlerEventArgs is a class that provides configtime set handlers with the information they need when called. + +**Syntax** + +```csharp +public class ConfigtimeSetHandlerEventArgs : SetHandlerEventArgs +``` + +## ConfigtimeSetHandlerEventArgs Constructor diff --git a/aot/reference/DataQuality.md b/aot/reference/DataQuality.md new file mode 100644 index 0000000..1efb4fe --- /dev/null +++ b/aot/reference/DataQuality.md @@ -0,0 +1,20 @@ +# DataQuality Enumeration + +Namespace: `ArchestrA.Toolkit` + +**Syntax** + +```csharp +enum DataQuality +{ +DataQualityUnknown = -1, +DataQualityGood = 0, +DataQualityUncertain = 1, +DataQualityInitializing = 2, +DataQualityBad = 3, +} +``` + +**Remarks** + +An enumeration that represents the four primary OPC data quality states as interpreted by ArchestrA. The DataQualityInitializing state is actually a substatus of Bad according to OPC. In general, use of MxDataQuality is preferred since it contains the most complete OPC bit definitions. diff --git a/aot/reference/ECALLCONTEXTFLAG.md b/aot/reference/ECALLCONTEXTFLAG.md new file mode 100644 index 0000000..51b94e0 --- /dev/null +++ b/aot/reference/ECALLCONTEXTFLAG.md @@ -0,0 +1,20 @@ +# ECALLCONTEXTFLAG Enumeration + +Namespace: `ArchestrA.Toolkit` + +**Syntax** + +```csharp +enum ECALLCONTEXTFLAG +{ +eCallingContextUnknown = 0, +eSupervisorySetAttribute = 1, +eSystemSetAttribute = 2, +eUserSetAttribute = 3, +eInternalSetAttribute = 4, +} +``` + +**Remarks** + +Indicates the type of caller that issued the set attribute request. The only types to be used are eSupervisorySetAttribute, eUserSetAttribute, and eInternalSetAttribute. SupervisorySet indicates another object performed the set. InternalSet indicates this object performed the set. UserSet indicates a user performed the set. diff --git a/aot/reference/EPACKAGESTATUS.md b/aot/reference/EPACKAGESTATUS.md new file mode 100644 index 0000000..dea27e0 --- /dev/null +++ b/aot/reference/EPACKAGESTATUS.md @@ -0,0 +1,19 @@ +# EPACKAGESTATUS Enumeration + +Namespace: `ArchestrA.Toolkit` + +**Syntax** + +```csharp +enum EPACKAGESTATUS +{ +ePackageUnknownStatus = -1, +ePackageGood = 0, +ePackageBad = 1, +ePackageWarning = 2, +} +``` + +**Remarks** + +This enumeration indicates the status of a package configuration. Bad packages cannot be deployed, whereas Good and Warning packages can be deployed. diff --git a/aot/reference/EPRIMITIVEOPSTATUS.md b/aot/reference/EPRIMITIVEOPSTATUS.md new file mode 100644 index 0000000..333968a --- /dev/null +++ b/aot/reference/EPRIMITIVEOPSTATUS.md @@ -0,0 +1,27 @@ +# EPRIMITIVEOPSTATUS Enumeration + +Namespace: `ArchestrA.Toolkit` + +**Syntax** + +```csharp +enum EPRIMITIVEOPSTATUS +{ +eSuccess = 0, +eUndefinedError = 1, +ePrimitiveNotFound = 2, +ePrimitiveDefinitionNotFound = 3, +eHasLockedAttributes = 4, +eNotDynamicPrimitive = 5, +eOperationCausesNameConflict = 6, +eInvalidPrimitiveName = 7, +eNotVirtualPrimitive = 8, +eCanNotFindParentPrimitive = 9, +eParentPrimitiveIsVirtual = 10, +eConflictWithExtensionPrimitive = 11, +} +``` + +**Remarks** + +This enumeration indicates the status of a virtual primitive operation within the package. diff --git a/aot/reference/ESTARTUPCONTEXT.md b/aot/reference/ESTARTUPCONTEXT.md new file mode 100644 index 0000000..03164fb --- /dev/null +++ b/aot/reference/ESTARTUPCONTEXT.md @@ -0,0 +1,21 @@ +# ESTARTUPCONTEXT Enumeration + +Namespace: `ArchestrA.Toolkit` + +**Syntax** + +```csharp +enum ESTARTUPCNTEXT +{ +eStartupContextUnknown = 0, +eStartingAfterDeployment = 1, +eStartingFromCheckpoint = 2, +eStartingFromStandby, +} +``` + +### Members + +eStartingAfterDeployment + +Indicates the object instance has just been deployed and is starting for the first time. diff --git a/aot/reference/EnumText.md b/aot/reference/EnumText.md new file mode 100644 index 0000000..fbf9ad2 --- /dev/null +++ b/aot/reference/EnumText.md @@ -0,0 +1,45 @@ +# EnumText Class + +Namespace: `ArchestrA.Toolkit` + +EnumText is a utility class within CMxCustomEnumArray. It provides a method to access the value of an element of the array as a string by specifying its ordinal value. + +**Syntax** + +```csharp +public class EnumText +``` + +## EnumText Property + +### Property to get and set the value of an element of the Enum Array + +Provides a property to get and set the value of an element of the Enum Array as a string. + +**Syntax** + +```csharp +public string this[short i] { get; set; } +``` + +**Returns** + +string + +## EnumText Method + +### EnumText Constructor + +Provides a constructor that takes the owning CMxCustomEnumArray. + +**Syntax** + +```csharp +public EnumText(CMxCustomEnumArray _owner); +``` + +**Parameters** + +**`_owner`** + +[in] CMxCustomEnumArray value to be set. diff --git a/aot/reference/MigrateHandler.md b/aot/reference/MigrateHandler.md new file mode 100644 index 0000000..814ca15 --- /dev/null +++ b/aot/reference/MigrateHandler.md @@ -0,0 +1,17 @@ +# MigrateHandler Class + +Namespace: `ArchestrA.Toolkit` + +The migrate handler contains the information on the current migrate event. + +**Syntax** + +```csharp +public class MigrateHandler +``` + +## MigrateHandler Properties + +## MigrateHandler Constructor + +## MigrateHandler Methods diff --git a/aot/reference/MxCustomStruct.md b/aot/reference/MxCustomStruct.md new file mode 100644 index 0000000..38c7819 --- /dev/null +++ b/aot/reference/MxCustomStruct.md @@ -0,0 +1,29 @@ +# MxCustomStruct Enumeration + +Namespace: `ArchestrA.Toolkit` + +**Syntax** + +class MxCustomStruct + +```csharp +{ +public byte[] Data; +public int Guid; + +public MxCustomStruct(); +public MxCustomStruct(int guid); + +public static bool operator !=(MxCustomStruct x, MxCustomStruct y); +public static bool operator ==(MxCustomStruct source, MxCustomStruct result); + +public override bool Equals(object obj); +public override int GetHashCode(); +} +``` + +### Members + +Guid + +Unique type identifier for the custom structure for type-checking. diff --git a/aot/reference/MxDataType.md b/aot/reference/MxDataType.md new file mode 100644 index 0000000..c673105 --- /dev/null +++ b/aot/reference/MxDataType.md @@ -0,0 +1,34 @@ +# MxDataType Enumeration + +Namespace: `ArchestrA.Toolkit` + +**Syntax** + +```csharp +enum MxDataType +{ +MxDataTypeUnknown = -1, +MxNoData = 0, +MxBoolean = 1, +MxInteger = 2, +MxFloat = 3, +MxDouble = 4, +MxString = 5, +MxTime = 6, +MxElapsedTime = 7, +MxReferenceType = 8, +MxStatusType = 9, +MxDataTypeEnum = 10, +MxSecurityClassificationEnum = 11, +MxDataQualityType = 12, +MxQualifiedEnum = 13, +MxQualifiedStruct = 14, +MxInternationalizedString = 15, +MxBigString = 16, +MxDataTypeEND = 17, +} +``` + +**Remarks** + +Indicates the datatype of an attribute. diff --git a/aot/reference/MxPropertyLockedEnum.md b/aot/reference/MxPropertyLockedEnum.md new file mode 100644 index 0000000..b61ed73 --- /dev/null +++ b/aot/reference/MxPropertyLockedEnum.md @@ -0,0 +1,20 @@ +# MxPropertyLockedEnum Enumeration + +Namespace: `ArchestrA.Toolkit` + +**Syntax** + +```csharp +enum MxPropertyLockedEnum +{ +MxUndefinedLockedStatus = -1, +MxUnLocked = 0, +MxLockedInMe = 1, +MxLockedInParent = 2, +MxPropertyLockedEnumEND = 3, +} +``` + +**Remarks** + +This enumeration indicates the lock status of an attribute in a package. Attributes that are MxUnLocked and MxLockedInMe can be modified in the package, whereas attributes that are MxLockedInParent cannot be modified in the package. diff --git a/aot/reference/MxSecurityClassification.md b/aot/reference/MxSecurityClassification.md new file mode 100644 index 0000000..705750c --- /dev/null +++ b/aot/reference/MxSecurityClassification.md @@ -0,0 +1,23 @@ +# MxSecurityClassification Enumeration + +Namespace: `ArchestrA.Toolkit` + +**Syntax** + +```csharp +enum MxSecurityClassification +{ +MxSecurityUndefined = -1, +MxSecurityFreeAccess = 0, +MxSecurityOperate = 1, +MxSecuritySecuredWrite = 2, +MxSecurityVerifiedWrite = 3, +MxSecurityTune = 4, +MxSecurityConfigure = 5, +MxSecurityViewOnly = 6, +} +``` + +**Remarks** + +Indicates the security classification of an attribute. diff --git a/aot/reference/MxStatus.md b/aot/reference/MxStatus.md new file mode 100644 index 0000000..a65be66 --- /dev/null +++ b/aot/reference/MxStatus.md @@ -0,0 +1,21 @@ +# MxStatus Enumeration + +Namespace: `ArchestrA.Toolkit` + +**Syntax** + +```csharp +struct MxStatus +{ +public MxStatusCategory Category; +public short detail; +public MxStatusSource detectedBy; +public short success; +} +``` + +### Members + +success + +Indicates whether the operation succeeded, pending, or failed. diff --git a/aot/reference/MxStatusCategory.md b/aot/reference/MxStatusCategory.md new file mode 100644 index 0000000..cf0691a --- /dev/null +++ b/aot/reference/MxStatusCategory.md @@ -0,0 +1,25 @@ +# MxStatusCategory Enumeration + +Namespace: `ArchestrA.Toolkit` + +**Syntax** + +```csharp +enum MxStatusCategory +{ +MxStatusCategoryUnknown = -1, +MxCategoryOk = 0, +MxCategoryPending = 1, +MxCategoryWarning = 2, +MxCategoryCommunicationError = 3, +MxCategoryConfigurationError = 4, +MxCategoryOperationalError = 5, +MxCategorySecurityError = 6, +MxCategorySoftwareError = 7, +MxCategoryOtherError = 8, +} +``` + +**Remarks** + +Indicates a category of success or error for a Message Exchange call. Used in the Set handler context for objects. Return MxCategoryOk if the set succeeded. Objects may also return MxCategoryWarning when the set completed with a warning. For errors, MxCategoryOperationalError is used to indicate an invalid operation was attempted. MxCategoryConfigurationError is used to indicate the object is not configured to support the set requested. diff --git a/aot/reference/MxStatusSource.md b/aot/reference/MxStatusSource.md new file mode 100644 index 0000000..b65ef66 --- /dev/null +++ b/aot/reference/MxStatusSource.md @@ -0,0 +1,22 @@ +# MxStatusSource Enumeration + +Namespace: `ArchestrA.Toolkit` + +**Syntax** + +```csharp +enum MxStatusSource +{ +MxSourceUnknown = -1, +MxSourceRequestingLmx = 0, +MxSourceRespondingLmx = 1, +MxSourceRequestingNmx = 2, +MxSourceRespondingNmx = 3, +MxSourceRequestingAutomationObject = 4, +MxSourceRespondingAutomationObject = 5, +} +``` + +**Remarks** + +Indicates the source of an error for a Message Exchange get or set call. Lmxmeans Local Message Exchange, the in-process component for ArchestrA data communications. Nmx means Network Message Exchange, the network component of ArchestrA data communications. diff --git a/aot/reference/README.md b/aot/reference/README.md new file mode 100644 index 0000000..a4ab676 --- /dev/null +++ b/aot/reference/README.md @@ -0,0 +1,89 @@ +# ArchestrA Object Toolkit Reference + +Auto-converted from the AVEVA *ArchestrA Object Toolkit Reference Guide* CHM. +Single namespace: `ArchestrA.Toolkit`. + +Layout: one Markdown file per top-level type (class / struct / enumeration / interface). +Member overloads are inlined as `###` subsections inside the parent type page. + +## Namespace Overview + +ArchestrA.Toolkit is the common namespace for all the classes in the toolkit. + +## Core Types + +- [AObjectBase Class](AObjectBase.md) +- [ConfigtimeBase Class](ConfigtimeBase.md) +- [RuntimeBase Class](RuntimeBase.md) +- [aaBaseEditorForm Class](aaBaseEditorForm.md) +- [CMxValue Class](CMxValue.md) +- [CMxType Class](CMxType.md) +- [CMxCommon Class](CMxCommon.md) +- [CMxArrayBase Class](CMxArrayBase.md) +- [CMxArray Class](CMxArrayT.md) +- [CMxBoolean Class](CMxBoolean.md) +- [CMxBooleanArray Class](CMxBooleanArray.md) +- [CMxFloat Class](CMxFloat.md) +- [CMxFloatArray Class](CMxFloatArray.md) +- [CMxDouble Class](CMxDouble.md) +- [CMxDoubleArray Class](CMxDoubleArray.md) +- [CMxInteger Class](CMxInteger.md) +- [CMxIntegerArray Class](CMxIntegerArray.md) +- [CMxCustomEnum Class](CMxCustomEnum.md) +- [EnumText Class](EnumText.md) +- [CMxCustomEnumArray Class](CMxCustomEnumArray.md) +- [CMxCustomStruct Class](CMxCustomStruct.md) +- [CMxCustomStructArray Class](CMxCustomStructArray.md) +- [CMxDataType Class](CMxDataType.md) +- [CMxDataTypeArray Class](CMxDataTypeArray.md) +- [CMxElapsedTime Class](CMxElapsedTime.md) +- [CMxElapsedTimeArray Class](CMxElapsedTimeArray.md) +- [CMxInternationalizedString Class](CMxInternationalizedString.md) +- [CMxInternationalizedStringArray Class](CMxInternationalizedStringArray.md) +- [CMxReference Class](CMxReference.md) +- [CMxReferenceArray Class](CMxReferenceArray.md) +- [CMxStatus Class](CMxStatus.md) +- [CMxStatusArray Class](CMxStatusArray.md) +- [CMxString Class](CMxString.md) +- [CMxStringArray Class](CMxStringArray.md) +- [CMxTime Class](CMxTime.md) +- [CMxTimeArray Class](CMxTimeArray.md) +- [CMxVariant Class](CMxVariant.md) +- [CMxVariantArray Class](CMxVariantArray.md) +- [CMxBigString Class](CMxBigString.md) +- [CMxBigStringArray Class](CMxBigStringArray.md) +- [CMxInternalDumpLoadData Class](CMxInternalDumpLoadData.md) +- [CMxInternalFailoverData Class](CMxInternalFailoverData.md) +- [CMxDataQuality Class](CMxDataQuality.md) +- [CMxIndirectBase Class](CMxIndirectBase.md) +- [CMxIndirectWriteOnly Class](CMxIndirectWriteOnly.md) +- [CMxIndirect Class](CMxIndirect.md) +- [VtqBufferReader Class](VtqBufferReader.md) +- [VtqBufferWriter Class](VtqBufferWriter.md) + +## Event Arguments + +- [SetHandlerEventArgs Class](SetHandlerEventArgs.md) +- [ConfigtimeSetHandlerEventArgs Class](ConfigtimeSetHandlerEventArgs.md) +- [MigrateHandler Class](MigrateHandler.md) +- [RuntimeSetHandlerEventArgs Class](RuntimeSetHandlerEventArgs.md) +- [RuntimeGetStatusDescEventArgs Class](RuntimeGetStatusDescEventArgs.md) +- [RuntimeSetScanStateEventArgs Class](RuntimeSetScanStateEventArgs.md) +- [RuntimeStartupEventArgs Class](RuntimeStartupEventArgs.md) + +## Enumerations + +- [ESTARTUPCONTEXT Enumeration](ESTARTUPCONTEXT.md) +- [StartupInfo Enumeration](StartupInfo.md) +- [ECALLCONTEXTFLAG Enumeration](ECALLCONTEXTFLAG.md) +- [SetInfo Enumeration](SetInfo.md) +- [MxStatus Enumeration](MxStatus.md) +- [MxStatusCategory Enumeration](MxStatusCategory.md) +- [MxStatusSource Enumeration](MxStatusSource.md) +- [DataQuality Enumeration](DataQuality.md) +- [MxSecurityClassification Enumeration](MxSecurityClassification.md) +- [MxCustomStruct Enumeration](MxCustomStruct.md) +- [MxDataType Enumeration](MxDataType.md) +- [EPACKAGESTATUS Enumeration](EPACKAGESTATUS.md) +- [EPRIMITIVEOPSTATUS Enumeration](EPRIMITIVEOPSTATUS.md) +- [MxPropertyLockedEnum Enumeration](MxPropertyLockedEnum.md) diff --git a/aot/reference/RuntimeBase.md b/aot/reference/RuntimeBase.md new file mode 100644 index 0000000..bda285a --- /dev/null +++ b/aot/reference/RuntimeBase.md @@ -0,0 +1,9340 @@ +# RuntimeBase Class + +Namespace: `ArchestrA.Toolkit` + +This Class provides functionality such as, Support for Runtime Events, Add / Remove attributes, Failover Support for Dynamic Attributes, Advise Only Active support and get / set of value, time and quality for attributes. + +**Syntax** + +```csharp +public class RuntimeBase : AObjectBase, IPrimitiveDeployment, IValueSupport, IPrimitiveRuntimeScanOnDemandCS, IPrimitiveRuntime3, IPrimitiveRuntime +``` + +**Remarks** + +The Runtime Base class is derived from: + +AObjectBase which is a part of the ArchestrA.Toolkit namespace and IPrimitiveDeployment, IValueSupport, IPrimitiveRuntimeScanOnDemandCS, IPrimitiveRuntime2 and IPrimitiveRuntime which are the parts of the ArchestrA.Core namespace. + +## RuntimeBase Properties + +### DynamicAttributeFailoverEnabled Property + +Indicates if fail-over support is enabled for runtime dynamic attribute. + +**Syntax** + +```csharp +public bool DynamicAttributeFailoverEnabled { get; } +``` + +**Returns** + +bool + +Returns true if Failover support is enabled for the object. + +### ScanOnDemandEnabled Property + +Indicates if the “advise only active” support is enabled for the Object. It returns true only if Advise Only Active is enabled for both the Object and the Galaxy. + +**Syntax** + +```csharp +public bool ScanOnDemandEnabled { get; } +``` + +**Returns** + +bool + +### Site Property + +Provides access to the RuntimeSite. + +**Syntax** + +```csharp +public IPrimitiveRuntimeSiteEx2 Site { get; } +``` + +**Returns** + +IPrimitiveRuntimeSiteEx2 + +**Remarks** + +The toolkit provides wrappers for most of the commonly used functions like AddAttribute and so on. An advanced user can access additional functions from IPrimitiveRuntimeSiteEx2 using the Site Property. + +Example to enable checkpoint for an attribute: + +```csharp +Site2.CheckpointAttribute(attrID,true); +``` + +### ThisPrimitive Property + +Provides access to the current Primitive ID. + +**Syntax** + +```csharp +public short ThisPrimitive { get; } +``` + +**Returns** + +short + +## RuntimeBase Constructor + +### RuntimeBase Constructor + +This is the default constructor for the RuntimeBase class. This is not used by the Object Developer. The Object Developer uses the Runtime() constructor that is automatically generated by the toolkit. + +**Syntax** + +```csharp +public RuntimeBase(); +``` + +## RuntimeBase Events + +### RuntimeDynamic Event + +Fired when the value of a runtime dynamic attribute is changed. The toolkit automatically generates code to register the delegate Runtime_RuntimeDynamic for this event. + +**Syntax** + +```csharp +public event RuntimeDynamicSetHandlerDelegate RuntimeDynamic; +``` + +### RuntimeExecute Event + +Fired on every scan cycle of the hosting AppEngine while the object is OnScan. The toolkit automatically generates code to register the delegate _RuntimeExecute for this event. + +**Syntax** + +```csharp +public event RuntimeExecuteDelegate RuntimeExecute; +``` + +### RuntimeGetStatusDesc Event + +Occurs when the run time component requests a detailed message for an error for example, after a set handler returns a failure. The toolkit automatically generates code to register the delegate Runtime_RuntimeGetStatusDesc for this event. + +**Syntax** + +```csharp +public event RuntimeGetStatusDescDelegate RuntimeGetStatusDesc; +``` + +### RuntimeInitialize Event + +Occurs after the object is created in run time (usually after deployment, but also after a failover or after the bootstrap is restarted). Occurs before the Startup event. No attribute information is available at this time. The toolkit automatically generates code to register the delegate Runtime_RuntimeInitialize for this event. + +**Syntax** + +```csharp +public event RuntimeInitializeDelegate RuntimeInitialize; +``` + +### RuntimeSetScanState Event + +Occurs when the object's scan state (OnScan/OffScan) is changed. The toolkit automatically generates code to register the delegate _ RuntimeSetScanState for this event. + +**Syntax** + +```csharp +public event RuntimeSetScanStateDelegate RuntimeSetScanState; +``` + +### RuntimeShutdown Event + +Occurs when the object is shutting down (usually after the object is set to OffScan, but during a failover OffScan may not be set). This event does not occur if the object goes off the network during a network failure. The toolkit automatically generates code to register the delegate _RuntimeShutdown for this event. + +**Syntax** + +```csharp +public event RuntimeShutdownDelegate RuntimeShutdown; +``` + +### RuntimeStartup Event + +Occurs when the object is started (after the Initialize event and before it goes OnScan). You can use the event's startup context to find out whether the object is starting up after a failover or other reasons. The toolkit automatically generates code to register the delegate _RuntimeStartup for this event. + +**Syntax** + +```csharp +public event RuntimeStartupDelegate RuntimeStartup; +``` + +## RuntimeBase Methods + +### ActivateLocalAttribute Method (string) + +Provides a method to activate an attribute. This function is called by auto-generated toolkit code and is typically not to be used by the Object Developer. + +**Syntax** + +```csharp +public bool ActivateLocalAttribute( +string attributeName +); +``` + +**Parameters** + +**`attributeName`** + +The external name of the attribute. + +**Returns** + +bool + +### ActivateLocalAttribute Method (short, string) + +Provides a method to activate an attribute. This function is called by auto-generated toolkit code and is typically not to be used by the Object Developer. + +**Syntax** + +```csharp +public bool ActivateLocalAttribute( +short attributeId, +string attributeName +); +``` + +**Parameters** + +**`attributeId`** + +The attribute ID. + +**`attributeName`** + +The external name of the attribute. + +**Returns** + +bool + +### ActivatePrimitiveAttribute Method (string) + +Provides a method to activate an attribute of a child primitive, reusable primitive, or utility primitive. + +**Syntax** + +```csharp +public bool ActivatePrimitiveAttribute( +string fullAttributeName +); +``` + +**Parameters** + +**`fullAttributeName`** + +The name of the primitive attribute. The name fullAttributeName format should be "PrimitiveName.AttributeName". + +**Returns** + +bool + +### ActivatePrimitiveAttribute Method (short, short) + +Provides a method to activate an attribute of a child primitive, reusable primitive, or utility primitive. + +**Syntax** + +```csharp +public bool ActivatePrimitiveAttribute( +short attributeId, +short primitiveId, +); +``` + +**Parameters** + +**`attributeId`** + +The Primitive's attribute ID. + +**`primitiveId`** + +The Primitive ID. + +**Returns** + +bool + +### AddAttribute Method (string, MxAttributeCategory, MxDataType, bool) + +Provides a method to add a Dynamic Attribute to the Primitive. Use this function if you are adding a non-array attribute. + +**Syntax** + +```csharp +public bool AddAttribute( +string name, +MxAttributeCategory category, +MxDataType type, +bool setHandler +); +``` + +**Parameters** + +Refer to the section AddAttribute Method Parameters and Return Value. + +**Returns** + +Refer to the section AddAttribute Method Parameters and Return Value. + +### AddAttribute Method (string, MxAttributeCategory, MxDataType, bool) + +Provides a method to add a Dynamic Attribute to the Primitive. Use this function if you are adding a non-array attribute. + +**Syntax** + +```csharp +public bool AddAttribute( +string name, +MxAttributeCategory category, +MxDataType type, +bool setHandler +); +``` + +**Parameters** + +Refer to the section AddAttribute Method Parameters and Return Value. + +**Returns** + +Refer to the section AddAttribute Method Parameters and Return Value. + +### AddAttribute Method (string, MxAttributeCategory, MxDataType, int, bool) + +Provides a method to add a Dynamic Attribute Array. + +**Syntax** + +```csharp +public bool AddAttribute( +string name, +MxAttributeCategory category, +MxDataType type, +int length, +bool setHandler +); +``` + +**Parameters** + +Refer to the section AddAttribute Method Parameters and Return Value. + +**Returns** + +Refer to the section AddAttribute Method Parameters and Return Value. + +### AddAttribute Method (string, MxAttributeCategory, MxDataType, MxSecurityClassification, DataQuality, bool, bool, short) + +Provides a detailed method to add a Dynamic Attribute. Use this function to add a non- array attribute that you want to exclude from Dump/Load. + +**Syntax** + +```csharp +public bool AddAttribute( +string name, +MxAttributeCategory category, +MxDataType type, +MxSecurityClassification security, +DataQuality quality, +bool setHandler, +bool excludeFromFailover, +out short id +); +``` + +**Parameters** + +Refer to the section AddAttribute Method Parameters and Return Value. + +**Returns** + +Refer to the section AddAttribute Method Parameters and Return Value. + +### AddAttribute Method (string, MxAttributeCategory, MxDataType, MxSecurityClassification, DataQuality, int, bool, bool, short) + +Provides a detailed method to add a Dynamic Attribute Array. Use this function to add a array attribute that you want to exclude from Dump/Load. + +**Syntax** + +```csharp +public bool AddAttribute( +string name, +MxAttributeCategory category, +MxDataType type, +MxSecurityClassification security, +DataQuality quality, +int length, +bool setHandler, +bool excludeFromFailover, +out short id +); +``` + +**Parameters** + +**`name`** + +Refer to the section AddAttribute Method Parameters and Return Value. + +**Returns** + +Refer to the section AddAttribute Method Parameters and Return Value. + +### AddAttribute Method Parameters and Return Value + +**Parameters** + +**`name`** + +External name of the attribute. + +**`category`** + +Supported categories: + +MxCategoryCalculated + +MxCategoryCalculatedRetentive + +MxCategoryWriteable_S + +MxCategoryWriteable_U + +MxCategoryWriteable_UC + +MxCategoryWriteable_US + +MxCategoryWriteable_USC + +**`type`** + +Supported data types: + +MxBigString + +MxBoolean + +MxDataQualityType + +MxDataTypeEnum + +MxDouble + +MxElapsedTime + +MxFloat + +MxInteger + +MxInternationalizedString + +MxNoData + +MxQualifiedEnum + +MxQualifiedStruct + +MxReferenceType + +MxSecurityClassificationEnum + +MxStatusType + +MxString + +MxTime + +**`setHandler`** + +true: Enables the runtime dynamic set handler. + +The user should add a case for the dynamic attribute in the Runtime_RuntimeDynamic function, as the attribute is not set by default, when this parameter is marked as true. + +**`length`** + +Indicates the length of the array, pass 0 in case of non-array attribute. + +**`quality`** + +Supported quality types: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**`security`** + +Supported security classifications: + +MxSecurityConfigure + +MxSecurityFreeAccess + +MxSecurityOperate + +MxSecuritySecuredWrite + +MxSecurityTune + +MxSecurityUndefined + +MxSecurityVerifiedWrite + +MxSecurityViewOnly + +**`excludeFromDumpLoad`** + +If true excludes the attribute from Dumpload. + +**`id`** + +Out parameter with the attribute ID of newly created dynamic attribute. + +**Returns** + +bool + +true: if the attribute is successfully added. + +false: fails to add the dynamic attribute if the attribute with the provided name already exists, or if the user tries to add a attribute with unsupported category or data type. + +### AppendNames Method + +Appends two names together in a period separated Application Server format [owner].[child]. + +**Syntax** + +```csharp +public string AppendNames( +string owner, +string child +); +``` + +**Parameters** + +**`owner`** + +The owner name. + +**`child`** + +The child name. + +**Returns** + +string + +Returns the Archestra name in the format [owner].[child]. If either name is empty, no period is included. + +### BindTo Method (string, string) + +Provides a method to create an Indirect (CMxIndirect) for referencing Attributes of other Objects. + +**Syntax** + +```csharp +public CMxIndirect BindTo( +string refString, +string refContext +); +``` + +**Parameters** + +**`refString`** + +The reference of the attribute of another object, in the format "ObjectName.AttributeName". + +**`refContext`** + +An empty string is used for this parameter when the refString parameter is specified as "ObjectName.AttributeName". + +When using a relative reference (like "MyArea.ScanState" or "MyPlatform.CPULoad") in the refString parameter, the refContext parameter must be the Tagname property of the object. The refContext parameter can be empty if the refString parameter contains an absolute path. + +**Remarks** + +After the BindTo() operation, access the value of the Indirect only if the Indirect's StatusOfLastRead.success = = -1 and StatusOfLastRead.Category = = MxStatusCategory.MxCategoryOk + +**Example** + +```csharp +CMxIndirect mxIndirect = BindTo("MyArea.ScanState", Tagname); +``` + +**Returns** + +CMxIndirect + +### BindTo Method (string, string, bool) + +Provides a method to create an Indirect (CMxIndirect) for referencing Attributes of other Objects. + +**Syntax** + +```csharp +public CMxIndirect BindTo( +string refString, +string refContext, +bool suspended +); +``` + +**Parameters** + +**`refString`** + +The reference of the attribute of another object, in the format "ObjectName.AttributeName". + +**`refContext`** + +An empty string is used for this parameter when the refString parameter is specified as "ObjectName.AttributeName". When using a relative reference (like "MyArea.ScanState" or "MyPlatform.CPULoad") in the refString parameter, the refContext parameter must be the Tagname property of the object. The refContext parameter can be empty if the refString parameter contains an absolute path. + +**`suspended`** + +true: suspend attribute. + +false: Activate attribute. + +**Returns** + +CMxIndirect + +**Remarks** + +After the BindTo() operation, access the value of the Indirect only if the Indirect's StatusOfLastRead.success = = -1 and StatusOfLastRead.Category = = MxStatusCategory.MxCategoryOk + +### BindToWriteOnly Method (string, string) + +Provides a method to create an Indirect (CMxIndirectWriteOnly) for write-only access to Attributes of other Objects. + +**Syntax** + +```csharp +public CMxIndirectWriteOnly BindToWriteOnly( +string refString, +string refContext +); +``` + +**Parameters** + +**`refString`** + +The reference of the attribute of another object in "ObjectName.AttributeName" format. + +**`refContext`** + +An empty string is used for this parameter when the refString parameter is specified as "ObjectName.AttributeName". When using a relative reference (like "MyArea.ScanState" or "MyPlatform.CPULoad") in the refString parameter, the refContext parameter must be the Tagname property of the object. The refContext parameter can be empty if the refString parameter contains an absolute path. + +**Example:** + +```csharp +CMxIndirectWriteOnly mxIndirect = BindToWriteOnly("MyArea.ScanState", Tagname); +``` + +**Returns** + +CMxIndirectWriteOnly + +### BindToWriteOnly Method (string, string, bool) + +Provides a method to create an Indirect (CMxIndirectWriteOnly) for write-only access to Attributes of other Objects. + +**Syntax** + +```csharp +public CMxIndirectWriteOnly BindToWriteOnly( +string refString, +string refContext, +bool suspended +); +``` + +**Parameters** + +**`refString`** + +The reference of the attribute of another object in "ObjectName.AttributeName" format. + +**`refContext`** + +An empty string is used for this parameter. + +**`suspended`** + +true: suspend attribute. + +false: Activate attribute. + +**Returns** + +CMxIndirectWriteOnly + +### CheckpointDynamicAttributeData Method + +Provides a method to store the values of all dynamic attributes created at runtime, that were not explicitly excluded from failover. This method should be called immediately after a dynamic attribute value is changed. + +**Syntax** + +```csharp +public bool CheckpointDynamicAttributeData(); +``` + +**Returns** + +bool + +### DeleteAttribute Method (string) + +Provides a method to delete a Dynamic Attribute by Attribute Name. + +**Syntax** + +```csharp +public void DeleteAttribute( +string name +); +``` + +**Parameters** + +**`name`** + +Name of the Dynamic attribute. + +### DeleteAttribute Method (string, bool) + +Provides a detailed method to delete a Dynamic Attribute and remove it from the failover data, if needed. + +**Syntax** + +```csharp +public void DeleteAttribute( +string name, +bool failover +); +``` + +**Parameters** + +**`name`** + +Name of the Dynamic attribute. + +**`failover`** + +true: remove the attribute from failover. + +### GetAttributeName Method (short, short, string) + +Provides a method to get the name of an attribute by ID and primitive ID. + +**Syntax** + +```csharp +public bool GetAttributeName( +short attributeId, +short primitiveId, +out string name +); +``` + +**Parameters** + +**`attributeId`** + +The attribute ID. + +**`PrimitiveId`** + +The primitive ID. + +**`name`** + +Fills the name parameter with the attribute external name. + +**Returns** + +bool + +true: access to attribute name is success. + +false: fails if the user tries to access a non-existing attribute. + +### GetAttributeProperties Method (string, MxDataType, MxSecurityClassification, MxAttributeCategory, MxPropertyLockedEnum, int, int, int, int, int, int, int, int, int) + +Provides a method to get all the properties of dynamic attribute by attribute name. + +**Syntax** + +```csharp +public bool GetAttributeProperties( +string fullName, +out MxDataType dataType, +out MxSecurityClassification secClass, +out MxAttributeCategory category, +out MxPropertyLockedEnum locked, +out int hasRtHandler, +out int hasQuality, +out int hasTimestamp, +out int isShared, +out int isArray, +out int isDynamic, +out int isSubscribed, +out int isCheckpointed, +out int hasTypeChanged +); +``` + +**Parameters** + +Refer to the section GetAttributeProperties Method Parameters and Return Value. + +**Returns** + +Refer to the section GetAttributeProperties Method Parameters and Return Value. + +### GetAttributeProperties Method (short, short, MxDataType, MxSecurityClassification, MxAttributeCategory, MxPropertyLockedEnum, int, int, int, int, int, int, int, int, int) + +Provides a method to get all the properties of dynamic attribute by Attribute ID and Primitive ID. + +**Syntax** + +```csharp +public bool GetAttributeProperties( +short attributeId, +short primitiveId, +out MxDataType dataType, +out MxSecurityClassification secClass, +out MxAttributeCategory category, +out MxPropertyLockedEnum locked, +out int hasRtHandler, +out int hasQuality, +out int hasTimestamp, +out int isShared, +out int isArray, +out int isDynamic, +out int isSubscribed, +out int isCheckpointed, +out int hasTypeChanged +); +``` + +**Parameters** + +Refer to the section GetAttributeProperties Method Parameters and Return Value. + +**Returns** + +Refer to the section GetAttributeProperties Method Parameters and Return Value. + +### GetAttributeProperties Method Parameters and Return Value + +**Parameters** + +**`fullName`** + +External Name of the attribute. + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`dataType`** + +The out parameter which contains the Datatype of the attribute. + +**`secClass`** + +The out parameter which contains the Security Classification of the attribute. + +**`category`** + +The out parameter which contains the Category of the attribute. + +**`locked`** + +The out parameter which contains the lock status of the attribute. + +**`hasRtHandler`** + +The out parameter which specifies whether the attribute has runtime set handler. + +1: if attribute has runtime set handler. + +0: if attribute doesn't have runtime set handler. + +**`hasQuality`** + +The out parameter which specifies whether the attribute supports quality. + +1: if attribute supports quality. + +0: if attribute doesn't supports quality. + +**`hasTimestamp`** + +The out parameter which specifies whether the attribute has timestamp. + +1: if attribute has timestamp. + +0:if attribute doesn't have timestamp. + +**`isShared`** + +The out parameter which specifies whether the attribute is shared + +1: if attribute is shared type. + +0: if attribute is non-shared type. + +**`isArray`** + +The out parameter which specifies whether the attribute is array type. + +1: if attribute is array type. + +0: if attribute is non-array type. + +**`isDynamic`** + +The out parameter which specifies whether the attribute is dynamic. + +1: if attribute is dynamic. + +0: if attribute is static. + +**`isSubscribed`** + +The out parameter which specifies whether the attribute is subscribed. + +1: if attribute is subscribed. + +0: if attribute is not subscribed. + +**`isCheckpointed`** + +The out parameter which specifies whether the attribute has check point support. + +1: if attribute has checkpointed. + +0: if attribute in not checkpointed. + +**`hasTypeChanged`** + +The out parameter which specifies whether the attribute type is changed. + +1: if attribute datatype is changed. + +0: if attribute datatype is not changed. + +**Returns** + +bool + +true: if the attribute is exits and access to the attribute properties is successful. + +false: if the user tries to access a non-existing attribute. + +### GetBoolean Method (string, bool) + +Provides a method to get the value of a Boolean attribute by its external name. + +**Syntax** + +```csharp +public bool GetBoolean( +string fullName, +out bool value +); +``` + +**Parameters** + +Refer to the section GetBoolean Method Parameters and Return Value + +**Returns** + +Refer to the section GetBoolean Method Parameters and Return Value + +### GetBoolean Method (short, short, bool) + +Provides a method to get the value of a Boolean attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool GetBoolean( +short attributeId, +short primitiveId, +out bool value +); +``` + +**Parameters** + +Refer to the section GetBoolean Method Parameters and Return Value + +**Returns** + +Refer to the section GetBoolean Method Parameters and Return Value + +### GetBoolean Method (string, int, bool) + +Provides a method to get the value of a Boolean array element by its external name and index. + +**Syntax** + +```csharp +public bool GetBoolean( +string fullName, +int index, +out bool value +); +``` + +**Parameters** + +Refer to the section GetBoolean Method Parameters and Return Value + +**Returns** + +Refer to the section GetBoolean Method Parameters and Return Value + +### GetBoolean Method (string, bool, CMxDataQuality) + +Provides a method to get the value and quality of a Boolean attribute by its external name. + +**Syntax** + +```csharp +public bool GetBoolean( +string fullName, +out bool value, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetBoolean Method Parameters and Return Value + +**Returns** + +Refer to the section GetBoolean Method Parameters and Return Value + +### GetBoolean Method (short, short, int, bool) + +Provides a method to get the value of a Boolean array element by its ID, Primitive ID, and index. + +**Syntax** + +```csharp +public bool GetBoolean( +short attributeId, +short primitiveId, +int index, +out bool value +); +``` + +**Parameters** + +Refer to the section GetBoolean Method Parameters and Return Value + +**Returns** + +Refer to the section GetBoolean Method Parameters and Return Value + +### GetBoolean Method (short, short, bool, CMxDataQuality) + +Provides a method to get the value and quality of a Boolean attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool GetBoolean( +short attributeId, +short primitiveId, +out bool value, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetBoolean Method Parameters and Return Value + +**Returns** + +Refer to the section GetBoolean Method Parameters and Return Value + +### GetBoolean Method (string, bool, DateTime, CMxDataQuality) + +Provides a method to get the value, time, and quality of a Boolean attribute by its external name. + +**Syntax** + +```csharp +public bool GetBoolean( +string fullName, +out bool value, +out DateTime time, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetBoolean Method Parameters and Return Value + +**Returns** + +Refer to the section GetBoolean Method Parameters and Return Value + +### GetBoolean Method (short, short, bool, DateTime, CMxDataQuality) + +Provides a method to get the value, time, and quality of a Boolean attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool GetBoolean( +short attributeId, +short primitiveId, +out bool value, +out DateTime time, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetBoolean Method Parameters and Return Value. + +**Returns** + +Refer to the section GetBoolean Method Parameters and Return Value. + +### GetBoolean Method Parameters and Return Value + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`Value`** + +The out parameter which contains the value of the Boolean attribute. + +**`Index`** + +The Boolean array index. + +**`quality`** + +The out parameter contains the quality property of Boolean attribute. + +**`time`** + +The out parameter contains the Date and Time associated with the Boolean attribute. + +**Returns** + +bool + +true: if the Boolean attribute accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetBooleanArrayQ Method (string, CMxDataQuality) + +Provides a method to get the quality of a Boolean array attribute by its external name. + +**Syntax** + +```csharp +public bool GetBooleanArrayQ( +string fullName, +out CMxDataQuality quality +); +``` + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`quality`** + +The out parameter contains the quality property of Boolean attribute. + +**Returns** + +bool + +true: if the Boolean attribute quality accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetBooleanArrayQ Method (short, short, CMxDataQuality) + +Provides a method to get the quality of a Boolean array attribute by its ID and primitive ID. + +**Syntax** + +```csharp +public bool GetBooleanArrayQ( +short attributeId, +short primitiveId, +out CMxDataQuality quality +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`quality`** + +The out parameter contains the quality property of Boolean attribute. + +**Returns** + +bool + +true: if the Boolean attribute quality accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetCustomEnum Method (string, short) + +Provides a method to get a custom enum ordinal by its external name. + +**Syntax** + +```csharp +public bool GetCustomEnum( +string fullName, +out short value +); +``` + +**Parameters** + +Refer to the section GetCustomEnum Method Parameters and Return value + +**Returns** + +Refer to the section GetCustomEnum Method Parameters and Return value + +### GetCustomEnum Method (short, short, short) + +Provides a method to get a custom enum ordinal by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool GetCustomEnum( +short attributeId, +short primitiveId, +out short value +); +``` + +**Returns** + +Refer to the section GetCustomEnum Method Parameters and Return value + +### GetCustomEnum Method (string, int, short) + +Provides a method to get a custom enum array element ordinal by its external name and index. + +**Syntax** + +```csharp +public bool GetCustomEnum( +string fullName, +int index, +out short value +); +``` + +**Parameters** + +Refer to the section GetCustomEnum Method Parameters and Return value + +**Returns** + +Refer to the section GetCustomEnum Method Parameters and Return value + +### GetCustomEnum Method (string, short, CMxDataQuality) + +Provides a method to get a custom enum ordinal and quality by its external name. + +**Syntax** + +```csharp +public bool GetCustomEnum( +string fullName, +out short value, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetCustomEnum Method Parameters and Return value + +**Returns** + +Refer to the section GetCustomEnum Method Parameters and Return value + +### GetCustomEnum Method (short, short, int, short) + +Provides a method to get a custom enum array element ordinal by its ID, Primitive ID and index. + +**Syntax** + +```csharp +public bool GetCustomEnum( +short attributeId, +short primitiveId, +int index, +out short value +); +``` + +**Parameters** + +Refer to the section GetCustomEnum Method Parameters and Return value + +**Returns** + +Refer to the section GetCustomEnum Method Parameters and Return value + +### GetCustomEnum Method (short, short, short, CMxDataQuality) + +Provides a method to get a custom enum ordinal and quality by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool GetCustomEnum( +short attributeId, +short primitiveId, +out short value, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetCustomEnum Method Parameters and Return value + +**Returns** + +Refer to the section GetCustomEnum Method Parameters and Return value + +### GetCustomEnum Method (string, short, DateTime, CMxDataQuality) + +Provides a method to get a custom enum ordinal, time, and quality by its external name. + +**Syntax** + +```csharp +public bool GetCustomEnum( +string fullName, +out short value, +out DateTime time, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetCustomEnum Method Parameters and Return value + +**Returns** + +Refer to the section GetCustomEnum Method Parameters and Return value + +### GetCustomEnum Method (short, short, short, DateTime, CMxDataQuality) + +Provides a method to get a custom enum ordinal, time, and quality by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool GetCustomEnum( +short attributeId, +short primitiveId, +out short value, +out DateTime time, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetCustomEnum Method Parameters and Return value. + +**Returns** + +Refer to the section GetCustomEnum Method Parameters and Return value. + +### GetCustomEnum Method Parameters and Return value + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`Value`** + +The out parameter which contains the ordinal value of the CustomEnum attribute. + +**`Index`** + +The CustomEnum array index. + +**`quality`** + +The quality property of CustomEnum attribute. + +**`time`** + +The out parameter contains the Date and Time associated with the CustomEnum attribute. + +**Returns** + +bool + +true: if the CustomEnum attribute accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetCustomStruct Method (string, MxCustomStruct) + +Provides a method to get the value of a CustomStruct attribute by its external name. + +**Syntax** + +```csharp +public bool GetCustomStruct( +string fullName, +out MxCustomStruct value +); +``` + +**Parameters** + +Refer to the section GetCustomStruct Method Parameters and Return value. + +### GetCustomStruct Method (short, short, MxCustomStruct) + +Provides a method to get the value of a CustomStruct attribute by its id and primitive id. + +**Syntax** + +```csharp +public bool GetCustomStruct( +short attributeId, +short primitiveId, +out MxCustomStruct value +); +``` + +**Parameters** + +Refer to the section GetCustomStruct Method Parameters and Return value. + +### GetCustomStruct Method (string, int, MxCustomStruct) + +Provides a method to get the value of a CustomStruct array element by its external name and index. + +**Syntax** + +```csharp +public bool GetCustomStruct( +string fullName, +int index, +out MxCustomStruct value +); +``` + +**Parameters** + +Refer to the section GetCustomStruct Method Parameters and Return value. + +### GetCustomStruct Method (string, MxCustomStruct, CMxDataQuality) + +Provides a method to get the value and quality of a CustomStruct attribute by its external name. + +**Syntax** + +```csharp +public bool GetCustomStruct( +string fullName, +out MxCustomStruct value, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetCustomStruct Method Parameters and Return value. + +### GetCustomStruct Method (short, short, int, MxCustomStruct) + +Provides a method to get the value of a CustomStruct array element by its id, primitive id, and index. + +**Syntax** + +```csharp +public bool GetCustomStruct( +short attributeId, +short primitiveId, +int index, +out MxCustomStruct value +); +``` + +**Parameters** + +Refer to the section GetCustomStruct Method Parameters and Return value. + +### GetCustomStruct Method (short, short, MxCustomStruct, CMxDataQuality) + +Provides a method to get the value and quality of a CustomStruct attribute by its id and primitive id. + +**Syntax** + +```csharp +public bool GetCustomStruct( +short attributeId, +short primitiveId, +out MxCustomStruct value, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetCustomStruct Method Parameters and Return value. + +### GetCustomStruct Method (string, MxCustomStruct, DateTime, CMxDataQuality) + +Provides a method to get the value, time, and quality of a CustomStruct attribute by its external name. + +**Syntax** + +```csharp +public bool GetCustomStruct( +string fullName, +out MxCustomStruct value, +out DateTime time, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetCustomStruct Method Parameters and Return value. + +### GetCustomStruct Method (short, short, MxCustomStruct, DateTime, CMxDataQuality) + +Provides a method to get the value, time, and quality of a CustomStruct attribute by its id and primitive id. + +**Syntax** + +```csharp +public bool GetCustomStruct( +short attributeId, +short primitiveId, +out MxCustomStruct value, +out DateTime time, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetCustomStruct Method Parameters and Return value. + +### GetCustomStruct Method Parameters and Return value + +**`fullName`** + +External name of the attribute. + +**`attributeId`** + +Attribute id. + +**`primitiveId`** + +Primitive id of an attribute. + +**`Value`** + +The out parameter which contains the value of a CustomStruct attribute. + +**`Index`** + +The CustomStruct array index. + +**`quality`** + +The out parameter contains the quality property of CustomStruct attribute. + +**`time`** + +The out parameter contains the Date and time associated with the CustomStruct attribute. + +**Returns** + +bool + +true: if the CustomStruct attribute accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetCustomEnumArrayQ Method (string, CMxDataQuality) + +Provides a method to get a custom enum array quality by its external name. + +**Syntax** + +```csharp +public bool GetCustomEnumArrayQ( +string fullName, +out CMxDataQuality quality +); +``` + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`quality`** + +The out parameter contains the quality property of CustomEnum attribute. + +**Returns** + +bool + +true: if the CustomEnum attribute quality accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetCustomEnumArrayQ Method (short, short, CMxDataQuality) + +Provides a method to get a custom enum array quality by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool GetCustomEnumArrayQ( +short attributeId, +short primitiveId, +out CMxDataQuality quality +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**Returns** + +bool + +The out parameter contains the quality property of CustomEnum attribute. + +### GetCustomStructArrayQ Method (string, CMxDataQuality) + +Provides a method to get a custom struct array quality by its external name. + +**Syntax** + +```csharp +public bool GetCustomStructArrayQ( +string fullName, +out CMxDataQuality quality +); +``` + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`quality`** + +The out parameter contains the quality property of CustomStruct array attribute. + +**Returns** + +bool + +true: if the CustomStruct array attribute quality accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetCustomStructArrayQ Method (short, short, CMxDataQuality) + +Provides a method to get a custom struct array quality by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool GetCustomStructArrayQ( +short attributeId, +short primitiveId, +out CMxDataQuality quality +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`quality`** + +The out parameter contains the quality property of CustomStruct array attribute. + +**Returns** + +bool + +true: if the CustomStruct array attribute quality accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetDataFromFailoverField Method + +Provides a method to get the data stored in the Failover Attributes as a C# object. The object developer is not expected to typically use this method. + +**Syntax** + +```csharp +public object GetDataFromFailoverField(); +``` + +**Returns** + +object + +### GetDefaultTimeStamp Method + +Provides a method to get the object startup time. + +**Syntax** + +```csharp +public bool GetDefaultTimeStamp( +out DateTime timestamp +); +``` + +**Parameters** + +**`timestamp`** + +The out parameter contains the Object startup time. + +**Returns** + +bool + +true: If the object startup time accessing is successful. + +false: If the object startup time accessing failed. + +### GetDouble Method (string, double) + +Provide a method to get the value of a Double attribute by its external name. + +**Syntax** + +```csharp +public bool GetDouble( +string fullName, +out double value +); +``` + +**Parameters** + +Refer to the section GetDouble Method Parameters and Return value. + +### GetDouble Method (short, short, double) + +Provides a method to get the value of a Double attribute by its id and primitive id. + +**Syntax** + +```csharp +public bool GetDouble( +short attributeId, +short primitiveId, +out double value +); +``` + +**Parameters** + +Refer to the section GetDouble Method Parameters and Return value. + +### GetDouble Method (string, int, double) + +Provides a method to get the value of a Double array element by its external name and index. + +**Syntax** + +```csharp +public bool GetDouble( +string fullName, +int index, +out double value +); +``` + +**Parameters** + +Refer to the section GetDouble Method Parameters and Return value. + +### GetDouble Method (string, double, CMxDataQuality) + +Provides a method to get the value and quality of a Double attribute by its external name. + +**Syntax** + +```csharp +public bool GetDouble( +string fullName, +out double value, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetDouble Method Parameters and Return value. + +### GetDouble Method (short, short, int, double) + +Provides a method to get the value of a Double array element by its id, primitive id, and index. + +**Syntax** + +```csharp +public bool GetDouble( +short attributeId, +short primitiveId, +int index, +out double value +); +``` + +**Parameters** + +Refer to the section GetDouble Method Parameters and Return value. + +### GetDouble Method (short, short, double, CMxDataQuality) + +Provides a method to get the value and quality of a Double attribute by its id and primitive id. + +**Syntax** + +```csharp +public bool GetDouble( +short attributeId, +short primitiveId, +out double value, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetDouble Method Parameters and Return value. + +### GetDouble Method (string, double, DateTime, CMxDataQuality) + +Provides a method to get the value,time and quality of a Double attribute by its external name. + +**Syntax** + +```csharp +public bool GetDouble( +string fullName, +out double value, +out DateTime time, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetDouble Method Parameters and Return value. + +### GetDouble Method (short, short, double, DateTime, CMxDataQuality) + +Provides a method to get the value,time and quality of a Double attribute by its id and primitive id. + +**Syntax** + +```csharp +public bool GetDouble( +short attributeId, +short primitiveId, +out double value, +out DateTime time, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetDouble Method Parameters and Return value. + +### GetDouble Method Parameters and Return value + +**`fullName`** + +External name of the attribute. + +**`attributeId`** + +Attribute id. + +**`primitiveId`** + +Primitive id of an attribute. + +**`Value`** + +The out parameter which contains the value of a Double attribute. + +**`Index`** + +The Double array index. + +**`quality`** + +The out parameter contains the quality property of Double attribute. + +**`time`** + +The out parameter contains the Date and Time associated with the Double attribute. + +**Returns** + +bool + +true: if the Double attribute accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetDoubleArrayQ Method (string, CMxDataQuality) + +Provides a method to get the quality of a double array attribute by its external name. + +**Syntax** + +```csharp +public bool GetDoubleArrayQ( +string fullName, +out CMxDataQuality quality +); +``` + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`quality`** + +The out parameter contains the quality property of Double array attribute. + +**Returns** + +bool + +true: if the Double array attribute quality accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetDoubleArrayQ Method (short, short, CMxDataQuality) + +Provides a method to get the quality of a double array attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool GetDoubleArrayQ( +short attributeId, +short primitiveId, +out CMxDataQuality quality +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`quality`** + +The out parameter contains the quality property of Double array attribute. + +**Returns** + +bool + +true: if the Double array attribute quality accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetElapsedTime Method (string, TimeSpan) + +Provides a method to get the value of an ElapsedTime attribute by its external name. + +**Syntax** + +```csharp +public bool GetElapsedTime( +string fullName, +out TimeSpan value +); +``` + +**Parameters** + +Refer to the section GetElapsedTime Method Parameters and Return value. + +### GetElapsedTime Method (short, short, TimeSpan) + +Provides a method to get the value of an ElapsedTime attribute by its id and primitive id. + +**Syntax** + +```csharp +public bool GetElapsedTime( +short attributeId, +short primitiveId, +out TimeSpan value +); +``` + +**Parameters** + +Refer to the section GetElapsedTime Method Parameters and Return value. + +### GetElapsedTime Method (string, int, TimeSpan) + +Provides a method to get the value of an ElapsedTime array element by its external name and index. + +**Syntax** + +```csharp +public bool GetElapsedTime( +string fullName, +int index, +out TimeSpan value +); +``` + +**Parameters** + +Refer to the section GetElapsedTime Method Parameters and Return value. + +### GetElapsedTime Method (string, TimeSpan, CMxDataQuality) + +Provides a method to get the value and quality of an ElapsedTime attribute by its external name. + +**Syntax** + +```csharp +public bool GetElapsedTime( +string fullName, +out TimeSpan value, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetElapsedTime Method Parameters and Return value. + +### GetElapsedTime Method (short, short, int, TimeSpan) + +Provides a method to get the value of an ElapsedTime array element by its id, primitive id, and index. + +**Syntax** + +```csharp +public bool GetElapsedTime( +short attributeId, +short primitiveId, +int index, +out TimeSpan value +); +``` + +**Parameters** + +Refer to the section GetElapsedTime Method Parameters and Return value. + +### GetElapsedTime Method (short, short, TimeSpan, CMxDataQuality) + +Provides a method to get the value and quality of an ElapsedTime attribute by its id and primitive id. + +**Syntax** + +```csharp +public bool GetElapsedTime( +short attributeId, +short primitiveId, +out TimeSpan value, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetElapsedTime Method Parameters and Return value. + +### GetElapsedTime Method (string, TimeSpan, DateTime, CMxDataQuality) + +Provides a method to get the value, time, and quality of an ElapsedTime attribute by its external name. + +**Syntax** + +```csharp +public bool GetElapsedTime( +string fullName, +out TimeSpan value, +out DateTime time, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetElapsedTime Method Parameters and Return value. + +### GetElapsedTime Method (short, short, TimeSpan, DateTime, CMxDataQuality) + +Provides a method to get the value, time, and quality of an ElapsedTime attribute by its id and primitive id. + +**Syntax** + +```csharp +public bool GetElapsedTime( +short attributeId, +short primitiveId, +out TimeSpan value, +out DateTime time, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetElapsedTime Method Parameters and Return value. + +### GetElapsedTime Method Parameters and Return value + +**`fullName`** + +External name of the attribute. + +**`attributeId`** + +Attribute id. + +**`primitiveId`** + +Primitive id of an attribute. + +**`Value`** + +The out parameter which contains the value of an ElapsedTime attribute. + +**`Index`** + +The ElapsedTime array index. + +**`quality`** + +The out parameter contains the quality property of an ElapsedTime attribute. + +**`time`** + +The out parameter contains the Date and time associated with the ElapsedTime attribute. + +**Returns** + +bool + +true: if the ElapsedTime attribute accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetElapsedTimeArrayQ Method (string, CMxDataQuality) + +Provides a method to get the quality of an ElapsedTime array attribute by its external name. + +**Syntax** + +```csharp +public bool GetElapsedTimeArrayQ( +string fullName, +out CMxDataQuality quality +); +``` + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`quality`** + +The out parameter contains the quality property of ElapsedTime array attribute. + +**Returns** + +bool + +true: if ElapsedTime array attribute quality accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetElapsedTimeArrayQ Method (short, short, CMxDataQuality) + +Provides a method to get the quality of an ElapsedTime array attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool GetElapsedTimeArrayQ( +short attributeId, +short primitiveId, +out CMxDataQuality quality +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`quality`** + +The out parameter contains the quality property of ElapsedTime array attribute. + +**Returns** + +bool + +true: if ElapsedTime array attribute quality accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetFloat Method (string, float) + +Provides a method to get the value of a float attribute by its external name. + +**Syntax** + +```csharp +public bool Float( +string fullName, +out float value +); +``` + +**Parameters** + +Refer to the section GetFloat Method Parameters and Return value. + +### GetFloat Method (short, short, float) + +Provides a method to get the value of a float attribute by its id and primitive id. + +**Syntax** + +```csharp +public bool Float( +short attributeId, +short primitiveId, +out float value +); +``` + +**Parameters** + +Refer to the section GetFloat Method Parameters and Return value. + +### GetFloat Method (string, int, float) + +Provides a method to get the value of a float array element by its external name and index. + +**Syntax** + +```csharp +public bool GetFloat( +string fullName, +int index, +out float value +); +``` + +**Parameters** + +Refer to the section GetFloat Method Parameters and Return value. + +### GetFloat Method (string, float, CMxDataQuality) + +Provides a method to get the value and quality of a float attribute by its external name. + +**Syntax** + +```csharp +public bool GetFloat( +string fullName, +out float value, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetFloat Method Parameters and Return value. + +### GetFloat Method (short, short, int, float) + +Provides a method to get the value of a float array element by its id, primitive id, and index. + +**Syntax** + +```csharp +public bool GetFloat( +short attributeId, +short primitiveId, +int index, +out float value +); +``` + +**Parameters** + +Refer to the section GetFloat Method Parameters and Return value. + +### GetFloat Method (short, short, float, CMxDataQuality) + +Provides a method to get the value and quality of a float attribute by its id and primitive id. + +**Syntax** + +```csharp +public bool GetFloat( +short attributeId, +short primitiveId, +out float value, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetFloat Method Parameters and Return value. + +### GetFloat Method (string, float, DateTime, CMxDataQuality) + +Provides a method to get the value, time, and quality of a float attribute by its external name. + +**Syntax** + +```csharp +public bool GetFloat( +string fullName, +out float value, +out DateTime time, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetFloat Method Parameters and Return value. + +### GetFloat Method (short, short, float, DateTime, CMxDataQuality) + +Provides a method to get the value,time and quality of a float attribute by its id and primitive id. + +**Syntax** + +```csharp +public bool GetFloat( +short attributeId, +short primitiveId, +out float value, +out DateTime time, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetFloat Method Parameters and Return value. + +### GetFloat Method Parameters and Return value + +**`fullName`** + +External name of the attribute. + +**`attributeId`** + +Attribute id. + +**`primitiveId`** + +Primitive id of an attribute. + +**`Value`** + +The out parameter which contains the value of a float attribute. + +**`Index`** + +The Float array index. + +**`quality`** + +The out parameter contains the quality property of Float attribute. + +**`time`** + +The out parameter contains the Date and Time associated with the Float attribute. + +**Returns** + +bool + +true: if the Float attribute accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetFloatArrayQ Method (string, CMxDataQuality) + +Provides a method to get the quality of Float array attribute by its external name. + +**Syntax** + +```csharp +public bool GetFloatArrayQ( +string fullName, +out CMxDataQuality quality +); +``` + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`quality`** + +The out parameter contains the quality property of Float array attribute. + +**Returns** + +bool + +true: if the Float array attribute quality accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetFloatArrayQ Method (short, short, CMxDataQuality) + +Provides a method to get the quality of a Float array attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool GetFloatArrayQ( +short attributeId, +short primitiveId, +out CMxDataQuality quality +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`quality`** + +The out parameter contains the quality property of Float array attribute. + +**Returns** + +bool + +true: if the Float array attribute quality accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetInteger Method (string, int) + +Provides a method to get the value of an integer attribute by its external name. + +**Syntax** + +```csharp +public bool GetInteger( +string fullName, +out int value +); +``` + +**Parameters** + +Refer to the section GetInteger Method Parameters and Return value. + +### GetInteger Method (short, short, int) + +Provides a method to get the value of an integer attribute by its id and primitive id. + +**Syntax** + +```csharp +public bool GetInteger( +short attributeId, +short primitiveId, +out int value +); +``` + +**Parameters** + +Refer to the section GetInteger Method Parameters and Return value. + +### GetInteger Method (string, int, int) + +Provides a method to get the value of an integer array element by its external name and index. + +**Syntax** + +```csharp +public bool GetInteger( +string fullName, +int index, +out int value +); +``` + +**Parameters** + +Refer to the section GetInteger Method Parameters and Return value. + +### GetInteger Method (string, int, CMxDataQuality) + +Provides a method to get the value and quality of an integer attribute by its external name. + +**Syntax** + +```csharp +public bool GetInteger( +string fullName, +out int value, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetInteger Method Parameters and Return value. + +### GetInteger Method (short, short, int, int) + +Provides a method to get the value of an integer array element by its id, primitive id, and index. + +**Syntax** + +```csharp +public bool GetInteger( +short attributeId, +short primitiveId, +int index, +out int value +); +``` + +**Parameters** + +Refer to the section GetInteger Method Parameters and Return value. + +### GetInteger Method (short, short, int, CMxDataQuality) + +Provides a method to get the value and quality of an integer attribute by its id and primitive id. + +**Syntax** + +```csharp +public bool GetInteger( +short attributeId, +short primitiveId, +out int value, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetInteger Method Parameters and Return value. + +### GetInteger Method (string, int, DateTime, CMxDataQuality) + +Provides a method to get the value, time, and quality of an integer attribute by its external name. + +**Syntax** + +```csharp +public bool GetInteger( +string fullName, +out int value, +out DateTime time, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetInteger Method Parameters and Return value. + +### GetInteger Method (short, short, int, DateTime, CMxDataQuality) + +Provides a method to get the value, time, and quality of an integer attribute by its id and primitive id. + +**Syntax** + +```csharp +public bool GetInteger( +short attributeId, +short primitiveId, +out int value, +out DateTime time, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetInteger Method Parameters and Return value. + +### GetInteger Method Parameters and Return value + +**`fullName`** + +External name of the attribute. + +**`attributeId`** + +Attribute id. + +**`primitiveId`** + +Primitive id of an attribute. + +**`Value`** + +The out parameter which contains the value of an integer attribute. + +**`Index`** + +The Integer array index. + +**`quality`** + +The out parameter contains the quality property of Integer attribute. + +**`time`** + +The out parameter contains the Date and Time associated with the Integer attribute. + +**Returns** + +bool + +true: if the Integer attribute accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetIntegerArrayQ Method (string, CMxDataQuality) + +Provides a method to get the quality of an Integer array attribute by its external name. + +**Syntax** + +```csharp +public bool GetIntegerArrayQ( +string fullName, +out CMxDataQuality quality +); +``` + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`quality`** + +The out parameter contains the quality property of Integer array attribute. + +**Returns** + +boo + +true: if the Integer array attribute quality accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetIntegerArrayQ Method (short, short, CMxDataQuality) + +Provides a method to get the quality of a Integer array attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool GetIntegerArrayQ( +short attributeId, +short primitiveId, +out CMxDataQuality quality +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`quality`** + +The out parameter contains the quality property of Integer array attribute. + +**Returns** + +bool + +true: if the Integer array attribute quality accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetLockStatus Method (string, MxPropertyLockedEnum) + +Provides a method to get the LockStatus of an attribute by its external name. + +**Syntax** + +```csharp +public bool GetLockStatus( +string fullName, +out MxPropertyLockedEnum lockStatus +); +``` + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`lockStatus`** + +The out parameter contains the LockStatus property of an attribute. + +**Returns** + +bool + +true: if the attribute LockStatus accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetLockStatus Method (short, short, MxPropertyLockedEnum) + +Provides a method to get the LockStatus of an attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool GetLockStatus( +short attributeId, +short primitiveId, +out MxPropertyLockedEnum lockStatus +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`lockStatus`** + +The out parameter contains the LockStatus property of an attribute. + +**Returns** + +bool + +true: if the attribute LockStatus accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetMxDataType Method (string, MxDataType) + +Provides a method to get the value of a MxDataType attribute by its external name. + +**Syntax** + +```csharp +public bool GetMxDataType( +string fullName, +out MxDataType value +); +``` + +**Parameters** + +Refer to the section GetMxDataType Method Parameters and Return value. + +### GetMxDataType Method (short, short, MxDataType) + +Provides a method to get the value of a MxDataType attribute by its id and primitive id. + +**Syntax** + +```csharp +public bool GetMxDataType( +short attributeId, +short primitiveId, +out MxDataType value +); +``` + +**Parameters** + +Refer to the section GetMxDataType Method Parameters and Return value. + +### GetMxDataType Method (string, int, MxDataType) + +Provides a method to get the value of a MxDataType array element by its external name and index. + +**Syntax** + +```csharp +public bool GetMxDataType( +string fullName, +int index, +out MxDataType value +); +``` + +**Parameters** + +Refer to the section GetMxDataType Method Parameters and Return value. + +### GetMxDataType Method (string, MxDataType, CMxDataQuality) + +Provides a method to get the value and quality of a MxDataType attribute by its external name. + +**Syntax** + +```csharp +public bool GetMxDataType( +string fullName, +out MxDataType value, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetMxDataType Method Parameters and Return value. + +### GetMxDataType Method (short, short, int, MxDataType) + +Provides a method to get the value of a MxDataType array element by its id, primitive id, and index. + +**Syntax** + +```csharp +public bool GetMxDataType( +short attributeId, +short primitiveId, +int index, +out MxDataType value +); +``` + +**Parameters** + +Refer to the section GetMxDataType Method Parameters and Return value. + +### GetMxDataType Method (short, short, MxDataType, CMxDataQuality) + +Provides a method to get the value and quality of a MxDataType attribute by its id and primitive id. + +**Syntax** + +```csharp +public bool GetMxDataType( +short attributeId, +short primitiveId, +out MxDataType value, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetMxDataType Method Parameters and Return value. + +### GetMxDataType Method (string, MxDataType, DateTime, CMxDataQuality) + +Provides a method to get the value, time, and quality of a MxDataType attribute by its external name. + +**Syntax** + +```csharp +public bool GetMxDataType( +string fullName, +out MxDataType value, +out DateTime time, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetMxDataType Method Parameters and Return value. + +### GetMxDataType Method (short, short, MxDataType, DateTime, CMxDataQuality) + +Provides a method to get the value, time, and quality of a MxDataType attribute by its id and primitive id. + +**Syntax** + +```csharp +public bool GetMxDataType( +short attributeId, +short primitiveId, +out MxDataType value, +out DateTime time, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetMxDataType Method Parameters and Return value. + +### GetMxDataType Method Parameters and Return value + +**`fullName`** + +External name of the attribute. + +**`attributeId`** + +Attribute id. + +**`primitiveId`** + +Primitive id of an attribute. + +**`Value`** + +The out parameter which contains the value of an MxDataType attribute. + +**`Index`** + +The MxDataType array index. + +**`quality`** + +The out parameter contains the quality property of MxDataType attribute. + +**`time`** + +The out parameter contains the Date and time associated with the MxDataType attribute. + +**Returns** + +bool + +true: if the MxDataType attribute accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetMxDataTypeArrayQ Method (string, CMxDataQuality) + +Provides a method to get the quality of a MxDataType array attribute by its external name. + +**Syntax** + +```csharp +public bool GetMxDataTypeArrayQ( +string fullName, +out CMxDataQuality quality +); +``` + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`quality`** + +The out parameter contains the quality property of MxDataType array attribute. + +**Returns** + +bool + +true: if the MxDataType array attribute quality accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetMxDataTypeArrayQ Method (short, short, CMxDataQuality) + +Provides a method to get the quality of a MxDataType array attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool GetMxDataTypeArrayQ( +short attributeId, +short primitiveId, +out CMxDataQuality quality +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`quality`** + +The out parameter contains the quality property of MxDataType array attribute. + +**Returns** + +bool + +true: if MxDataType array attribute quality accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetMxStatus Method (string, MxStatus) + +Provides a method to get the value of a MxStatus attribute by its external name. + +**Syntax** + +```csharp +public bool GetMxStatus( +string fullName, +out MxStatus value +); +``` + +**Parameters** + +Refer to the section GetMxStatus Method Parameters and Return value. + +**Returns** + +Refer to the section GetMxStatus Method Parameters and Return value. + +### GetMxStatus Method (short, short, MxStatus) + +Provides a method to get the value of a MxStatus attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool GetMxStatus( +short attributeId, +short primitiveId, +out MxStatus value +); +``` + +**Parameters** + +Refer to the section GetMxStatus Method Parameters and Return value. + +**Returns** + +Refer to the section GetMxStatus Method Parameters and Return value. + +### GetMxStatus Method (string, int, MxStatus) + +Provides a method to get the value of a MxStatus array element by its external name and index. + +**Syntax** + +```csharp +public bool GetMxStatus( +string fullName, +int index, +out MxStatus value +); +``` + +**Parameters** + +Refer to the section GetMxStatus Method Parameters and Return value. + +**Returns** + +Refer to the section GetMxStatus Method Parameters and Return value. + +### GetMxStatus Method (string, MxStatus, CMxDataQuality) + +Provides a method to get the value and quality of a MxStatus attribute by its external name. + +**Syntax** + +```csharp +public bool GetMxStatus( +string fullName, +out MxStatus value, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetMxStatus Method Parameters and Return value + +**Returns** + +Refer to the section GetMxStatus Method Parameters and Return value + +### GetMxStatus Method (short, short, int, MxStatus) + +Provides a method to get the value of a MxStatus array element by its ID, Primitive ID and index. + +**Syntax** + +```csharp +public bool GetMxStatus( +short attributeId, +short primitiveId, +int index, +out MxStatus value +); +``` + +**Parameters** + +Refer to the section GetMxStatus Method Parameters and Return value + +**Returns** + +Refer to the section GetMxStatus Method Parameters and Return value + +### GetMxStatus Method (short, short, MxStatus, CMxDataQuality) + +Provides a method to get the value and quality of a MxStatus array attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool GetMxStatus( +short attributeId, +short primitiveId, +out MxStatus value, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetMxStatus Method Parameters and Return value + +**Returns** + +Refer to the section GetMxStatus Method Parameters and Return value + +### GetMxStatus Method (string, MxStatus, DateTime, CMxDataQuality) + +Provides a method to get the value, time, and quality of a MxStatus attribute by external name. + +**Syntax** + +```csharp +public bool GetMxStatus( +string fullName, +out MxStatus value, +out DateTime time, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetMxStatus Method Parameters and Return value + +**Returns** + +Refer to the section GetMxStatus Method Parameters and Return value + +### GetMxStatus Method (short, short, MxStatus, DateTime, CMxDataQuality) + +Provides a method to get the value, time, and quality of a MxStatus attribute by its ID and primitive ID. + +**Syntax** + +```csharp +public bool GetMxStatus( +short attributeId, +short primitiveId, +out MxStatus value, +out DateTime time, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetMxStatus Method Parameters and Return value. + +**Returns** + +Refer to the section GetMxStatus Method Parameters and Return value. + +### GetMxStatus Method Parameters and Return value + +**`fullName`** + +External name of the attribute. + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`Value`** + +The out parameter which contains the value of the MxStatus attribute. + +**`Index`** + +The MxStatus array index. + +**`quality`** + +The quality property of MxStatus attribute. + +**`time`** + +The out parameter contains the Date and Time associated with the MxStatus attribute. + +**Returns** + +bool + +true: if the MxStatus attribute accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetMxStatusArrayQ Method (string, CMxDataQuality) + +Provides a method to get the quality of a MxStatus array attribute by its external name. + +**Syntax** + +```csharp +public bool GetMxStatusArrayQ( +string fullName, +out CMxDataQuality quality +); +``` + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`quality`** + +The out parameter contains the quality property of the MxStatus array attribute. + +**Returns** + +bool + +true: if the MxStatus array attribute quality accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetMxStatusArrayQ Method (short, short, CMxDataQuality) + +Provides a method to get the quality of a MxStatus array attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool GetMxStatusArrayQ( +short attributeId, +short primitiveId, +out CMxDataQuality quality +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`quality`** + +The out parameter contains the quality property of MxStatus array attribute. + +**Returns** + +bool + +true: if the MxStatus array attribute quality accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetNormalChildID Method + +Provides a method to access the ID of a non-virtual Child Primitive by its parent primitive ID and primitive internal name. + +**Syntax** + +```csharp +public short GetNormalChildID( +short parentPrimID, +string primInternalName +); +``` + +**Parameters** + +**`parentPrimID`** + +The parent primitive ID. + +**`primInternalName`** + +The primitive internal name. + +**Returns** + +bool + +### GetNumElementsEx Method (string, int) + +Provides a method to return the number of elements of an array attribute by its external name. + +**Syntax** + +```csharp +public bool GetNumElementsEx( +string fullName, +out int numElements +); +``` + +**Parameters** + +**`fullName`** + +The Name of the array attribute. + +**`numElements`** + +The out parameter contains the number of elements in the array. + +**Returns** + +bool + +true: if the accessing of number of elements in array elements is successful. + +false: if the user tries to access a non-existing attribute. + +### GetNumElementsEx Method (short, short, int) + +Provides a method to return the number of elements of an array attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool GetNumElementsEx( +short attributeId, +short primitiveId, +out int numElements +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`numElements`** + +The out parameter contains the number of elements in the array. + +**Returns** + +bool + +true: if the accessing of number of elements in an array is successful. + +false: if the user tries to access a non-existing attribute. + +### GetPrimitiveIds Method + +Provides a method to return ID's of the primitives in an object. + +**Syntax** + +```csharp +public bool GetPrimitiveIds(out short[] primitiveIds); +``` + +**Parameters** + +**`primitiveIds`** + +The array contains all the primitive IDs. + +**Returns** + +bool + +### GetPrimitiveInfo Method + +Provides an implementation of IPrimitiveDeployment member returning the file that contains the aaDEF as a resource and the ID of the resource in the file. + +**Syntax** + +```csharp +public void GetPrimitiveInfo( +ref string pFilename, +ref int pResourceId +); +``` + +**Parameters** + +**`pFilename`** + +The file name. + +**`pResourceId`** + +The resource ID. + +### GetPrimitiveRuntimeSite2 Method + +Provides access to RuntimeSite2 interface of a primitive by ID. + +**Syntax** + +```csharp +public IPrimitiveRuntimeSite2 GetPrimitiveRuntimeSite2(short _primID); +``` + +**Parameters** + +**`_primID`** + +The primitive. + +**Returns** + +IPrimitiveRuntimeSite2 + +### GetQ Method (string) + +Provides a method to get the quality of an attribute by name. + +**Syntax** + +```csharp +public CMxDataQuality GetQ(string fullName); +``` + +**Parameters** + +**`fullName`** + +External Name of the attribute. + +**Returns** + +CMxDataQuality + +### GetQ Method (short, short) + +Provides a method to get the quality of an attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public CMxDataQuality GetQ( +short attributeId, +short primitiveId +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**Returns** + +CMxDataQuality + +### GetQuality Method (string, MxDataType, CMxDataQuality) + +Provides a method to get the quality of an attribute by its type and name. + +**Syntax** + +```csharp +public bool GetQuality( +string fullName, +MxDataType dataType, +out CMxDataQuality quality +); +``` + +**Parameters** + +**`fullName`** + +External Name of the attribute. + +**`dataType`** + +The Datatype of an attribute. The supported datatype are: + +MxBoolean + +MxInteger + +MxFloat + +MxDouble + +MxString + +MxTime + +MxElapsedTime + +MxReferenceType + +MxStatusType + +MxDataTypeEnum + +MxQualifiedEnum + +MxQualifiedStruct + +**`quality`** + +The out parameter contains the quality property of an attribute. + +**Returns** + +bool + +true: if attribute quality accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetQuality Method (short, short, MxDataType, CMxDataQuality) + +Provides a method to get the quality of an attribute by its type, ID, and Primitive ID. + +**Syntax** + +```csharp +public bool GetQuality( +short attributeId, +short primitiveId, +MxDataType dataType, +out CMxDataQuality quality +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`dataType`** + +The Datatype of an attribute. The supported datatype are: + +MxBoolean + +MxInteger + +MxFloat + +MxDouble + +MxString + +MxTime + +MxElapsedTime + +MxReferenceType + +MxStatusType + +MxDataTypeEnum + +MxQualifiedEnum + +MxQualifiedStruct + +**`quality`** + +The out parameter contains the quality property of an attribute. + +**Returns** + +bool + +true: if attribute quality accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetReference Method (string, IMxReference) + +Provides a method to access the reference attribute by its external name. + +**Syntax** + +```csharp +public bool GetReference( +string fullName, +out IMxReference value +); +``` + +**Parameters** + +Refer to the section GetReference Method Parameters and Return value. + +**Returns** + +Refer to the section GetReference Method Parameters and Return value. + +### GetReference Method (short, short, IMxReference) + +Provides a method to access the reference attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool GetReference( +short attributeId, +short primitiveId, +out IMxReference value +); +``` + +**Parameters** + +Refer to the section GetReference Method Parameters and Return value. + +**Returns** + +Refer to the section GetReference Method Parameters and Return value. + +### GetReference Method (string, int, IMxReference) + +Provides a method to access the reference array element by its external name and index. + +**Syntax** + +```csharp +public bool GetReference( +string fullName, +int index, +out IMxReference value +); +``` + +**Parameters** + +Refer to the section GetReference Method Parameters and Return value. + +**Returns** + +Refer to the section GetReference Method Parameters and Return value. + +### GetReference Method (string, IMxReference, CMxDataQuality) + +Provides a method to access the reference attribute and quality by its external name. + +**Syntax** + +```csharp +public bool GetReference( +string fullName, +out IMxReference value, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetReference Method Parameters and Return value. + +**Returns** + +Refer to the section GetReference Method Parameters and Return value. + +### GetReference Method (short, short, int, IMxReference) + +Provides a method to access the reference array element by its ID, Primitive ID, and index. + +**Syntax** + +```csharp +public bool GetReference( +short attributeId, +short primitiveId, +int index, +out IMxReference value +); +``` + +**Parameters** + +Refer to the section GetReference Method Parameters and Return value. + +**Returns** + +Refer to the section GetReference Method Parameters and Return value. + +### GetReference Method (short, short, IMxReference, CMxDataQuality) + +Provides a method to access the reference attribute and quality by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool GetReference( +short attributeId, +short primitiveId, +out IMxReference value, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetReference Method Parameters and Return value. + +**Returns** + +Refer to the section GetReference Method Parameters and Return value. + +### GetReference Method (string, IMxReference, DateTime, CMxDataQuality) + +Provides a method to access the reference attribute, its quality and time by external name. + +**Syntax** + +```csharp +public bool GetReference( +string fullName, +out IMxReference value, +out DateTime time, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetReference Method Parameters and Return value. + +**Returns** + +Refer to the section GetReference Method Parameters and Return value. + +### GetReference Method (short, short, IMxReference, DateTime, CMxDataQuality) + +Provides a method to access the reference attribute, its quality and time by ID and Primitive ID. + +**Syntax** + +```csharp +public bool GetReference( +short attributeId, +short primitiveId, +out IMxReference value, +out DateTime time, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetReference Method Parameters and Return value. + +**Returns** + +Refer to the section GetReference Method Parameters and Return value. + +### GetReference Method Parameters and Return value + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`Value`** + +The out parameter which contains the value of the Reference attribute. + +**`Index`** + +The Reference attribute array index. + +**`quality`** + +The quality property of Reference attribute. + +**`time`** + +The out parameter contains the Date and Time associated with the Reference attribute. + +**Returns** + +bool + +true: if the Reference attribute accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetReferenceArrayQ Method (string, CMxDataQuality) + +Provides a method to get the quality of a Reference array attribute by its external name. + +**Syntax** + +```csharp +public bool GetReferenceArrayQ( +string fullName, +out CMxDataQuality quality +); +``` + +**Parameters** + +**`fullName`** + +External name of an attribute. + +**`quality`** + +The out parameter contains the quality property of Reference attribute. + +**Returns** + +bool + +true: if the Reference attribute quality accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetReferenceArrayQ Method (short, short, CMxDataQuality) + +Provides a method to get the quality of a Reference array attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool GetReferenceArrayQ( +short attributeId, +short primitiveId, +out CMxDataQuality quality +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`quality`** + +The out parameter contains the quality property of Reference attribute. + +**Returns** + +bool + +true: if the Reference attribute quality accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetScanTime Method + +Provides a method to access to the current scan time. + +**Syntax** + +```csharp +public DateTime GetScanTime(); +``` + +**Returns** + +DateTime + +### GetScanTime Method (short) + +Provides a method to access to the current scan time with time zone offset. + +**Syntax** + +```csharp +public DateTime GetScanTime( +out short offset +); +``` + +**Parameters** + +**`offset`** + +The time zone offset. + +**Returns** + +DateTime + +### GetStatusDescription Method + +Provides a method to get the string associated with an error code. + +**Syntax** + +```csharp +public string GetStatusDescription( +short shDetailedErrorCode +); +``` + +**Parameters** + +**`shDetailedErrorCode`** + +The error code. + +**Returns** + +string + +The string value corresponding to the error code. + +### GetString Method (string, string) + +Provides a method to get the value of string attribute by its external name. + +**Syntax** + +```csharp +public bool GetString( +string fullName, +out string value +); +``` + +**Parameters** + +Refer to the section GetString Method Parameters and Return value + +**Returns** + +Refer to the section GetString Method Parameters and Return value + +### GetString Method (short, short, string) + +Provides a method to get the value of string attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool GetString( +short attributeId, +short primitiveId, +out string value +); +``` + +**Parameters** + +Refer to the section GetString Method Parameters and Return value + +**Returns** + +Refer to the section GetString Method Parameters and Return value + +### GetString Method (string, int, string) + +Provides a method to get the value of string array element by its external name and index. + +**Syntax** + +```csharp +public bool GetString( +string fullName, +int index, +out string value +); +``` + +**Parameters** + +Refer to the section GetString Method Parameters and Return value. + +**Returns** + +Refer to the section GetString Method Parameters and Return value. + +### GetString Method (string, string, CMxDataQuality) + +Provides a method to get the value and quality of string attribute by its external name. + +**Syntax** + +```csharp +public bool GetString( +string fullName, +out string value, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetString Method Parameters and Return value. + +**Returns** + +Refer to the section GetString Method Parameters and Return value. + +### GetString Method (short, short, int, string) + +Provides a method to get the value of string array element by its ID, Primitive ID, and index. + +**Syntax** + +```csharp +public bool GetString( +short attributeId, +short primitiveId, +int index, +out string value +); +``` + +**Parameters** + +Refer to the section GetString Method Parameters and Return value. + +**Returns** + +Refer to the section GetString Method Parameters and Return value. + +### GetString Method (short, short, string, CMxDataQuality) + +Provides a method to get the value and quality of string attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool GetString( +short attributeId, +short primitiveId, +out string value, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetString Method Parameters and Return value. + +**Returns** + +Refer to the section GetString Method Parameters and Return value. + +### GetString Method (string, string, DateTime, CMxDataQuality) + +Provides a method to get the value, time, and quality of string attribute by its external name. + +**Syntax** + +```csharp +public bool GetString( +string fullName, +out string value, +out DateTime time, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetString Method Parameters and Return value. + +**Returns** + +Refer to the section GetString Method Parameters and Return value. + +### GetString Method (short, short, string, DateTime, CMxDataQuality) + +Provides a method to get the value, time, and quality of string attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool GetString( +short attributeId, +short primitiveId, +out string value, +out DateTime time, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetString Method Parameters and Return value + +**Returns** + +Refer to the section GetString Method Parameters and Return value + +### GetString Method Parameters and Return value + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`Value`** + +The out parameter which contains the value of the string attribute. + +**`Index`** + +The string array index. + +**`quality`** + +The quality property of string attribute. + +**`time`** + +The out parameter contains the Date and Time associated with the string attribute. + +**Returns** + +bool + +true: if the string attribute accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetStringArrayQ Method (string, CMxDataQuality) + +Provides a method to get the quality of a string array attribute by its external name. + +**Syntax** + +```csharp +public bool GetStringArrayQ( +string fullName, +out CMxDataQuality quality +); +``` + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`quality`** + +The out parameter contains the quality property of string array attribute. + +**Returns** + +bool + +true: if the string array attribute quality accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetStringArrayQ Method (short, short, CMxDataQuality) + +Provides a method to get the quality of a string array attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool GetStringArrayQ( +short attributeId, +short primitiveId, +out CMxDataQuality quality +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`quality`** + +The out parameter contains the quality property of string array attribute. + +**Returns** + +bool + +true: if the string array attribute quality accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetTime Method (string, DateTime) + +Provides a method to get the value of a time attribute by its external name. + +**Syntax** + +```csharp +public bool GetTime( +string fullName, +out DateTime value +); +``` + +**Parameters** + +Refer to the section GetTime Method Parameters and Return value. + +### GetTime Method (short, short, DateTime) + +Provides a method to get the value of a time attribute by its id and primitive id. + +**Syntax** + +```csharp +public bool GetTime( +short attributeId, +short primitiveId, +out DateTime value +); +``` + +**Parameters** + +Refer to the section GetTime Method Parameters and Return value. + +### GetTime Method (string, int, DateTime) + +Provides a method to get the value of a time array element by its external name and index. + +**Syntax** + +```csharp +public bool GetTime( +string fullName, +int index, +out DateTime value +); +``` + +**Parameters** + +Refer to the section GetTime Method Parameters and Return value. + +### GetTime Method (string, DateTime, CMxDataQuality) + +Provides a method to get the value and quality of a time attribute by its external name. + +**Syntax** + +```csharp +public bool GetTime( +string fullName, +out DateTime value, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetTime Method Parameters and Return value. + +### GetTime Method (short, short, int, DateTime) + +Provides a method to get the value of a time array element by its id, primitive id, and index. + +**Syntax** + +```csharp +public bool GetTime( +short attributeId, +short primitiveId, +int index, +out DateTime value +); +``` + +**Parameters** + +Refer to the section GetTime Method Parameters and Return value. + +### GetTime Method (short, short, DateTime, CMxDataQuality) + +Provides a method to get the value and quality of a time attribute by its id and primitive id. + +**Syntax** + +```csharp +public bool GetTime( +short attributeId, +short primitiveId, +out DateTime value, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetTime Method Parameters and Return value. + +### GetTime Method (string, DateTime, DateTime, CMxDataQuality) + +Provides a method to get the value, time, and quality of a time attribute by its external name. + +**Syntax** + +```csharp +public bool GetTime( +string fullName, +out DateTime value, +out DateTime time, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetTime Method Parameters and Return value. + +### GetTime Method (short, short, DateTime, DateTime, CMxDataQuality) + +Provides a method to get the value, time, and quality of a time attribute by its id and primitive id. + +**Syntax** + +```csharp +public bool GetTime( +short attributeId, +short primitiveId, +out DateTime value, +out DateTime time, +out CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section GetTime Method Parameters and Return value. + +### GetTime Method Parameters and Return value + +**`fullName`** + +External name of the attribute. + +**`attributeId`** + +Attribute id. + +**`primitiveId`** + +Primitive id of an attribute. + +**`Value`** + +The out parameter which contains the value of a time attribute. + +**`Index`** + +The DateTime array index. + +**`quality`** + +The out parameter contains the quality property of time attribute. + +**`time`** + +The out parameter contains the Date and Time associated with the time attribute. + +**Returns** + +bool + +true: if the time attribute accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetTimeArrayQ Method (string, CMxDataQuality) + +Provides a method to get the quality of a Time array attribute by its external name. + +**Syntax** + +```csharp +public bool GetTimeArrayQ( +string fullName, +out CMxDataQuality quality +); +``` + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`quality`** + +The out parameter contains the quality property of the Time array attribute. + +**Returns** + +bool + +true: if the Time array attribute quality accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetTimeArrayQ Method (short, short, CMxDataQuality) + +Provides a method to get the quality of a Time array attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool GetTimeArrayQ( +short attributeId, +short primitiveId, +out CMxDataQuality quality +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`quality`** + +The out parameter contains the quality property of Time array attribute. + +**Returns** + +bool + +true: if the Time array attribute quality accessing is successful. + +false: if the user tries to access a non-existing attribute. + +### GetTimeStamp Method (string, MxDataType, DateTime) + +Provides a method to get the time of an attribute by name. + +**Syntax** + +```csharp +public bool GetTimeStamp( +string fullName, +MxDataType dataType, +out DateTime time +); +``` + +**Parameters** + +**`fullName`** + +External name of attribute. + +**`dataType`** + +Datatype of an attribute. + +**`time`** + +The out parameter contains the date and time of an attribute. + +**Returns** + +bool + +true: if accessing the Date and Time of an attribute is successful. + +false: if the user tries to access a non-existing attribute. + +### GetTimeStamp Method (short, short, MxdataType, DateTime) + +Provides a method to get the time of an attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public bool GetTimeStamp( +short attributeId, +short primitiveId, +MxDataType dataType, +out DateTime time +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`dataType`** + +Datatype of an attribute. + +**`time`** + +The out parameter contains the date and time of an attribute. + +**Returns** + +bool + +true: if accessing the Date and Time of an attribute is successful. + +false: if the user tries to access a non-existing attribute. + +### GetType Method (string, MxDataType, int) + +Provides a method to get the type of an attribute by name. + +**Syntax** + +```csharp +public bool GetType( +string fullName, +out MxDataType dataType, +out int isArray +); +``` + +**Parameters** + +**`fullName`** + +External name of an attribute. + +**`dataType`** + +The out parameter contains the Datatype if an attribute. + +**`isArray`** + +The out parameter which specifies whether the attribute is an array type. + +1: if attribute is an array type. + +0: if attribute is non-array type. + +**Returns** + +bool + +true: if the accessing of attribute type is successful. + +false: if the user tries to access a non-existing attribute. + +### GetType Method (short, short, MxDataType, int) + +Provides a method to get the type of an attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public bool GetType( +short attributeId, +short primitiveId, +out MxDataType dataType, +out int isArray +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`dataType`** + +The out parameter contains the Datatype of an attribute. + +**`isArray`** + +The out parameter which specifies whether the attribute is an array type. + +1: if the attribute is an array type. + +0: if the attribute is non-array type + +**Returns** + +bool + +true: if the accessing of attribute type is successful. + +false: if the user tries to access a non-existing attribute. + +### Initialize Method + +Provides a method to initialize the wrapper to a Primitive by ID and IPrimitiveRuntimeSite. + +**Syntax** + +```csharp +public void Initialize( +short primitiveId, +IPrimitiveRuntimeSite pSite +); +``` + +**Parameters** + +**`primitiveId`** + +Primitive ID. + +**`pSite`** + +Object of IPrimitiveRuntimeSite. + +### ParentPrimitive Method + +Provides a method to get the Parent Primitive ID of a Primitive. + +**Syntax** + +```csharp +public short ParentPrimitive(short _primID); +``` + +**Parameters** + +**`_primId`** + +Primitive ID. + +**Returns** + +short + +### PutBoolean Method (string, bool) + +Provides a method to set the value of Boolean attribute by external name. + +**Syntax** + +```csharp +public bool PutBoolean( +string fullName, +bool value +); +``` + +**Parameters** + +Refer to the section PutBoolean Method Parameters and Return value. + +**Returns** + +Refer to the section PutBoolean Method Parameters and Return value. + +### PutBoolean Method (short, short, bool) + +Provides a method to set the value of Boolean attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutBoolean( +short attributeId, +short primitiveId, +bool value +); +``` + +**Parameters** + +Refer to the section PutBoolean Method Parameters and Return value. + +**Returns** + +Refer to the section PutBoolean Method Parameters and Return value. + +### PutBoolean Method (string, bool, CMxDataQuality) + +Provides a method to set the value and quality of Boolean attribute by name. + +**Syntax** + +```csharp +public bool PutBoolean( +string fullName, +bool value, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutBoolean Method Parameters and Return value. + +**Returns** + +Refer to the section PutBoolean Method Parameters and Return value. + +### PutBoolean Method (string, int, bool) + +Provides a method to set the value of an element of a Boolean array attribute by name. + +**Syntax** + +```csharp +public bool PutBoolean( +string fullName, +int index, +bool value +); +``` + +**Parameters** + +Refer to the section PutBoolean Method Parameters and Return value. + +**Returns** + +Refer to the section PutBoolean Method Parameters and Return value. + +### PutBoolean Method (short, short, bool, CMxDataQuality) + +Provides a method to set the value and quality of Boolean attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutBoolean( +short attributeId, +short primitiveId, +bool value, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutBoolean Method Parameters and Return value. + +**Returns** + +Refer to the section PutBoolean Method Parameters and Return value. + +### PutBoolean Method (short, short, int, bool) + +Provides a method to set the value of an element of a Boolean array attribute by ID, Primitive ID and index. + +**Syntax** + +```csharp +public bool PutBoolean( +short attributeId, +short primitiveId, +int index, +bool value +); +``` + +**Parameters** + +Refer to the section PutBoolean Method Parameters and Return value. + +**Returns** + +Refer to the section PutBoolean Method Parameters and Return value. + +### PutBoolean Method (string, bool, DateTime, CMxDataQuality) + +Provides a method to set the value, time, and quality of Boolean attribute by name. + +**Syntax** + +```csharp +public bool PutBoolean( +string fullName, +bool value, +DateTime time, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutBoolean Method Parameters and Return value. + +**Returns** + +Refer to the section PutBoolean Method Parameters and Return value. + +### PutBoolean Method (short, short, bool, DateTime, CMxDataQuality) + +Provides a method to set the value, time, and quality of a Boolean attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutBoolean( +short attributeId, +short primitiveId, +bool value, +DateTime time, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutBoolean Method Parameters and Return value. + +**Returns** + +Refer to the section PutBoolean Method Parameters and Return value. + +### PutBoolean Method Parameters and Return value + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`Value`** + +The Boolean value. + +**`Index`** + +The Boolean array index. + +**`quality`** + +The quality property for Boolean attribute. The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**`time`** + +The Date and Time for a Boolean attribute. + +**Returns** + +bool + +true: if the Boolean attribute setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutBooleanArrayQ Method (string, CMxDataQuality) + +Provides a method to set the quality of a Boolean array attribute by its external name. + +**Syntax** + +```csharp +public bool PutBooleanArrayQ( +string fullName, +CMxDataQuality quality +); +``` + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`quality`** + +The quality property for Boolean array attribute. The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**Returns** + +bool + +true: if the Boolean array element quality setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutBooleanArrayQ Method (short, short, CMxDataQuality) + +Provides a method to set the quality of a Boolean array element by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutBooleanArrayQ( +short attributeId, +short primitiveId, +CMxDataQuality quality +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`quality`** + +The quality property for Boolean array element. The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**Returns** + +bool + +true: if the Boolean array element quality setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutCustomEnum Method (string, short) + +Provides a method to set the ordinal value of CustomEnum attribute by name. + +**Syntax** + +```csharp +public bool PutCustomEnum( +string fullName, +short value +); +``` + +**Parameters** + +Refer to the section PutCustomEnum Method Parameters and Return value + +**Returns** + +Refer to the section PutCustomEnum Method Parameters and Return value + +### PutCustomEnum Method (short, short, short) + +Provides a method to set the ordinal value of CustomEnum attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutCustomEnum( +short attributeId, +short primitiveId, +short value +); +``` + +**Parameters** + +Refer to the section PutCustomEnum Method Parameters and Return value + +**Returns** + +Refer to the section PutCustomEnum Method Parameters and Return value + +### PutCustomEnum Method (string, int, short) + +Provides a method to set the ordinal value of a CustomEnum array element by name. + +**Syntax** + +```csharp +public bool PutCustomEnum( +string fullName, +int index, +short value +); +``` + +**Parameters** + +Refer to the section PutCustomEnum Method Parameters and Return value + +**Returns** + +Refer to the section PutCustomEnum Method Parameters and Return value + +### PutCustomEnum Method (string, short, CMxDataQuality) + +Provides a method to set the ordinal value and quality of CustomEnum attribute by name. + +**Syntax** + +```csharp +public bool PutCustomEnum( +string fullName, +short value, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutCustomEnum Method Parameters and Return value + +**Returns** + +Refer to the section PutCustomEnum Method Parameters and Return value + +### PutCustomEnum Method (short, short, int, short) + +Provides a method to set the ordinal value of CustomEnum array element by ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutCustomEnum( +short attributeId, +short primitiveId, +int index, +short value +); +``` + +**Parameters** + +Refer to the section PutCustomEnum Method Parameters and Return value + +**Returns** + +Refer to the section PutCustomEnum Method Parameters and Return value + +### PutCustomEnum Method (short, short, short, CMxDataQuality) + +Provides a method to set the ordinal value and quality of CustomEnum attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutCustomEnum( +short attributeId, +short primitiveId, +short value, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutCustomEnum Method Parameters and Return value + +**Returns** + +Refer to the section PutCustomEnum Method Parameters and Return value + +### PutCustomEnum Method (string, short, DateTime, CMxDataQuality) + +Provides a method to set the ordinal value, time, and quality of CustomEnum attribute by name. + +**Syntax** + +```csharp +public bool PutCustomEnum( +string fullName, +short value, +DateTime time, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutCustomEnum Method Parameters and Return value + +**Returns** + +Refer to the section PutCustomEnum Method Parameters and Return value + +### PutCustomEnum Method (short, short, short, DateTime, CMxDataQuality) + +Provides a method to set the ordinal value, time, and quality of CustomEnum attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutCustomEnum( +short attributeId, +short primitiveId, +short value, +DateTime time, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutCustomEnum Method Parameters and Return value. + +**Returns** + +Refer to the section PutCustomEnum Method Parameters and Return value. + +### PutCustomEnum Method Parameters and Return value + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`Value`** + +The ordinal value of CustomEnum attribute. + +**`Index`** + +The CustomEnum array index. + +**`quality`** + +The quality property for CustomEnum attribute.The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**`time`** + +The Date and Time for a CustomEnum attribute. + +**Returns** + +bool + +true: if the CustomEnum attribute setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutCustomEnumArrayQ Method (string, CMxDataQuality) + +Provides a method to set the quality of a CustomEnum array element by its external name. + +**Syntax** + +```csharp +public bool PutCustomEnumArrayQ( +string fullName, +CMxDataQuality quality +); +``` + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`quality`** + +The quality property for CustomEnum array element . The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**Returns** + +true: if the CustomEnum array element quality setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutCustomEnumArrayQ Method (short, short, CMxDataQuality) + +Provides a method to set the quality of a CustomEnum array element by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutCustomEnumArrayQ( +short attributeId, +short primitiveId, +CMxDataQuality quality +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`quality`** + +The quality property for CustomEnum array element . The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**Returns** + +bool + +true: if the CustomEnum array element quality setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutCustomStruct Method (string, MxCustomStruct) + +Provides a method to set the value of a CustomStruct attribute by its external name. + +**Syntax** + +```csharp +public bool PutCustomStruct( +string fullName, +MxCustomStruct value +); +``` + +**Parameters** + +Refer to the section PutCustomStruct Method Parameters and Return value + +**Returns** + +Refer to the section PutCustomStruct Method Parameters and Return value + +### PutCustomStruct Method (short, short, MxCustomStruct) + +Provide a method to set the value of a CustomStruct attribute by its id and primitive id. + +**Syntax** + +```csharp +public bool PutCustomStruct( +short attributeId, +short primitiveId, +MxCustomStruct value +); +``` + +**Parameters** + +Refer to the section PutCustomStruct Method Parameters and Return value + +**Returns** + +Refer to the section PutCustomStruct Method Parameters and Return value + +### PutCustomStruct Method (string, int, MxCustomStruct) + +Provides a method to set the value of an element of a CustomStruct array attribute by its external name and index. + +**Syntax** + +```csharp +public bool PutCustomStruct( +string fullName, +int index, +MxCustomStruct value +); +``` + +**Parameters** + +Refer to the section PutCustomStruct Method Parameters and Return value + +**Returns** + +Refer to the section PutCustomStruct Method Parameters and Return value + +### PutCustomStruct Method (string, MxCustomStruct, CMxDataQuality) + +Provides a method to set the value and quality of a CustomStruct attribute by its external name. + +**Syntax** + +```csharp +public bool PutCustomStruct( +string fullName, +MxCustomStruct value, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutCustomStruct Method Parameters and Return value + +**Returns** + +Refer to the section PutCustomStruct Method Parameters and Return value + +### PutCustomStruct Method (short, short, int, MxCustomStruct) + +Provides a method to set the value of an element of a CustomStruct array attribute by its id, primitive id, and index. + +**Syntax** + +```csharp +public bool PutCustomStruct( +short attributeId, +short primitiveId, +int index, +MxCustomStruct value +); +``` + +**Parameters** + +Refer to the section PutCustomStruct Method Parameters and Return value + +**Returns** + +Refer to the section PutCustomStruct Method Parameters and Return value + +### PutCustomStruct Method (short, short, MxCustomStruct, CMxDataQuality) + +Provides a method to set the value and quality of a CustomStruct attribute by its id and primitive id. + +**Syntax** + +```csharp +public bool PutCustomStruct( +short attributeId, +short primitiveId, +MxCustomStruct value, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutCustomStruct Method Parameters and Return value + +**Returns** + +Refer to the section PutCustomStruct Method Parameters and Return value + +### PutCustomStruct Method (string, MxCustomStruct, DateTime, CMxDataQuality) + +Provides a method to set the value, time, and quality of a CustomStruct attribute by its external name. + +**Syntax** + +```csharp +public bool PutCustomStruct( +string fullName, +MxCustomStruct value, +DateTime time, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutCustomStruct Method Parameters and Return value + +**Returns** + +Refer to the section PutCustomStruct Method Parameters and Return value + +### PutCustomStruct Method (short, short, MxCustomStruct, DateTime, CMxDataQuality) + +Provides a method to set the value, time, and quality of a CustomStruct attribute by its id and primitive id. + +**Syntax** + +```csharp +public bool PutCustomStruct( +short attributeId, +short primitiveId, +MxCustomStruct value, +DateTime time, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutCustomStruct Method Parameters and Return value. + +**Returns** + +Refer to the section PutCustomStruct Method Parameters and Return value. + +### PutCustomStruct Method Parameters and Return value + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`guid`** + +The guid of customstruct. + +**`length`** + +The length of the byte array. + +**`Value`** + +The byte array. + +**`Index`** + +The CustomStruct array index. + +**`quality`** + +The quality property for CustomStruct attribute. + +**`time`** + +The Date and Time for a CustomStruct attribute. + +**Returns** + +bool + +true: if the CustomStruct attribute setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutCustomStructArrayQ Method (string, CMxDataQuality) + +Provides a method to set the quality of a CustomStruct array element by its external name. + +**Syntax** + +```csharp +public bool PutCustomStructArrayQ( +string fullName, +CMxDataQuality quality +); +``` + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`quality`** + +The quality property for CustomStruct array element. The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**Returns** + +bool + +true: if the CustomStruct array element quality setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutCustomStructArrayQ Method (short, short, CMxDataQuality) + +Provides a method to set the quality of a CustomStruct array element by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutCustomStructArrayQ( +short attributeId, +short primitiveId, +CMxDataQuality quality +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`quality`** + +The quality property for CustomStruct attribute. The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**Returns** + +bool + +true: if the CustomStruct array element quality setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutDouble Method (string, double) + +Provides a method to set the value of a double attribute by name. + +**Syntax** + +```csharp +public bool PutDouble( +string fullName, +double value +); +``` + +**Parameters** + +Refer to the section PutDouble Method Parameters and Return value + +**Returns** + +Refer to the section PutDouble Method Parameters and Return value + +### PutDouble Method (short, short, double) + +Provides a method to set the value of a double attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutDouble( +short attributeId, +short primitiveId, +double value +); +``` + +**Parameters** + +Refer to the section PutDouble Method Parameters and Return value + +**Returns** + +Refer to the section PutDouble Method Parameters and Return value + +### PutDouble Method (string, double, CMxDataQuality) + +Provides a method to set the value and quality of a double attribute by name. + +**Syntax** + +```csharp +public bool PutDouble( +string fullName, +double value, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutDouble Method Parameters and Return value + +**Returns** + +Refer to the section PutDouble Method Parameters and Return value + +### PutDouble Method (string, int, double) + +Provides a method to set the value of a double array element by name. + +**Syntax** + +```csharp +public bool PutDouble( +string fullName, +int index, +double value +); +``` + +**Parameters** + +Refer to the section PutDouble Method Parameters and Return value + +**Returns** + +Refer to the section PutDouble Method Parameters and Return value + +### PutDouble Method (short, short, double, CMxDataQuality) + +Provides a method to set the value and quality of a double attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutDouble( +short attributeId, +short primitiveId, +double value, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutDouble Method Parameters and Return value + +**Returns** + +Refer to the section PutDouble Method Parameters and Return value + +### PutDouble Method (short, short, int, double) + +Provides a method to set the value of an element of a double array attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutDouble( +short attributeId, +short primitiveId, +int index, +double value +); +``` + +**Parameters** + +Refer to the section PutDouble Method Parameters and Return value + +**Returns** + +Refer to the section PutDouble Method Parameters and Return value + +### PutDouble Method (string, double, DateTime, CMxDataQuality) + +Provides a method to set the value, time, and quality of a double attribute by name. + +**Syntax** + +```csharp +public bool PutDouble( +string fullName, +double value, +DateTime time, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutDouble Method Parameters and Return value + +**Returns** + +Refer to the section PutDouble Method Parameters and Return value + +### PutDouble Method (short, short, double, DateTime, CMxDataQuality) + +Provides a method to set the value, time, and quality of a double attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutDouble( +short attributeId, +short primitiveId, +double value, +DateTime time, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutDouble Method Parameters and Return value. + +**Returns** + +Refer to the section PutDouble Method Parameters and Return value. + +### PutDouble Method Parameters and Return value + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`Value`** + +The Double value. + +**`Index`** + +The Double array index. + +**`quality`** + +The quality property for Double attribute. The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**`time`** + +The Date and Time for a Double attribute. + +**Returns** + +bool + +true: if the Double attribute setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutDoubleArrayQ Method (string, CMxDataQuality) + +Provides a method to set the quality of a double array element by its external name. + +**Syntax** + +```csharp +public bool PutDoubleArrayQ( +string fullName, +CMxDataQuality quality +); +``` + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`quality`** + +The quality property for double attribute. The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**Returns** + +bool + +true: if the double array element quality setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutDoubleArrayQ Method (short, short, CMxDataQuality) + +Provides a method to set the quality of a double array element by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutDoubleArrayQ( +short attributeId, +short primitiveId, +CMxDataQuality quality +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`quality`** + +The quality property for double array element. The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**Returns** + +bool + +true: if the double array element quality setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutElapsedTime Method (string, TimeSpan) + +Provides a method to set the value of an ElapsedTime attribute by its external name. + +**Syntax** + +```csharp +public bool PutElapsedTime( +string fullName, +TimeSpan value +); +``` + +**Parameters** + +Refer to the section PutElapsedTime Method Parameters and Return value + +**Returns** + +Refer to the section PutElapsedTime Method Parameters and Return value + +### PutElapsedTime Method (short, short, TimeSpan) + +Provides a method to set the value of an ElapsedTime attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutElapsedTime( +short attributeId, +short primitiveId, +TimeSpan value +); +``` + +**Parameters** + +Refer to the section PutElapsedTime Method Parameters and Return value + +**Returns** + +Refer to the section PutElapsedTime Method Parameters and Return value + +### PutElapsedTime Method (string, int, TimeSpan) + +Provides a method to set the value of an element of an ElapsedTime array attribute by its name. + +**Syntax** + +```csharp +public bool PutElapsedTime( +string fullName, +int index, +TimeSpan value +); +``` + +**Parameters** + +Refer to the section PutElapsedTime Method Parameters and Return value + +**Returns** + +Refer to the section PutElapsedTime Method Parameters and Return value + +### PutElapsedTime Method (string, TimeSpan, CMxDataQuality) + +Provides a method to set the value and quality of an ElapsedTime attribute by its name. + +**Syntax** + +```csharp +public bool PutElapsedTime( +string fullName, +TimeSpan value, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutElapsedTime Method Parameters and Return value + +**Returns** + +Refer to the section PutElapsedTime Method Parameters and Return value + +### PutElapsedTime Method (short, short, int, TimeSpan) + +Provides a method to set the value of an element of an ElapsedTime array attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutElapsedTime( +short attributeId, +short primitiveId, +int index, +TimeSpan value +); +``` + +**Parameters** + +Refer to the section PutElapsedTime Method Parameters and Return value + +**Returns** + +Refer to the section PutElapsedTime Method Parameters and Return value + +### PutElapsedTime Method (short, short, TimeSpan, CMxDataQuality) + +Provides a method to set the value and quality of an ElapsedTime attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutElapsedTime( +short attributeId, +short primitiveId, +TimeSpan value, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutElapsedTime Method Parameters and Return value + +**Returns** + +Refer to the section PutElapsedTime Method Parameters and Return value + +### PutElapsedTime Method (string, TimeSpan, DateTime, CMxDataQuality) + +Provides a method to set the value, time, and quality of an ElapsedTime attribute by its name. + +**Syntax** + +```csharp +public bool PutElapsedTime( +string fullName, +TimeSpan value, +DateTime time, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutElapsedTime Method Parameters and Return value + +**Returns** + +Refer to the section PutElapsedTime Method Parameters and Return value + +### PutElapsedTime Method (short, short, TimeSpan, DateTime, CMxDataQuality) + +Provides a method to set the value, time, and quality of an ElapsedTime attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutElapsedTime( +short attributeId, +short primitiveId, +TimeSpan value, +DateTime time, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutElapsedTime Method Parameters and Return value. + +**Returns** + +Refer to the section PutElapsedTime Method Parameters and Return value. + +### PutElapsedTime Method Parameters and Return value + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`Value`** + +The ElapsedTime value. + +**`Index`** + +The ElapsedTime array index. + +**`quality`** + +The quality property for ElapsedTime attribute. + +**`time`** + +The Date and Time for a ElapsedTime attribute. + +**Returns** + +bool + +true: if the ElapsedTime attribute setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutElapsedTimeArrayQ Method (string, CMxDataQuality) + +Provides a method to set the quality of a ElapsedTime array element by its external name. + +**Syntax** + +```csharp +public bool PutElapsedTimeArrayQ( +string fullName, +CMxDataQuality quality +); +``` + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`quality`** + +The quality property for ElapsedTime array element. The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**Returns** + +bool + +true: if the ElapsedTime array element quality setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutElapsedTimeArrayQ Method (short, short, CMxDataQuality) + +Provides a method to set the quality of an ElapsedTime array element by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutElapsedTimeArrayQ( +short attributeId, +short primitiveId, +CMxDataQuality quality +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`quality`** + +The quality property for ElapsedTime array element. The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**Returns** + +bool + +true: if the ElapsedTime array element quality setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutFloat Method (string, float) + +Provides a method to set the value of a float attribute by its external name. + +**Syntax** + +```csharp +public bool PutFloat( +string fullName, +float value +); +``` + +**Parameters** + +Refer to the section PutFloat Method Parameters and Return value + +**Returns** + +Refer to the section PutFloat Method Parameters and Return value + +### PutFloat Method (short, short, float) + +Provides a method to set the value of a float attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutFloat( +short attributeId, +short primitiveId, +float value +); +``` + +**Parameters** + +Refer to the section PutFloat Method Parameters and Return value + +**Returns** + +Refer to the section PutFloat Method Parameters and Return value + +### PutFloat Method (string, float, CMxDataQuality) + +Provides a method to set the value and quality of a float attribute by its name. + +**Syntax** + +```csharp +public bool PutFloat( +string fullName, +float value, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutFloat Method Parameters and Return value + +**Returns** + +Refer to the section PutFloat Method Parameters and Return value + +### PutFloat Method (string, int, float) + +Provides a method to set the value of an element of a float array attribute by its name. + +**Syntax** + +```csharp +public bool PutFloat( +string fullName, +int index, +float value +); +``` + +**Parameters** + +Refer to the section PutFloat Method Parameters and Return value + +**Returns** + +Refer to the section PutFloat Method Parameters and Return value + +### PutFloat Method (short, short, float, CMxDataQuality) + +Provides a method to set the value and quality of a float attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutFloat( +short attributeId, +short primitiveId, +float value, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutFloat Method Parameters and Return value + +**Returns** + +Refer to the section PutFloat Method Parameters and Return value + +### PutFloat Method (short, short, int, float) + +Provides a method to set the value of an element of a float array attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutFloat( +short attributeId, +short primitiveId, +int index, +float value +); +``` + +**Parameters** + +Refer to the section PutFloat Method Parameters and Return value + +**Returns** + +Refer to the section PutFloat Method Parameters and Return value + +### PutFloat Method (string, float, DateTime, CMxDataQuality) + +Provides a method to set the value, time, and quality of a float attribute by its name. + +**Syntax** + +```csharp +public bool PutFloat( +string fullName, +float value, +DateTime time, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutFloat Method Parameters and Return value + +**Returns** + +Refer to the section PutFloat Method Parameters and Return value + +### PutFloat Method (short, short, float, DateTime, CMxDataQuality) + +Provides a method to set the value, time, and quality of a float attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutFloat( +short attributeId, +short primitiveId, +float value, +DateTime time, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutFloat Method Parameters and Return value. + +**Returns** + +Refer to the section PutFloat Method Parameters and Return value. + +### PutFloat Method Parameters and Return value + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`Value`** + +The Float value. + +**`Index`** + +The Float array index. + +**`quality`** + +The quality property for Float attribute. The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**`time`** + +The Date and Time for a Float attribute. + +**Returns** + +bool + +true: if the Float attribute setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutFloatArrayQ Method (string, CMxDataQuality) + +Provides a method to set the quality of a Float array element by its external name. + +**Syntax** + +```csharp +public bool PutFloatArrayQ( +string fullName, +CMxDataQuality quality +); +``` + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`quality`** + +The quality property for Float array element. The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**Returns** + +bool + +true: if the Float array element quality setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutFloatArrayQ Method (short, short, CMxDataQuality) + +Provides a method to set the quality of a Float array element by its external ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutFloatArrayQ( +short attributeId, +short primitiveId, +CMxDataQuality quality +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`quality`** + +The quality property for Float array element. The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**Returns** + +bool + +true: if the Float array element quality setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutInteger Method (string, int) + +Provides a method to set the value of an Integer attribute by its external name. + +**Syntax** + +```csharp +public bool PutInteger( +string fullName, +int value +); +``` + +**Parameters** + +Refer to the section PutInteger Method Parameters and Return value + +**Returns** + +Refer to the section PutInteger Method Parameters and Return value + +### PutInteger Method (short, short, int) + +Provides a method to set the value of an Integer attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutInteger( +short attributeId, +short primitiveId, +int value +); +``` + +**Parameters** + +Refer to the section PutInteger Method Parameters and Return value + +**Returns** + +Refer to the section PutInteger Method Parameters and Return value + +### PutInteger Method (string, int, CMxDataQuality) + +Provides a method to set the value and quality of an Integer attribute by name. + +**Syntax** + +```csharp +public bool PutInteger( +string fullName, +int value, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutInteger Method Parameters and Return value + +**Returns** + +Refer to the section PutInteger Method Parameters and Return value + +### PutInteger Method (string, int, int) + +Provides a method to set the value of an element of an Integer array attribute by name. + +**Syntax** + +```csharp +public bool PutInteger( +string fullName, +int index, +int value +); +``` + +**Parameters** + +Refer to the section PutInteger Method Parameters and Return value + +**Returns** + +Refer to the section PutInteger Method Parameters and Return value + +### PutInteger Method (short, short, int, CMxDataQuality) + +Provides a method to set the value and quality of an Integer attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutInteger( +short attributeId, +short primitiveId, +int value, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutInteger Method Parameters and Return value + +**Returns** + +Refer to the section PutInteger Method Parameters and Return value + +### PutInteger Method (short, short, int, int) + +Provides a method to set the value of an element of an Integer array attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutInteger( +short attributeId, +short primitiveId, +int index, +int value +); +``` + +**Parameters** + +Refer to the section PutInteger Method Parameters and Return value + +**Returns** + +Refer to the section PutInteger Method Parameters and Return value + +### PutInteger Method (string, int, DateTime, CMxDataQuality) + +Provides a method to set the value, time, and quality of an Integer attribute by name. + +**Syntax** + +```csharp +public bool PutInteger( +string fullName, +int value, +DateTime time, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutInteger Method Parameters and Return value + +**Returns** + +Refer to the section PutInteger Method Parameters and Return value + +### PutInteger Method (short, short, int, DateTime, CMxDataQuality) + +Provides a method to set the value, time, and quality of an Integer attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutInteger( +short attributeId, +short primitiveId, +int value, +DateTime time, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutInteger Method Parameters and Return value. + +**Returns** + +Refer to the section PutInteger Method Parameters and Return value. + +### PutInteger Method Parameters and Return value + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`Value`** + +The Integer value. + +**`Index`** + +The Integer array index. + +**`quality`** + +The quality property for an Integer attribute. The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**`time`** + +The Date and Time for an Integer attribute. + +**Returns** + +bool + +true: if the Integer attribute setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutIntegerArrayQ Method (string, CMxDataQuality) + +Provides a method to set the quality of an Integer array attribute by its external name. + +**Syntax** + +```csharp +public bool PutIntegerArrayQ( +string fullName, +CMxDataQuality quality +); +``` + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`quality`** + +The quality property for an Integer array attribute. The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**Returns** + +bool + +true: if the Integer array attribute quality setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutIntegerArrayQ Method (short, short, CMxDataQuality) + +Provides a method to set the quality of an Integer array attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutIntegerArrayQ( +short attributeId, +short primitiveId, +CMxDataQuality quality +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`quality`** + +The quality property for an Integer array attribute. The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**Returns** + +bool + +true: if the Integer array attribute quality setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutMxDataType Method (string, MxDataType) + +Provides a method to set the value of a MxDataType attribute by its external name. + +**Syntax** + +```csharp +public bool PutMxDataType( +string fullName, +MxDataType value +); +``` + +**Parameters** + +Refer to the section PutMxDataType Method Parameters and Return value. + +**Returns** + +Refer to the section PutMxDataType Method Parameters and Return value + +### PutMxDataType Method (short, short, MxDataType) + +Provides a method to set the value of a MxDataType attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutMxDataType( +short attributeId, +short primitiveId, +MxDataType value +); +``` + +**Parameters** + +Refer to the section PutMxDataType Method Parameters and Return value. + +**Returns** + +Refer to the section PutMxDataType Method Parameters and Return value. + +### PutMxDataType Method (string, int, MxDataType) + +Provides a method to set the value of an element of an MxDataType array attribute by name. + +**Syntax** + +```csharp +public bool PutMxDataType( +string fullName, +int index, +MxDataType value +); +``` + +**Parameters** + +Refer to the section PutMxDataType Method Parameters and Return value. + +**Returns** + +Refer to the section PutMxDataType Method Parameters and Return value. + +### PutMxDataType Method (string, MxDataType, CMxDataQuality) + +Provides a method to set the value and quality of a MxDataType attribute by name. + +**Syntax** + +```csharp +public bool PutMxDataType( +string fullName, +MxDataType value, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutMxDataType Method Parameters and Return value. + +**Returns** + +Refer to the section PutMxDataType Method Parameters and Return value. + +### PutMxDataType Method (short, short, int, MxDataType) + +Provides a method to set the value of an element of an MxDataType array attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutMxDataType( +short attributeId, +short primitiveId, +int index, +MxDataType value +); +``` + +**Parameters** + +Refer to the section PutMxDataType Method Parameters and Return value. + +**Returns** + +Refer to the section PutMxDataType Method Parameters and Return value. + +### PutMxDataType Method (short, short, MxDataType, CMxDataQuality) + +Provides a method to set the value and quality of a MxDataType attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutMxDataType( +short attributeId, +short primitiveId, +MxDataType value, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutMxDataType Method Parameters and Return value. + +**Returns** + +Refer to the section PutMxDataType Method Parameters and Return value. + +### PutMxDataType Method (string, MxDataType, DateTime, CMxDataQuality) + +Provides a method to set the value, time, and quality of a MxDataType attribute by name. + +**Syntax** + +```csharp +public bool PutMxDataType( +string fullName, +MxDataType value, +DateTime time, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutMxDataType Method Parameters and Return value. + +**Returns** + +Refer to the section PutMxDataType Method Parameters and Return value. + +### PutMxDataType Method (short, short, MxDataType, DateTime, CMxDataQuality) + +Provides a method to set the value, time, and quality of a MxDataType attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutMxDataType( +short attributeId, +short primitiveId, +MxDataType value, +DateTime time, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutMxDataType Method Parameters and Return value. + +**Returns** + +Refer to the section PutMxDataType Method Parameters and Return value. + +### PutMxDataType Method Parameters and Return value + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`Value`** + +The MxDataType value. The supported MxDataType values are: + +MxBigString, MxBoolean, MxDataQualityType, MxDataTypeEND, MxDataTypeEnum, MxDataTypeUnknown, MxDouble, MxElapsedTime, MxFloat, MxInteger, MxInternationalizedString, MxNoData, MxQualifiedEnum, MxQualifiedStruct, MxReferenceType, MxSecurityClassificationEnum, MxStatusType, MxString, and MxTime. + +**`Index`** + +The MxDataType array index. + +**`quality`** + +The quality property for MxDataType attribute. The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**`time`** + +The Date and Time for MxDataType attribute. + +**Returns** + +bool + +true: if the MxDataType attribute setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutMxDataTypeArrayQ Method (string, CMxDataQuality) + +Provides a method to set the quality of a MxDataType array attribute by its external name. + +**Syntax** + +```csharp +public bool PutMxDataTypeArrayQ( +string fullName, +CMxDataQuality quality +); +``` + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`quality`** + +The quality property for MxDataType array attribute. The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**Returns** + +bool + +true: if the MxDataType array attribute quality setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutMxDataTypeArrayQ Method (short, short, CMxDataQuality) + +Provides a method to set the quality of a MxDataType array attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutMxDataTypeArrayQ( +short attributeId, +short primitiveId, +CMxDataQuality quality +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`quality`** + +The quality property for MxDataType array attribute. The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**Returns** + +bool + +true: if the MxDataType array attribute quality setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutMxStatus Method (string, MxStatus) + +Provides a method to set the value of a MxStatus attribute by its external name. + +**Syntax** + +```csharp +public bool PutMxStatus( +string fullName, +MxStatus value +); +``` + +**Parameters** + +Refer to the section PutMxStatus Method Parameters and Return value + +**Returns** + +Refer to the section PutMxStatus Method Parameters and Return value + +### PutMxStatus Method (short, short, MxStatus) + +Provides a method to set the value of a MxStatus attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutMxStatus( +short attributeId, +short primitiveId, +MxStatus value +); +``` + +**Parameters** + +Refer to the section PutMxStatus Method Parameters and Return value. + +**Returns** + +Refer to the section PutMxStatus Method Parameters and Return value. + +### PutMxStatus Method (string, int, MxStatus) + +Provides a method to set the value of an element of an MxStatus array attribute by name. + +**Syntax** + +```csharp +public bool PutMxStatus( +string fullName, +int index, +MxStatus value +); +``` + +**Parameters** + +Refer to the section PutMxStatus Method Parameters and Return value. + +**Returns** + +Refer to the section PutMxStatus Method Parameters and Return value + +### PutMxStatus Method (string, MxStatus, CMxDataQuality) + +Provides a method to set the value and quality of a MxStatus attribute by name. + +**Syntax** + +```csharp +public bool PutMxStatus( +string fullName, +MxStatus value, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutMxStatus Method Parameters and Return value. + +**Returns** + +Refer to the section PutMxStatus Method Parameters and Return value. + +### PutMxStatus Method (short, short, int, MxStatus) + +Provides a method to set the value of an element of an MxStatus array attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutMxStatus( +short attributeId, +short primitiveId, +int index, +MxStatus value +); +``` + +**Parameters** + +Refer to the section PutMxStatus Method Parameters and Return value. + +**Returns** + +Refer to the section PutMxStatus Method Parameters and Return value. + +### PutMxStatus Method (short, short, MxStatus, CMxDataQuality) + +Provides a method to set the value and quality of a MxStatus attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutMxStatus( +short attributeId, +short primitiveId, +MxStatus value, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutMxStatus Method Parameters and Return value. + +**Returns** + +Refer to the section PutMxStatus Method Parameters and Return value. + +### PutMxStatus Method (string, MxStatus, DateTime, CMxDataQuality) + +Provides a method to set the value, time, and quality of a MxStatus attribute by name. + +**Syntax** + +```csharp +public bool PutMxStatus( +string fullName, +MxStatus value, +DateTime time, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutMxStatus Method Parameters and Return value. + +**Returns** + +Refer to the section PutMxStatus Method Parameters and Return value. + +### PutMxStatus Method (short, short, MxStatus, DateTime, CMxDataQuality) + +Provides a method to set the value, time, and quality of a MxStatus attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutMxStatus( +short attributeId, +short primitiveId, +MxStatus value, +DateTime time, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutMxStatus Method Parameters and Return value. + +**Returns** + +Refer to the section PutMxStatus Method Parameters and Return value. + +### PutMxStatus Method Parameters and Return value + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`Value`** + +The MxStatus value. The MxStatus value can set as shown below: + +MxStatus sval = new MxStatus(); + +sval.success = -1; + +sval.Category = MxStatusCategory.MxCategoryOk; + +sval.detail = 1; + +sval.detectedBy = MxStatusSource.MxSourceRequestingAutomationObject; + +PutMxStatus("StatusAttr", sval); + +**`Index`** + +The MxStatus array index. + +**`quality`** + +The quality property for MxStatus attribute. The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**`time`** + +The Date and Time for MxStatus attribute. + +**Returns** + +bool + +true: if the MxStatus attribute setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutMxStatusArrayQ Method (string, CMxDataQuality) + +Provides a method to set the quality of a MxDataType array attribute by its external name. + +**Syntax** + +```csharp +public bool PutMxStatusArrayQ( +string fullName, +CMxDataQuality quality +); +``` + +**Parameters** + +**`fullName`** + +External name of attribute. + +**`quality`** + +The quality property for MxStatus array attribute. The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**Returns** + +bool + +true: if MxStatus array attribute quality setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutMxStatusArrayQ Method (short, short, CMxDataQuality) + +Provides a method to set the quality of a MxDataType array attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutMxStatusArrayQ( +short attributeId, +short primitiveId, +CMxDataQuality quality +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`quality`** + +The quality property for MxStatus array attribute. The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**Returns** + +bool + +true: if MxStatus array attribute quality setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutQuality Method (string, MxDataType, CMxDataQuality) + +Provides a method to set the quality of an attribute by its name. + +**Syntax** + +```csharp +public bool PutQuality( +string fullName, +MxDataType dataType, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutQuality Method Parameters and Return value. + +**Returns** + +Refer to the section PutQuality Method Parameters and Return value. + +### PutQuality Method (short, short, MxDataType, CMxDataQuality) + +Provides a method to set the quality of an attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutQuality( +short attributeId, +short primitiveId, +MxDataType dataType, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutQuality Method Parameters and Return value. + +**Returns** + +Refer to the section PutQuality Method Parameters and Return value. + +### PutQuality Method Parameters and Return value + +**Parameters** + +**`fullName`** + +External name of an attribute. + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`dataType`** + +The Datatype of an attribute. The supported datatypes are: + +MxBoolean + +MxInteger + +MxFloat + +MxDouble + +MxString + +MxTime + +MxElapsedTime + +MxReferenceType + +MxStatusType + +MxDataTypeEnum + +MxQualifiedEnum + +MxQualifiedStruct + +**`quality`** + +The quality property of an attribute. The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**Returns** + +bool + +true: if the attribute quality setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutReference Method (string, IMxReference) + +Provides a method to set the value of reference attribute by its external name. + +**Syntax** + +```csharp +public bool PutReference( +string fullName, +IMxReference value +); +``` + +**Parameters** + +Refer to the section PutReference Method Parameters and Return value. + +**Returns** + +Refer to the section PutReference Method Parameters and Return value. + +### PutReference Method (short, short, IMxReference) + +Provides a method to set the value of reference attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutReference( +short attributeId, +short primitiveId, +IMxReference value +); +``` + +**Parameters** + +Refer to the section PutReference Method Parameters and Return value. + +**Returns** + +Refer to the section PutReference Method Parameters and Return value. + +### PutReference Method (string, IMxReference, CMxDataQuality) + +Provides a method to set the value and quality of reference attribute by name. + +**Syntax** + +```csharp +public bool PutReference( +string fullName, +IMxReference value, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutReference Method Parameters and Return value + +**Returns** + +Refer to the section PutReference Method Parameters and Return value + +### PutReference Method (string, int, IMxReference) + +Provides a method to set the value of an element of a reference array attribute by name. + +**Syntax** + +```csharp +public bool PutReference( +string fullName, +int index, +IMxReference value +); +``` + +**Parameters** + +Refer to the section PutReference Method Parameters and Return value. + +**Returns** + +Refer to the section PutReference Method Parameters and Return value. + +### PutReference Method (short, short, IMxReference, CMXDataQuality) + +Provides a method to set the value and quality of reference attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutReference( +short attributeId, +short primitiveId, +IMxReference value, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutReference Method Parameters and Return value. + +**Returns** + +Refer to the section PutReference Method Parameters and Return value. + +### PutReference Method (short, short, int, IMxReference) + +Provides a method to set the value of an element of a reference array attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutReference( +short attributeId, +short primitiveId, +int index, +IMxReference value +); +``` + +**Parameters** + +Refer to the section PutReference Method Parameters and Return value. + +**Returns** + +Refer to the section PutReference Method Parameters and Return value. + +### PutReference Method (string, IMxReference, DateTime, CMxDataQuality) + +Provides a method to set the value, time, and quality of reference attribute by name. + +**Syntax** + +```csharp +public bool PutReference( +string fullName, +IMxReference value, +DateTime time, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutReference Method Parameters and Return value. + +**Returns** + +Refer to the section PutReference Method Parameters and Return value. + +### PutReference Method (short, short, IMxReference, DateTime, CMxDataQuality) + +Provides a method to set the value, time, and quality of reference attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutReference( +short attributeId, +short primitiveId, +IMxReference value, +DateTime time, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutReference Method Parameters and Return value. + +**Returns** + +Refer to the section PutReference Method Parameters and Return value. + +### PutReference Method Parameters and Return value + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`Value`** + +The Reference attribute value. The value can be set by IMxReference: + +IMxReference val; + +val.FullReferenceString = "Sample String"; + +PutReference("ReferenceAttr", val); + +**`Index`** + +The Reference array index. + +**`quality`** + +The quality property for Reference attribute. The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**`time`** + +The Date and Time for a Reference attribute. + +**Returns** + +bool + +true: if the Reference attribute setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutReferenceArrayQ Method (string, CMxDataQuality) + +Provides a method to set the quality of a Reference array attribute by its external name. + +**Syntax** + +```csharp +public bool PutReferenceArrayQ( +string fullName, +CMxDataQuality quality +); +``` + +**Parameters** + +**`fullName`** + +External name of attribute. + +**`quality`** + +The quality property for Reference array attribute. The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**Returns** + +bool + +true: if Reference array attribute quality setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutReferenceArrayQ Method (short, short, CMxDataQuality) + +Provides a method to set the quality of a Reference array attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutReferenceArrayQ( +short attributeId, +short primitiveId, +CMxDataQuality quality +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`quality`** + +The quality property for Reference array attribute. The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**Returns** + +bool + +true: if Reference array attribute quality setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutString Method (string, string) + +Provides a method to set the value of a string attribute by its external name. + +**Syntax** + +```csharp +public bool PutString( +string fullName, +string value +); +``` + +**Parameters** + +Refer to the section PutString Method Parameters and Return value. + +**Returns** + +Refer to the section PutString Method Parameters and Return value. + +### PutString Method (short, short, string) + +Provides a method to set the value of a string attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutString( +short attributeId, +short primitiveId, +string value +); +``` + +**Parameters** + +Refer to the section PutString Method Parameters and Return value. + +**Returns** + +Refer to the section PutString Method Parameters and Return value. + +### PutString Method (string, int, string) + +Provides a method to set the value of an element of a string array attribute by name. + +**Syntax** + +```csharp +public bool PutString( +string fullName, +int index, +string value +); +``` + +**Parameters** + +Refer to the section PutString Method Parameters and Return value. + +**Returns** + +Refer to the section PutString Method Parameters and Return value. + +### PutString Method (string, string, CMxDataQuality) + +Provides a method to set the value and quality of a string attribute by name. + +**Syntax** + +```csharp +public bool PutString( +string fullName, +string value, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutString Method Parameters and Return value. + +**Returns** + +Refer to the section PutString Method Parameters and Return value. + +### PutString Method (short, short, int, string) + +Provides a method to set the value of an element of a string array attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutString( +short attributeId, +short primitiveId, +int index, +string value +); +``` + +**Parameters** + +Refer to the section PutString Method Parameters and Return value. + +**Returns** + +Refer to the section PutString Method Parameters and Return value. + +### PutString Method (short, short, string, CMxDataQuality) + +Provides a method to set the value and quality of a string attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutString( +short attributeId, +short primitiveId, +string value, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutString Method Parameters and Return value. + +**Returns** + +Refer to the section PutString Method Parameters and Return value. + +### PutString Method (string, string, DateTime, CMxDataQuality) + +Provides a method to set the value, time, and quality of a string attribute by name. + +**Syntax** + +```csharp +public bool PutString( +string fullName, +string value, +DateTime time, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutString Method Parameters and Return value. + +**Returns** + +Refer to the section PutString Method Parameters and Return value. + +### PutString Method (short, short, string, DateTime, CMxDataQuality) + +Provides a method to set the value, time, and quality of a string attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutString( +short attributeId, +short primitiveId, +string value, +DateTime time, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutString Method Parameters and Return value. + +**Returns** + +Refer to the section PutString Method Parameters and Return value. + +### PutString Method Parameters and Return value + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`Value`** + +The string value. + +**`Index`** + +The string array index. + +**`quality`** + +The quality property for string attribute. The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**`time`** + +The Date and Time for a string attribute. + +**Returns** + +bool + +true: if the string attribute setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutStringArrayQ Method (string, CMxDataQuality) + +Provides a method to set the quality of a string array attribute by its external name. + +**Syntax** + +```csharp +public bool PutStringArrayQ( +string fullName, +CMxDataQuality quality +); +``` + +**Parameters** + +**`fullName`** + +External name of attribute. + +**`quality`** + +The quality property for string array attribute. The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**Returns** + +bool + +true: if the string array attribute quality setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutStringArrayQ Method (short, short, CMxDataQuality) + +Provides a method to set the quality of a string array attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutStringArrayQ( +short attributeId, +short primitiveId, +CMxDataQuality quality +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`quality`** + +The quality property for string array attribute. The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**Returns** + +bool + +true: if the string array attribute quality setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutTime Method (string, VBFILETIME) + +Provides a method to set the value of a time attribute by its external name. + +**Syntax** + +```csharp +public bool PutTime( +string fullName, +ref VBFILETIME value +); +``` + +**Parameters** + +Refer to the section PutTime Method Parameters and Return value. + +**Returns** + +Refer to the section PutTime Method Parameters and Return value. + +### PutTime Method (short, short, VBFILETIME) + +Provides a method to set the value of a time attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutTime( +short attributeId, +short primitiveId, +ref VBFILETIME value +); +``` + +**Parameters** + +Refer to the section PutTime Method Parameters and Return value. + +**Returns** + +Refer to the section PutTime Method Parameters and Return value. + +### PutTime Method (string, int, VBFILETIME) + +Provides a method to set the value of an element of a time array attribute by name. + +**Syntax** + +```csharp +public bool PutTime( +string fullName, +int index, +ref VBFILETIME value +); +``` + +**Parameters** + +Refer to the section PutTime Method Parameters and Return value. + +**Returns** + +Refer to the section PutTime Method Parameters and Return value. + +### PutTime Method (string, VBFILETIME, CMxDataQuality) + +Provides a method to set the value and quality of a time attribute by name. + +**Syntax** + +```csharp +public bool PutTime( +string fullName, +ref VBFILETIME value, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutTime Method Parameters and Return value. + +**Returns** + +Refer to the section PutTime Method Parameters and Return value. + +### PutTime Method (short, short, int, VBFILETIME) + +Provides a method to set the value of an element of a time array attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutTime( +short attributeId, +short primitiveId, +int index, +ref VBFILETIME value +); +``` + +**Parameters** + +Refer to the section PutTime Method Parameters and Return value + +**Returns** + +Refer to the section PutTime Method Parameters and Return value + +### PutTime Method (short, short, VBFILETIME, CMxDataQuality) + +Provides a method to set the value and quality of a time attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutTime( +short attributeId, +short primitiveId, +ref VBFILETIME value, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutTime Method Parameters and Return value + +**Returns** + +Refer to the section PutTime Method Parameters and Return value + +### PutTime Method (string, VBFILETIME, DateTime, CMxDataQuality) + +Provides a method to set the value, time, and quality of a time attribute by name. + +**Syntax** + +```csharp +public bool PutTime( +string fullName, +ref VBFILETIME value, +DateTime time, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutTime Method Parameters and Return value + +**Returns** + +Refer to the section PutTime Method Parameters and Return value + +### PutTime Method (short, short, VBFILETIME, DateTime, CMxDataQuality) + +Provides a method to set the value, time, and quality of a time attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutTime( +short attributeId, +short primitiveId, +ref VBFILETIME value, +DateTime time, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section PutTime Method Parameters and Return value. + +**Returns** + +Refer to the section PutTime Method Parameters and Return value. + +### PutTime Method Parameters and Return value + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`Value`** + +The Time attribute value. The Time value can be set as shown below: + +VBFILETIME val = CMxValue.DateTimeToVBFT(DateTime.Now); + +PutTime("TimeAttr", ref val); + +**`Index`** + +The Time array index. + +**`quality`** + +The quality property for Time attribute. The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**`time`** + +The Date and Time for a Time attribute. + +**Returns** + +bool + +true: if the Time attribute setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutTimeArrayQ Method (string, CMxDataQuality) + +Provides a method to set the quality of a Time array attribute by its external name. + +**Syntax** + +```csharp +public bool PutTimeArrayQ( +string fullName, +CMxDataQuality quality +); +``` + +**Parameters** + +**`fullName`** + +External name of attribute. + +**`quality`** + +The quality property for Time array attribute. The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**Returns** + +bool + +true: if the Time array attribute quality setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutTimeArrayQ Method (short, short, CMxDataQuality) + +Provides a method to set the quality of a Time array attribute by its ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutTimeArrayQ( +short attributeId, +short primitiveId, +CMxDataQuality quality +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`quality`** + +The quality property for Time array attribute. The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +**Returns** + +bool + +true: if the Time array attribute quality setting is successful. + +false: if the user tries to access a non-existing attribute. + +### PutTimeStamp Method (string, MxDataType, DateTime) + +Provides a method to set the time of an attribute by name. + +**Syntax** + +```csharp +public bool PutTimeStamp( +string fullName, +MxDataType dataType, +DateTime time +); +``` + +**Parameters** + +Refer to the section PutTimeStamp Method Parameters and Return value + +**Returns** + +Refer to the section PutTimeStamp Method Parameters and Return value + +### PutTimeStamp Method (short, short, MxDataType, DateTime) + +Provides a method to set the time of an attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public bool PutTimeStamp( +short attributeId, +short primitiveId, +MxDataType dataType, +DateTime time +); +``` + +**Parameters** + +Refer to the section PutTimeStamp Method Parameters and Return value. + +**Returns** + +Refer to the section PutTimeStamp Method Parameters and Return value. + +### PutTimeStamp Method Parameters and Return value + +**Parameters** + +**`fullName`** + +External name of an attribute. + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`dataType`** + +The Datatype of an attribute. The supported datatype are: + +MxBoolean + +MxInteger + +MxFloat + +MxDouble + +MxString + +MxTime + +MxElapsedTime + +MxReferenceType + +MxStatusType + +MxDataTypeEnum + +MxQualifiedEnum + +MxQualifiedStruct + +**`time`** + +The time property of an attribute. + +**Returns** + +bool + +true: if the attribute time setting is successful. + +false: if the user tries to access a non-existing attribute. + +### RecreateDynamicAttributes Method + +Provides a method to recreate dynamic attributes supported by failover. + +**Syntax** + +```csharp +public void RecreateDynamicAttributes(); +``` + +### RestoreDynamicAttributes Method + +Provides a method to recreate dynamic attributes supported by failover and set their value if the object is starting up from standby. Use this method to restore the dynamic attribute’s values if the startup context is Checkpoint or Failover. + +**Syntax** + +```csharp +public void RestoreDynamicAttributes(); +``` + +### SendEvent Method + +Provides a method to cause an Attributes Set Handler to execute using the Attributes External Name (report a data change). + +**Syntax** + +```csharp +public bool SendEvent( +string name, +string oldValue, +string newValue, +string description +); +``` + +**Parameters** + +**`name`** + +External name of an attribute. + +**`oldValue`** + +Old value of an attribute. + +**`newValue`** + +New value of an attribute. + +**`description`** + +The custom string specifies the description of change. + +**Returns** + +bool + +### SetDataToFailoverField Method + +Provides a method to set a C# object to the failover attribute. + +**Syntax** + +```csharp +public void SetDataToFailoverField(object data); +``` + +**Parameters** + +**`data`** + +The data object. + +### SetHandler Method + +Provides a method to perform custom execution logic based upon a change of data for a particular attribute. + +**Syntax** + +```csharp +public void SetHandler( +ref AttributeHandle pAttributeHandle, +ref SetInfo pInfo, +IMxValue pMxValue, +ref MxStatus pMxStatus +); +``` + +**Parameters** + +**`pAttributeHandle`** + +Specifies which property of which attribute is attempting to be set. + +**`pInfo`** + +Specifies additional information regarding this set attribute. + +**`pMxValue`** + +Specifies the value of the property to be set. + +**`pMxStatus`** + +Specifies the return status of the set. + +### SetNumElementsEx Method (string, int) + +Provides a method to set the number of elements of an array attribute by name. + +**Syntax** + +```csharp +public bool SetNumElementsEx( +string fullName, +int numElements +); +``` + +**Parameters** + +**`fullName`** + +Name of an array attribute. + +**`numElements`** + +The number of elements of an array attribute. + +**Returns** + +bool + +true: if the array attribute number of elements setting is successful. + +false: if the user tries to access a non-existing attribute. + +### SetNumElementsEx Method (short, short, int) + +Provides a method to set the number of elements of an array attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public bool SetNumElementsEx( +short attributeId, +short primitiveId, +int numElements +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`numElements`** + +The number of elements of an array attribute. + +**Returns** + +bool + +true: if the array attribute number of elements setting is successful. + +false: if the user tries to access a non-existing attribute. + +### SetQ Method (string, CMxDataQuality) + +Provides a method to set the quality of an attribute by name. + +**Syntax** + +```csharp +public void SetQ( +string fullName, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section SetQ Method Parameters and Return value + +### SetQ Method (short, short, CMxDataQuality) + +Provides a method to set the quality of an attribute by ID and Primitive ID. + +**Syntax** + +```csharp +public void SetQ( +short attributeId, +short primitiveId, +CMxDataQuality quality +); +``` + +**Parameters** + +Refer to the section SetQ Method Parameters and Return value. + +### SetQ Method Parameters and Return value + +**Parameters** + +**`fullName`** + +External name of the attribute. + +**`attributeId`** + +Attribute ID. + +**`primitiveId`** + +Primitive ID of an attribute. + +**`quality`** + +The quality property of an attribute. The supported quality types are: + +DataQualityBad + +DataQualityGood + +DataQualityInitializing + +DataQualityUncertain + +DataQualityUnknown + +### SetScanState Method + +Provides a wrapper to fire the SetScanState event. + +**Syntax** + +```csharp +public void SetScanState(bool bOnScan); +``` + +**Parameters** + +**`bOnScan`** + +true: OnScan state. + +false: OffScan state. + +### StandbyStartup Method + +Provide indication if object is starting up from standby. + +**Syntax** + +```csharp +public bool StandbyStartup(); +``` + +**Returns** + +bool + +### SuspendLocalAttribute Method (string) + +Provides a method to suspend an attribute. This function is called by auto-generated toolkit code and is typically not to be used by the Object Developer. + +**Syntax** + +```csharp +public bool SuspendLocalAttribute( +string attributeName +); +``` + +**Parameters** + +**`attributeName`** + +External name of an attribute. + +**Returns** + +bool + +### SuspendLocalAttribute Method (short, string) + +Provides a method to activate an attribute. This function is called by auto-generated toolkit code and is not to be used by the Object Developer. + +**Syntax** + +```csharp +public bool SuspendLocalAttribute( +short attributeId, +string attributeName +); +``` + +**Parameters** + +**`attributeId`** + +Attribute ID. + +**`attributeName`** + +External name of an attribute. + +**Returns** + +bool + +### SuspendPrimitiveAttribute Method (string) + +Provides a method to suspend an attribute of a child primitive, reusable primitive, or an utility primitive. + +**Syntax** + +```csharp +public bool SuspendPrimitiveAttribute( +string fullAttributeName +); +``` + +**Parameters** + +**`fullAttributeName`** + +The name of the primitive attribute. The name fullAttributeName format should be "PrimitiveName.AttributeName". + +**Returns** + +bool + +### SuspendPrimitiveAttribute Method (short, short) + +Provides a method to activate an attribute of a child primitive, reusable primitive, or utility primitive. + +**Syntax** + +```csharp +public bool SuspendPrimitiveAttribute( +short attributeId, +short primitiveId +); +``` + +**Parameters** + +**`attributeId`** + +The primitive's attribute ID. + +**`primitiveId`** + +Primitive ID. + +**Returns** + +bool + +### UpdateDynamicAttributeData Method + +Provides a method to update each dynamic attribute registered for failover with its current name, type, category, security, and set handler flag. + +**Syntax** + +```csharp +public void UpdateDynamicAttributeData(); +``` + +## Nested Type: InputOutputPrimitive Class + +This class provides a wrapper for the InputOutput Primitive. + +**Syntax** + +```csharp +public class InputOutputPrimitive : RuntimeBase.PrimitiveWrapper +``` + +**Remarks** + +The InputOutputPrimitive is derived from RuntimeBase.PrimitiveWrapper and it contains the properties, attributes, and methods associated with the InputOutput Primitives. + +### InputOutputPrimitive Properties + +### InputOutputPrimitive Constructor + +### InputOutputPrimitive Methods + +## Nested Type: InputPrimitive Class + +This class provides a wrapper for Input Primitive. + +**Syntax** + +```csharp +public class InputPrimitive : RuntimeBase.PrimitiveWrapper +``` + +**Remarks** + +The InputPrimitive is derived from RuntimeBase.PrimitiveWrapper and it contains the properties, attributes, and methods associated with the InputPrimitives. + +### InputPrimitive Properties + +### InputPrimitive Constructor + +### InputPrimitive Methods + +## Nested Type: OutputPrimitive Class + +This class provides a wrapper for Output Primitive. + +**Syntax** + +```csharp +public class OutputPrimitive : RuntimeBase.PrimitiveWrapper +``` + +**Remarks** + +The OutputPrimitive is derived from RuntimeBase.PrimitiveWrapper and it contains the properties, attributes, and methods associated with the OutputPrimitives. + +### OutputPrimitive Properties + +### OutputPrimitive Constructor + +### OutputPrimitive Methods + +## Nested Type: PrimitiveWrapper Class + +This class is the base class of all IO Wrappers. + +**Syntax** + +```csharp +public class PrimitiveWrapper +``` + +### PrimitiveWrapper Property + +### PrimitiveWrapper Constructor + +### PrimitiveWrapper Methods diff --git a/aot/reference/RuntimeGetStatusDescEventArgs.md b/aot/reference/RuntimeGetStatusDescEventArgs.md new file mode 100644 index 0000000..6465f29 --- /dev/null +++ b/aot/reference/RuntimeGetStatusDescEventArgs.md @@ -0,0 +1,15 @@ +# RuntimeGetStatusDescEventArgs Class + +Namespace: `ArchestrA.Toolkit` + +This class is the argument to the GetStatusDescription event. + +**Syntax** + +```csharp +public class RuntimeGetStatusDescEventArgs : EventArgs +``` + +## RuntimeGetStatusDescEventArgs Constructor + +## RuntimeGetStatusDescEventArgs Members diff --git a/aot/reference/RuntimeSetHandlerEventArgs.md b/aot/reference/RuntimeSetHandlerEventArgs.md new file mode 100644 index 0000000..d912fba --- /dev/null +++ b/aot/reference/RuntimeSetHandlerEventArgs.md @@ -0,0 +1,15 @@ +# RuntimeSetHandlerEventArgs Class + +Namespace: `ArchestrA.Toolkit` + +RuntimeSetHandlerEventArgs is a class that provides runtime set handlers with the information they need when called. + +**Syntax** + +```csharp +public class RuntimeRuntimeSetHandlerEventArgs : RuntimeSetHandlerEventArgs +``` + +## RuntimeSetHandlerEventArgs Constructor + +## RuntimeSetHandlerEventArgs Members diff --git a/aot/reference/RuntimeSetScanStateEventArgs.md b/aot/reference/RuntimeSetScanStateEventArgs.md new file mode 100644 index 0000000..958a895 --- /dev/null +++ b/aot/reference/RuntimeSetScanStateEventArgs.md @@ -0,0 +1,13 @@ +# RuntimeSetScanStateEventArgs Class + +Namespace: `ArchestrA.Toolkit` + +This class is the argument to the set scan state event. + +**Syntax** + +```csharp +public class RuntimeSetScanStateEventArgs : EventArgs +``` + +## RuntimeSetScanStateEventArgs Constructor diff --git a/aot/reference/RuntimeStartupEventArgs.md b/aot/reference/RuntimeStartupEventArgs.md new file mode 100644 index 0000000..5539cc7 --- /dev/null +++ b/aot/reference/RuntimeStartupEventArgs.md @@ -0,0 +1,13 @@ +# RuntimeStartupEventArgs Class + +Namespace: `ArchestrA.Toolkit` + +This class is the argument for the startup event. + +**Syntax** + +```csharp +public class RuntimeStartupEventArgs : EventArgs +``` + +## RuntimeStartupEventArgs Constructor diff --git a/aot/reference/SetHandlerEventArgs.md b/aot/reference/SetHandlerEventArgs.md new file mode 100644 index 0000000..0e3b9f7 --- /dev/null +++ b/aot/reference/SetHandlerEventArgs.md @@ -0,0 +1,17 @@ +# SetHandlerEventArgs Class + +Namespace: `ArchestrA.Toolkit` + +SetHandlerEventArgs is an inherited class that provides properties that are common to all SetHandlers. + +**Syntax** + +```csharp +public class SetHandlerEventArgs : EventArgs +``` + +## SetHandlerEventArgs Property + +## SetHandlerEventArgs Constructor + +## SetHandlerEventArgs Members diff --git a/aot/reference/SetInfo.md b/aot/reference/SetInfo.md new file mode 100644 index 0000000..3ef6a3f --- /dev/null +++ b/aot/reference/SetInfo.md @@ -0,0 +1,23 @@ +# SetInfo Enumeration + +Namespace: `ArchestrA.Toolkit` + +**Syntax** + +```csharp +struct SetInfo +{ +public ECALLCONTEXTFLAG callContext; +public string engineName; +public int responseId; +public VBGUID userId; +public VBGUID userIdVerifier; +``` + +} + +### Members + +UserId + +For internal use only. diff --git a/aot/reference/StartupInfo.md b/aot/reference/StartupInfo.md new file mode 100644 index 0000000..d96d311 --- /dev/null +++ b/aot/reference/StartupInfo.md @@ -0,0 +1,19 @@ +# StartupInfo Enumeration + +Namespace: `ArchestrA.Toolkit` + +**Syntax** + +```csharp +struct StartupInfo +{ +public VB_LARGE_INTEGER checkpointFiletime; +public ESTARTUPCONTEXT startupContext; +} +``` + +### Members + +startupContext + +Indicates whether object has just been deployed or restarted from checkpoint. diff --git a/aot/reference/VtqBufferReader.md b/aot/reference/VtqBufferReader.md new file mode 100644 index 0000000..a08e8d1 --- /dev/null +++ b/aot/reference/VtqBufferReader.md @@ -0,0 +1,25 @@ +# VtqBufferReader Class + +Namespace: `ArchestrA.Toolkit` + +VtqBufferReader class reads the run-time data of an attribute which is passed as a second argument in the constructor. VtqBufferReader class is derived from IEnumerable, which allows it to be used in a C# foreach statement. + +**Syntax** + +```csharp +public class VtqBufferReader : IEnumerable, IDisposable +``` + +## VtqBufferReader Constructor + +## VtqBufferReader Method + +### GetEnumerator Method + +GetEnumerator returns an enumerator of ValueTimeQuality (VTQ). This function is called implicitly via the C# foreach syntax and provides a standard implementation of IEnumerator. + +**Syntax** + +```csharp +public virtual IEnumerator GetEnumerator(); +``` diff --git a/aot/reference/VtqBufferWriter.md b/aot/reference/VtqBufferWriter.md new file mode 100644 index 0000000..5cee630 --- /dev/null +++ b/aot/reference/VtqBufferWriter.md @@ -0,0 +1,49 @@ +# VtqBufferWriter Class + +Namespace: `ArchestrA.Toolkit` + +The VtqBufferWriter class provides an assortment of AddVtq overloads, one of which is called multiple times to build a buffer of VTQs. The GetBuffer method is then called to retrieve the buffer. + +**Syntax** + +```csharp +public class VtqBufferWriter : IDisposable +``` + +## VtqBufferWriter Constructor + +## VtqBufferWriter Methods + +### AddVtq Method + +VtqBufferWriter method for Boolean data type + +**Syntax** + +```csharp +public void AddVtq(bool value, DateTime dt, CMxDataQuality quality); +``` + +**Parameters** + +**`value`** + +[in] Boolean value to be added into VtqBufferWriter + +**`dt`** + +[in] Timestamp of the value + +**`quality`** + +[in] Quality of the value + +### GetBuffer Method + +Call GetBuffer to retrieve the accumulated buffer from the VtqBufferWriter. The buffer is returned as a custom structure contained in a CMxValue. Calling GetBuffer empties the buffer in the underlying buffer writer. + +**Syntax** + +```csharp +public CMxValue GetBuffer(); +``` diff --git a/aot/reference/aaBaseEditorForm.md b/aot/reference/aaBaseEditorForm.md new file mode 100644 index 0000000..c8ea05e --- /dev/null +++ b/aot/reference/aaBaseEditorForm.md @@ -0,0 +1,141 @@ +# aaBaseEditorForm Class + +Namespace: `ArchestrA.Toolkit` + +aaBaseEditorForm is an User Control and it is the base class of the object Editor project. + +aaBaseEditorForm provides functionality like adding custom tabs to the object editor, Attribute data access, Dictionary access, and ArchestrA logger access. + +**Syntax** + +```csharp +public class aaBaseEditorForm : UserControl, IaaEditorForm, IaaEditorFormInternal, IaaControl +``` + +## aaBaseEditorForm Methods + +### GetData Method (string) + +Provides a method to access attribute value from the Editor project. + +**Syntax** + +```csharp +public object GetData(string sAttribute); +``` + +**Parameters** + +**`sAttribute`** + +Attribute external name. + +**Returns** + +object + +User should typecast the return value to the corresponding datatype. Returns null if the attribute is not found. + +### GetData Method (string, string) + +Provides a method to access attribute information from the Editor project. + +**Syntax** + +```csharp +public object GetData(string sAttribute, string sProperty); +``` + +**Parameters** + +**`sAttribute`** + +Attribute external name. + +**`sProperty`** + +Property to access: + +"Value" to access the attribute's Value. + +"Lock" to access the attribute's Lock status. + +"SecurityClassification" to access the attribute's SecurityClassification. + +**Returns** + +User should typecast the return value to the corresponding datatype. Returns null if the attribute is not found. + +### GetLocalizedText Method (string, string) + +Provides a method to get a string from the dictionary. + +**Syntax** + +```csharp +public object GetLocalizedText(string sPhraseID, string sDictionary); +``` + +**Parameters** + +**`sPhraseID`** + +PhraseID that exists in the dictionary. + +**`sDictionary`** + +Dictionary file path. The 'this.Dictionary' property of the Editor project contains the full path of the object dictionary file and should be used. + +**Returns** + +object + +### SetData Method (string, object) + +Provides a method to set the value of an Attribute by name. + +**Syntax** + +```csharp +public void SetData(string sAttribute, object sVal); +``` + +**Parameters** + +**`sAttribute`** + +Attribute external name. + +**`sVal`** + +Value to set. + +### SetData Method (string, string, object) + +Provides a method to set the value of a property of an Attribute by attribute name. + +**Syntax** + +```csharp +public void SetData(string sAttribute, string sProperty, object sVal); +``` + +**Parameters** + +**`sAttribute`** + +Attribute external name. + +**`sProperty`** + +Property type: + +"Value" in case of Value property. + +"Lock" in case of Lock property. + +"SecurityClassification" in case of SecurityClassification property. + +**`sVal`** + +Value to set. diff --git a/graccesscli/.gitignore b/graccesscli/.gitignore new file mode 100644 index 0000000..94b2bc4 --- /dev/null +++ b/graccesscli/.gitignore @@ -0,0 +1,6 @@ +bin/ +obj/ +publish/ +*.user +*.suo +.vs/ diff --git a/graccesscli/AGENTS.md b/graccesscli/AGENTS.md new file mode 100644 index 0000000..21b6543 --- /dev/null +++ b/graccesscli/AGENTS.md @@ -0,0 +1,154 @@ +# AGENTS.md + +Guidance for coding agents working in the `graccesscli` folder. + +## Project Snapshot + +This folder contains `graccesscli`, a .NET Framework 4.8 x86 CLI for automating AVEVA/Wonderware System Platform Galaxy configuration through the ArchestrA GRAccess COM/.NET interop library. + +The important platform constraint is that GRAccess is a 32-bit COM stack. Do not try to directly load the native GRAccess DLL from a .NET 10 x64 process. The current CLI stays on `net48`, `x86`, and `[STAThread]` for COM compatibility. + +For the detailed local investigation behind this constraint, read [`GRAccess-DLL-and-DotNet10-Notes.md`](GRAccess-DLL-and-DotNet10-Notes.md). Active mutation-path defect tracking lives in [`requirements-mutation-typelib-fix.md`](requirements-mutation-typelib-fix.md). + +## Key Documentation + +All paths below are relative to this `graccesscli/` folder. + +- [`GRAccess-DLL-and-DotNet10-Notes.md`](GRAccess-DLL-and-DotNet10-Notes.md) - local GRAccess DLL, COM registration, architecture, and .NET 10 compatibility findings. +- [`requirements-mutation-typelib-fix.md`](requirements-mutation-typelib-fix.md) - mutation-path COM lifecycle fixes (typelib regression resolved, follow-on defect tracked here). +- [`CLAUDE.md`](CLAUDE.md) - existing detailed agent guide for this CLI. +- [`graccess_documentation.md`](graccess_documentation.md) - full GRAccess Toolkit API reference. +- [`graccess_operations.md`](graccess_operations.md) - GRAccess operations grouped by functional area with page references. +- [`docs/usage.md`](docs/usage.md) - CLI commands, options, session mode, and IPC protocol. Update this whenever user-facing commands change. +- [`docs/llm-integration.md`](docs/llm-integration.md) - LLM-facing operating contract, safety rules, and recommended CLI improvements for System Platform IDE automation. +- [`docs/adding-features.md`](docs/adding-features.md) - checklist for adding commands, dispatcher handlers, capabilities metadata, LLM output, validation, tests, and documentation. +- [`docs/zb-galaxy.md`](docs/zb-galaxy.md) - read-only documentation captured from the live `ZB` galaxy with `graccesscli`. +- [`docs/zb-testmachine.md`](docs/zb-testmachine.md) - deep read-only documentation of the `ZB` `$TestMachine` template family and instances. +- [`docs/template-parsing.md`](docs/template-parsing.md) - read-only workflow for inspecting existing templates such as `TestMachine`. +- [`docs/attribute-parsing.md`](docs/attribute-parsing.md) - detailed workflow for parsing all template attributes and setting families. +- [`docs/script-parsing.md`](docs/script-parsing.md) - workflow for parsing script libraries and object-level scripts. +- [`docs/template-editing.md`](docs/template-editing.md) - end-to-end workflow for safely editing existing templates. +- [`docs/template-instance-editing.md`](docs/template-instance-editing.md) - workflow for creating and editing template instances, areas, engine assignments, and I/O settings. +- [`docs/attribute-editing.md`](docs/attribute-editing.md) - detailed workflow for editing template attributes, UDAs, extensions, and setting families. +- [`docs/script-editing.md`](docs/script-editing.md) - workflow for editing script libraries and script-bearing template content. +- [`usage.md`](usage.md) - compatibility copy of the CLI usage documentation; keep it aligned with [`docs/usage.md`](docs/usage.md) if edited. +- [`docs/README.md`](docs/README.md) - index for CLI documentation stored under `docs/`. +- [`docs/clifx_reference.md`](docs/clifx_reference.md) - local CliFx framework reference. + +## Repository Layout + +```text +graccesscli/ + ZB.MOM.WW.GRAccess.Cli.slnx + lib/ArchestrA.GRAccess.dll + src/ZB.MOM.WW.GRAccess.Cli/ + Program.cs + Commands/ + GRAccess/ + Infrastructure/ + Protocol/ + Session/ + tests/ZB.MOM.WW.GRAccess.Cli.Tests/ +``` + +## Build And Test + +Run commands from this `graccesscli` folder unless noted otherwise. + +```powershell +dotnet build src/ZB.MOM.WW.GRAccess.Cli/ZB.MOM.WW.GRAccess.Cli.csproj -p:Platform=x86 +dotnet test tests/ZB.MOM.WW.GRAccess.Cli.Tests/ZB.MOM.WW.GRAccess.Cli.Tests.csproj -p:Platform=x86 +dotnet test tests/ZB.MOM.WW.GRAccess.Cli.Tests --filter "FullyQualifiedName~TestName" +``` + +Run the CLI: + +```powershell +dotnet run --project src/ZB.MOM.WW.GRAccess.Cli/ZB.MOM.WW.GRAccess.Cli.csproj -- +``` + +## Implementation Rules + +- Keep the CLI and tests targeting `net48` and `x86`. +- Keep the entry point `[STAThread]`; GRAccess COM calls must run on an STA thread. +- Route long-lived GRAccess work through the session daemon infrastructure when appropriate. +- All GRAccess COM access in daemon mode must go through `Session/StaComThread.cs`. +- Keep the `GRAccessApp` object alive for the lifetime of any GRAccess objects derived from it. +- Check `CommandResult.Successful` after GRAccess calls. Multi-object calls return `CommandResults`. +- For object changes, follow `CheckOut()` -> modify -> `Save()` -> `CheckIn(comment)`. Skipping `CheckIn` leaves the object locked in the Galaxy repo. +- Treat GRAccess collections as 1-based unless the API docs prove otherwise. +- Use `using ArchestrA.GRAccess;` for GRAccess API types. +- Use CliFx command patterns already present in the repo: command classes implement `ICommand` and use `[Command]`, `[CommandParameter]`, and `[CommandOption]`. +- C# language version is 9.0. `init` is supported through `IsExternalInit.cs`; do not use the `required` keyword. + +## Session Mode + +Session mode keeps a GRAccess connection open in a daemon to avoid expensive reconnects. + +```powershell +graccess session start --galaxy MyGalaxy --node MyNode +graccess --galaxy MyGalaxy +graccess session status --galaxy MyGalaxy +graccess session stop --galaxy MyGalaxy +``` + +The daemon uses: + +- Session file: `%LOCALAPPDATA%\ZB.MOM.WW.GRAccess.Cli\sessions\{galaxy}.json` +- Log file: `%LOCALAPPDATA%\ZB.MOM.WW.GRAccess.Cli\logs\daemon-{galaxy}.log` +- Named pipe: `graccess-session-{galaxy}` +- Mutex: `Global\graccess-session-{galaxy}` +- IPC: newline-delimited JSON + +See [`docs/usage.md`](docs/usage.md) and [`CLAUDE.md`](CLAUDE.md) before changing session behavior. + +## GRAccess References + +The primary API entry point is `GRAccessAppClass`. + +Typical flow: + +```csharp +GRAccessApp grAccess = new GRAccessAppClass(); +IGalaxies galaxies = grAccess.QueryGalaxies(Environment.MachineName); +IGalaxy galaxy = galaxies["GalaxyName"]; +galaxy.Login("", ""); +// work with galaxy +galaxy.Logout(); +``` + +Object model summary: + +```text +GRAccessApp + IGalaxies -> IGalaxy + IGalaxySecurity / roles / users + IgObjects -> ITemplate / IInstance + IAttributes -> IAttribute + IToolsets + IScriptLibraries + ICommandResults +``` + +For exact method signatures, enum names, and page references, use [`graccess_documentation.md`](graccess_documentation.md) and [`graccess_operations.md`](graccess_operations.md). + +## Current CLI Query Surface + +Galaxy-bound commands route through an active session when one exists, and otherwise fall back to one-shot mode: + +```powershell +graccess object list --galaxy ZB --node . --type instance --pattern '%' +graccess template list --galaxy ZB --node . --pattern '%' +graccess instance list --galaxy ZB --node . --pattern '%' +graccess object attributes --galaxy ZB --node . --name DEV --type instance --configurable +``` + +When a session is active, routed commands can omit `--node` and are dispatched by `SessionDaemon.ExecuteCommandAsync` through `GRAccessCommandDispatcher` on the daemon STA thread. GRAccess `namedLike` patterns use `%` as the wildcard. Attribute metadata should be read defensively because some COM-backed properties can throw when storage is unavailable; unavailable JSON fields are represented as `null`. + +The expanded CLI surface is concentrated in `Commands/GRAccessSurfaceCommands.cs` and routes through `GRAccess/GRAccessCommandDispatcher.cs`. Mutating commands must pass `--confirm` and matching `--confirm-target`; keep that guard in place for delete, deploy, restore, migrate, import, GRLoad, and object configuration changes. + +LLM-facing automation is documented in [`docs/llm-integration.md`](docs/llm-integration.md). Preserve legacy `--json` shapes; use `--llm-json` for stable envelopes. Keep `capabilities`, `validate`, `batch`, `object snapshot`, attribute value commands, object script commands, and area/engine/I/O wrappers aligned with `CommandCapabilityRegistry`. + +For deep read-only parsing, prefer `object snapshot`, `object lineage`, and `object children` with `--llm-json`. These commands should use direct GRAccess typed reads first and may use temporary GRAccess-exported package parsing for lineage, contained objects, attribute values, and script bodies when direct COM properties are unavailable. Normal CLI behavior must not query the Galaxy Repository SQL database; SQL access is development verification/debugging only. + +When adding new CLI features, follow [`docs/adding-features.md`](docs/adding-features.md) and update user-facing docs in the same change. diff --git a/graccesscli/ArchestrA.GRAccess.dll b/graccesscli/ArchestrA.GRAccess.dll new file mode 100644 index 0000000..731006e Binary files /dev/null and b/graccesscli/ArchestrA.GRAccess.dll differ diff --git a/graccesscli/CLAUDE.md b/graccesscli/CLAUDE.md new file mode 100644 index 0000000..7c7469f --- /dev/null +++ b/graccesscli/CLAUDE.md @@ -0,0 +1,169 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Project Overview + +This is a .NET Framework 4.8 console application (CLI) for automating Aveva System Platform Galaxy configuration via the **ArchestrA GRAccess** COM/.NET library. The GRAccess API exposes a hierarchical object model rooted at `GRAccessAppClass` for programmatically managing Galaxies, templates, instances, attributes, users, roles, and security. + +## Key References + +- **GRAccess documentation**: `graccess_documentation.md` (full API reference, type definitions, code examples) +- **GRAccess DLL**: `lib/ArchestrA.GRAccess.dll` — COM interop assembly, referenced by the CLI csproj +- **GRAccess operations**: `graccess_operations.md` - all library operations organized by functional area with page references +- **CLI usage**: `docs/usage.md` - all CLI commands, options, session mode, IPC protocol. **Must be updated whenever commands are added or changed.** +- **LLM integration**: `docs/llm-integration.md` - implemented LLM-facing operating contract, stable envelope, safety rules, validation, batch plans, and IDE intent wrappers. +- **Adding features**: `docs/adding-features.md` - checklist for adding commands, dispatcher handlers, capabilities metadata, LLM output, validation, tests, and documentation. +- **ZB galaxy documentation**: `docs/zb-galaxy.md` - read-only documentation captured from the live `ZB` galaxy with `graccess_cli`. +- **ZB TestMachine documentation**: `docs/zb-testmachine.md` - deep read-only documentation of the `ZB` `$TestMachine` template family and instances. +- **Template parsing**: `docs/template-parsing.md` - read-only workflow for inspecting existing templates such as `TestMachine`. +- **Attribute parsing**: `docs/attribute-parsing.md` - detailed workflow for parsing all template attributes and setting families. +- **Script parsing**: `docs/script-parsing.md` - workflow for parsing script libraries and object-level scripts. +- **Template editing**: `docs/template-editing.md` - end-to-end workflow for safely editing existing templates. +- **Template instance editing**: `docs/template-instance-editing.md` - workflow for creating and editing template instances, areas, engine assignments, and I/O settings. +- **Attribute editing**: `docs/attribute-editing.md` - detailed workflow for editing template attributes, UDAs, extensions, and setting families. +- **Script editing**: `docs/script-editing.md` - workflow for editing script libraries and script-bearing template content. +- **CliFx reference**: `docs/clifx_reference.md` - local copy of CliFx framework docs (commands, parameters, options, DI, testing) +- The DLL's default GAC path is `C:\Windows\assembly\GAC\Archestra.GRAccess\1.7.0.0_23106a86e706d0ae\Archestra.GRAccess.dll` + +## Solution Layout + +``` +ZB.MOM.WW.GRAccess.Cli.slnx +├── lib/ArchestrA.GRAccess.dll +├── docs/usage.md +├── docs/llm-integration.md +├── docs/adding-features.md +├── docs/zb-galaxy.md +├── docs/zb-testmachine.md +├── docs/template-parsing.md +├── docs/attribute-parsing.md +├── docs/script-parsing.md +├── docs/template-editing.md +├── docs/template-instance-editing.md +├── docs/attribute-editing.md +├── docs/script-editing.md +├── docs/clifx_reference.md +├── graccess_documentation.md +├── graccess_operations.md +├── src/ZB.MOM.WW.GRAccess.Cli/ # CLI project (net48, x86, CliFx) +│ ├── Program.cs # Dual entry: CLI mode or --daemon mode +│ ├── IsExternalInit.cs # Polyfill for init accessors on net48 +│ ├── Commands/Session/ # session start|stop|status commands +│ ├── Session/ # Daemon infrastructure +│ │ ├── StaComThread.cs # STA thread + Win32 message pump +│ │ ├── SessionDaemon.cs # Named pipe server, idle timeout +│ │ ├── SessionClient.cs # Named pipe client +│ │ └── SessionInfo.cs # Session state file (PID, pipe name) +│ ├── GRAccess/ +│ │ ├── GRAccessConnection.cs # Wraps connect/login/logout +│ │ └── PackageSnapshot.cs # Read-only exported package parser for deep snapshots +│ ├── Protocol/ # IPC message DTOs +│ │ ├── PipeRequest.cs +│ │ ├── PipeResponse.cs +│ │ └── PipeProtocol.cs +│ └── Infrastructure/ +│ └── CommandRouter.cs # Routes via session or one-shot +└── tests/ZB.MOM.WW.GRAccess.Cli.Tests/ # xunit + Shouldly +``` + +## Build & Test Commands + +```bash +# Build +dotnet build src/ZB.MOM.WW.GRAccess.Cli/ZB.MOM.WW.GRAccess.Cli.csproj -p:Platform=x86 + +# Run CLI +dotnet run --project src/ZB.MOM.WW.GRAccess.Cli/ZB.MOM.WW.GRAccess.Cli.csproj -- + +# Run all tests +dotnet test tests/ZB.MOM.WW.GRAccess.Cli.Tests/ZB.MOM.WW.GRAccess.Cli.Tests.csproj -p:Platform=x86 + +# Run a single test +dotnet test tests/ZB.MOM.WW.GRAccess.Cli.Tests/ --filter "FullyQualifiedName~TestName" +``` + +Target framework is **.NET Framework 4.8** (SDK-style csproj). Must target **x86** (both CLI and test projects) because GRAccess is a 32-bit COM component. Uses **CliFx** for CLI parsing — commands are classes implementing `ICommand` with `[Command]`, `[CommandParameter]`, and `[CommandOption]` attributes. C# 9.0 `init` accessors require the `IsExternalInit.cs` polyfill; `required` keyword is not available. + +## Session Architecture + +The CLI supports two execution modes to avoid expensive repeated GRAccess connections: + +### One-shot mode (default) +Opens connection, runs command, closes. Simple but slow. + +### Session mode +```bash +graccess session start --galaxy MyGalaxy --node MyNode # spawns daemon +graccess session status --galaxy MyGalaxy # check status +graccess --galaxy MyGalaxy # routes via daemon +graccess session stop --galaxy MyGalaxy # tears down +``` + +**How it works:** Same binary, two codepaths. `--daemon` hidden flag (bypasses CliFx) launches the daemon which: +1. Acquires a `Mutex` (`Global\graccess-session-{galaxy}`) for single-instance +2. Starts a `StaComThread` (STA thread + Win32 message pump for COM interop) +3. Connects to the galaxy on the STA thread +4. Writes session info to `%LOCALAPPDATA%\ZB.MOM.WW.GRAccess.Cli\sessions\{galaxy}.json` +5. Listens on named pipe `graccess-session-{galaxy}` for JSON requests +6. Auto-exits after idle timeout (default 30 min) + +**IPC protocol:** Newline-delimited JSON over named pipes. Request types: `execute`, `shutdown`, `status`. + +**`CommandRouter`** detects active sessions via `SessionClient.TryConnect()` and routes commands through the pipe. Falls back to one-shot if no session is running. + +**Key constraint:** All GRAccess COM calls must execute on the `StaComThread`. The daemon marshals work via `RunAsync(Func)` which posts to a `ConcurrentQueue` and wakes the message pump with `PostThreadMessage(WM_APP)`. + +For LLM/deep parsing, prefer `object snapshot`, `object lineage`, and `object children` with `--llm-json`. These commands use typed GRAccess reads first and can fall back to temporary GRAccess-exported package parsing for lineage, contained objects, scalar attribute values, and script bodies. Normal CLI behavior must not query the Galaxy Repository SQL database; SQL is only for development verification/debugging. + +## GRAccess API Patterns + +All GRAccess code must follow these patterns: + +1. **Entry point must use `[STAThread]`** — GRAccess is a COM STA component +2. **`GRAccessApp` must stay in scope** for the lifetime of any GRAccess objects — do not let it get garbage collected +3. **Error handling**: Check `CommandResult.Successful` after every API call. Multi-object operations return `CommandResults` (plural). These work like `GetLastError` in C++. +4. **Workflow for modifying objects**: `CheckOut()` → make changes → `Save()` → `CheckIn(comment)` +5. **Collections are 1-based**, not 0-based +6. **Namespace**: `using ArchestrA.GRAccess;` — classes are `GRAccessAppClass`, `MxValueClass`, etc. + +### Typical connection flow + +```csharp +GRAccessApp grAccess = new GRAccessAppClass(); +IGalaxies galaxies = grAccess.QueryGalaxies(Environment.MachineName); +IGalaxy galaxy = galaxies["GalaxyName"]; +galaxy.Login("", ""); +// ... work with galaxy ... +galaxy.Logout(); +``` + +## GRAccess Object Model Hierarchy + +``` +GRAccessApp (root) +├── IGalaxies → IGalaxy +│ ├── IGalaxySecurity → ISecurityGroups → ISecurityGroup +│ ├── IGalaxyRoles → IGalaxyRole → IGalaxyUsers → IGalaxyUser +│ └── IgObjects (QueryObjects/QueryObjectsByName) +│ ├── ITemplate → CreateInstance() → IInstance +│ └── IInstance (CheckOut/Save/CheckIn/Deploy/Undeploy) +│ └── IAttributes → IAttribute (Get/SetValue via MxValue) +├── IToolsets → IToolset +├── IScriptLibraries → IScriptLibrary +└── ICommandResults → ICommandResult +``` + +## Important Type Definitions + +- **`EgObjectIsTemplateOrInstance`**: `gObjectIsTemplate` or `gObjectIsInstance` — used in query methods +- **`MxDataType`**: `MxString`, `MxInteger`, `MxFloat`, `MxBoolean`, etc. +- **`MxAttributeCategory`**: `MxCategoryWriteable_USC_Lockable`, etc. +- **`EAuthenticationMode`**: `galaxyAuthenticationMode`, `osAuthenticationMode` +- **`MxValue`/`MxValueClass`**: Universal value container (like Variant), handles type conversions automatically + +## Platform Requirements + +- Must run on a machine with Aveva System Platform (Application Server) installed, or have the GRAccess DLL registered +- For remote machine access, the OSConfigUtility must have been run +- On 64-bit OS, the import path must include `(x86)`: `C:\Program Files (x86)\ArchestrA\Framework\Bin\` diff --git a/graccesscli/GRAccess-DLL-and-DotNet10-Notes.md b/graccesscli/GRAccess-DLL-and-DotNet10-Notes.md new file mode 100644 index 0000000..e895033 --- /dev/null +++ b/graccesscli/GRAccess-DLL-and-DotNet10-Notes.md @@ -0,0 +1,149 @@ +# AVEVA GRAccess DLL and .NET 10 Notes + +Date: 2026-04-26 + +## Installed GRAccess files + +Primary AVEVA/System Platform GRAccess files found on this machine: + +| Path | Purpose | Runtime / architecture | +| --- | --- | --- | +| `C:\Program Files (x86)\Common Files\ArchestrA\Framework\Bin\GRAccess.dll` | Main GRAccess COM in-process server | Native PE32 x86, file version `5200.0051.1991.1` | +| `C:\Program Files (x86)\Common Files\ArchestrA\ArchestrA.GRAccess.dll` | .NET COM interop assembly | IL-only, CLR v2 metadata, assembly version `2.0.0.0`, file version `2000.0002.1957.1` | +| `C:\Windows\assembly\GAC\ArchestrA.GRAccess\2.0.0.0__23106a86e706d0ae\ArchestrA.GRAccess.dll` | GAC copy of the interop assembly | Same assembly version `2.0.0.0` | +| `C:\Program Files (x86)\ArchestrA\Framework\Bin\GRAccessApp.exe` | GRAccess COM out-of-process server | Native PE32 x86, file version `5200.0051.1991.1` | +| `C:\Program Files (x86)\Common Files\ArchestrA\GRAccess20.tlb` | Current GRAccess type library | COM metadata | + +Older type libraries are also installed in: + +`C:\Program Files (x86)\Common Files\ArchestrA` + +Files present: + +- `GRAccess10.tlb` +- `GRAccess11.tlb` +- `GRAccess111.tlb` +- `GRAccess12.tlb` +- `GRAccess13.tlb` +- `GRAccess14.tlb` +- `GRAccess15.tlb` +- `GRAccess16.tlb` +- `GRAccess17.tlb` +- `GRAccess18.tlb` +- `GRAccess19.tlb` +- `GRAccess20.tlb` + +AutoBuild-related GRAccess files: + +| Path | Purpose | Runtime / architecture | +| --- | --- | --- | +| `C:\Program Files (x86)\Wonderware\OI-Server\AutoBuild\Bin\ArchestrA.GRAccess.dll` | AutoBuild interop assembly | IL-only, CLR v2 metadata, assembly version `1.8.0.0` | +| `C:\Program Files (x86)\Wonderware\OI-Server\AutoBuild\Bin\GRAccessUtility.dll` | AutoBuild helper | Managed IL-only, references .NET Framework 4-era assemblies | +| `C:\Program Files (x86)\Wonderware\OI-Server\AutoBuild\Bin\GRAccessProcess.exe` | AutoBuild process helper | Managed IL-only, `32BITREQUIRED` | + +## COM registration + +`GRAccess` / `GRAccess.1` + +- CLSID: `{40F5AD46-FE1A-4D0E-B92D-C643E8D2BDF3}` +- Registered under the 32-bit COM registry view: + `HKLM\SOFTWARE\WOW6432Node\Classes\CLSID\{40F5AD46-FE1A-4D0E-B92D-C643E8D2BDF3}` +- In-process server: + `C:\Program Files (x86)\Common Files\ArchestrA\Framework\Bin\GRAccess.dll` +- Threading model: `Apartment` + +`GRAccessApp` / `GRAccessApp.1` + +- CLSID: `{949654D1-B9C0-468f-B43D-33431004297A}` +- AppID: `{604B52A4-FD85-4F02-9C53-C61B23D2039C}` +- Local server: + `C:\Program Files (x86)\ArchestrA\Framework\Bin\GRAccessApp.exe` +- TypeLib: `{054F998C-9E20-425C-A69D-FCEA0F44442E}` + +The `GRAccessApp` type library registration points to: + +`C:\Program Files (x86)\ArchestrA\Framework\Bin\GRAccessApp.exe` + +## ExportObjects `TYPE_E_LIBNOTREGISTERED` finding + +`IgObjects.ExportObjects(...)` can fail with: + +```text +Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)) +``` + +Two separate issues were verified locally: + +1. .NET publisher policy redirects `ArchestrA.GRAccess` to the GAC `2.0.0.0` interop assembly unless the CLI opts out. The CLI carries and builds against the local `1.7.0.0` interop assembly, which matches the working command surface. `src/ZB.MOM.WW.GRAccess.Cli/App.config` disables publisher policy for `ArchestrA.GRAccess` so the private assembly is used. +2. Late-bound reflection calls against `IgObjects.ExportObjects` can trigger type-library lookup failures even when the typed interface call works. Export/package fallback code should call the strongly typed `IgObjects.ExportObjects(...)`, `IgObjects.ExportObjectsAsProtected(...)`, and `IgObjects.Add(...)` methods instead of using `InvokeMember`. + +After both fixes, this command successfully exports `$TestMachine` from `ZB` to an `.aaPKG`: + +```powershell +graccess objects export --galaxy ZB --node . --type template --name '$TestMachine' --output "$env:TEMP\TestMachine.aaPKG" --export-type exportAsPDF --confirm --confirm-target "$env:TEMP\TestMachine.aaPKG" --llm-json +``` + +## .NET 10 / x64 compatibility notes + +The installed AVEVA GRAccess stack is not a .NET 10, full-managed, x64-compatible DLL stack. + +Key findings: + +- `GRAccess.dll` is native PE32 x86. It cannot be loaded into a .NET 10 x64 process. +- `ArchestrA.GRAccess.dll` is an interop assembly, not the implementation. It contains mostly `[ComImport]` interfaces/classes such as `IGRAccess`, `GRAccessClass`, and `GRAccessAppClass`. +- The interop assembly uses old CLR metadata and references `mscorlib, Version=1.0.5000.0`. +- The in-process COM class `GRAccess` is registered only in the 32-bit COM view. Creating it from 64-bit PowerShell/.NET fails with `REGDB_E_CLASSNOTREG` / `0x80040154`. +- The out-of-process COM class `GRAccessApp` can be created from a 64-bit process because COM can launch the 32-bit local server EXE. +- `GRAccessApp.exe.config` uses: + +```xml + + + +``` + +This is .NET Framework-era hosting/configuration, not .NET 10. + +## Native dependency imports + +`GRAccess.dll` imports these native DLLs: + +```text +ADVAPI32.dll +ATL100.DLL +dbghelp.dll +KERNEL32.dll +MSVCP100.dll +MSVCR100.dll +ole32.dll +OLEAUT32.dll +Secur32.dll +SHLWAPI.dll +USER32.dll +WWPackageManager.DLL +``` + +`GRAccessApp.exe` imports: + +```text +ADVAPI32.dll +ATL100.DLL +dbghelp.dll +KERNEL32.dll +MSVCP100.dll +MSVCR100.dll +ole32.dll +OLEAUT32.dll +SHLWAPI.dll +USER32.dll +``` + +## Practical options for a new .NET 10 project + +For a .NET 10 x64 project, there are three realistic approaches: + +1. Use `GRAccessApp` as an out-of-process COM bridge if its exposed API covers the required operations. +2. Build a 32-bit sidecar process that loads the native GRAccess COM stack, then expose a modern IPC API to .NET 10 x64. +3. Reimplement the needed GRAccess behavior in managed .NET 10 x64 using the type libraries and observed behavior as reference material. + +Do not plan on directly referencing `GRAccess.dll` from .NET 10 x64. It is a 32-bit native COM server. diff --git a/graccesscli/README.md b/graccesscli/README.md new file mode 100644 index 0000000..0facedf --- /dev/null +++ b/graccesscli/README.md @@ -0,0 +1,62 @@ +# graccesscli + +A `.NET Framework 4.8 / x86` CliFx-based CLI for automating AVEVA / Wonderware System Platform Galaxy configuration through the **ArchestrA GRAccess** COM interop library (`ZB.MOM.WW.GRAccess.Cli`). + +## Hard constraints + +GRAccess is a 32-bit COM stack. Skipping any of these will fail at load or corrupt Galaxy state: + +- Target framework / arch: `net48`, `x86`, `[STAThread]`. No exceptions. +- **Cannot** be loaded from a .NET 10 / x64 process — see [`GRAccess-DLL-and-DotNet10-Notes.md`](GRAccess-DLL-and-DotNet10-Notes.md). +- AVEVA System Platform must be installed locally (or `ArchestrA.GRAccess.dll` registered in the GAC at `C:\Windows\assembly\GAC\Archestra.GRAccess\1.7.0.0_23106a86e706d0ae\`). The bundled copy in `lib/` is for build-time reference only. +- In daemon mode, every COM call must be marshalled through [`Session/StaComThread.cs`](src/ZB.MOM.WW.GRAccess.Cli/Session/StaComThread.cs); calling GRAccess from any other thread will deadlock or corrupt state. +- Keep the root `GRAccessApp` alive for the lifetime of any derived `IGalaxy` / `IgObject` handle. +- Mutation flow is fixed: `CheckOut → modify → Save → CheckIn(comment)`. Skipping `CheckIn` leaves the object locked in the Galaxy repo. +- Build requires Visual Studio / MSBuild with the `x86` platform target. + +## Layout + +```text +graccesscli/ + ZB.MOM.WW.GRAccess.Cli.slnx # solution + lib/ArchestrA.GRAccess.dll # bundled COM interop assembly (reference only) + src/ZB.MOM.WW.GRAccess.Cli/ # CLI project (net48, x86, CliFx) + tests/ZB.MOM.WW.GRAccess.Cli.Tests # test project + docs/ # CLI workflows, LLM contract, parsing/editing guides + AGENTS.md # coding-agent rules for this tool + CLAUDE.md # detailed agent guide + graccess_documentation.md # full GRAccess API reference + graccess_operations.md # GRAccess operations grouped by functional area + usage.md # compatibility copy of docs/usage.md + GRAccess-DLL-and-DotNet10-Notes.md # platform / 32-bit COM / .NET 10 incident notes + requirements-mutation-typelib-fix.md # active mutation-path defect tracker +``` + +## Resource index + +| Task | Go to | +| --- | --- | +| Coding-agent rules for working in this folder | [`AGENTS.md`](AGENTS.md) | +| General agent guide (project overview, references) | [`CLAUDE.md`](CLAUDE.md) | +| Full GRAccess API surface (types, methods) | [`graccess_documentation.md`](graccess_documentation.md) | +| GRAccess operations grouped by functional area, with page refs | [`graccess_operations.md`](graccess_operations.md) | +| CLI commands, options, session mode, IPC protocol | [`docs/usage.md`](docs/usage.md) | +| LLM-facing operating contract (envelopes, safety, batch) | [`docs/llm-integration.md`](docs/llm-integration.md) | +| Add a new CLI command end-to-end | [`docs/adding-features.md`](docs/adding-features.md) | +| Inspect / read existing templates (read-only) | [`docs/template-parsing.md`](docs/template-parsing.md) | +| Parse template attributes and setting families | [`docs/attribute-parsing.md`](docs/attribute-parsing.md) | +| Parse script libraries and object-level scripts | [`docs/script-parsing.md`](docs/script-parsing.md) | +| Edit existing templates safely | [`docs/template-editing.md`](docs/template-editing.md) | +| Create / edit template instances, areas, engine assignments, I/O | [`docs/template-instance-editing.md`](docs/template-instance-editing.md) | +| Edit template attributes, UDAs, extensions, setting families | [`docs/attribute-editing.md`](docs/attribute-editing.md) | +| Edit script libraries and script-bearing template content | [`docs/script-editing.md`](docs/script-editing.md) | +| Live `ZB` galaxy reference (read-only capture) | [`docs/zb-galaxy.md`](docs/zb-galaxy.md) | +| Live `ZB` `$TestMachine` template family reference | [`docs/zb-testmachine.md`](docs/zb-testmachine.md) | +| CliFx framework reference (commands, options, DI, testing) | [`docs/clifx_reference.md`](docs/clifx_reference.md) | +| GRAccess DLL / 32-bit COM / .NET 10 platform notes | [`GRAccess-DLL-and-DotNet10-Notes.md`](GRAccess-DLL-and-DotNet10-Notes.md) | +| Active mutation-path COM lifecycle defects | [`requirements-mutation-typelib-fix.md`](requirements-mutation-typelib-fix.md) | +| Index for `docs/` only | [`docs/README.md`](docs/README.md) | + +## Maintenance + +Documentation rules live in [`../DOCS-GUIDE.md`](../DOCS-GUIDE.md); the root task → tool index lives in [`../CLAUDE.md`](../CLAUDE.md). When adding, renaming, or removing any doc in this folder, update the resource index above in the same change. When the user-facing CLI surface changes, update [`docs/usage.md`](docs/usage.md) (and keep [`usage.md`](usage.md) aligned). diff --git a/graccesscli/ZB.MOM.WW.GRAccess.Cli.slnx b/graccesscli/ZB.MOM.WW.GRAccess.Cli.slnx new file mode 100644 index 0000000..f25a32d --- /dev/null +++ b/graccesscli/ZB.MOM.WW.GRAccess.Cli.slnx @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/graccesscli/docs/README.md b/graccesscli/docs/README.md new file mode 100644 index 0000000..4f999d9 --- /dev/null +++ b/graccesscli/docs/README.md @@ -0,0 +1,17 @@ +# GRAccess CLI Documentation + +This folder stores user-facing and implementation reference documentation for `graccess_cli`. + +- `usage.md` - CLI commands, options, session mode, IPC protocol, and expanded command surface. Update this whenever user-facing commands change. +- `llm-integration.md` - implemented LLM-facing operating contract, stable envelope, safety rules, validation, batch plans, and IDE intent wrappers. +- `adding-features.md` - contributor checklist for adding commands, dispatcher handlers, LLM output, validation, tests, and documentation. +- `zb-galaxy.md` - read-only documentation captured from the live `ZB` galaxy with `graccess_cli`. +- `zb-testmachine.md` - deep read-only documentation of the `ZB` `$TestMachine` template family and instances. +- `template-parsing.md` - read-only workflow for inspecting existing templates such as `TestMachine`. +- `attribute-parsing.md` - detailed workflow for parsing all template attributes and setting families. +- `script-parsing.md` - workflow for parsing script libraries and object-level scripts. +- `template-editing.md` - end-to-end workflow for safely editing existing templates. +- `template-instance-editing.md` - workflow for creating and editing template instances, areas, engine assignments, and I/O settings. +- `attribute-editing.md` - detailed workflow for editing template attributes, UDAs, extensions, and setting families. +- `script-editing.md` - workflow for editing script libraries and script-bearing template content. +- `clifx_reference.md` - local CliFx framework reference. diff --git a/graccesscli/docs/adding-features.md b/graccesscli/docs/adding-features.md new file mode 100644 index 0000000..38cf633 --- /dev/null +++ b/graccesscli/docs/adding-features.md @@ -0,0 +1,192 @@ +# Adding GRAccess CLI Features + +Use this checklist when adding a new `graccess_cli` command, option, output field, dispatcher operation, or LLM-facing workflow. The goal is to keep human CLI behavior, script compatibility, session routing, and LLM automation aligned. + +## First Read + +Before editing code, read the relevant source material: + +- `graccess_operations.md` for the operation family and page references. +- `graccess_documentation.md` for exact GRAccess signatures, enum names, return types, and object model constraints. +- `docs/usage.md` for the current public CLI contract. +- `docs/llm-integration.md` for machine-facing output, validation, batch, and confirmation rules. +- The domain docs that match the feature: parsing, editing, scripts, attributes, or template instances. + +Do not infer COM behavior from names alone. GRAccess methods often return `CommandResult` or `CommandResults` and may expose properties that throw when backing storage is unavailable. + +## Decide The Command Shape + +Choose the smallest command that maps clearly to the GRAccess operation. + +- Use established CliFx patterns: command classes implement `ICommand` and use `[Command]`, `[CommandParameter]`, and `[CommandOption]`. +- Keep galaxy-bound commands routable through `CommandRouter`. +- Keep pre-login galaxy operations one-shot when they cannot use a galaxy-specific session. +- Prefer explicit subcommands over overloaded string modes. +- Preserve existing command names and existing `--json` shapes. +- Add `--llm-json` for machine-stable output when the command is useful to automation. +- Add `--dry-run` to mutating routed commands for validation without invoking mutating COM calls. + +For mutating operations, choose the safety rule before implementation: + +- All mutations require `--confirm`. +- Destructive, deployment, import/export, restore, migrate, GRLoad, and object configuration changes require `--confirm-target `. +- Batch plans must include per-step `confirm: true` and exact `confirm-target`; do not add global mutation confirmation. + +## Register Capabilities + +Every public command intended for automation must be represented in `Infrastructure/CommandCapabilityRegistry.cs`. + +Add or update: + +- Command name. +- Required and optional args. +- Whether it mutates state. +- Whether it supports session routing. +- Whether it requires `--confirm`. +- Whether it requires `--confirm-target`, and which target rule applies. +- Output modes, including `text`, `json`, and `llm-json` where supported. +- Schema name for the request or response family. + +The registry is the source for `graccess capabilities`, `graccess validate`, batch validation, and tests. Do not scrape docs or help output to discover commands. + +## Add The CliFx Wrapper + +Put thin command wrappers in the existing command area that matches the feature: + +- `Commands/GRAccessSurfaceCommands.cs` for most expanded GRAccess operation surface commands. +- `Commands/Objects/*` for established object list/query commands. +- `Commands/Galaxy/*` for galaxy commands. +- `Commands/LlmCommands.cs` for capabilities, validate, and batch behavior. + +Wrapper responsibilities should stay narrow: + +- Parse CLI args. +- Build a structured `Dictionary` request. +- Pass the request to `CommandRouter` for galaxy-bound work. +- Print text, legacy JSON, or LLM JSON exactly once. + +Do not put GRAccess COM logic in command wrappers unless the operation is explicitly one-shot and cannot be session-routed. + +## Route Through The Dispatcher + +Galaxy-bound behavior belongs in `GRAccess/GRAccessCommandDispatcher.cs`. + +When adding a handler: + +- Dispatch by command family and subcommand. +- Keep daemon and one-shot behavior identical by using the same dispatcher path. +- Keep all daemon COM access on `StaComThread`. +- Check GRAccess `CommandResult.Successful` or every result in `CommandResults`. +- For object mutations, follow `CheckOut()` -> modify -> `Save()` -> `CheckIn(comment)`. +- Use defensive reads for optional COM-backed properties. +- Represent unreadable fields as structured unavailable data instead of throwing when a partial result is useful. + +For object-reference assignment, prefer resolving named GRAccess objects first and only fall back to string assignment when the API allows it. + +## Output Rules + +Legacy behavior is part of the contract. + +- Do not change existing `--json` shapes for existing commands. +- `--llm-json` must use the stable envelope: + +```json +{ + "success": true, + "command": "object get", + "galaxy": "ZB", + "target": "TestMachine", + "data": {}, + "commandResult": null, + "warnings": [], + "unavailable": [] +} +``` + +- Failure envelopes must include `success: false`, `error`, `exitCode`, and any useful GRAccess command result details. +- Normal log lines must not pollute `--llm-json` stdout. +- Include unavailable fields in `unavailable` when GRAccess lacks direct support or the local COM layer throws. +- Include `CommandResult` / `CommandResults` details for mutations. + +## Validation And Dry Run + +Validation should catch request-shape and safety issues before COM mutation. + +- Add required args and confirmation rules to `CommandCapabilityRegistry`. +- Ensure `graccess validate --request plan.json --llm-json` catches missing args, unknown commands, and mismatched confirmation targets. +- Ensure `graccess batch --mode validate --llm-json` validates every step. +- Ensure `--dry-run` validates args, routing, and confirmation without calling mutating GRAccess methods. + +If a true GRAccess dry-run is not available, document that dry-run is input and routing validation only. + +## Tests + +Add focused tests for the changed behavior. + +Minimum expected coverage: + +- Capability registry entry for the new command. +- Command parsing for the public CLI shape. +- Dispatcher request mapping from CliFx wrapper to command/subcommand/args. +- Confirmation guard behavior for normal, dry-run, and batch paths when the command mutates. +- Legacy `--json` compatibility if an existing command changed. +- `--llm-json` success and failure envelope shape when LLM output is supported. +- Structured IPC round-trip if the command uses arrays, condition lists, booleans, enums, or object batches. +- Fake or mocked handler tests for session route and one-shot route equivalence when practical. + +Live validation against `ZB` should be read-only unless the test creates an explicitly named disposable object and removes it afterward. Never run wildcard bulk mutation live. + +## Documentation Updates + +Update docs in the same change as the feature. + +Required updates: + +- `docs/usage.md` for every user-facing command, option, output mode, and example. +- `docs/llm-integration.md` for every LLM-facing command, envelope field, batch behavior, validation behavior, or safety rule. +- `docs/README.md` if a new documentation page is added. +- `AGENTS.md` and `CLAUDE.md` when agent-critical workflows, constraints, or references change. + +Domain-specific updates: + +- Parsing commands: update `template-parsing.md`, `attribute-parsing.md`, or `script-parsing.md`. +- Editing commands: update `template-editing.md`, `template-instance-editing.md`, `attribute-editing.md`, or `script-editing.md`. +- IDE intent wrappers: update `template-instance-editing.md` and `llm-integration.md`. +- Safety changes: update all docs that include mutation examples. + +Documentation should include: + +- Command syntax. +- Required flags. +- Confirmation requirements. +- Session behavior. +- `--llm-json` example when useful. +- Any known GRAccess limitation or unavailable field behavior. + +## Implementation Checklist + +Use this order for most features: + +1. Find the GRAccess API operation and confirm signatures. +2. Design the CLI command and safety rule. +3. Add or update capability registry metadata. +4. Add the CliFx wrapper. +5. Add the dispatcher handler. +6. Preserve legacy output and add `--llm-json` if machine-facing. +7. Add validation, dry-run, and batch support where applicable. +8. Add tests. +9. Update docs. +10. Run build and tests. +11. Run read-only smoke validation against `ZB` when the feature can be safely verified. + +## Common Pitfalls + +- Loading GRAccess from x64 or non-STA code. +- Letting `GRAccessApp` go out of scope while derived objects are still in use. +- Changing legacy `--json` output while adding `--llm-json`. +- Returning success for unsupported COM behavior instead of structured unavailable details. +- Adding a command wrapper but forgetting `CommandCapabilityRegistry`. +- Adding a dispatcher handler that only works in one-shot mode. +- Running mutating live validation against real objects or wildcard selections. +- Assuming GRAccess collections are zero-based. +- Forgetting to update `docs/usage.md`. diff --git a/graccesscli/docs/attribute-editing.md b/graccesscli/docs/attribute-editing.md new file mode 100644 index 0000000..5760b90 --- /dev/null +++ b/graccesscli/docs/attribute-editing.md @@ -0,0 +1,270 @@ +# Editing Template Attributes + +This guide describes how to edit template attributes for an existing GRAccess template such as `TestMachine`. + +Read `attribute-parsing.md` first so you know the exact attribute names and current settings before changing anything. + +Run commands from `graccess_cli`. Examples assume an active session: + +```powershell +graccess session start --galaxy ZB --node . +``` + +Without a session, add `--node .` to each command. + +For LLM-driven edits, use `--llm-json` and validate first: + +```powershell +graccess object snapshot --galaxy ZB --name TestMachine --type template --llm-json +graccess object attribute value set --galaxy ZB --name TestMachine --type template --attribute Description --value Updated --data-type string --confirm --confirm-target TestMachine --dry-run --llm-json +``` + +## Edit Flow + +Wrap attribute edits in the standard GRAccess object edit flow: + +```powershell +graccess object checkout --galaxy ZB --name TestMachine --type template --confirm --confirm-target TestMachine + +# Attribute mutation commands. + +graccess object save --galaxy ZB --name TestMachine --type template --confirm --confirm-target TestMachine +graccess object checkin --galaxy ZB --name TestMachine --type template --comment 'Edit template attributes' --confirm --confirm-target TestMachine +``` + +If any mutation fails, do not continue with more changes until the failure is understood. Use `object undo-checkout` when the edit should be discarded. + +## Confirm The Target Attribute + +Before editing a specific attribute: + +```powershell +graccess object attribute get --galaxy ZB --name TestMachine --type template --attribute Description --json +``` + +For setting-family edits, find candidate names first: + +```powershell +graccess object attributes --galaxy ZB --name TestMachine --type template --json +graccess object attributes --galaxy ZB --name TestMachine --type template --configurable --json +graccess object extended-attributes --galaxy ZB --name TestMachine --type template --json +``` + +## Set Attribute Values + +Use `object attribute set`: + +```powershell +graccess object attribute set --galaxy ZB --name TestMachine --type template --attribute Description --value 'Updated description' --data-type string --confirm --confirm-target TestMachine +``` + +Supported `--data-type` values: + +| Data type | Conversion | +|---|---| +| `string` | `MxValue.PutString(...)` | +| `bool`, `boolean`, `mxboolean` | `MxValue.PutBoolean(...)` | +| `int`, `integer`, `mxinteger` | `MxValue.PutInteger(...)` | +| `float`, `mxfloat` | `MxValue.PutFloat(...)` | +| `double`, `mxdouble` | `MxValue.PutDouble(...)` | + +Examples: + +```powershell +graccess object attribute set --galaxy ZB --name TestMachine --type template --attribute EnableFeature --value true --data-type bool --confirm --confirm-target TestMachine + +graccess object attribute set --galaxy ZB --name TestMachine --type template --attribute ScanPeriod --value 1000 --data-type int --confirm --confirm-target TestMachine + +graccess object attribute set --galaxy ZB --name TestMachine --type template --attribute Gain --value 1.25 --data-type double --confirm --confirm-target TestMachine +``` + +The current CLI does not support array values, time values, references, or complex `MxValue` payloads. Use export/import or extend `CreateMxValue(...)` when those are needed. + +## Lock Or Unlock Attributes + +Use `object attribute lock`: + +```powershell +graccess object attribute lock --galaxy ZB --name TestMachine --type template --attribute Description --locked MxPropertyUnlocked --confirm --confirm-target TestMachine +``` + +The `--locked` value must match a local `MxPropertyLockedEnum` member. The enum parser is case-insensitive and also accepts values with or without a `galaxy_` prefix when such a prefix exists. + +## Change Attribute Security + +Use `object attribute security`: + +```powershell +graccess object attribute security --galaxy ZB --name TestMachine --type template --attribute Description --security MxSecurityOperate --confirm --confirm-target TestMachine +``` + +The `--security` value must match a local `MxSecurityClassification` member. + +## Change Attribute Buffer Flag + +Use `object attribute buffer`: + +```powershell +graccess object attribute buffer --galaxy ZB --name TestMachine --type template --attribute Description --has-buffer --confirm --confirm-target TestMachine +``` + +To clear the flag, omit `--has-buffer`: + +```powershell +graccess object attribute buffer --galaxy ZB --name TestMachine --type template --attribute Description --confirm --confirm-target TestMachine +``` + +## Add A UDA + +Use `object uda add`: + +```powershell +graccess object uda add --galaxy ZB --name TestMachine --type template --uda CustomCode --data-type MxString --category MxCategoryWriteable_USC --security MxSecurityUndefined --confirm --confirm-target TestMachine +``` + +Array UDA: + +```powershell +graccess object uda add --galaxy ZB --name TestMachine --type template --uda CustomArray --data-type MxString --category MxCategoryWriteable_USC --security MxSecurityUndefined --is-array --array-count 10 --confirm --confirm-target TestMachine +``` + +## Rename, Update, Or Delete A UDA + +Rename: + +```powershell +graccess object uda rename --galaxy ZB --name TestMachine --type template --uda CustomCode --new-name CustomCode2 --confirm --confirm-target TestMachine +``` + +Update metadata: + +```powershell +graccess object uda update --galaxy ZB --name TestMachine --type template --uda CustomCode2 --data-type MxString --category MxCategoryWriteable_USC --security MxSecurityUndefined --confirm --confirm-target TestMachine +``` + +Delete: + +```powershell +graccess object uda delete --galaxy ZB --name TestMachine --type template --uda CustomCode2 --confirm --confirm-target TestMachine +``` + +## Edit Extensions + +Use extension commands only when you know the supported extension type and primitive name for the template. + +```powershell +graccess object extension add --galaxy ZB --name TestMachine --type template --extension-type ScriptExtension --primitive OnScan --object-extension --confirm --confirm-target TestMachine +``` + +```powershell +graccess object extension rename --galaxy ZB --name TestMachine --type template --extension-type ScriptExtension --primitive OnScan --new-name OnScan2 --object-extension --confirm --confirm-target TestMachine +``` + +```powershell +graccess object extension delete --galaxy ZB --name TestMachine --type template --extension-type ScriptExtension --primitive OnScan2 --object-extension --confirm --confirm-target TestMachine +``` + +## Edit History Settings + +History settings are usually stored as attributes or extension attributes. First identify candidate names: + +```powershell +$attrs = graccess object attributes --galaxy ZB --name TestMachine --type template --json | ConvertFrom-Json +$extended = graccess object extended-attributes --galaxy ZB --name TestMachine --type template --json | ConvertFrom-Json +$history = (@($attrs) + @($extended)) | Where-Object { + $_.Name -match '(?i)hist|history|historian|storage|trend' +} | Sort-Object Name -Unique + +$history | Select-Object Name, DataType, Category, Locked +``` + +Then edit a known setting with `object attribute set`, lock, security, or buffer commands. Example: + +```powershell +graccess object attribute set --galaxy ZB --name TestMachine --type template --attribute HistoryEnabled --value true --data-type bool --confirm --confirm-target TestMachine +``` + +If the setting value is not a simple string/bool/int/float/double, use export/import or extend CLI value serialization first. + +## Edit I/O Settings + +I/O settings may be attributes, object-reference assignments, or extension payloads. + +Find likely attributes: + +```powershell +$io = (@($attrs) + @($extended)) | Where-Object { + $_.Name -match '(?i)\bio\b|input|output|source|destination|scan|topic|device|address|reference' +} | Sort-Object Name -Unique + +$io | Select-Object Name, DataType, Category, RuntimeSetHandler, ConfigSetHandler +``` + +Edit simple attribute-backed settings: + +```powershell +graccess object attribute set --galaxy ZB --name TestMachine --type template --attribute ScanPeriod --value 1000 --data-type int --confirm --confirm-target TestMachine +``` + +Edit object-level assignment properties with `object set` when applicable: + +```powershell +graccess object set --galaxy ZB --name TestMachine --type template --property host --value AppEngine_001 --confirm --confirm-target TestMachine +``` + +If the COM setter requires an object reference instead of a string, extend the CLI to resolve the named object and assign that object. + +## Edit Alarm Settings + +Alarm settings are commonly attribute-backed. + +Find likely alarm attributes: + +```powershell +$alarm = (@($attrs) + @($extended)) | Where-Object { + $_.Name -match '(?i)alarm|alert|limit|priority|severity|deadband|deviation|rate|roc|hihi|lolo|(^|[._])hi($|[._])|(^|[._])lo($|[._])|ack' +} | Sort-Object Name -Unique + +$alarm | Select-Object Name, DataType, Category, SecurityClassification, Locked +``` + +Edit simple value-backed settings: + +```powershell +graccess object attribute set --galaxy ZB --name TestMachine --type template --attribute AlarmPriority --value 500 --data-type int --confirm --confirm-target TestMachine +``` + +Security and lock changes use the same attribute commands: + +```powershell +graccess object attribute security --galaxy ZB --name TestMachine --type template --attribute AlarmPriority --security MxSecurityOperate --confirm --confirm-target TestMachine +graccess object attribute lock --galaxy ZB --name TestMachine --type template --attribute AlarmPriority --locked MxPropertyLocked --confirm --confirm-target TestMachine +``` + +## Verify Attribute Edits + +After checkin, re-read the edited metadata: + +```powershell +graccess object attribute get --galaxy ZB --name TestMachine --type template --attribute Description --json +graccess object attributes --galaxy ZB --name TestMachine --type template --configurable --json +``` + +The current CLI does not read back attribute values, so value verification requires one of: + +| Need | Path | +|---|---| +| Confirm metadata changed | `object attribute get` or `object attributes` | +| Confirm simple value changed | Add value readback support | +| Confirm full vendor configuration | Export object and compare package content with vendor tooling | + +## Recommended CLI Extension For Full Attribute Editing + +To fully support history, I/O, alarm, and script-related settings as first-class CLI operations, add: + +```text +graccess object attribute value get --galaxy ZB --name TestMachine --type template --attribute AttrName --json +graccess object attribute value set --galaxy ZB --name TestMachine --type template --attribute AttrName --value-json file.json --confirm --confirm-target TestMachine +``` + +The implementation should serialize `IAttribute.Value` defensively and support complex `MxValue` shapes beyond the current scalar `string`, `bool`, `int`, `float`, and `double` conversions. diff --git a/graccesscli/docs/attribute-parsing.md b/graccesscli/docs/attribute-parsing.md new file mode 100644 index 0000000..b221370 --- /dev/null +++ b/graccesscli/docs/attribute-parsing.md @@ -0,0 +1,249 @@ +# Parsing Template Attributes + +This guide describes how to parse attributes for an existing GRAccess template such as `TestMachine`, including the settings families normally needed for template analysis: object properties, attribute metadata, history settings, I/O settings, alarm settings, and extension/UDA settings. + +Run commands from `graccess_cli`. Examples assume an active session: + +```powershell +graccess session start --galaxy ZB --node . +``` + +Without a session, add `--node .` to each command. + +For LLM workflows, start with the stable snapshot envelope: + +```powershell +graccess object snapshot --galaxy ZB --name TestMachine --type template --llm-json +``` + +Then use `object attribute value get --llm-json` for individual scalar value readback. The value command tries direct `IAttribute.Value` first and then the read-only package fallback. + +## Attribute Sources + +Use all three read paths when building a complete parse: + +| Source | Command | Purpose | +|---|---|---| +| Object identity | `object get` | Template tagname, contained name, hierarchy, checkout status | +| All attributes | `object attributes` | Every attribute visible through `IgObject.Attributes` | +| Configurable attributes | `object attributes --configurable` | Attributes visible through `IgObject.ConfigurableAttributes` | +| Extended attributes | `object extended-attributes` | Inherited or hierarchy-expanded attributes from `GetExtendedAttributes` | +| One attribute | `object attribute get` | Metadata for a known attribute | +| One attribute value | `object attribute value get` | Scalar value readback through direct GRAccess or package fallback where supported | + +Base commands: + +```powershell +graccess object get --galaxy ZB --name TestMachine --type template --json +graccess object attributes --galaxy ZB --name TestMachine --type template --json +graccess object attributes --galaxy ZB --name TestMachine --type template --configurable --json +graccess object extended-attributes --galaxy ZB --name TestMachine --type template --json +``` + +## Current CLI Coverage + +The current CLI exposes the stable `IAttribute` metadata listed below. + +| JSON field | GRAccess API member | Notes | +|---|---|---| +| `Name` | `IAttribute.Name` | Attribute name | +| `DataType` | `IAttribute.DataType` | `MxDataType` value | +| `Category` | `IAttribute.AttributeCategory` | Attribute category | +| `SecurityClassification` | `IAttribute.SecurityClassification` | Security classification | +| `Locked` | `IAttribute.Locked` | Lock state | +| `UpperBoundDim1` | `IAttribute.UpperBoundDim1` | First array dimension upper bound | +| `HasBuffer` | `IAttribute.HasBuffer` | Attribute buffer flag | +| `RuntimeSetHandler` | `IAttribute.RtSethandler` | Runtime set handler flag | +| `ConfigSetHandler` | `IAttribute.CfgSethandler` | Configuration set handler flag | + +The GRAccess API also exposes `IAttribute.Value`. The CLI serializes scalar values when the local COM object exposes a supported accessor, and falls back to a temporary exported package when direct readback is unavailable. Because many history, I/O, alarm, and script-related settings are stored as attribute values, strict value-level parsing should use these paths: + +| Need | Best current path | +|---|---| +| Inventory every setting name and metadata | `object attributes`, `--configurable`, and `object extended-attributes` | +| Read a single setting metadata record | `object attribute get` | +| Read one scalar value | `object attribute value get --llm-json` | +| Preserve full vendor configuration, including values and scripts | `object snapshot --llm-json` package fallback, `objects export`, or `galaxy export-all` | +| Arrays or complex values | Treat as unavailable unless the snapshot/package parser emits a safe scalar representation | + +Normal CLI parsing must not query the Galaxy SQL database for attribute values. SQL can be used only in development verification scripts to compare GRAccess/package output against repository facts. + +## Parse All Attributes + +Capture all attribute lists before classifying them: + +```powershell +$name = 'TestMachine' +$out = '.\template-snapshots' +New-Item -ItemType Directory -Force -Path $out | Out-Null + +graccess object attributes --galaxy ZB --name $name --type template --json ` + | Set-Content "$out\$name.attributes.json" + +graccess object attributes --galaxy ZB --name $name --type template --configurable --json ` + | Set-Content "$out\$name.configurable-attributes.json" + +graccess object extended-attributes --galaxy ZB --name $name --type template --json ` + | Set-Content "$out\$name.extended-attributes.json" +``` + +Load the snapshot in PowerShell: + +```powershell +$attrs = Get-Content '.\template-snapshots\TestMachine.attributes.json' -Raw | ConvertFrom-Json +$configurable = Get-Content '.\template-snapshots\TestMachine.configurable-attributes.json' -Raw | ConvertFrom-Json +$extended = Get-Content '.\template-snapshots\TestMachine.extended-attributes.json' -Raw | ConvertFrom-Json +``` + +Merge and de-duplicate by attribute name: + +```powershell +$all = @($attrs) + @($configurable) + @($extended) +$byName = $all | Sort-Object Name -Unique +$byName | Select-Object Name, DataType, Category, Locked, HasBuffer +``` + +## Parse Object Properties + +Object-level properties are not the same as attributes. The current `object get` output gives identity and checkout information: + +```powershell +graccess object get --galaxy ZB --name TestMachine --type template --json +``` + +`graccess_operations.md` lists additional GRAccess object properties that exist on `ITemplate` and `IInstance`, including `DerivedFrom`, `BasedOn`, `Category`, `CategoryGUID`, `Container`, `Area`, `Host`, `Toolset`, `ConfigVersion`, `CheckedOutBy`, `EditStatus`, `ValidationStatus`, `Errors`, and `Warnings`. + +The current CLI does not emit every one of those properties in `object get`. If a parse requires all object properties, extend `GRAccessCommandDispatcher.ObjectDetails(...)` to read them defensively with the same `Try(...)` pattern used for current COM-backed fields. + +## Parse History Settings + +History settings are commonly represented as attributes or extended attributes. To parse them: + +1. Capture all attributes and extended attributes. +2. Find setting names related to history or historian configuration. +3. Preserve metadata for each matching attribute. +4. Use object export or a future value-emitting CLI command when actual setting values are required. + +PowerShell classification: + +```powershell +$history = $byName | Where-Object { + $_.Name -match '(?i)hist|history|historian|storage|trend' +} + +$history | Sort-Object Name | Select-Object Name, DataType, Category, Locked, HasBuffer +``` + +This is intentionally name-driven because exact attribute names vary by template type, System Platform version, primitive, and extension package. + +## Parse I/O Settings + +I/O settings can appear as object-level assignment properties, attributes, extension attributes, or exported package content. Parse them in this order: + +1. `object get` for identity and hierarchy. +2. `object attributes` and `object extended-attributes` for setting names and metadata. +3. Query relationships such as host, containment, and area when relevant. +4. Use export for full value-level source/destination details. + +PowerShell classification: + +```powershell +$io = $byName | Where-Object { + $_.Name -match '(?i)\bio\b|input|output|source|destination|scan|topic|device|address|reference' +} + +$io | Sort-Object Name | Select-Object Name, DataType, Category, Locked, RuntimeSetHandler, ConfigSetHandler +``` + +Relationship queries that often help with I/O context: + +```powershell +graccess object query-condition --galaxy ZB --type all --condition containedBy --value TestMachine --json +graccess object query-condition --galaxy ZB --type all --condition assignedTo --value TestMachine --json +graccess object query-condition --galaxy ZB --type all --condition hostEngineIs --value TestMachine --json +``` + +## Parse Alarm Settings + +Alarm settings are usually represented as attributes and extension attributes. Capture all attribute sources, then classify by alarm-related names: + +```powershell +$alarm = $byName | Where-Object { + $_.Name -match '(?i)alarm|alert|limit|priority|severity|deadband|deviation|rate|roc|hihi|lolo|(^|[._])hi($|[._])|(^|[._])lo($|[._])|ack' +} + +$alarm | Sort-Object Name | Select-Object Name, DataType, Category, SecurityClassification, Locked +``` + +For value-level alarm settings, use `objects export` until the CLI emits `IAttribute.Value`. + +## Parse UDAs And Extensions + +User-defined attributes are included in the attribute collections. Extension primitives normally show up through extended attributes, object export, or extension-specific attributes. + +Recommended read-only capture: + +```powershell +graccess object attributes --galaxy ZB --name TestMachine --type template --json +graccess object extended-attributes --galaxy ZB --name TestMachine --type template --json +``` + +The CLI currently has mutation commands for UDA and extension management, but it does not have a dedicated read-only `object uda list` or `object extension list` command. For complete extension parsing, prefer export or add dedicated list commands that call the GRAccess object/extension APIs if available in the local COM assembly. + +## Full Attribute Snapshot Script + +This script creates a structured local parse folder and classifies likely setting families: + +```powershell +$galaxy = 'ZB' +$name = 'TestMachine' +$type = 'template' +$out = ".\template-snapshots\$name" +New-Item -ItemType Directory -Force -Path $out | Out-Null + +graccess object get --galaxy $galaxy --name $name --type $type --json ` + | Set-Content "$out\object.json" + +graccess object attributes --galaxy $galaxy --name $name --type $type --json ` + | Set-Content "$out\attributes.json" + +graccess object attributes --galaxy $galaxy --name $name --type $type --configurable --json ` + | Set-Content "$out\configurable-attributes.json" + +graccess object extended-attributes --galaxy $galaxy --name $name --type $type --json ` + | Set-Content "$out\extended-attributes.json" + +$all = @( + Get-Content "$out\attributes.json" -Raw | ConvertFrom-Json +) + @( + Get-Content "$out\configurable-attributes.json" -Raw | ConvertFrom-Json +) + @( + Get-Content "$out\extended-attributes.json" -Raw | ConvertFrom-Json +) + +$byName = $all | Sort-Object Name -Unique +$byName | ConvertTo-Json -Depth 5 | Set-Content "$out\all-attributes.unique.json" + +$groups = [ordered]@{ + history = @($byName | Where-Object { $_.Name -match '(?i)hist|history|historian|storage|trend' }) + io = @($byName | Where-Object { $_.Name -match '(?i)\bio\b|input|output|source|destination|scan|topic|device|address|reference' }) + alarm = @($byName | Where-Object { $_.Name -match '(?i)alarm|alert|limit|priority|severity|deadband|deviation|rate|roc|hihi|lolo|(^|[._])hi($|[._])|(^|[._])lo($|[._])|ack' }) + script = @($byName | Where-Object { $_.Name -match '(?i)script|execute|trigger|expression|declaration|startup|shutdown' }) +} + +$groups | ConvertTo-Json -Depth 8 | Set-Content "$out\attribute-groups.json" +``` + +## CLI Gap For Complete Attribute Values + +To make `graccess_cli` parse all attribute settings without relying on export files, add a read-only command or extend `object attributes` to include safe value serialization: + +| Proposed field | Source | +|---|---| +| `Value` | `IAttribute.Value` converted from `IMxValue` | +| `IsArray` | Derived from bounds and value shape | +| `Dimensions` | `UpperBoundDim1` and any additional dimensions exposed by local API | +| `CommandResult` | `IAttribute.CommandResult` after value reads where relevant | +| `UnavailableReason` | Exception message when a COM-backed field cannot be read | + +Keep value reads defensive. Some attributes may throw because storage is unavailable, the value is runtime-only, the datatype is not serializable, or the current login cannot read the field. diff --git a/graccesscli/docs/clifx_reference.md b/graccesscli/docs/clifx_reference.md new file mode 100644 index 0000000..1c80326 --- /dev/null +++ b/graccesscli/docs/clifx_reference.md @@ -0,0 +1,245 @@ +# CliFx Reference (v2.3.6) + +Local reference for the CliFx CLI framework. Source: https://github.com/Tyrrrz/CliFx + +## Setup + +```csharp +using CliFx; + +public static class Program +{ + public static async Task Main() => + await new CliApplicationBuilder() + .AddCommandsFromThisAssembly() + .Build() + .RunAsync(); +} +``` + +**Important:** `Main()` must return the integer exit code from `RunAsync()`. + +`RunAsync()` resolves args from `Environment.GetCommandLineArgs()` and env vars from `Environment.GetEnvironmentVariables()`. You can also provide them manually via overloads. + +## Defining Commands + +Commands implement `ICommand` and are decorated with `[Command]`: + +```csharp +using CliFx; +using CliFx.Attributes; + +[Command(Description = "Calculates the logarithm of a value.")] +public class LogCommand : ICommand +{ + [CommandParameter(0, Description = "Value whose logarithm is to be found.")] + public required double Value { get; init; } + + [CommandOption("base", 'b', Description = "Logarithm base.")] + public double Base { get; init; } = 10; + + public ValueTask ExecuteAsync(IConsole console) + { + var result = Math.Log(Value, Base); + console.Output.WriteLine(result); + return default; + } +} +``` + +Use `IConsole` (not `System.Console`) for all console I/O — this enables testability. + +## Parameters vs Options + +| Aspect | `[CommandParameter]` | `[CommandOption]` | +|---|---|---| +| Binding | By position order | By name (`--foo`) or short name (`-f`) | +| Required by default | Yes | No | +| Make optional | Omit `required` (last param only) | Omit `required` | +| Make required | Use `required` keyword | Use `required` keyword | +| Non-scalar (collections) | Only last parameter | Any option | +| Env var fallback | No | Yes (`EnvironmentVariable = "ENV_FOO"`) | + +```csharp +// Required option +[CommandOption("foo")] +public required string Foo { get; init; } + +// Optional parameter (must be last) +[CommandParameter(0)] +public string? OptionalParam { get; init; } + +// Option with env var fallback +[CommandOption("foo", EnvironmentVariable = "ENV_FOO")] +public required string FooWithFallback { get; init; } + +// Non-scalar option +[CommandOption("items")] +public required IReadOnlyList Items { get; init; } +``` + +## Argument Syntax (POSIX-style) + +``` +myapp [...directives] [command] [...parameters] [...options] +``` + +- `--foo bar` → option "foo" = "bar" +- `-f bar` → option 'f' = "bar" +- `--switch` → option "switch" (no value / boolean) +- `-abc` → options 'a', 'b', 'c' (no value) +- `-i file1.txt file2.txt` → option 'i' = ["file1.txt", "file2.txt"] +- `-i file1.txt -i file2.txt` → same as above + +## Value Conversion + +Supports out of the box: +- **Primitives**: `int`, `bool`, `double`, `ulong`, `char`, etc. +- **Date/time**: `DateTime`, `DateTimeOffset`, `TimeSpan` +- **Enums**: by name or numeric value +- **String-initializable**: types with `ctor(string)` or static `Parse(string)` — e.g. `FileInfo`, `Guid`, `BigInteger` +- **Nullable** versions of all above +- **Collections**: `T[]`, `IReadOnlyList`, `List`, `HashSet`, etc. + +### Custom Converter + +```csharp +public class VectorConverter : BindingConverter +{ + public override Vector2 Convert(string? rawValue) + { + if (string.IsNullOrWhiteSpace(rawValue)) + return default; + + var components = rawValue.Split('x', 'X', ';'); + var x = int.Parse(components[0], CultureInfo.InvariantCulture); + var y = int.Parse(components[1], CultureInfo.InvariantCulture); + + return new Vector2(x, y); + } +} + +[CommandParameter(0, Converter = typeof(VectorConverter))] +public required Vector2 Point { get; init; } +``` + +## Multiple / Nested Commands + +Give each command a unique name. Common name segments create hierarchy: + +```csharp +[Command] // Default (unnamed) command +public class DefaultCommand : ICommand { ... } + +[Command("cmd1")] // Child of default +public class FirstCommand : ICommand { ... } + +[Command("cmd1 sub")] // Child of cmd1 +public class SubCommand : ICommand { ... } +``` + +Usage: `myapp cmd1 sub arg1 --opt value` + +Default command is optional. If absent, running without a command shows root help text. + +## Error Reporting + +Use `CommandException` to report errors with specific exit codes: + +```csharp +throw new CommandException("Division by zero is not supported.", 133); +``` + +Exit codes should be 1–255 (8-bit unsigned) to avoid overflow on Unix. + +## Graceful Cancellation + +```csharp +public async ValueTask ExecuteAsync(IConsole console) +{ + var cancellation = console.RegisterCancellationHandler(); + await DoSomethingAsync(cancellation); +} +``` + +First interrupt signal triggers the token. Second interrupt force-kills. + +## Dependency Injection + +Use `UseTypeActivator(...)` with `Microsoft.Extensions.DependencyInjection`: + +```csharp +await new CliApplicationBuilder() + .AddCommandsFromThisAssembly() + .UseTypeActivator(commandTypes => + { + var services = new ServiceCollection(); + services.AddSingleton(); + foreach (var commandType in commandTypes) + services.AddTransient(commandType); + return services.BuildServiceProvider(); + }) + .Build() + .RunAsync(); +``` + +## Testing + +Use `FakeInMemoryConsole` to test commands in isolation: + +### Command-level test + +```csharp +using var console = new FakeInMemoryConsole(); + +var command = new ConcatCommand { Left = "foo", Right = "bar" }; +await command.ExecuteAsync(console); + +var stdOut = console.ReadOutputString(); +Assert.Equal("foo bar", stdOut); +``` + +### Application-level test + +```csharp +using var console = new FakeInMemoryConsole(); + +var app = new CliApplicationBuilder() + .AddCommand() + .UseConsole(console) + .Build(); + +var args = new[] { "--left", "foo", "--right", "bar" }; +var envVars = new Dictionary(); + +await app.RunAsync(args, envVars); + +var stdOut = console.ReadOutputString(); +Assert.Equal("foo bar", stdOut); +``` + +## Debug & Preview Directives + +```bash +# Suspend until debugger attaches +myapp [debug] cmd -o + +# Print parsed args without executing +myapp [preview] cmd arg1 -o foo +``` + +Disable in production: + +```csharp +new CliApplicationBuilder() + .AllowDebugMode(false) + .AllowPreviewMode(false) + .Build(); +``` + +## .NET Framework 4.8 Notes + +- CliFx targets .NET Standard 2.0+, fully compatible with net48 +- `required` keyword requires C# 11+ — on net48 (LangVersion 9.0), use properties with default values and validate in `ExecuteAsync` instead +- `init` setters require C# 9+ (supported on net48 with LangVersion 9.0) +- `async Task Main` requires `System.Threading.Tasks` using directive on net48 diff --git a/graccesscli/docs/llm-integration.md b/graccesscli/docs/llm-integration.md new file mode 100644 index 0000000..7e67052 --- /dev/null +++ b/graccesscli/docs/llm-integration.md @@ -0,0 +1,172 @@ +# LLM Integration Guide + +This document is the implemented machine-facing contract for using `graccess_cli` as an LLM automation layer for AVEVA/Wonderware System Platform IDE work through GRAccess. + +The CLI still preserves legacy human output and existing `--json` shapes. LLMs should use `--llm-json` for a stable envelope. + +## Stable Envelope + +Galaxy-bound routed commands and LLM helper commands accept `--llm-json`. + +```json +{ + "success": true, + "command": "object snapshot", + "galaxy": "ZB", + "target": "TestMachine", + "data": {}, + "commandResult": null, + "warnings": [], + "unavailable": [], + "error": null, + "exitCode": 0 +} +``` + +Failures use the same envelope with `success=false`, `error`, and `exitCode`. + +## Discovery + +Use capabilities before generating plans: + +```powershell +graccess capabilities --json +graccess capabilities --llm-json +``` + +The capability registry is code-backed, not scraped from prose. It returns command name, dispatcher command/subcommand, argument metadata, mutation status, session routing support, confirmation target rule, and output schema name. + +## Read Workflow + +Prefer session mode for repeated reads: + +```powershell +graccess session start --galaxy ZB --node . +graccess object snapshot --galaxy ZB --name TestMachine --type template --llm-json +``` + +`object snapshot` includes object details, all attributes, configurable attributes, extended attributes, relationships, lineage, children, contained objects, package-backed attribute values/script bodies where available, and `Unavailable` entries for COM-backed sections that cannot be read safely. + +Useful read commands: + +```powershell +graccess object get --galaxy ZB --name TestMachine --type template --llm-json +graccess object lineage --galaxy ZB --name '$TestMachine' --type template --llm-json +graccess object children --galaxy ZB --name '$TestMachine' --type template --llm-json +graccess object attribute value get --galaxy ZB --name TestMachine --type template --attribute Description --llm-json +graccess object scripts list --galaxy ZB --name TestMachine --type template --llm-json +graccess object scripts get --galaxy ZB --name TestMachine --type template --script UpdateTestChangingInt --llm-json +``` + +The CLI tries direct GRAccess reads first. If direct GRAccess does not expose inheritance, attribute values, or script bodies, read commands may export the target object to a temporary `.aaPKG`, parse textual/package entries, recurse into nested package archives, parse binary UTF-16 script extension records, and delete the temp files. SQL Server repository reads are not part of normal CLI behavior and should only be used for development verification/debugging. + +Script body access is adapter-dependent. For `ScriptExtension` objects, a bare script name maps to `.ExecuteText`; `object scripts set` writes the matching script body attribute through GRAccess. Mutating script and attribute commands prefer `ConfigurableAttributes[...]` before `Attributes[...]`, because script extension settings such as `TriggerPeriod`, `TriggerType`, `Expression`, and `ExecuteText` are configuration attributes in common GRAccess builds. If neither direct GRAccess nor the package fallback exposes body text, script read commands return structured unavailable details instead of pretending success. + +Use the script settings wrapper for IDE-style script configuration: + +```powershell +graccess object scripts settings set --galaxy ZB --name '$TestMachine' --type template --script UpdateTestChangingInt --trigger-period-ms 500 --lock-trigger-period --confirm --confirm-target '$TestMachine' --llm-json +``` + +Use the create wrapper for new object-level script extensions: + +```powershell +graccess object scripts create --galaxy ZB --name '$MyTemplate' --type template --script OnScan --file OnScan.txt --trigger-type Periodic --trigger-period-ms 1000 --confirm --confirm-target '$MyTemplate' --llm-json +``` + +## Inheritance And Embedded Objects + +For template families, model inheritance and containment explicitly. Do not rely on a single field being populated by every GRAccess version. + +```powershell +graccess object snapshot --galaxy ZB --name '$TestMachine' --type template --llm-json +graccess object lineage --galaxy ZB --name '$TestMachine' --type template --llm-json +graccess object children --galaxy ZB --name '$TestMachine' --type template --llm-json +graccess object query-condition --galaxy ZB --type all --condition derivedOrInstantiatedFrom --value '$gMachine' --llm-json +graccess object query-condition --galaxy ZB --type all --condition basedOn --value '$gMachine' --llm-json +graccess object query-condition --galaxy ZB --type all --condition containedBy --value '$TestMachine' --llm-json +``` + +Read `data.Lineage`, `data.Children`, `data.ContainedObjects`, `data.Object.DerivedFrom`, `data.Object.BasedOn`, `ContainedName`, and `HierarchicalName` when available. The documented `ZB` `$TestMachine` family is an example: `$TestMachine` extends `$gMachine`, while `$TestMachine.DelmiaReceiver` and `$TestMachine.MESReceiver` are contained embedded templates. + +Create derived templates and instances with contained objects when the family requires embedded children: + +```powershell +graccess template derive --galaxy ZB --name '$gMachine' --type template --new-name '$MyMachine' --confirm --confirm-target '$gMachine' --llm-json +graccess template instantiate --galaxy ZB --name '$TestMachine' --type template --new-name TestMachine_021 --create-contained --confirm --confirm-target '$TestMachine' --llm-json +``` + +Edit contained child templates or instances by targeting their own object names, such as `$TestMachine.DelmiaReceiver` or `DelmiaReceiver_001`, and use normal checkout/save/checkin safety. + +## Validation And Batch + +Per-command dry-run validates command shape and confirmation without calling mutating GRAccess methods: + +```powershell +graccess object attribute value set --galaxy ZB --name TestMachine --type template --attribute Description --value Updated --data-type string --confirm --confirm-target TestMachine --dry-run --llm-json +``` + +Plan validation: + +```powershell +graccess validate --request plan.json --llm-json +``` + +Batch validation or execution: + +```powershell +graccess batch --file plan.json --mode validate --llm-json +graccess batch --file plan.json --mode execute --llm-json +``` + +Plan shape: + +```json +{ + "Galaxy": "ZB", + "Node": ".", + "Commands": [ + { + "Command": "object checkout", + "Args": { + "name": "TestMachine", + "type": "template", + "confirm": true, + "confirm-target": "TestMachine" + } + } + ] +} +``` + +Every mutating step must include its own `confirm=true` and exact `confirm-target`. There is no global mutation confirmation. Batch execute stops on first failure. + +## IDE Intent Wrappers + +Use intent-level commands instead of generic property edits when possible: + +```powershell +graccess area list --galaxy ZB --llm-json +graccess area create --galaxy ZB --template '$Area' --name Area_Test --confirm --confirm-target '$Area' --llm-json +graccess engine list --galaxy ZB --llm-json +graccess engine create --galaxy ZB --template '$AppEngine' --name AppEngine_Test --confirm --confirm-target '$AppEngine' --llm-json +graccess instance assign-area --galaxy ZB --name TestMachine_001 --area Area_Test --confirm --confirm-target TestMachine_001 --llm-json +graccess instance assign-engine --galaxy ZB --name TestMachine_001 --engine AppEngine_Test --confirm --confirm-target TestMachine_001 --llm-json +graccess instance assign-container --galaxy ZB --name TestMachine_001 --container ParentObject --confirm --confirm-target TestMachine_001 --llm-json +graccess io assign --galaxy ZB --name TestMachine_001 --attribute DeviceAddress --value D100 --confirm --confirm-target TestMachine_001 --llm-json +``` + +`object set --property area|host|container|toolset|security-group` attempts to resolve the named GRAccess object first, then falls back to raw string assignment for version-specific setters. + +## Safety Rules + +1. Start with `capabilities` and read-only snapshots. +2. Do not mutate without an exact object or file target. +3. Never use wildcard bulk mutation in production. +4. Use `--dry-run --llm-json` before mutation plans. +5. Snapshot before editing and re-read after editing. +6. Stop after the first failed mutation or `CommandResult.Successful=false`. +7. Treat missing or unavailable fields as unknown, not false. +8. Prefer test objects or derived templates before production targets. +9. Use session mode for repeated galaxy-bound commands. +10. Use deployment commands only when the user explicitly names targets. diff --git a/graccesscli/docs/script-editing.md b/graccesscli/docs/script-editing.md new file mode 100644 index 0000000..9e00b34 --- /dev/null +++ b/graccesscli/docs/script-editing.md @@ -0,0 +1,206 @@ +# Editing Scripts And Script Libraries + +This guide describes how to edit scripts related to a template such as `TestMachine`. + +Read `script-parsing.md` first so you know whether the target script is a script library, an object-level script-like attribute, an extension primitive, or content that only appears in an exported object package. + +Run commands from `graccess_cli`. Examples assume an active session: + +```powershell +graccess session start --galaxy ZB --node . +``` + +Without a session, add `--node .` to each command. + +For LLM-driven script work, read script metadata and validate guarded edits with the LLM envelope: + +```powershell +graccess object scripts list --galaxy ZB --name TestMachine --type template --llm-json +graccess object scripts get --galaxy ZB --name TestMachine --type template --script UpdateTestChangingInt --llm-json +graccess object scripts set --galaxy ZB --name TestMachine --type template --script UpdateTestChangingInt --file .\UpdateTestChangingInt.txt --confirm --confirm-target TestMachine --dry-run --llm-json +``` + +## What The CLI Can Edit Today + +| Area | Current command support | +|---|---| +| Script library inventory | `script-library list` | +| Script library export | `script-library export` | +| Script library import/add | `script-library import`, `script-library add`, `galaxy import-script-library` | +| Object script metadata | `object scripts list`, `object scripts get` | +| Object script body read/write | `object scripts get`, `object scripts set` for script body attributes such as `ExecuteText` | +| Script-like attributes | `object attribute set`, lock, security, buffer | +| Extension primitives | `object extension add/delete/rename` | +| Full object package script payloads | Use `objects export` and `galaxy import-objects` | + +## Export Before Editing + +Export script libraries before changing them: + +```powershell +$out = '.\template-snapshots\script-libraries-before' +New-Item -ItemType Directory -Force -Path $out | Out-Null + +$libs = graccess script-library list --galaxy ZB --json | ConvertFrom-Json +foreach ($lib in $libs) { + $name = $lib.Name + $path = Join-Path $out "$name.aaslib" + graccess script-library export --galaxy ZB --name $name --output $path --confirm --confirm-target $path +} +``` + +Export the template package when object-level scripts may be involved: + +```powershell +$pkg = '.\template-snapshots\TestMachine-before\TestMachine.aaPKG' +graccess objects export --galaxy ZB --type template --name TestMachine --output $pkg --confirm --confirm-target $pkg +``` + +## Edit Script Libraries + +Script library content is edited outside the CLI in the `.aaslib` file or source toolchain that creates it. Import the updated library after review: + +```powershell +graccess script-library import --galaxy ZB --path '.\scripts\CommonScripts.aaslib' --confirm --confirm-target '.\scripts\CommonScripts.aaslib' +``` + +The galaxy-level import command is also available: + +```powershell +graccess galaxy import-script-library --galaxy ZB --path '.\scripts\CommonScripts.aaslib' --confirm --confirm-target '.\scripts\CommonScripts.aaslib' +``` + +After import, list libraries again: + +```powershell +graccess script-library list --galaxy ZB --json +``` + +## Edit Script-Like Attributes + +Some templates store expressions, declarations, triggers, or script fragments in attributes. Find candidates: + +```powershell +$attrs = graccess object attributes --galaxy ZB --name TestMachine --type template --json | ConvertFrom-Json +$extended = graccess object extended-attributes --galaxy ZB --name TestMachine --type template --json | ConvertFrom-Json +$scripts = (@($attrs) + @($extended)) | Where-Object { + $_.Name -match '(?i)script|execute|trigger|expression|declaration|startup|shutdown|scan' +} | Sort-Object Name -Unique + +$scripts | Select-Object Name, DataType, Category, Locked +``` + +If the script-like setting is a scalar string attribute, edit it through the normal template edit flow. Script extension fields should be written through `ConfigurableAttributes`; the CLI does this automatically for `object scripts set`, `object scripts settings set`, and mutating `object attribute` commands. `object scripts set` is the convenience wrapper for script body attributes. A bare script name maps to `.ExecuteText`; explicit fields such as `.StartupText`, `.OnScanText`, or `.Expression` are preserved. + +```powershell +graccess object checkout --galaxy ZB --name TestMachine --type template --confirm --confirm-target TestMachine +graccess object scripts set --galaxy ZB --name TestMachine --type template --script UpdateTestChangingInt --file .\UpdateTestChangingInt.txt --confirm --confirm-target TestMachine +graccess object save --galaxy ZB --name TestMachine --type template --confirm --confirm-target TestMachine +graccess object checkin --galaxy ZB --name TestMachine --type template --comment 'Update script text' --confirm --confirm-target TestMachine +``` + +Update periodic script settings and lock the interval for deployment inheritance: + +```powershell +graccess object checkout --galaxy ZB --name '$TestMachine' --type template --confirm --confirm-target '$TestMachine' +graccess object scripts settings set --galaxy ZB --name '$TestMachine' --type template --script UpdateTestChangingInt --trigger-period-ms 500 --lock-trigger-period --confirm --confirm-target '$TestMachine' +graccess object save --galaxy ZB --name '$TestMachine' --type template --confirm --confirm-target '$TestMachine' +graccess object checkin --galaxy ZB --name '$TestMachine' --type template --comment 'Set UpdateTestChangingInt interval to 500ms' --confirm --confirm-target '$TestMachine' +``` + +Verify with package-backed readback: + +```powershell +graccess object scripts get --galaxy ZB --name TestMachine --type template --script UpdateTestChangingInt --llm-json +``` + +## Edit Extension Primitives + +When a script is represented by an extension primitive, use the extension commands for the primitive lifecycle: + +```powershell +graccess object checkout --galaxy ZB --name TestMachine --type template --confirm --confirm-target TestMachine +graccess object extension add --galaxy ZB --name TestMachine --type template --extension-type ScriptExtension --primitive OnScan --object-extension --confirm --confirm-target TestMachine +graccess object save --galaxy ZB --name TestMachine --type template --confirm --confirm-target TestMachine +graccess object checkin --galaxy ZB --name TestMachine --type template --comment 'Add script extension primitive' --confirm --confirm-target TestMachine +``` + +Rename: + +```powershell +graccess object extension rename --galaxy ZB --name TestMachine --type template --extension-type ScriptExtension --primitive OnScan --new-name OnScan2 --object-extension --confirm --confirm-target TestMachine +``` + +Delete: + +```powershell +graccess object extension delete --galaxy ZB --name TestMachine --type template --extension-type ScriptExtension --primitive OnScan2 --object-extension --confirm --confirm-target TestMachine +``` + +These commands manage primitive structure. The IDE-oriented wrapper below creates the same `ScriptExtension` primitive and can initialize the body and common settings: + +```powershell +graccess object checkout --galaxy ZB --name '$MyTemplate' --type template --confirm --confirm-target '$MyTemplate' +graccess object scripts create --galaxy ZB --name '$MyTemplate' --type template --script OnScan --file .\OnScan.txt --trigger-type Periodic --trigger-period-ms 1000 --confirm --confirm-target '$MyTemplate' +graccess object save --galaxy ZB --name '$MyTemplate' --type template --confirm --confirm-target '$MyTemplate' +graccess object checkin --galaxy ZB --name '$MyTemplate' --type template --comment 'Add OnScan script' --confirm --confirm-target '$MyTemplate' +``` + +After adding a `ScriptExtension` primitive, set its body with `object scripts set --script ` or `object scripts set --script .ExecuteText`. + +## Full-Fidelity Object Script Edits + +When script bodies are only available inside the object package, use export/import: + +1. Export the template package. +2. Edit with the supported vendor tooling or package workflow. +3. Import the updated package with explicit confirmation. +4. Re-parse and validate the template. + +Export: + +```powershell +$pkg = '.\template-work\TestMachine.aaPKG' +graccess objects export --galaxy ZB --type template --name TestMachine --output $pkg --confirm --confirm-target $pkg +``` + +Import: + +```powershell +graccess galaxy import-objects --galaxy ZB --file '.\template-work\TestMachine.aaPKG' --overwrite --confirm --confirm-target '.\template-work\TestMachine.aaPKG' +``` + +For conflict-aware import: + +```powershell +graccess galaxy import-objects-ex --galaxy ZB --file '.\template-work\TestMachine.aaPKG' --version-conflict '' --name-conflict '' --confirm --confirm-target '.\template-work\TestMachine.aaPKG' +``` + +The exact enum values for import conflict handling must match the local GRAccess interop assembly. See `graccess_operations.md` and `graccess_documentation.md`. + +## Validate Script Edits + +After import or checkin: + +```powershell +graccess object get --galaxy ZB --name TestMachine --type template --json +graccess object attributes --galaxy ZB --name TestMachine --type template --json +graccess object extended-attributes --galaxy ZB --name TestMachine --type template --json +``` + +For runtime validation, instantiate a test object and deploy only that explicitly named test instance: + +```powershell +graccess template instantiate --galaxy ZB --name TestMachine --type template --new-name TestMachine_ScriptTest_001 --create-contained --confirm --confirm-target TestMachine +graccess instance deploy --galaxy ZB --name TestMachine_ScriptTest_001 --type instance --confirm --confirm-target TestMachine_ScriptTest_001 +``` + +## Supported Object Script Command Pattern + +```text +graccess object scripts list --galaxy ZB --name TestMachine --type template --json +graccess object scripts get --galaxy ZB --name TestMachine --type template --script UpdateTestChangingInt --llm-json +graccess object scripts set --galaxy ZB --name TestMachine --type template --script UpdateTestChangingInt --file .\UpdateTestChangingInt.txt --confirm --confirm-target TestMachine --llm-json +``` + +The local GRAccess examples sometimes show `Template.Scripts[index].ScriptString`. This repository's installed interop exposes the same practical content through script extension attributes such as `UpdateTestChangingInt.ExecuteText`; the CLI writes those attributes directly via `IAttribute.SetValue`. diff --git a/graccesscli/docs/script-parsing.md b/graccesscli/docs/script-parsing.md new file mode 100644 index 0000000..7f48df6 --- /dev/null +++ b/graccesscli/docs/script-parsing.md @@ -0,0 +1,130 @@ +# Parsing Scripts And Script Libraries + +This guide describes how to capture scripts related to a template such as `TestMachine`. + +GRAccess exposes script libraries directly through `IScriptLibraries` and `IScriptLibrary`. Object-level scripts are less direct: depending on object type and System Platform version, they may appear as attributes, extension attributes, or only inside exported object packages. + +Run commands from `graccess_cli`. Examples assume an active session: + +```powershell +graccess session start --galaxy ZB --node . +``` + +Without a session, add `--node .` to each command. + +For LLM workflows, include object script metadata in the snapshot first: + +```powershell +graccess object snapshot --galaxy ZB --name TestMachine --type template --llm-json +graccess object scripts list --galaxy ZB --name TestMachine --type template --llm-json +graccess object scripts get --galaxy ZB --name TestMachine --type template --script UpdateTestChangingInt.ExecuteText --llm-json +graccess object scripts get --galaxy ZB --name TestMachine --type template --script UpdateTestChangingInt --llm-json +``` + +Direct object script body readback is version-specific. The CLI tries direct GRAccess metadata first, then exports the target object to a temporary `.aaPKG`, recurses through nested package archives, and parses binary UTF-16 package records for `ScriptExtension` content. For script extension names, a bare script such as `UpdateTestChangingInt` resolves to `UpdateTestChangingInt.ExecuteText`. Explicit fields such as `UpdateTestChangingInt.StartupText` are preserved. + +The exported package fallback can read script text fields such as `ExecuteText`, `DeclarationsText`, `StartupText`, `ShutdownText`, `OnScanText`, `OffScanText`, and `Expression` when present. When body access is unavailable from both direct GRAccess and package data, `object scripts get` reports that in structured output. + +## Script Library Inventory + +List script libraries: + +```powershell +graccess script-library list --galaxy ZB --json +``` + +The current CLI returns library names. The underlying GRAccess API for `IScriptLibrary` exposes `Name` and `Export(path)`. + +## Export Script Libraries + +Export is the authoritative way to preserve script library content: + +```powershell +$out = '.\template-snapshots\script-libraries' +New-Item -ItemType Directory -Force -Path $out | Out-Null + +graccess script-library export --galaxy ZB --name CommonScripts --output "$out\CommonScripts.aaslib" --confirm --confirm-target "$out\CommonScripts.aaslib" +``` + +`script-library export` writes a local file, so the CLI requires confirmation and a matching `--confirm-target` equal to the output path. + +To export every listed script library, parse the JSON list and call export for each name: + +```powershell +$galaxy = 'ZB' +$out = '.\template-snapshots\script-libraries' +New-Item -ItemType Directory -Force -Path $out | Out-Null + +$libs = graccess script-library list --galaxy $galaxy --json | ConvertFrom-Json +foreach ($lib in $libs) { + $name = $lib.Name + $path = Join-Path $out "$name.aaslib" + graccess script-library export --galaxy $galaxy --name $name --output $path --confirm --confirm-target $path +} +``` + +## Object-Level Script Discovery + +For a template such as `TestMachine`, first inspect attributes and extended attributes for script-like names: + +```powershell +graccess object attributes --galaxy ZB --name TestMachine --type template --json +graccess object extended-attributes --galaxy ZB --name TestMachine --type template --json +``` + +PowerShell classification: + +```powershell +$attrs = Get-Content '.\template-snapshots\TestMachine.attributes.json' -Raw | ConvertFrom-Json +$extended = Get-Content '.\template-snapshots\TestMachine.extended-attributes.json' -Raw | ConvertFrom-Json +$all = (@($attrs) + @($extended)) | Sort-Object Name -Unique + +$scripts = $all | Where-Object { + $_.Name -match '(?i)script|execute|trigger|expression|declaration|startup|shutdown|scan' +} + +$scripts | Sort-Object Name | Select-Object Name, DataType, Category, Locked +``` + +This discovers script-related setting names and metadata. For bodies, prefer `object scripts get --llm-json` or `object snapshot --llm-json`; both can include package-backed script text when GRAccess export is available. Normal CLI script parsing must not query the Galaxy SQL database; SQL is development verification/debug-only. + +## Export Template Objects For Script Bodies + +Use object export when you need the full object configuration, including script bodies, declarations, triggers, and extension payloads that are not exposed as simple attribute metadata: + +```powershell +$out = '.\template-snapshots\TestMachine' +New-Item -ItemType Directory -Force -Path $out | Out-Null +$pkg = Join-Path $out 'TestMachine.aaPKG' + +graccess objects export --galaxy ZB --type template --name TestMachine --output $pkg --confirm --confirm-target $pkg +``` + +The exported package should be treated as the complete vendor-owned representation. Use it as the source of truth when CLI JSON and GRAccess attribute metadata do not expose script content. + +For a galaxy-wide reference export: + +```powershell +$pkg = '.\template-snapshots\ZB.export.aaPKG' +graccess galaxy export-all --galaxy ZB --output $pkg --json +``` + +`galaxy export-all` is read-only from the galaxy perspective but writes an output file. + +## Suggested Parse Bundle + +A practical template parse bundle should include: + +| File | Command | +|---|---| +| `object.json` | `object get` | +| `attributes.json` | `object attributes` | +| `configurable-attributes.json` | `object attributes --configurable` | +| `extended-attributes.json` | `object extended-attributes` | +| `attribute-groups.json` | Local classifier from `attribute-parsing.md` | +| `template.aaPKG` | `objects export` | +| `script-libraries/*.aaslib` | `script-library export` | + +## Notes On GRAccess Script Collections + +Some GRAccess examples refer to `Template.Scripts[index].ScriptString`. The local installed GRAccess interop and docs used by this CLI expose `ScriptExtension` content through script-like attributes and exported package records instead. Use `object scripts list/get` as the supported discovery and readback contract for this repository. diff --git a/graccesscli/docs/template-editing.md b/graccesscli/docs/template-editing.md new file mode 100644 index 0000000..5e41de6 --- /dev/null +++ b/graccesscli/docs/template-editing.md @@ -0,0 +1,370 @@ +# Editing Existing Templates + +This guide describes how to edit an existing GRAccess template such as `TestMachine` with `graccess_cli`. + +Use this document as the top-level workflow. For deeper coverage, also read: + +- `attribute-editing.md` - attribute values, locks, security, buffers, UDAs, extensions, and settings families such as history, I/O, and alarms. +- `script-editing.md` - script-library import/export and the current options for object-level script edits. +- `template-instance-editing.md` - create and edit instances from templates, including areas, engines, and I/O assignment. +- `template-parsing.md` - read-only inspection workflow to run before and after edits. + +Run commands from `graccess_cli`. Examples assume the CLI is available as `graccess`. During local development, replace `graccess` with: + +```powershell +dotnet run --project src/ZB.MOM.WW.GRAccess.Cli/ZB.MOM.WW.GRAccess.Cli.csproj -- +``` + +## Safety Model + +Every mutating command requires `--confirm`. Template/object mutation commands also require `--confirm-target` matching the exact object name being edited. File import/export commands use the file path as the confirmation target. + +For template edits, use this pattern: + +```powershell +--confirm --confirm-target TestMachine +``` + +For LLM-driven edits, validate the final command or batch plan before mutation: + +```powershell +graccess object attribute value set --galaxy ZB --name TestMachine --type template --attribute Description --value Updated --data-type string --confirm --confirm-target TestMachine --dry-run --llm-json +graccess batch --file plan.json --mode validate --llm-json +``` + +Do not edit production templates directly unless the target, backup, and rollback path are explicit. For risky work, derive or export a test copy first. + +## Session Setup + +Start a session for repeated edits: + +```powershell +graccess session start --galaxy ZB --node . +``` + +With a session active, omit `--node` on logged-in commands: + +```powershell +graccess object get --galaxy ZB --name TestMachine --type template --json +``` + +Use `object snapshot --llm-json` for before/after verification when an LLM is planning or executing the edit: + +```powershell +graccess object snapshot --galaxy ZB --name TestMachine --type template --llm-json +``` + +Without a session, include `--node .` on each command. + +## Pre-Edit Snapshot + +Take a read-only snapshot before changing anything: + +```powershell +$galaxy = 'ZB' +$name = 'TestMachine' +$out = ".\template-snapshots\$name-before" +New-Item -ItemType Directory -Force -Path $out | Out-Null + +graccess object get --galaxy $galaxy --name $name --type template --json ` + | Set-Content "$out\object.json" + +graccess object attributes --galaxy $galaxy --name $name --type template --json ` + | Set-Content "$out\attributes.json" + +graccess object attributes --galaxy $galaxy --name $name --type template --configurable --json ` + | Set-Content "$out\configurable-attributes.json" + +graccess object extended-attributes --galaxy $galaxy --name $name --type template --json ` + | Set-Content "$out\extended-attributes.json" +``` + +For a fuller snapshot, follow `template-parsing.md`, `attribute-parsing.md`, and `script-parsing.md`. + +## Optional Backup Export + +For a rollback artifact, export the template before editing: + +```powershell +$pkg = '.\template-snapshots\TestMachine-before\TestMachine.aaPKG' +graccess objects export --galaxy ZB --type template --name TestMachine --output $pkg --confirm --confirm-target $pkg +``` + +`objects export` writes a file and therefore requires `--confirm-target` equal to the output path. + +## Standard Edit Flow + +GRAccess object changes should follow: + +```text +CheckOut -> mutate -> Save -> CheckIn(comment) +``` + +With `graccess_cli`: + +```powershell +graccess object checkout --galaxy ZB --name TestMachine --type template --confirm --confirm-target TestMachine + +# Run one or more mutation commands here. + +graccess object save --galaxy ZB --name TestMachine --type template --confirm --confirm-target TestMachine +graccess object checkin --galaxy ZB --name TestMachine --type template --comment 'Edited TestMachine' --confirm --confirm-target TestMachine +``` + +If you need to discard changes: + +```powershell +graccess object undo-checkout --galaxy ZB --name TestMachine --type template --confirm --confirm-target TestMachine +``` + +`object unload` releases the object from the GRAccess cache: + +```powershell +graccess object unload --galaxy ZB --name TestMachine --type template --confirm --confirm-target TestMachine +``` + +## Edit Object Properties + +Use `object set` for supported object-level properties: + +| Property | Command value | Notes | +|---|---|---| +| Tagname | `tagname` | Renames the object tagname | +| Contained name | `contained-name` | Changes contained name | +| Area | `area` | Object reference or accepted GRAccess value | +| Host | `host` | Object reference or accepted GRAccess value | +| Container | `container` | Object reference or accepted GRAccess value | +| Toolset | `toolset` | Toolset reference or accepted GRAccess value | +| Security group | `security-group` | Security group reference or accepted GRAccess value | + +Example: + +```powershell +graccess object checkout --galaxy ZB --name TestMachine --type template --confirm --confirm-target TestMachine +graccess object set --galaxy ZB --name TestMachine --type template --property contained-name --value TestMachineEdited --confirm --confirm-target TestMachine +graccess object save --galaxy ZB --name TestMachine --type template --confirm --confirm-target TestMachine +graccess object checkin --galaxy ZB --name TestMachine --type template --comment 'Update contained name' --confirm --confirm-target TestMachine +``` + +When renaming `tagname`, the command target is the current name. After a successful rename, use the new name for later commands: + +```powershell +graccess object checkout --galaxy ZB --name TestMachine --type template --confirm --confirm-target TestMachine +graccess object set --galaxy ZB --name TestMachine --type template --property tagname --value TestMachineV2 --confirm --confirm-target TestMachine +graccess object save --galaxy ZB --name TestMachineV2 --type template --confirm --confirm-target TestMachineV2 +graccess object checkin --galaxy ZB --name TestMachineV2 --type template --comment 'Rename template' --confirm --confirm-target TestMachineV2 +``` + +Validate tagname renames in a test galaxy first. If the local GRAccess cache cannot find the object by the new name before `Save`, the CLI needs a combined rename/save/checkin command that keeps the same COM object reference for the full operation. + +Object-reference properties such as area, host, container, toolset, and security group depend on what the local GRAccess COM property setter accepts. If a string value fails, extend the CLI to resolve the named target object first and assign the COM object instead of the raw string. + +## Edit Attributes And Settings + +Use `attribute-editing.md` for the full attribute workflow. + +Common commands: + +```powershell +graccess object attribute set --galaxy ZB --name TestMachine --type template --attribute Description --value 'Updated description' --data-type string --confirm --confirm-target TestMachine + +graccess object attribute lock --galaxy ZB --name TestMachine --type template --attribute Description --locked MxPropertyUnlocked --confirm --confirm-target TestMachine + +graccess object attribute security --galaxy ZB --name TestMachine --type template --attribute Description --security MxSecurityOperate --confirm --confirm-target TestMachine + +graccess object attribute buffer --galaxy ZB --name TestMachine --type template --attribute Description --has-buffer --confirm --confirm-target TestMachine +``` + +The current CLI supports attribute value types `string`, `bool`, `int`, `float`, and `double`. + +History, I/O, alarm, and script settings are usually represented as attributes, extended attributes, object package content, or extension-specific payloads. For value-level edits beyond the current `object attribute set` support, use export/import or add CLI support for safe `IAttribute.Value` parsing and serialization. + +## Edit UDAs + +UDAs are object mutations and should be wrapped in checkout/save/checkin. + +Add a UDA: + +```powershell +graccess object checkout --galaxy ZB --name TestMachine --type template --confirm --confirm-target TestMachine +graccess object uda add --galaxy ZB --name TestMachine --type template --uda CustomCode --data-type MxString --category MxCategoryWriteable_USC --security MxSecurityUndefined --confirm --confirm-target TestMachine +graccess object save --galaxy ZB --name TestMachine --type template --confirm --confirm-target TestMachine +graccess object checkin --galaxy ZB --name TestMachine --type template --comment 'Add CustomCode UDA' --confirm --confirm-target TestMachine +``` + +Rename a UDA: + +```powershell +graccess object uda rename --galaxy ZB --name TestMachine --type template --uda CustomCode --new-name CustomCode2 --confirm --confirm-target TestMachine +``` + +Update UDA metadata: + +```powershell +graccess object uda update --galaxy ZB --name TestMachine --type template --uda CustomCode2 --data-type MxString --category MxCategoryWriteable_USC --security MxSecurityUndefined --confirm --confirm-target TestMachine +``` + +Delete a UDA: + +```powershell +graccess object uda delete --galaxy ZB --name TestMachine --type template --uda CustomCode2 --confirm --confirm-target TestMachine +``` + +## Edit Extensions + +Extension primitives are object mutations and should be wrapped in checkout/save/checkin. + +Add an extension primitive: + +```powershell +graccess object extension add --galaxy ZB --name TestMachine --type template --extension-type ScriptExtension --primitive OnScan --object-extension --confirm --confirm-target TestMachine +``` + +Rename an extension primitive: + +```powershell +graccess object extension rename --galaxy ZB --name TestMachine --type template --extension-type ScriptExtension --primitive OnScan --new-name OnScan2 --object-extension --confirm --confirm-target TestMachine +``` + +Delete an extension primitive: + +```powershell +graccess object extension delete --galaxy ZB --name TestMachine --type template --extension-type ScriptExtension --primitive OnScan2 --object-extension --confirm --confirm-target TestMachine +``` + +Exact extension type and primitive names must match what the local System Platform installation and template support. + +## Derive A Template + +Derive a test template before editing a production template directly. This is also how you extend a base System Platform template, such as deriving `$TestMachine` from `$gMachine`. + +```powershell +graccess template derive --galaxy ZB --name TestMachine --type template --new-name TestMachine_EditTest --create-contained --confirm --confirm-target TestMachine +``` + +Then edit `TestMachine_EditTest`: + +```powershell +graccess object checkout --galaxy ZB --name TestMachine_EditTest --type template --confirm --confirm-target TestMachine_EditTest +``` + +To extend `$gMachine` with a new machine template: + +```powershell +graccess template derive --galaxy ZB --name '$gMachine' --type template --new-name '$MyMachine' --confirm --confirm-target '$gMachine' --llm-json +graccess object snapshot --galaxy ZB --name '$MyMachine' --type template --llm-json +``` + +Use `--create-contained` only when the source template has contained templates/objects that should be copied into the derived template. For a family like `$TestMachine`, contained templates such as `$TestMachine.DelmiaReceiver` and `$TestMachine.MESReceiver` are part of the template design and should be verified after derivation: + +```powershell +graccess template derive --galaxy ZB --name '$TestMachine' --type template --new-name '$MyMachine' --create-contained --confirm --confirm-target '$TestMachine' --llm-json +graccess template list --galaxy ZB --pattern '%MyMachine%' --llm-json +``` + +If the derived family does not include expected embedded templates, do not hand-edit production objects to compensate. Add or validate CLI support for contained template creation against a disposable test family first. + +## Edit Embedded Template Objects + +Contained templates are edited by targeting the contained template tagname. For the `TestMachine` family: + +```powershell +graccess object snapshot --galaxy ZB --name '$TestMachine.DelmiaReceiver' --type template --llm-json +graccess object checkout --galaxy ZB --name '$TestMachine.DelmiaReceiver' --type template --confirm --confirm-target '$TestMachine.DelmiaReceiver' +graccess object attribute value set --galaxy ZB --name '$TestMachine.DelmiaReceiver' --type template --attribute DownloadPath --value 'C:\Recipes' --data-type string --confirm --confirm-target '$TestMachine.DelmiaReceiver' --llm-json +graccess object save --galaxy ZB --name '$TestMachine.DelmiaReceiver' --type template --confirm --confirm-target '$TestMachine.DelmiaReceiver' +graccess object checkin --galaxy ZB --name '$TestMachine.DelmiaReceiver' --type template --comment 'Update Delmia receiver download path' --confirm --confirm-target '$TestMachine.DelmiaReceiver' +``` + +Contained template edits flow to future instances and may affect derived/instantiated objects depending on lock and override state. Before editing an embedded template, snapshot representative existing child instances such as `DelmiaReceiver_001` and compare after checkin. + +## Instantiate For Validation + +Create a test instance from the edited template: + +```powershell +graccess template instantiate --galaxy ZB --name TestMachine_EditTest --type template --new-name TestMachine_EditTest_001 --create-contained --confirm --confirm-target TestMachine_EditTest +``` + +Use instance deployment commands only against explicitly named test instances: + +```powershell +graccess instance deploy --galaxy ZB --name TestMachine_EditTest_001 --type instance --confirm --confirm-target TestMachine_EditTest_001 +``` + +## Edit Scripts + +Use `script-editing.md` for script-library import/export and object-level script guidance. + +The current CLI can import script libraries: + +```powershell +graccess script-library import --galaxy ZB --path '.\scripts\CommonScripts.aaslib' --confirm --confirm-target '.\scripts\CommonScripts.aaslib' +``` + +The current CLI does not expose direct JSON editing for object-level script bodies. Use object export/import for full-fidelity script body edits, or add a dedicated command that exposes script primitives and script-valued attributes. + +## Post-Edit Verification + +After checkin, take a second snapshot: + +```powershell +$galaxy = 'ZB' +$name = 'TestMachine' +$out = ".\template-snapshots\$name-after" +New-Item -ItemType Directory -Force -Path $out | Out-Null + +graccess object get --galaxy $galaxy --name $name --type template --json ` + | Set-Content "$out\object.json" + +graccess object attributes --galaxy $galaxy --name $name --type template --json ` + | Set-Content "$out\attributes.json" + +graccess object attributes --galaxy $galaxy --name $name --type template --configurable --json ` + | Set-Content "$out\configurable-attributes.json" + +graccess object extended-attributes --galaxy $galaxy --name $name --type template --json ` + | Set-Content "$out\extended-attributes.json" +``` + +Compare before and after snapshots: + +```powershell +Compare-Object ` + (Get-Content '.\template-snapshots\TestMachine-before\attributes.json') ` + (Get-Content '.\template-snapshots\TestMachine-after\attributes.json') +``` + +Also verify command summaries after each mutation. GRAccess returns `CommandResult` or `CommandResults`; failed calls should be treated as failed edits even if the CLI process exits after printing output. + +## Rollback Options + +Rollback depends on what changed: + +| Change type | Rollback path | +|---|---| +| Unchecked-in edit | `object undo-checkout` | +| Attribute value/metadata edit | Restore previous value with another edit cycle | +| UDA or extension edit | Reverse the add/delete/rename/update operation | +| Derived test template | Delete the derived template after validation | +| Full object/package edit | Re-import the pre-edit export package with explicit confirmation | + +Importing packages is production-impacting and requires exact confirmation: + +```powershell +graccess galaxy import-objects --galaxy ZB --file '.\template-snapshots\TestMachine-before\TestMachine.aaPKG' --overwrite --confirm --confirm-target '.\template-snapshots\TestMachine-before\TestMachine.aaPKG' +``` + +## Current CLI Gaps For Full-Fidelity Editing + +The current CLI can edit object properties, attribute values, locks, security classifications, buffers, UDAs, extensions, derived templates, instances, and script libraries. Full-fidelity template editing still has gaps: + +| Area | Current status | Recommended next step | +|---|---|---| +| Attribute value readback | Values are not emitted by `object attributes` | Add defensive `IAttribute.Value` serialization | +| History/I/O/alarm value editing | Possible only when the setting is a known attribute and supported value type | Add typed setting commands or broader `MxValue` support | +| Object-level script bodies | Not exposed as JSON | Add `object scripts get/set` or use export/import | +| Object-reference property assignment | Raw string assignment may fail for some COM properties | Resolve named GRAccess objects before assignment | +| Validation details | `object get` does not emit all errors/warnings/status fields | Extend object detail output defensively | + +Prefer implementing those gaps as read-only parse support first, then mutation support with confirmation guards. diff --git a/graccesscli/docs/template-instance-editing.md b/graccesscli/docs/template-instance-editing.md new file mode 100644 index 0000000..56a9893 --- /dev/null +++ b/graccesscli/docs/template-instance-editing.md @@ -0,0 +1,441 @@ +# Creating And Editing Template Instances + +This guide describes how to create and edit instances from templates with `graccess_cli`, including area creation, area assignment, engine assignment, I/O-related configuration, deployment, and rollback. + +Use this guide with: + +- `template-parsing.md` - inspect templates before instantiation. +- `template-editing.md` - edit source templates. +- `attribute-parsing.md` and `attribute-editing.md` - inspect and edit instance settings. +- `script-parsing.md` and `script-editing.md` - inspect and edit script-related content. + +Run commands from `graccess_cli`. Examples assume the CLI is available as `graccess`. During local development, replace `graccess` with: + +```powershell +dotnet run --project src/ZB.MOM.WW.GRAccess.Cli/ZB.MOM.WW.GRAccess.Cli.csproj -- +``` + +## Safety Model + +Mutating commands require `--confirm`. Commands that edit an object require `--confirm-target` matching the exact current object name. + +Important confirmation targets: + +| Command | `--confirm-target` must match | +|---|---| +| `template instantiate` | Source template name | +| `object checkout/save/checkin/undo-checkout` | Target object or instance name | +| `object set` | Target object or instance name | +| `object attribute set/lock/security/buffer` | Target object or instance name | +| `object attribute value set` | Target object or instance name | +| `instance assign-area/assign-engine/assign-container` | Target instance name | +| `io assign` | Target instance name | +| `instance deploy/undeploy/upload/delete` | Target instance name | +| `objects export` | Output file path | +| `galaxy import-objects` | Input file path | + +For production work, create or use a test area and test instance first. + +## Session Setup + +Start a session for repeated work: + +```powershell +graccess session start --galaxy ZB --node . +``` + +With a session active, omit `--node` on logged-in commands. Without a session, add `--node .` to each command. + +For LLM-driven instance work, snapshot before and after edits: + +```powershell +graccess object snapshot --galaxy ZB --name TestMachine_001 --type instance --llm-json +``` + +Prefer intent wrappers for IDE concepts: + +```powershell +graccess area list --galaxy ZB --llm-json +graccess engine list --galaxy ZB --llm-json +graccess instance assign-area --galaxy ZB --name TestMachine_001 --area Area_Test --confirm --confirm-target TestMachine_001 --llm-json +graccess instance assign-engine --galaxy ZB --name TestMachine_001 --engine AppEngine_Test --confirm --confirm-target TestMachine_001 --llm-json +graccess io assign --galaxy ZB --name TestMachine_001 --attribute DeviceAddress --value D100 --confirm --confirm-target TestMachine_001 --llm-json +``` + +## Discover Source Templates + +Find the exact template name before instantiation: + +```powershell +graccess template list --galaxy ZB --pattern '%TestMachine%' --json +``` + +If the template starts with `$`, quote it in PowerShell: + +```powershell +graccess template list --galaxy ZB --pattern '%$Area%' --json +graccess template list --galaxy ZB --pattern '%$AppEngine%' --json +``` + +Template names differ by System Platform version and galaxy standards. Always confirm the actual template names in the target galaxy. + +## Create An Instance From A Template + +Use `template instantiate`: + +```powershell +graccess template instantiate --galaxy ZB --name TestMachine --type template --new-name TestMachine_001 --create-contained --confirm --confirm-target TestMachine +``` + +Notes: + +| Option | Meaning | +|---|---| +| `--name` | Source template name | +| `--new-name` | New instance tagname | +| `--create-contained` | Create contained objects from the template when supported | +| `--confirm-target` | Must match the source template name | + +Verify the new instance: + +```powershell +graccess object get --galaxy ZB --name TestMachine_001 --type instance --json +graccess object attributes --galaxy ZB --name TestMachine_001 --type instance --json +``` + +## Create Areas + +Areas are galaxy objects. The CLI has an `area create` wrapper and also supports the underlying `template instantiate` workflow. Prefer the wrapper when it maps cleanly to the target galaxy; fall back to `template instantiate` when you need explicit control over the source template. + +Find candidate area templates: + +```powershell +graccess template list --galaxy ZB --pattern '%Area%' --json +``` + +Create an area instance, using the exact area template name returned by the galaxy. If the template is `$Area`, quote it: + +```powershell +graccess area create --galaxy ZB --template '$Area' --name Area_Test --confirm --confirm-target '$Area' --llm-json +``` + +Equivalent lower-level form: + +```powershell +graccess template instantiate --galaxy ZB --name '$Area' --type template --new-name Area_Test --create-contained --confirm --confirm-target '$Area' +``` + +Verify the area: + +```powershell +graccess object get --galaxy ZB --name Area_Test --type instance --json +``` + +Edit an area like any other instance: + +```powershell +graccess object checkout --galaxy ZB --name Area_Test --type instance --confirm --confirm-target Area_Test +graccess object attribute set --galaxy ZB --name Area_Test --type instance --attribute Description --value 'Test area' --data-type string --confirm --confirm-target Area_Test +graccess object save --galaxy ZB --name Area_Test --type instance --confirm --confirm-target Area_Test +graccess object checkin --galaxy ZB --name Area_Test --type instance --comment 'Configure test area' --confirm --confirm-target Area_Test +``` + +If the area template or area attributes differ in the target galaxy, use the parsing docs to identify the supported attributes before editing. + +## Assign An Instance To An Area + +Use `object set --property area` on the instance: + +```powershell +graccess object checkout --galaxy ZB --name TestMachine_001 --type instance --confirm --confirm-target TestMachine_001 +graccess object set --galaxy ZB --name TestMachine_001 --type instance --property area --value Area_Test --confirm --confirm-target TestMachine_001 +graccess object save --galaxy ZB --name TestMachine_001 --type instance --confirm --confirm-target TestMachine_001 +graccess object checkin --galaxy ZB --name TestMachine_001 --type instance --comment 'Assign area' --confirm --confirm-target TestMachine_001 +``` + +Validate area relationships: + +```powershell +graccess object query-condition --galaxy ZB --type instance --condition belongsToArea --value Area_Test --json +``` + +The current CLI resolves named GRAccess objects before falling back to string assignment for object-reference properties such as `area`, `host`, and `container`. + +## Create Or Find Engines + +Engine creation is also template-driven. The CLI has an `engine create` wrapper and also supports the underlying `template instantiate` workflow. + +Find engine templates: + +```powershell +graccess template list --galaxy ZB --pattern '%Engine%' --json +``` + +Create an engine instance only after confirming the correct platform/engine template for the target galaxy: + +```powershell +graccess engine create --galaxy ZB --template '$AppEngine' --name AppEngine_Test --confirm --confirm-target '$AppEngine' --llm-json +``` + +Equivalent lower-level form: + +```powershell +graccess template instantiate --galaxy ZB --name '$AppEngine' --type template --new-name AppEngine_Test --create-contained --confirm --confirm-target '$AppEngine' +``` + +If the galaxy already has a target engine, inspect it instead: + +```powershell +graccess object get --galaxy ZB --name AppEngine_Test --type instance --json +graccess object attributes --galaxy ZB --name AppEngine_Test --type instance --json +``` + +Engine templates and required container/platform relationships vary by System Platform version and galaxy standards. Use export/import or vendor tooling if engine creation requires fields the CLI does not expose yet. + +## Assign An Instance To An Engine + +Use `object set --property host`: + +```powershell +graccess object checkout --galaxy ZB --name TestMachine_001 --type instance --confirm --confirm-target TestMachine_001 +graccess object set --galaxy ZB --name TestMachine_001 --type instance --property host --value AppEngine_Test --confirm --confirm-target TestMachine_001 +graccess object save --galaxy ZB --name TestMachine_001 --type instance --confirm --confirm-target TestMachine_001 +graccess object checkin --galaxy ZB --name TestMachine_001 --type instance --comment 'Assign host engine' --confirm --confirm-target TestMachine_001 +``` + +Validate engine assignment: + +```powershell +graccess object query-condition --galaxy ZB --type instance --condition hostEngineIs --value AppEngine_Test --json +``` + +The current CLI resolves named GRAccess objects before falling back to string assignment for object-reference properties. + +## Assign Container Or Parent Object + +Use `object set --property container` when the instance should be contained by another object: + +```powershell +graccess object checkout --galaxy ZB --name TestMachine_001 --type instance --confirm --confirm-target TestMachine_001 +graccess object set --galaxy ZB --name TestMachine_001 --type instance --property container --value Area_Test --confirm --confirm-target TestMachine_001 +graccess object save --galaxy ZB --name TestMachine_001 --type instance --confirm --confirm-target TestMachine_001 +graccess object checkin --galaxy ZB --name TestMachine_001 --type instance --comment 'Assign container' --confirm --confirm-target TestMachine_001 +``` + +Validate containment: + +```powershell +graccess object query-condition --galaxy ZB --type instance --condition containedBy --value Area_Test --json +``` + +Container, area, and host are separate concepts. Use the property that matches the object model requirement for the template being instantiated. + +## Create And Edit Embedded Objects + +Embedded objects are contained child templates or instances. In the `TestMachine` family, `$TestMachine` contains `$TestMachine.DelmiaReceiver` and `$TestMachine.MESReceiver`; each `TestMachine_NNN` instance contains `DelmiaReceiver_NNN` and `MESReceiver_NNN`. + +Create embedded objects by instantiating the parent with `--create-contained`: + +```powershell +graccess template instantiate --galaxy ZB --name '$TestMachine' --type template --new-name TestMachine_021 --create-contained --confirm --confirm-target '$TestMachine' --llm-json +``` + +Verify parent and child objects: + +```powershell +graccess object snapshot --galaxy ZB --name TestMachine_021 --type instance --llm-json +graccess instance list --galaxy ZB --pattern '%021%' --llm-json +graccess object query-condition --galaxy ZB --type instance --condition hierarchicalNameLike --value '%TestMachine_021%' --llm-json +``` + +If relationship queries do not return the embedded children, fall back to instance list patterns and child naming conventions: + +```powershell +graccess instance list --galaxy ZB --pattern '%DelmiaReceiver_021%' --llm-json +graccess instance list --galaxy ZB --pattern '%MESReceiver_021%' --llm-json +``` + +Edit embedded child instances by targeting the child instance tagname: + +```powershell +graccess object snapshot --galaxy ZB --name DelmiaReceiver_021 --type instance --llm-json +graccess object checkout --galaxy ZB --name DelmiaReceiver_021 --type instance --confirm --confirm-target DelmiaReceiver_021 +graccess object attribute value set --galaxy ZB --name DelmiaReceiver_021 --type instance --attribute DownloadPath --value 'C:\Recipes\021' --data-type string --confirm --confirm-target DelmiaReceiver_021 --llm-json +graccess object save --galaxy ZB --name DelmiaReceiver_021 --type instance --confirm --confirm-target DelmiaReceiver_021 +graccess object checkin --galaxy ZB --name DelmiaReceiver_021 --type instance --comment 'Configure embedded Delmia receiver' --confirm --confirm-target DelmiaReceiver_021 +``` + +Assign or move containment with `instance assign-container` or `object set --property container` only when the target object model supports moving that object: + +```powershell +graccess instance assign-container --galaxy ZB --name DelmiaReceiver_021 --container TestMachine_021 --confirm --confirm-target DelmiaReceiver_021 --llm-json +``` + +Do not assume embedded child tag names are globally derivable from the parent number in every galaxy. Always verify `ContainedName` and `HierarchicalName` with `object snapshot`. + +## Assign I/O + +I/O assignment can mean different things depending on the template: + +| I/O concern | Usual configuration path | +|---|---| +| Host engine | `object set --property host` | +| Area | `object set --property area` | +| Parent/container | `object set --property container` | +| Device/topic/address/reference settings | Attribute values or extension payloads | +| Complex I/O object structure | Instantiate I/O templates, set relationships, or import package | + +First parse likely I/O settings: + +```powershell +$attrs = graccess object attributes --galaxy ZB --name TestMachine_001 --type instance --json | ConvertFrom-Json +$extended = graccess object extended-attributes --galaxy ZB --name TestMachine_001 --type instance --json | ConvertFrom-Json +$io = (@($attrs) + @($extended)) | Where-Object { + $_.Name -match '(?i)\bio\b|input|output|source|destination|scan|topic|device|address|reference' +} | Sort-Object Name -Unique + +$io | Select-Object Name, DataType, Category, RuntimeSetHandler, ConfigSetHandler +``` + +Edit simple I/O attributes: + +```powershell +graccess object checkout --galaxy ZB --name TestMachine_001 --type instance --confirm --confirm-target TestMachine_001 +graccess object attribute set --galaxy ZB --name TestMachine_001 --type instance --attribute DeviceAddress --value 'D100' --data-type string --confirm --confirm-target TestMachine_001 +graccess object attribute set --galaxy ZB --name TestMachine_001 --type instance --attribute ScanPeriod --value 1000 --data-type int --confirm --confirm-target TestMachine_001 +graccess object save --galaxy ZB --name TestMachine_001 --type instance --confirm --confirm-target TestMachine_001 +graccess object checkin --galaxy ZB --name TestMachine_001 --type instance --comment 'Assign I/O settings' --confirm --confirm-target TestMachine_001 +``` + +The exact attribute names are template-specific. Use `attribute-parsing.md` to identify real names before editing. + +The current CLI supports scalar attribute values only: `string`, `bool`, `int`, `float`, and `double`. Complex I/O settings such as object references, arrays, structured addresses, or extension-specific payloads may require object export/import or additional CLI value serialization. + +## Edit Instance Attributes + +For normal instance configuration: + +```powershell +graccess object checkout --galaxy ZB --name TestMachine_001 --type instance --confirm --confirm-target TestMachine_001 + +graccess object attribute set --galaxy ZB --name TestMachine_001 --type instance --attribute Description --value 'Machine 001' --data-type string --confirm --confirm-target TestMachine_001 + +graccess object attribute security --galaxy ZB --name TestMachine_001 --type instance --attribute Description --security MxSecurityOperate --confirm --confirm-target TestMachine_001 + +graccess object save --galaxy ZB --name TestMachine_001 --type instance --confirm --confirm-target TestMachine_001 +graccess object checkin --galaxy ZB --name TestMachine_001 --type instance --comment 'Configure instance' --confirm --confirm-target TestMachine_001 +``` + +For a deeper attribute workflow, use `attribute-editing.md`. + +## Deploy, Undeploy, And Upload + +Deploy an explicitly named test instance: + +```powershell +graccess instance deploy --galaxy ZB --name TestMachine_001 --type instance --confirm --confirm-target TestMachine_001 +``` + +Undeploy: + +```powershell +graccess instance undeploy --galaxy ZB --name TestMachine_001 --type instance --confirm --confirm-target TestMachine_001 +``` + +Upload runtime changes: + +```powershell +graccess instance upload --galaxy ZB --name TestMachine_001 --type instance --confirm --confirm-target TestMachine_001 +``` + +Bulk deployment commands are available, but use them only with explicit target selection: + +```powershell +graccess objects deploy --galaxy ZB --type instance --name TestMachine_001 --name TestMachine_002 --confirm --confirm-target TestMachine_001,TestMachine_002 +``` + +For bulk commands, the confirmation target must match the CLI's target list. Prefer single-instance deployment until the target list behavior is verified in a test galaxy. + +## Export Instance Configuration + +Export before risky edits: + +```powershell +$pkg = '.\instance-snapshots\TestMachine_001-before.aaPKG' +graccess objects export --galaxy ZB --type instance --name TestMachine_001 --output $pkg --confirm --confirm-target $pkg +``` + +For full-fidelity edits not supported by scalar CLI commands, edit through the supported package workflow and import: + +```powershell +graccess galaxy import-objects --galaxy ZB --file '.\instance-snapshots\TestMachine_001-edited.aaPKG' --overwrite --confirm --confirm-target '.\instance-snapshots\TestMachine_001-edited.aaPKG' +``` + +## Delete Test Instances + +Delete only explicitly named test instances: + +```powershell +graccess instance delete --galaxy ZB --name TestMachine_001 --type instance --confirm --confirm-target TestMachine_001 +``` + +If the object is deployed, undeploy it first unless the selected force option explicitly allows deletion. The command exposes `--force-option`; the default is `undeployIfDeployed`. + +```powershell +graccess instance delete --galaxy ZB --name TestMachine_001 --type instance --force-option undeployIfDeployed --confirm --confirm-target TestMachine_001 +``` + +## End-To-End Example + +This creates an area, creates a template instance, assigns area and engine, sets simple I/O attributes, and deploys the instance. + +```powershell +$galaxy = 'ZB' +$template = 'TestMachine' +$areaTemplate = '$Area' +$area = 'Area_Test' +$engine = 'AppEngine_Test' +$instance = 'TestMachine_001' + +graccess session start --galaxy $galaxy --node . + +graccess template instantiate --galaxy $galaxy --name $areaTemplate --type template --new-name $area --create-contained --confirm --confirm-target $areaTemplate + +graccess template instantiate --galaxy $galaxy --name $template --type template --new-name $instance --create-contained --confirm --confirm-target $template + +graccess object checkout --galaxy $galaxy --name $instance --type instance --confirm --confirm-target $instance +graccess object set --galaxy $galaxy --name $instance --type instance --property area --value $area --confirm --confirm-target $instance +graccess object set --galaxy $galaxy --name $instance --type instance --property host --value $engine --confirm --confirm-target $instance +graccess object attribute set --galaxy $galaxy --name $instance --type instance --attribute DeviceAddress --value 'D100' --data-type string --confirm --confirm-target $instance +graccess object attribute set --galaxy $galaxy --name $instance --type instance --attribute ScanPeriod --value 1000 --data-type int --confirm --confirm-target $instance +graccess object save --galaxy $galaxy --name $instance --type instance --confirm --confirm-target $instance +graccess object checkin --galaxy $galaxy --name $instance --type instance --comment 'Create and configure test instance' --confirm --confirm-target $instance + +graccess instance deploy --galaxy $galaxy --name $instance --type instance --confirm --confirm-target $instance +``` + +Before running this exact sequence, verify `$Area`, `AppEngine_Test`, `DeviceAddress`, and `ScanPeriod` are valid in the target galaxy. These names are examples, not universal System Platform requirements. + +## Post-Edit Verification + +Verify object records and relationships: + +```powershell +graccess object get --galaxy ZB --name TestMachine_001 --type instance --json +graccess object attributes --galaxy ZB --name TestMachine_001 --type instance --configurable --json +graccess object query-condition --galaxy ZB --type instance --condition belongsToArea --value Area_Test --json +graccess object query-condition --galaxy ZB --type instance --condition hostEngineIs --value AppEngine_Test --json +``` + +If deployed, verify deployment status through available object details or System Platform tooling. The current `object get` output does not emit every `IInstance` status property; extending object details to include `DeploymentStatus`, `DeployedVersion`, validation errors, and warnings is recommended. + +## Current CLI Gaps For Instance Work + +| Area | Current status | Recommended next step | +|---|---|---| +| Dedicated area commands | Areas are created and edited as normal instances | Add `area create/edit/list` wrappers if desired | +| Dedicated engine commands | Engines are created and edited as normal instances | Add `engine create/edit/list` wrappers if desired | +| Object-reference assignment | `object set` currently writes the supplied value directly | Resolve named objects and assign COM object references when required | +| Bulk property edits | Bulk deploy/undeploy/upload/delete/export exist; bulk `area`/`host` assignment does not | Add guarded `objects set` after single-object assignment is reliable | +| Complex I/O values | Scalar `MxValue` writes only | Add array/reference/structured value serialization | +| Deployment status details | `object get` does not emit all instance status fields | Extend object detail output defensively | diff --git a/graccesscli/docs/template-parsing.md b/graccesscli/docs/template-parsing.md new file mode 100644 index 0000000..e211a05 --- /dev/null +++ b/graccesscli/docs/template-parsing.md @@ -0,0 +1,275 @@ +# Parsing Existing Templates + +This guide describes a read-only workflow for inspecting an existing GRAccess template, using `TestMachine` as the example target. The same steps work for any template name. + +Use this document as the top-level workflow. For deeper coverage, also read: + +- `attribute-parsing.md` - all attributes, configurable attributes, extended attributes, and setting families such as history, I/O, alarms, UDAs, and extensions. +- `script-parsing.md` - script libraries, object-level script discovery, and export-based script capture. + +Examples assume the CLI is available as `graccess`. During local development, replace `graccess` with: + +```powershell +dotnet run --project src/ZB.MOM.WW.GRAccess.Cli/ZB.MOM.WW.GRAccess.Cli.csproj -- +``` + +Run commands from `graccess_cli`. + +## Session Setup + +For repeated template parsing, start a session first so commands reuse one GRAccess login: + +```powershell +graccess session start --galaxy ZB --node . +``` + +After a session is active, logged-in commands can omit `--node`: + +```powershell +graccess template list --galaxy ZB --pattern '%TestMachine%' --json +``` + +Without a session, include `--node .` on each command: + +```powershell +graccess template list --galaxy ZB --node . --pattern '%TestMachine%' --json +``` + +For LLM-driven parsing, prefer the bundled machine snapshot before running narrower commands: + +```powershell +graccess object snapshot --galaxy ZB --name TestMachine --type template --llm-json +``` + +Use the narrower `object attributes`, `object extended-attributes`, and script commands when you need to drill into a specific section or compare legacy `--json` output. + +## Find The Template + +Use `template list` to confirm the exact template tagname. GRAccess patterns use `%` as the wildcard. + +```powershell +graccess template list --galaxy ZB --pattern '%TestMachine%' --json +``` + +If the template name starts with `$`, quote it with single quotes in PowerShell: + +```powershell +graccess template list --galaxy ZB --pattern '%$TestMachine%' --json +``` + +## Read Template Identity + +Use `object get` with `--type template` to fetch the core object record: + +```powershell +graccess object get --galaxy ZB --name TestMachine --type template --json +``` + +Expected fields include: + +| Field | Meaning | +|---|---| +| `Kind` | `template` for template objects | +| `Tagname` | Template tagname | +| `ContainedName` | Name inside its container | +| `HierarchicalName` | Galaxy hierarchy path when available | +| `CheckoutStatus` | Current checkout state | + +For LLM-oriented parsing, prefer `object snapshot --llm-json` because it returns the same identity section plus attributes, relationships, script metadata, and unavailable-field details in one stable envelope. + +## Parse Inheritance And Containment + +Template inheritance and containment are separate relationships: + +| Relationship | Meaning | Typical command | +| --- | --- | --- | +| Derived from | Template extends another template, such as `$TestMachine` extending `$gMachine` | `object snapshot`, `object lineage`, `object query-condition --condition derivedOrInstantiatedFrom` | +| Based on | Descendant or instance family relationship to a base template | `object query-condition --condition basedOn` | +| Contained by | Embedded template or object inside a parent template/instance | `object children`, `object query-condition --condition containedBy`; `template instantiate --create-contained` for creation | + +Start with the snapshot: + +```powershell +graccess object snapshot --galaxy ZB --name '$TestMachine' --type template --llm-json +graccess object lineage --galaxy ZB --name '$TestMachine' --type template --llm-json +graccess object children --galaxy ZB --name '$TestMachine' --type template --llm-json +``` + +Check `data.Lineage`, `data.Children`, `data.ContainedObjects`, and these fields in the returned `data.Object` object: + +| Field | Meaning | +| --- | --- | +| `DerivedFrom` | Immediate parent template when the local GRAccess property is exposed | +| `BasedOn` | Base template lineage when exposed | +| `ContainedName` | Embedded name inside the parent template or instance | +| `HierarchicalName` | Full contained path when exposed | + +Then run relationship queries: + +```powershell +graccess object query-condition --galaxy ZB --type all --condition derivedOrInstantiatedFrom --value '$gMachine' --llm-json +graccess object query-condition --galaxy ZB --type all --condition basedOn --value '$gMachine' --llm-json +graccess object query-condition --galaxy ZB --type all --condition containedBy --value '$TestMachine' --llm-json +graccess object query-condition --galaxy ZB --type all --condition hierarchicalNameLike --value '%TestMachine%' --llm-json +``` + +GRAccess relationship queries can be version-sensitive. The CLI now tries typed template/instance properties first, then uses a read-only exported package fallback for snapshot, lineage, children, attribute values, and script bodies when export is available. If both direct GRAccess and package fallback are unavailable, document the unavailable entry and avoid guessing. Do not use Galaxy SQL as part of normal parsing; SQL is only a development verification/debugging oracle. + +Contained embedded templates should be parsed as their own templates: + +```powershell +graccess object snapshot --galaxy ZB --name '$TestMachine.DelmiaReceiver' --type template --llm-json +graccess object snapshot --galaxy ZB --name '$TestMachine.MESReceiver' --type template --llm-json +``` + +Contained instances should be parsed as their own instances: + +```powershell +graccess object snapshot --galaxy ZB --name DelmiaReceiver_001 --type instance --llm-json +graccess object snapshot --galaxy ZB --name MESReceiver_001 --type instance --llm-json +``` + +When available, compare `Tagname`, `ContainedName`, and `HierarchicalName` to connect child instance tags back to parent paths such as `TestMachine_001.DelmiaReceiver`. + +## Dump Attributes + +Use `object attributes` to enumerate the template attributes: + +```powershell +graccess object attributes --galaxy ZB --name TestMachine --type template --json +``` + +Use `--configurable` when you only need configurable attributes: + +```powershell +graccess object attributes --galaxy ZB --name TestMachine --type template --configurable --json +``` + +Attribute JSON includes the stable metadata currently exposed by the CLI: + +| Field | Meaning | +|---|---| +| `Name` | Attribute name | +| `DataType` | GRAccess data type | +| `Category` | Attribute category | +| `SecurityClassification` | Security classification | +| `Locked` | Lock state | +| `UpperBoundDim1` | Array upper bound when available | +| `HasBuffer` | Attribute buffer flag when available | +| `RuntimeSetHandler` | Runtime set handler flag when available | +| `ConfigSetHandler` | Config set handler flag when available | + +Some COM-backed metadata is not available on every attribute. In JSON output, unavailable values are returned as `null`. + +## Read One Attribute + +Use `object attribute get` when you already know the attribute name and need its metadata without dumping the full collection: + +```powershell +graccess object attribute get --galaxy ZB --name TestMachine --type template --attribute Description --json +``` + +This command is read-only and does not require `--confirm`. + +## Dump Extended Attributes + +Use `object extended-attributes` to call GRAccess `GetExtendedAttributes` for the template: + +```powershell +graccess object extended-attributes --galaxy ZB --name TestMachine --type template --json +``` + +You can scope the request with an attribute name and hierarchy level: + +```powershell +graccess object extended-attributes --galaxy ZB --name TestMachine --type template --attribute Description --level 0 --json +``` + +The output uses the same attribute metadata shape as `object attributes`. + +For parsing all attribute settings, including properties, history settings, I/O settings, alarm settings, UDAs, and extensions, use the expanded workflow in `attribute-parsing.md`. + +## Capture Scripts + +Template scripts may appear as script-related attributes, extension attributes, exported object package content, or script libraries. Use `script-parsing.md` when a parse needs script bodies, declarations, triggers, or script-library files. + +Minimum script-related capture for `TestMachine`: + +```powershell +graccess script-library list --galaxy ZB --json +graccess object attributes --galaxy ZB --name TestMachine --type template --json +graccess object extended-attributes --galaxy ZB --name TestMachine --type template --json +``` + +For complete script content, export the template object: + +```powershell +$pkg = '.\template-snapshots\TestMachine\TestMachine.aaPKG' +graccess objects export --galaxy ZB --type template --name TestMachine --output $pkg --confirm --confirm-target $pkg +``` + +## Find Related Objects + +Use `object query-condition` to find objects related to the template. + +First-level derived templates or instantiated instances: + +```powershell +graccess object query-condition --galaxy ZB --type all --condition derivedOrInstantiatedFrom --value TestMachine --json +``` + +All descendants based on the same base template: + +```powershell +graccess object query-condition --galaxy ZB --type all --condition basedOn --value TestMachine --json +``` + +Objects contained by the template: + +```powershell +graccess object query-condition --galaxy ZB --type all --condition containedBy --value TestMachine --json +``` + +Useful `EConditionType` values for parsing template relationships are documented in `graccess_documentation.md` under `EConditionType`. The most common values for template parsing are `namedLike`, `NameEquals`, `derivedOrInstantiatedFrom`, `basedOn`, `containedBy`, and `hierarchicalNameLike`. + +## Save A Local Parse Snapshot + +PowerShell can capture JSON output into files for comparison or downstream processing: + +```powershell +$name = 'TestMachine' +$out = '.\template-snapshots' +New-Item -ItemType Directory -Force -Path $out | Out-Null + +graccess object get --galaxy ZB --name $name --type template --json ` + | Set-Content "$out\$name.object.json" + +graccess object attributes --galaxy ZB --name $name --type template --json ` + | Set-Content "$out\$name.attributes.json" + +graccess object attributes --galaxy ZB --name $name --type template --configurable --json ` + | Set-Content "$out\$name.configurable-attributes.json" + +graccess object extended-attributes --galaxy ZB --name $name --type template --json ` + | Set-Content "$out\$name.extended-attributes.json" + +graccess script-library list --galaxy ZB --json ` + | Set-Content "$out\script-libraries.json" + +graccess object query-condition --galaxy ZB --type all --condition derivedOrInstantiatedFrom --value $name --json ` + | Set-Content "$out\$name.children.json" + +graccess object query-condition --galaxy ZB --type all --condition basedOn --value $name --json ` + | Set-Content "$out\$name.descendants.json" +``` + +To inspect the parsed JSON in PowerShell: + +```powershell +$attrs = Get-Content '.\template-snapshots\TestMachine.attributes.json' -Raw | ConvertFrom-Json +$attrs | Sort-Object Name | Select-Object Name, DataType, Category, Locked +``` + +## Safety Notes + +The commands in this guide are read-only. Do not use `object set`, `object attribute set`, `object uda`, `object extension`, `template derive`, `template instantiate`, or delete/deploy commands while parsing unless you intentionally want to mutate the galaxy and pass the required `--confirm` and `--confirm-target` flags. diff --git a/graccesscli/docs/usage.md b/graccesscli/docs/usage.md new file mode 100644 index 0000000..aa28df1 --- /dev/null +++ b/graccesscli/docs/usage.md @@ -0,0 +1,435 @@ +# GRAccess CLI Usage + +Command-line interface for Aveva System Platform Galaxy management via the GRAccess library. + +## Global Options + +All commands that interact with a galaxy require: + +| Option | Short | Description | Required | +|---|---|---|---| +| `--galaxy` | `-g` | Galaxy name | Yes | +| `--node` | `-n` | GR node name. Blank defaults to local node; `.` is normalized to the local machine name. | One-shot mode only | + +In session mode, `--node` is not needed because the daemon already holds the connection. + +Machine-facing commands also support: + +| Option | Description | +|---|---| +| `--json` | Legacy command-specific JSON. Existing shapes are preserved. | +| `--llm-json` | Stable success/error envelope for LLM and tool callers. | +| `--dry-run` | For mutating routed commands, validate arguments and confirmation without invoking mutating GRAccess calls. | + +`--llm-json` envelope shape: + +```json +{ + "success": true, + "command": "object get", + "galaxy": "ZB", + "target": "TestMachine", + "data": {}, + "commandResult": null, + "warnings": [], + "unavailable": [], + "error": null, + "exitCode": 0 +} +``` + +## LLM And Tooling Commands + +### `capabilities` + +Return the code-backed command registry. + +```powershell +graccess capabilities --json +graccess capabilities --llm-json +``` + +The registry includes command names, arguments, mutation status, session routing support, confirmation target rules, and output schema names. + +### `validate` + +Validate a single-command or batch plan file without connecting to GRAccess. + +```powershell +graccess validate --request plan.json --llm-json +``` + +### `batch` + +Validate or execute a command plan. Execution stops on first failure. Every mutating step must include its own `confirm=true` and exact `confirm-target`. + +```powershell +graccess batch --file plan.json --mode validate --llm-json +graccess batch --file plan.json --mode execute --llm-json +``` + +Plan example: + +```json +{ + "Galaxy": "ZB", + "Node": ".", + "Commands": [ + { + "Command": "object attribute value set", + "Args": { + "name": "TestMachine", + "type": "template", + "attribute": "Description", + "value": "Updated", + "data-type": "string", + "confirm": true, + "confirm-target": "TestMachine" + } + } + ] +} +``` + +## Galaxy Commands + +### `galaxy list` + +List available galaxies on a GR node. + +``` +graccess galaxy list [--node ] [--json] [--llm-json] +``` + +| Option | Short | Required | Description | +|---|---|---|---| +| `--node` | `-n` | No | GR node name to query. Blank defaults to local node; `.` is normalized to the local machine name. | +| `--json` | | No | Output as JSON array | +| `--llm-json` | | No | Output stable LLM envelope | + +This command always runs in one-shot mode (no galaxy login needed). It does not use or require an active session. + +Example output: +``` +MyGalaxy1 +MyGalaxy2 +TestGalaxy +``` + +With `--json`: +```json +[ + "MyGalaxy1", + "MyGalaxy2", + "TestGalaxy" +] +``` + +--- + +## Object Query Commands + +These commands route through an active session when one exists for the target galaxy. Without an active session, they connect to a galaxy, run a read-only GRAccess query, and disconnect. Name patterns use the GRAccess `namedLike` condition; use `%` as the wildcard. + +### `object list` + +List templates, instances, or both. + +``` +graccess object list --galaxy --node [--type all|template|instance] [--pattern ] [--json] +``` + +| Option | Short | Default | Description | +|---|---|---|---| +| `--galaxy` | `-g` | (required) | Galaxy name | +| `--node` | `-n` | local node | GR node name. `.` is normalized to the local machine name. | +| `--type` | `-t` | `all` | Object type: `all`, `template`, or `instance` | +| `--pattern` | `-p` | `%` | GRAccess name pattern. Use `%` as wildcard. | +| `--json` | | `false` | Output as JSON | + +Example: +```powershell +graccess object list --galaxy ZB --node . --type instance --pattern 'TestMachine_%' +``` + +### `template list` + +List templates. + +``` +graccess template list --galaxy --node [--pattern ] [--json] +``` + +### `instance list` + +List instances. + +``` +graccess instance list --galaxy --node [--pattern ] [--json] +``` + +Example: +```powershell +graccess instance list --galaxy ZB --node . --pattern '%' +``` + +### `object attributes` + +List attributes for a template or instance. + +``` +graccess object attributes --galaxy --node --name [--type all|template|instance] [--configurable] [--json] +``` + +| Option | Short | Default | Description | +|---|---|---|---| +| `--galaxy` | `-g` | (required) | Galaxy name | +| `--node` | `-n` | local node | GR node name. `.` is normalized to the local machine name. | +| `--name` | | (required) | Template or instance tagname | +| `--type` | `-t` | `all` | Object type: `all`, `template`, or `instance` | +| `--configurable` | | `false` | Query `ConfigurableAttributes` instead of `Attributes` | +| `--json` | | `false` | Output as JSON | + +Some optional COM-backed attribute properties are not available for every object. In JSON output those values are emitted as `null`; text output includes the stable name, data type, and category columns. + +Example: +```powershell +graccess object attributes --galaxy ZB --node . --name DEV --type instance --configurable +``` + +--- + +## LLM Snapshot And IDE Commands + +### `object snapshot` + +Return a bundled object snapshot for planning and verification. + +```powershell +graccess object snapshot --galaxy ZB --name TestMachine --type template --llm-json +``` + +Snapshot data includes object identity/status, all attributes, configurable attributes, extended attributes, relationships, lineage, children, contained objects, package-backed attribute values and script bodies where available, and unavailable field details. + +Use snapshots, direct lineage commands, and relationship queries together to parse inheritance and containment: + +```powershell +graccess object snapshot --galaxy ZB --name '$TestMachine' --type template --llm-json +graccess object lineage --galaxy ZB --name '$TestMachine' --type template --llm-json +graccess object children --galaxy ZB --name '$TestMachine' --type template --llm-json +graccess object query-condition --galaxy ZB --type all --condition derivedOrInstantiatedFrom --value '$gMachine' --llm-json +graccess object query-condition --galaxy ZB --type all --condition basedOn --value '$gMachine' --llm-json +graccess object query-condition --galaxy ZB --type all --condition containedBy --value '$TestMachine' --llm-json +graccess object query-condition --galaxy ZB --type all --condition hierarchicalNameLike --value '%TestMachine%' --llm-json +``` + +`object lineage` walks typed `ITemplate` / `IInstance` relationship properties first and falls back to the read-only package snapshot when GRAccess export is available. `object children` combines package-backed containment with direct GRAccess scans for objects whose `DerivedFrom`, `BasedOn`, `Container`, or `HierarchicalName` point at the target. + +When direct GRAccess does not expose a field, the CLI records a structured unavailable entry instead of guessing. Normal CLI usage does not query the Galaxy SQL database; SQL is allowed only for development verification/debugging outside the supported command path. + +### Attribute values + +```powershell +graccess object attribute value get --galaxy ZB --name TestMachine --type template --attribute Description --llm-json +graccess object attribute value set --galaxy ZB --name TestMachine --type template --attribute Description --value Updated --data-type string --confirm --confirm-target TestMachine --llm-json +``` + +Scalar `string`, `bool`, `int`, `float`, and `double` writes are supported first. Value reads try direct `IAttribute.Value` first, then use the read-only exported package fallback for scalar package values. Array and complex readback returns structured unavailable details unless parsed safely. + +### Object scripts + +```powershell +graccess object scripts list --galaxy ZB --name TestMachine --type template --llm-json +graccess object scripts get --galaxy ZB --name TestMachine --type template --script UpdateTestChangingInt --llm-json +graccess object scripts get --galaxy ZB --name TestMachine --type template --script UpdateTestChangingInt.ExecuteText --llm-json +graccess object scripts set --galaxy ZB --name TestMachine --type template --script UpdateTestChangingInt --file UpdateTestChangingInt.txt --confirm --confirm-target TestMachine --llm-json +graccess object scripts settings set --galaxy ZB --name '$TestMachine' --type template --script UpdateTestChangingInt --trigger-period-ms 500 --lock-trigger-period --confirm --confirm-target '$TestMachine' --llm-json +graccess object scripts create --galaxy ZB --name '$MyTemplate' --type template --script OnScan --file OnScan.txt --trigger-type Periodic --trigger-period-ms 1000 --confirm --confirm-target '$MyTemplate' --llm-json +``` + +Direct object script body access depends on the local GRAccess object model. Reads inspect the exported package fallback for script extension bodies and script text fields such as `ExecuteText`, `DeclarationsText`, `StartupText`, `ShutdownText`, `OnScanText`, `OffScanText`, and `Expression`. + +For writes, the CLI follows the GRAccess pattern used by `ScriptExtension` objects: script body and setting mutations prefer `IgObject.ConfigurableAttributes[...]`, then fall back to `Attributes[...]` only if the configurable collection does not expose the requested field. `object scripts set` writes the matching script body attribute; a bare script name maps to `.ExecuteText`. `object scripts settings set` writes common script settings such as `TriggerPeriod`, `TriggerType`, and `Expression`; `--lock-trigger-period` applies `MxLockedInMe` so derived instances receive the interval on deploy. `object scripts create` calls `AddExtensionPrimitive("ScriptExtension",