Initial commit: Wonderware / System Platform tools and reference
Five tools under one repo, all docs organized per DOCS-GUIDE.md: - aalogcli: .NET 4.8 / x86 CliFx CLI for reading System Platform binary logs (*.aaLGX) for LLM debugging, built on aaOpenSource/aaLog. Commands: last, tail, range, unread, fields. Stable JSON envelope under --llm-json. Build template under lib/build/ for rebuilding aaLogReader.dll. - aot: ArchestrA Object Toolkit 2014 v4.0 reference material. Dev guide (Markdown converted from CHM), API reference for the ArchestrA.Toolkit namespace, and the Monitor / Watchdog VS sample solutions. - graccesscli: .NET 4.8 / x86 CliFx CLI that automates Galaxy configuration via the ArchestrA GRAccess COM interop. Includes session daemon, IPC protocol, and llm-json envelope contract. - grdb: SQL/DDL exploration of the Galaxy Repository database. DDL captures, reusable queries, hierarchy / contained-name <-> tag-name translation notes. - histdb: LLM-oriented reference for AVEVA Historian retrieval. INSQL linked-server, extension tables, every wwXxx time-domain extension, every retrieval mode, alarm/event SQL recipes, REST API. Distilled from the 243-page Historian Retrieval Guide. Root contains: - CLAUDE.md: thin index pointing into each tool's README. - DOCS-GUIDE.md: doctrine for organizing docs for LLM consumption. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+25
@@ -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
|
||||
@@ -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 `<tool>/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`.
|
||||
+102
@@ -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
|
||||
|
||||
```
|
||||
<repo-root>/
|
||||
CLAUDE.md # layer 1: thin index, pointers only
|
||||
DOCS-GUIDE.md # this file
|
||||
<tool>/
|
||||
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
|
||||
<doc-area>/... # 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 — `<tool>/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?" | `<tool>/README.md` |
|
||||
| "How do I do task X with this tool?" | `<tool>/<doc-area>/<task>.md` |
|
||||
| Tool API reference / type catalog | `<tool>/<reference>/...` |
|
||||
| Coding rules for an agent working in this tool | `<tool>/AGENTS.md` or `<tool>/CLAUDE.md` |
|
||||
| Active incident / regression / defect | `<tool>/<dated-incident>.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 `<tool>/README.md`, the structure is working.
|
||||
|
||||
## Maintenance discipline
|
||||
|
||||
- **New tool added →** create `<tool>/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.
|
||||
@@ -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 -- <args>
|
||||
```
|
||||
|
||||
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/<Name>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`).
|
||||
@@ -0,0 +1,5 @@
|
||||
<Solution>
|
||||
<Folder Name="/src/">
|
||||
<Project Path="src/AaLog.Cli/AaLog.Cli.csproj" />
|
||||
</Folder>
|
||||
</Solution>
|
||||
@@ -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 <path>` 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 <wwtools>\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 <wwtools>\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 <wwtools>\aalogcli\lib\aaLogReader.dll
|
||||
```
|
||||
|
||||
The csproj template sets `<Deterministic>false</Deterministic>` (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.
|
||||
@@ -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.
|
||||
@@ -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 <path>` | `C:\ProgramData\ArchestrA\LogFiles` | Read from a copied-out log directory. |
|
||||
| `--component <pattern>` | (none) | Substring match against `Component`. With `--regex`, treated as a regex. |
|
||||
| `--level <pattern>` | (none) | Substring/regex against `LogFlag` (`Info`, `Warning`, `Error`, `Trace`, …). |
|
||||
| `--message <pattern>` | (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 <int>` | `50` | How many records to return. |
|
||||
| `--until <iso>` | 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 <int>` | `10` | Window length in minutes. Must be positive. |
|
||||
| `--max <int>` | `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 <iso>` | (required) | Start timestamp, ISO-8601 local time. |
|
||||
| `--to <iso>` | now | End timestamp, ISO-8601 local time. Must be later than `--from`. |
|
||||
| `--max <int>` | `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 <ulong>` | `1000` | Maximum unread records to return. |
|
||||
| `--ignore-cache` | off | Re-read regardless; the next call resumes from the new high-water mark. |
|
||||
| `--client-id <name>` | (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 <agent-name>` 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.
|
||||
@@ -0,0 +1,3 @@
|
||||
aaLogReader.dll must be dropped into this folder before building.
|
||||
|
||||
See ../README.md "Provisioning aaLogReader.dll" for build instructions.
|
||||
@@ -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.
|
||||
|
||||
@@ -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 `<Compile Include="..\aaLog\aaLogReader\..." />` 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`.
|
||||
@@ -0,0 +1,38 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net48</TargetFramework>
|
||||
<RootNamespace>aaLogReader</RootNamespace>
|
||||
<AssemblyName>aaLogReader</AssemblyName>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
|
||||
<Deterministic>false</Deterministic>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="log4net" Version="2.0.15" />
|
||||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.3" PrivateAssets="all" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="System.ComponentModel.Composition" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\aaLog\aaLogReader\aaLgxReader.cs" />
|
||||
<Compile Include="..\aaLog\aaLogReader\aaLogReader.cs" />
|
||||
<Compile Include="..\aaLog\aaLogReader\Enum\*.cs" />
|
||||
<Compile Include="..\aaLog\aaLogReader\Helpers\*.cs" />
|
||||
<Compile Include="..\aaLog\aaLogReader\Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="..\aaLog\aaLogReader\Struct\*.cs" />
|
||||
<Compile Include="..\aaLog\aaLogReader\Types\ILogHeader.cs" />
|
||||
<Compile Include="..\aaLog\aaLogReader\Types\ILogRecord.cs" />
|
||||
<Compile Include="..\aaLog\aaLogReader\Types\aaLogReaderException.cs" />
|
||||
<Compile Include="patched\LogRecord.cs" />
|
||||
<Compile Include="patched\LogHeader.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return the log header data in the form of a Key-Value Pair
|
||||
/// </summary>
|
||||
/// <param name="format">Full or Minimal</param>
|
||||
/// <returns></returns>
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a header for a series of log records with a delimiter
|
||||
/// </summary>
|
||||
/// <param name="Delimiter"></param>
|
||||
/// <param name="format"></param>
|
||||
/// <returns></returns>
|
||||
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');
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the lastRecordRead in the form of a delimited string
|
||||
/// </summary>
|
||||
/// <param name="Delimiter">Delimiter to Use</param>
|
||||
/// <param name="format">Full or Minimal</param>
|
||||
/// <returns></returns>
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,278 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
using System.Text;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace aaLogReader
|
||||
{
|
||||
/// <summary>
|
||||
/// A standard log record
|
||||
/// </summary>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Return the log record in the form of a Key-Value Pair
|
||||
/// </summary>
|
||||
/// <param name="format">Full or Minimal</param>
|
||||
/// <returns></returns>
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get a header for a series of log records with a delimiter
|
||||
/// </summary>
|
||||
/// <param name="Delimiter"></param>
|
||||
/// <param name="format"></param>
|
||||
/// <returns></returns>
|
||||
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);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the log record in the form of a delimited string
|
||||
/// </summary>
|
||||
/// <param name="Delimiter">Delimiter to Use</param>
|
||||
/// <param name="format">Full or Minimal</param>
|
||||
/// <returns></returns>
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net48</TargetFramework>
|
||||
<Platforms>x86</Platforms>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
<RootNamespace>AaLog.Cli</RootNamespace>
|
||||
<AssemblyName>aalog</AssemblyName>
|
||||
<LangVersion>9.0</LangVersion>
|
||||
<Nullable>disable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="CliFx" Version="2.3.5" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="log4net" Version="2.0.15" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="aaLogReader">
|
||||
<HintPath>..\..\lib\aaLogReader.dll</HintPath>
|
||||
<Private>true</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -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; }
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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<aaLogReader.LogRecord>();
|
||||
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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<aaLogReader.LogRecord>();
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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<aaLogReader.LogRecord>();
|
||||
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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<aaLogReader.LogRecord>();
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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<LogRecordDto> Apply(
|
||||
IEnumerable<LogRecordDto> records,
|
||||
string componentPattern,
|
||||
string levelPattern,
|
||||
string messagePattern,
|
||||
bool useRegex)
|
||||
{
|
||||
Predicate<string> componentMatch = Build(componentPattern, useRegex);
|
||||
Predicate<string> levelMatch = Build(levelPattern, useRegex);
|
||||
Predicate<string> 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<string> 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// Polyfill so C# 9.0 `init` accessors compile on net48.
|
||||
namespace System.Runtime.CompilerServices
|
||||
{
|
||||
internal static class IsExternalInit { }
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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,
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -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<LogRecordDto> 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<LogRecordDto> records)
|
||||
{
|
||||
var envelope = new
|
||||
{
|
||||
query,
|
||||
count = records.Count,
|
||||
records,
|
||||
};
|
||||
console.Output.WriteLine(JsonConvert.SerializeObject(envelope, JsonSettings));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using System.Threading.Tasks;
|
||||
using CliFx;
|
||||
|
||||
namespace AaLog.Cli
|
||||
{
|
||||
public static class Program
|
||||
{
|
||||
public static async Task<int> Main(string[] args) =>
|
||||
await new CliApplicationBuilder()
|
||||
.SetTitle("aalog")
|
||||
.SetExecutableName("aalog")
|
||||
.SetDescription("Read AVEVA / Wonderware System Platform binary log records.")
|
||||
.AddCommandsFromThisAssembly()
|
||||
.Build()
|
||||
.RunAsync(args);
|
||||
}
|
||||
}
|
||||
@@ -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 (`<Name>`, `<Name>Configtime`, `<Name>Editor`, `<Name>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.
|
||||
@@ -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
|
||||
Binary file not shown.
@@ -0,0 +1,410 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xml>
|
||||
<version>1</version>
|
||||
<CCData>
|
||||
<RTSODEC><![CDATA[ #region Declarations
|
||||
//Declare Runtime Class Variables here.
|
||||
//Variables declared in this region are available to all methods
|
||||
//in the Runtime Class.
|
||||
|
||||
|
||||
]]></RTSODEC>
|
||||
<RTSOGetStatusDesc><![CDATA[ //------------------------------------------------------------------------------
|
||||
// TODO: Runtime Event - GetStatusDesc
|
||||
//
|
||||
// This routine provides a String for an error code when a client requests it.
|
||||
// By default this method looks for an entry in the dictionary that has the
|
||||
// DetailedErrorCode as the PhraseID.
|
||||
//
|
||||
// You need to change this implmentation if you want to provide embedded values
|
||||
// within your messages, or you want to use string PhraseIDs instead of integer
|
||||
// PhraseIDs.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
switch (e.detailedErrorCode)
|
||||
{
|
||||
default:
|
||||
e.status = GetText((int)e.detailedErrorCode);
|
||||
break;
|
||||
}
|
||||
]]></RTSOGetStatusDesc>
|
||||
<RTSOSetScanState><![CDATA[ //------------------------------------------------------------------------------
|
||||
// TODO: Runtime Event - SetScanState
|
||||
//
|
||||
// Perform actions when the object goes on or off scan.
|
||||
//------------------------------------------------------------------------------
|
||||
]]></RTSOSetScanState>
|
||||
<RTSOInitialize><![CDATA[ //------------------------------------------------------------------------------
|
||||
// TODO: Runtime - Initialize
|
||||
//
|
||||
// Do not read or write attribute values of this primitive during Initialize
|
||||
//------------------------------------------------------------------------------
|
||||
]]></RTSOInitialize>
|
||||
<RTSOExecute><![CDATA[ //------------------------------------------------------------------------------
|
||||
// TODO: Runtime - Execute
|
||||
//
|
||||
// This is where the main logic of the object periodically executes when
|
||||
// the object is on scan.
|
||||
//
|
||||
// Read or write the attributes of this primitive using the generated
|
||||
// properties (Value, Quality).
|
||||
//------------------------------------------------------------------------------
|
||||
#region Example code
|
||||
// // The lines below both increment the value of the attribute "Attribute1" by 1
|
||||
// Example_001 ++;
|
||||
// Example_001 = Example_001 + 1;
|
||||
//
|
||||
// //Example_001 quality is set to Bad on Condition_001 being true.
|
||||
// Example_001.Quality = (Condition_001 ? DataQuality.DataQualityBad : DataQuality.DataQualityGood);
|
||||
//
|
||||
// // The attribute "ElapsedTime" contains the time elapsed since the last reset
|
||||
// ElapsedTime = GetScanTime() - TimeOfLastReset;
|
||||
//
|
||||
// // Increment the 3rd element of an array
|
||||
// FloatArray[3] ++;
|
||||
//
|
||||
// // Increment all the elements of an array
|
||||
// for( short counter = 1; counter <= FloatArray.Length; counter ++)
|
||||
// {
|
||||
// FloatArray[counter] ++;
|
||||
// }
|
||||
#endregion
|
||||
]]></RTSOExecute>
|
||||
<RTSOShutdown><![CDATA[ //------------------------------------------------------------------------------
|
||||
// TODO: Runtime Event - Shutdown
|
||||
//
|
||||
// Clean up dynamic allocation, release open resources, etc.
|
||||
//------------------------------------------------------------------------------
|
||||
]]></RTSOShutdown>
|
||||
<RTSOStartup><![CDATA[ //------------------------------------------------------------------------------
|
||||
// TODO: Runtime Event - Startup
|
||||
//
|
||||
// Cache attributes. Cache Primitive IDs of other known primitives.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// RestoreDynamicAttributes will recreate the Dynamic Attributes and restore the check pointed
|
||||
// values during failover startup. The Failover Support for Dynamic Attributes option must
|
||||
// be enabled via the Object Editor to support this function. To maintain the
|
||||
// Dynamic Attribute values the CheckpointDynamicAttributeData function must be called
|
||||
// when Dynamic Attribute values are modified (refer to the Dynamic Attribute Set Handler).
|
||||
|
||||
//RestoreDynamicAttributes();
|
||||
|
||||
// Execute offscan code to initialize the object in its offscan state.
|
||||
SetScanState(false);
|
||||
]]></RTSOStartup>
|
||||
<RTSODynamic_Attributes_Set_Handler><![CDATA[
|
||||
string attrName = Get(e.attributeHandle.shAttributeId, e.attributeHandle.shPrimitiveId, EATTRIBUTEPROPERTY.idxAttribPropName);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// TODO: Runtime Event - Dynamic Set Handler
|
||||
//
|
||||
// Implement set handler code for any dynamic attributes you create with set handlers
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// CheckpointDynamicAttributeData will update the checkpoint values for all Dynamic Attributes.
|
||||
// To recreate Dynamic Attributes and restore Dynamic Attribute values the RestoreDynamicAttributes
|
||||
// function must be called when starting up from failover (refer to the Startup method).
|
||||
|
||||
//CheckpointDynamicAttributeData();
|
||||
|
||||
#region Example
|
||||
// if (attrName == "MyDynamic")
|
||||
// {
|
||||
// if (e.Value > 10)
|
||||
// {
|
||||
// LogWarning(string.Format("value for {0} must be less or equal to 10", attrName));
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// SetValue(attrName, e.Value);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// return;
|
||||
// }
|
||||
#endregion
|
||||
|
||||
// if unhandled a warning is shown as a reminder
|
||||
Set(e.attributeHandle.shAttributeId, e.attributeHandle.shPrimitiveId, e.Value);
|
||||
LogWarning(string.Format("Uknown set handler for attribute '{0}'", attrName));
|
||||
|
||||
]]></RTSODynamic_Attributes_Set_Handler>
|
||||
<CTSODEC><![CDATA[ #region Declarations
|
||||
//Declare Configtime Class Variables here.
|
||||
//Variables declared in this region are available to all methods
|
||||
//in the Configtime Class.
|
||||
|
||||
|
||||
]]></CTSODEC>
|
||||
<CTSOValidate><![CDATA[ //------------------------------------------------------------------------------
|
||||
// TODO: Configtime Event - Validate
|
||||
//
|
||||
// Validate sets the warning or error text for the object.
|
||||
// It is used to check conditions that would not be checked using
|
||||
// a SetHandler, such as reporting that an object was not
|
||||
// configured, or that combinations of attributes are illegal.
|
||||
//
|
||||
// Other than calling AddWarningMessage or AddErrorMessage, Validate
|
||||
// should never modify the state of the object.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#region Example code
|
||||
// if (MyTestDefaultState)
|
||||
// {
|
||||
// //Add a warning message using the dictionay phrase ID "ObjectStillInDefaultState"
|
||||
// AddWarningMessage(GetText("ObjectStillInDefaultState"));
|
||||
//
|
||||
// //Change the status to Warning if the current status is Good
|
||||
// if (status == EPACKAGESTATUS.ePackageGood)
|
||||
// {
|
||||
// status = EPACKAGESTATUS.ePackageWarning;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (MyTestAttributeCombinationValid)
|
||||
// {
|
||||
// //Add a warning message using the dictionay phrase ID "AttributeCombinationInvalid"
|
||||
// AddWarningMessage(GetText("AttributeCombinationInvalid"));
|
||||
//
|
||||
// // Change the status to Warning if the current status is Good
|
||||
// if (status == EPACKAGESTATUS.ePackageGood)
|
||||
// {
|
||||
// status = EPACKAGESTATUS.ePackageWarning;
|
||||
// }
|
||||
// }
|
||||
#endregion
|
||||
|
||||
// By default set the object status to Good
|
||||
status = EPACKAGESTATUS.ePackageGood;
|
||||
|
||||
|
||||
// The following statement will exit validate when validating templates.
|
||||
// Place code that should be validated in templates and instances before this
|
||||
// statement. Code placed after this statement will execute in instances only.
|
||||
if ((bool)Get((short)ECOMMONPRIMITIVE.idxCommonIsTemplate, eCommonPrimitiveId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
]]></CTSOValidate>
|
||||
<CTSOInitialize><![CDATA[ //------------------------------------------------------------------------------
|
||||
// TODO: Configtime Event - Initialize
|
||||
//
|
||||
// Any custom initialization can be done here, including caching of attribute
|
||||
// values, primitive IDs etc.
|
||||
//------------------------------------------------------------------------------
|
||||
]]></CTSOInitialize>
|
||||
<CTSOMigrate><![CDATA[ //------------------------------------------------------------------------------
|
||||
// TODO: Configtime Event - Migrate
|
||||
//
|
||||
// Migrate executes when importing a template into a Galaxy that contains
|
||||
// a previous version (major) of the template. The template must be derived or
|
||||
// instantiated for migrate to execute.
|
||||
//
|
||||
// Migrate provides access to the previous versions attribute information.
|
||||
// A typical application for migrate code is to preserve attribute values
|
||||
// when an attribute name has changed (refer to the Example code below).
|
||||
//
|
||||
// To enable this event the migrate option must be configured via the Toolkit
|
||||
// Editor or in code (i.e. [ObjectAttributes.AMigrate("1","2")]).
|
||||
//
|
||||
// If no implementation is provided, the system will copy all attribute values
|
||||
// from the old object to the new one by matching the attribute names.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#region Example code
|
||||
// //Check major version of previous template
|
||||
// if (migrate.MajorVersion() == 1)
|
||||
// {
|
||||
// //Attribute "Eg_001" has been renamed to "Example_001".
|
||||
// //Transfer attribute value, lock and security classification
|
||||
// Example_001 = migrate.GetValue("Eg_001"); //Gets value
|
||||
// Example_001.Locked = migrate.GetLocked("Eg_001"); //Gets lock status
|
||||
// Example_001.Security = migrate.GetSecurity("Eg_001"); //Gets Security Classification
|
||||
//
|
||||
// //Transfer primitive values
|
||||
// SetValue("Example_001.TrendHi", migrate.GetValue("Eg_001.TrendHi"));
|
||||
// SetValue("Example_001.TrendHi", EATTRIBUTEPROPERTY.idxAttribPropLocked, migrate.GetLocked("Eg_001.TrendHi"));
|
||||
//
|
||||
// //Automatically migrate all child primitives
|
||||
// migrate.AutoMigrateChildPrimitives = true;
|
||||
// }
|
||||
|
||||
#endregion
|
||||
]]></CTSOMigrate>
|
||||
<CTSOPreValidate><![CDATA[ //------------------------------------------------------------------------------
|
||||
// TODO: Configtime Event - PreValidate
|
||||
//
|
||||
// PreValidate is called when the object is about to be validated (e.g. when
|
||||
// an edit session is ending and the object is about to be saved.)
|
||||
//
|
||||
// A primitive can modify attributes within this method.
|
||||
//
|
||||
// Note: It is often not necessary to perform any actions in OnPreValidate.
|
||||
//------------------------------------------------------------------------------
|
||||
]]></CTSOPreValidate>
|
||||
<CTSOPostCreate><![CDATA[ //------------------------------------------------------------------------------
|
||||
// TODO: Configtime Event - PostCreate
|
||||
//
|
||||
// OnPostCreate is called when an object is first created.
|
||||
//
|
||||
// One purpose for implementing this method is to insure that the initial
|
||||
// state of the primitive is valid.
|
||||
//
|
||||
// This method can be used by a Resuable Primitive to correct invalid initial
|
||||
// states that can arise when an attribute value has been overridden. If the
|
||||
// attribute has a SetHandler with validation or side effects the SetHandler
|
||||
// does not execute as overrides do not trigger SetHandlers.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#region Example code
|
||||
// // If statistics are enabled, add the Statistics virtual primitive
|
||||
// // the way the SetHandler would have done it.
|
||||
// if (StatsEnable)
|
||||
// {
|
||||
// AddPrimitive("Statistics", "Statistics1", "Statistics1");
|
||||
// }
|
||||
#endregion
|
||||
]]></CTSOPostCreate>
|
||||
<CTSODynamic_Attributes_Set_Handler><![CDATA[
|
||||
string attrName = Get(e.attributeHandle.shAttributeId, e.attributeHandle.shPrimitiveId, EATTRIBUTEPROPERTY.idxAttribPropName);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// TODO: Configtime Event - Dynamic Set Handler
|
||||
//
|
||||
// Implement set handler code for any dynamic attributes you create with set handlers
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#region Example
|
||||
// if (attrName == "MyDynamic")
|
||||
// {
|
||||
// if (e.Value > 10)
|
||||
// {
|
||||
// LogWarning(string.Format("value for {0} must be less or equal to 10", attrName));
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// SetValue(attrName, e.Value);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// return;
|
||||
// }
|
||||
#endregion
|
||||
|
||||
// if unhandled a warning is shown as a reminder
|
||||
Set(e.attributeHandle.shAttributeId, e.attributeHandle.shPrimitiveId, e.Value);
|
||||
LogWarning(string.Format("Uknown set handler for attribute '{0}'", attrName));
|
||||
|
||||
]]></CTSODynamic_Attributes_Set_Handler>
|
||||
</CCData>
|
||||
<BuildInfo>
|
||||
<OutputDir><![CDATA[..\Output\]]></OutputDir>
|
||||
<Project TopMost="True" CreateAADEF="True">
|
||||
<FullOutputFileName><![CDATA[bin\Debug\Monitor5.dll]]></FullOutputFileName>
|
||||
<OutputPath><![CDATA[bin\Debug\]]></OutputPath>
|
||||
<ProjectPath><![CDATA[]]></ProjectPath>
|
||||
<ClassName>ArchestrA.Toolkit.Monitor.Monitor</ClassName>
|
||||
<DependentFiles>
|
||||
<dep>
|
||||
<name><![CDATA[Monitor5RC.dll]]></name>
|
||||
<vendor><![CDATA[test]]></vendor>
|
||||
<type>Runtime</type>
|
||||
<fileType>ComDLL</fileType>
|
||||
<def />
|
||||
</dep>
|
||||
<dep>
|
||||
<name><![CDATA[Monitor5.dll]]></name>
|
||||
<vendor><![CDATA[test]]></vendor>
|
||||
<type>Runtime, Configtime</type>
|
||||
<fileType>NETFrameworkAssembly</fileType>
|
||||
</dep>
|
||||
<dep>
|
||||
<name><![CDATA[Monitor5.reg]]></name>
|
||||
<vendor><![CDATA[test]]></vendor>
|
||||
<type>Runtime, Configtime</type>
|
||||
<fileType>MergeRegistryScript</fileType>
|
||||
</dep>
|
||||
<dep>
|
||||
<name><![CDATA[MonitorRuntime5.dll]]></name>
|
||||
<vendor><![CDATA[test]]></vendor>
|
||||
<type>Runtime</type>
|
||||
<fileType>NETFrameworkAssembly</fileType>
|
||||
</dep>
|
||||
<dep>
|
||||
<name><![CDATA[MonitorRuntime5.reg]]></name>
|
||||
<vendor><![CDATA[test]]></vendor>
|
||||
<type>Runtime</type>
|
||||
<fileType>MergeRegistryScript</fileType>
|
||||
</dep>
|
||||
<dep>
|
||||
<name><![CDATA[MonitorConfigtime5.dll]]></name>
|
||||
<vendor><![CDATA[test]]></vendor>
|
||||
<type>Configtime</type>
|
||||
<fileType>NETFrameworkAssembly</fileType>
|
||||
</dep>
|
||||
<dep>
|
||||
<name><![CDATA[MonitorConfigtime5.reg]]></name>
|
||||
<vendor><![CDATA[test]]></vendor>
|
||||
<type>Configtime</type>
|
||||
<fileType>MergeRegistryScript</fileType>
|
||||
</dep>
|
||||
<dep>
|
||||
<name><![CDATA[MonitorEditor5.dll]]></name>
|
||||
<vendor><![CDATA[test]]></vendor>
|
||||
<type>Editor</type>
|
||||
<fileType>NETFrameworkAssembly</fileType>
|
||||
</dep>
|
||||
<dep>
|
||||
<name><![CDATA[MonitorEditor5.reg]]></name>
|
||||
<vendor><![CDATA[test]]></vendor>
|
||||
<type>Editor</type>
|
||||
<fileType>MergeRegistryScript</fileType>
|
||||
</dep>
|
||||
<dep>
|
||||
<name><![CDATA[C:\WINDOWS\assembly\GAC_MSIL\ArchestrA.Toolkit.ArchestrAControlLibrary\1.0.0.0__f787e550f2f530ee\ArchestrA.Toolkit.ArchestrAControlLibrary.dll]]></name>
|
||||
<vendor><![CDATA[Wonderware]]></vendor>
|
||||
<type>Runtime, Configtime, Editor</type>
|
||||
<fileType>NETFrameworkAssembly</fileType>
|
||||
</dep>
|
||||
<dep>
|
||||
<name><![CDATA[C:\WINDOWS\assembly\GAC_MSIL\ArchestrA.Toolkit.ArchestrAObjectSupport\1.0.0.0__f787e550f2f530ee\ArchestrA.Toolkit.ArchestrAObjectSupport.dll]]></name>
|
||||
<vendor><![CDATA[Wonderware]]></vendor>
|
||||
<type>Runtime, Configtime</type>
|
||||
<fileType>NETFrameworkAssembly</fileType>
|
||||
</dep>
|
||||
<editor>MonitorEditor5</editor>
|
||||
<attribute>
|
||||
<name>ResetInputAvg</name>
|
||||
<run />
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>PVHiLimit</name>
|
||||
<cfg />
|
||||
<run />
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>PV</name>
|
||||
<run />
|
||||
</attribute>
|
||||
<FullName>Monitor</FullName>
|
||||
</DependentFiles>
|
||||
</Project>
|
||||
<Project>
|
||||
<FullOutputFileName><![CDATA[..\MonitorRuntime\bin\Debug\MonitorRuntime5.dll]]></FullOutputFileName>
|
||||
<OutputPath><![CDATA[..\MonitorRuntime\bin\Debug\]]></OutputPath>
|
||||
<ProjectPath><![CDATA[..\MonitorRuntime]]></ProjectPath>
|
||||
</Project>
|
||||
<Project>
|
||||
<FullOutputFileName><![CDATA[..\MonitorConfigtime\bin\Debug\MonitorConfigtime5.dll]]></FullOutputFileName>
|
||||
<OutputPath><![CDATA[..\MonitorConfigtime\bin\Debug\]]></OutputPath>
|
||||
<ProjectPath><![CDATA[..\MonitorConfigtime]]></ProjectPath>
|
||||
</Project>
|
||||
<Project>
|
||||
<FullOutputFileName><![CDATA[..\MonitorEditor\bin\Debug\MonitorEditor5.dll]]></FullOutputFileName>
|
||||
<OutputPath><![CDATA[..\MonitorEditor\bin\Debug\]]></OutputPath>
|
||||
<ProjectPath><![CDATA[..\MonitorEditor]]></ProjectPath>
|
||||
</Project>
|
||||
</BuildInfo>
|
||||
<Build_Type><![CDATA[Build & Instantiate]]></Build_Type>
|
||||
</xml>
|
||||
@@ -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>
|
||||
/// Summary description for Monitor
|
||||
/// </summary>
|
||||
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()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.21022</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{0D1ADE9C-7960-4C20-A274-1FFEAAFF9315}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ArchestrA.Toolkit.Monitor</RootNamespace>
|
||||
<AssemblyName>Monitor5</AssemblyName>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>..\Monitor.snk</AssemblyOriginatorKeyFile>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>4.0</OldToolsVersion>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ArchestrA.Toolkit.ArchestrAObjectSupport, Version=4.0.0.0, Culture=neutral, PublicKeyToken=f787e550f2f530ee, processorArchitecture=MSI">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Toolkit.ArchestrAObjectSupport.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArchestrA.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=23106a86e706d0ae">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Core.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Monitor.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="AAObjectInfo.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\Monitor.snk">
|
||||
<Link>Monitor.snk</Link>
|
||||
</None>
|
||||
<None Include="Monitor1.aaDCT" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 2.0 %28x86%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.0 %28x86%29</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Dictionary>
|
||||
<Phrase_Index PhraseID="SampleEntry">
|
||||
<Language LangID="1033">
|
||||
<VALUE>English Example</VALUE>
|
||||
</Language>
|
||||
<Language LangID="1031">
|
||||
<VALUE>German Example</VALUE>
|
||||
</Language>
|
||||
</Phrase_Index>
|
||||
<Phrase_Index PhraseID="HiLimitExceeded">
|
||||
<Language LangID="1033">
|
||||
<VALUE>The value you tried to send out exceeded HiLimit</VALUE>
|
||||
</Language>
|
||||
</Phrase_Index>
|
||||
</Dictionary>
|
||||
@@ -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")]
|
||||
|
||||
@@ -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>
|
||||
/// Summary description for MonitorConfigtime
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.21022</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{E684C279-E337-41AB-BB43-CA0A04E65D53}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ArchestrA.Toolkit.Monitor</RootNamespace>
|
||||
<AssemblyName>MonitorConfigtime5</AssemblyName>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>..\Monitor.snk</AssemblyOriginatorKeyFile>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>4.0</OldToolsVersion>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ArchestrA.Toolkit.ArchestrAObjectSupport, Version=4.0.0.0, Culture=neutral, PublicKeyToken=f787e550f2f530ee, processorArchitecture=MSI">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Toolkit.ArchestrAObjectSupport.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArchestrA.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=23106a86e706d0ae">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Core.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="MonitorConfigtime.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Service Include="{94E38DFF-614B-4cbd-B67C-F211BB35CE8B}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Monitor\Monitor.csproj">
|
||||
<Project>{0D1ADE9C-7960-4C20-A274-1FFEAAFF9315}</Project>
|
||||
<Name>Monitor</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\Monitor.snk">
|
||||
<Link>Monitor.snk</Link>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 2.0 %28x86%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.0 %28x86%29</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -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")]
|
||||
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing)
|
||||
{
|
||||
if (components != null)
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Component Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.21022</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{06CEDE14-B295-4817-A439-D2B60D71FF4C}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ArchestrA.Toolkit.Monitor</RootNamespace>
|
||||
<AssemblyName>MonitorEditor5</AssemblyName>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>..\Monitor.snk</AssemblyOriginatorKeyFile>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>4.0</OldToolsVersion>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ArchestrA.Toolkit.ArchestrAControlLibrary, Version=4.0.0.0, Culture=neutral, PublicKeyToken=f787e550f2f530ee, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Toolkit.ArchestrAControlLibrary.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArchestraEditorFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=fdcbee9982d955e0, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestraEditorFramework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="IaaEditorFormLibInterop, Version=2.0.0.0, Culture=neutral, PublicKeyToken=fdcbee9982d955e0, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>C:\Program Files\Archestra\Toolkits\AOT\bin\IaaEditorFormLibInterop.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="MonitorEditor.cs">
|
||||
</Compile>
|
||||
<Compile Include="MonitorEditor.Designer.cs">
|
||||
<DependentUpon>MonitorEditor.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Service Include="{94E38DFF-614B-4cbd-B67C-F211BB35CE8B}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="MonitorEditor.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>MonitorEditor.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\Monitor.snk">
|
||||
<Link>Monitor.snk</Link>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 2.0 %28x86%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.0 %28x86%29</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,211 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="m_ToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="aaLockIcon3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA
|
||||
CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ
|
||||
Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA
|
||||
GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2
|
||||
BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9
|
||||
/sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU
|
||||
KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg
|
||||
JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="aaLockIcon2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA
|
||||
CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ
|
||||
Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA
|
||||
GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2
|
||||
BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9
|
||||
/sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU
|
||||
KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg
|
||||
JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="aaSecurityClassificationIcon3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
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==
|
||||
</value>
|
||||
</data>
|
||||
<data name="aaLockIcon1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA
|
||||
CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ
|
||||
Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA
|
||||
GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2
|
||||
BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9
|
||||
/sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU
|
||||
KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg
|
||||
JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="aaSecurityClassificationIcon2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
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==
|
||||
</value>
|
||||
</data>
|
||||
<data name="aaSecurityClassificationIcon1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
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==
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -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")]
|
||||
@@ -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>
|
||||
/// Summary description for Monitor
|
||||
/// </summary>
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.21022</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{71A913E8-9A33-4A92-AD13-6B9023E5C8E5}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ArchestrA.Toolkit.Monitor</RootNamespace>
|
||||
<AssemblyName>MonitorRuntime5</AssemblyName>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>..\Monitor.snk</AssemblyOriginatorKeyFile>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<OldToolsVersion>4.0</OldToolsVersion>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ArchestrA.Toolkit.ArchestrAObjectSupport, Version=4.0.0.0, Culture=neutral, PublicKeyToken=f787e550f2f530ee, processorArchitecture=MSI">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Toolkit.ArchestrAObjectSupport.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArchestrA.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=23106a86e706d0ae">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Core.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="MonitorRuntime.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Service Include="{94E38DFF-614B-4cbd-B67C-F211BB35CE8B}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Monitor\Monitor.csproj">
|
||||
<Project>{0D1ADE9C-7960-4C20-A274-1FFEAAFF9315}</Project>
|
||||
<Name>Monitor</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\Monitor.snk">
|
||||
<Link>Monitor.snk</Link>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -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")]
|
||||
@@ -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")]
|
||||
@@ -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>
|
||||
/// Summary description for WatchdogConfigtime
|
||||
/// </summary>
|
||||
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;
|
||||
//}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.21022</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{63437254-FEDA-404A-8FCB-B2036ED949CB}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ArchestrA.Toolkit.Watchdog</RootNamespace>
|
||||
<AssemblyName>WatchDogStatsConfigtime1</AssemblyName>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>..\..\Watchdog.snk</AssemblyOriginatorKeyFile>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ArchestrA.Toolkit.ArchestrAObjectSupport, Version=4.0.0.0, Culture=neutral, PublicKeyToken=f787e550f2f530ee, processorArchitecture=MSI">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Toolkit.ArchestrAObjectSupport.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArchestrA.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=23106a86e706d0ae">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Core.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="StatsConfigtime.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Service Include="{94E38DFF-614B-4cbd-B67C-F211BB35CE8B}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Statsobj\Statsobj.csproj">
|
||||
<Project>{A7BA2304-935A-4DDD-80CC-E6387B2980E6}</Project>
|
||||
<Name>Statsobj</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\Watchdog.snk">
|
||||
<Link>Watchdog.snk</Link>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 2.0 %28x86%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.0 %28x86%29</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -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")]
|
||||
@@ -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>
|
||||
/// Summary description for Watchdog
|
||||
/// </summary>
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.21022</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{7E2D944C-A637-451B-A66D-E7861F1D4CBE}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ArchestrA.Toolkit.Watchdog</RootNamespace>
|
||||
<AssemblyName>WatchDogStatsRuntime1</AssemblyName>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>..\..\Watchdog.snk</AssemblyOriginatorKeyFile>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ArchestrA.Toolkit.ArchestrAObjectSupport, Version=4.0.0.0, Culture=neutral, PublicKeyToken=f787e550f2f530ee, processorArchitecture=MSI">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Toolkit.ArchestrAObjectSupport.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArchestrA.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=23106a86e706d0ae">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Core.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="StatsRuntime.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Service Include="{94E38DFF-614B-4cbd-B67C-F211BB35CE8B}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Statsobj\Statsobj.csproj">
|
||||
<Project>{A7BA2304-935A-4DDD-80CC-E6387B2980E6}</Project>
|
||||
<Name>Statsobj</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\Watchdog.snk">
|
||||
<Link>Watchdog.snk</Link>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 2.0 %28x86%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.0 %28x86%29</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -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")]
|
||||
|
||||
@@ -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>
|
||||
/// Summary description for Stats
|
||||
/// </summary>
|
||||
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)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.21022</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{A7BA2304-935A-4DDD-80CC-E6387B2980E6}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ArchestrA.Toolkit.Watchdog</RootNamespace>
|
||||
<AssemblyName>WatchDogStats1</AssemblyName>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>..\..\Watchdog.snk</AssemblyOriginatorKeyFile>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ArchestrA.Toolkit.ArchestrAObjectSupport, Version=4.0.0.0, Culture=neutral, PublicKeyToken=f787e550f2f530ee, processorArchitecture=MSI">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Toolkit.ArchestrAObjectSupport.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArchestrA.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=23106a86e706d0ae">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Core.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Stats.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\..\Watchdog.snk">
|
||||
<Link>Watchdog.snk</Link>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 2.0 %28x86%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.0 %28x86%29</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -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
|
||||
Binary file not shown.
@@ -0,0 +1,784 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xml>
|
||||
<version>1</version>
|
||||
<CCData>
|
||||
<RTSODEC><![CDATA[ #region Declarations
|
||||
//Declare Runtime Class Variables here.
|
||||
//Variables declared in this region are available to all methods
|
||||
//in the Runtime Class.
|
||||
|
||||
|
||||
]]></RTSODEC>
|
||||
<RTSOGetStatusDesc><![CDATA[ //------------------------------------------------------------------------------
|
||||
// TODO: Runtime Event - GetStatusDesc
|
||||
//
|
||||
// This routine provides a String for an error code when a client requests it.
|
||||
// By default this method looks for an entry in the dictionary that has the
|
||||
// DetailedErrorCode as the PhraseID.
|
||||
//
|
||||
// You need to change this implmentation if you want to provide embedded values
|
||||
// within your messages, or you want to use string PhraseIDs instead of integer
|
||||
// PhraseIDs.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
switch (e.detailedErrorCode)
|
||||
{
|
||||
default:
|
||||
e.status = GetText((int)e.detailedErrorCode);
|
||||
break;
|
||||
}
|
||||
]]></RTSOGetStatusDesc>
|
||||
<RTSOSetScanState><![CDATA[ //------------------------------------------------------------------------------
|
||||
// TODO: Runtime Event - SetScanState
|
||||
//
|
||||
// Perform actions when the object goes on or off scan.
|
||||
//------------------------------------------------------------------------------
|
||||
]]></RTSOSetScanState>
|
||||
<RTSOInitialize><![CDATA[ //------------------------------------------------------------------------------
|
||||
// TODO: Runtime - Initialize
|
||||
//
|
||||
// Do not read or write attribute values of this primitive during Initialize
|
||||
//------------------------------------------------------------------------------
|
||||
]]></RTSOInitialize>
|
||||
<RTSOExecute><![CDATA[ //------------------------------------------------------------------------------
|
||||
// TODO: Runtime - Execute
|
||||
//
|
||||
// This is where the main logic of the object periodically executes when
|
||||
// the object is on scan.
|
||||
//
|
||||
// Read or write the attributes of this primitive using the generated
|
||||
// properties (Value, Quality).
|
||||
//------------------------------------------------------------------------------
|
||||
#region Example code
|
||||
// // The lines below both increment the value of the attribute "Attribute1" by 1
|
||||
// Example_001 ++;
|
||||
// Example_001 = Example_001 + 1;
|
||||
//
|
||||
// //Example_001 quality is set to Bad on Condition_001 being true.
|
||||
// Example_001.Quality = (Condition_001 ? DataQuality.DataQualityBad : DataQuality.DataQualityGood);
|
||||
//
|
||||
// // The attribute "ElapsedTime" contains the time elapsed since the last reset
|
||||
// ElapsedTime = GetScanTime() - TimeOfLastReset;
|
||||
//
|
||||
// // Increment the 3rd element of an array
|
||||
// FloatArray[3] ++;
|
||||
//
|
||||
// // Increment all the elements of an array
|
||||
// for( short counter = 1; counter <= FloatArray.Length; counter ++)
|
||||
// {
|
||||
// FloatArray[counter] ++;
|
||||
// }
|
||||
#endregion
|
||||
]]></RTSOExecute>
|
||||
<RTSODynamic_Attributes_Set_Handler><![CDATA[
|
||||
string attrName = Get(e.attributeHandle.shAttributeId, e.attributeHandle.shPrimitiveId, EATTRIBUTEPROPERTY.idxAttribPropName);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// TODO: Runtime Event - Dynamic Set Handler
|
||||
//
|
||||
// Implement set handler code for any dynamic attributes you create with set handlers
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// CheckpointDynamicAttributeData will update the checkpoint values for all Dynamic Attributes.
|
||||
// To recreate Dynamic Attributes and restore Dynamic Attribute values the RestoreDynamicAttributes
|
||||
// function must be called when starting up from failover (refer to the Startup method).
|
||||
|
||||
//CheckpointDynamicAttributeData();
|
||||
|
||||
#region Example
|
||||
// if (attrName == "MyDynamic")
|
||||
// {
|
||||
// if (e.Value > 10)
|
||||
// {
|
||||
// LogWarning(string.Format("value for {0} must be less or equal to 10", attrName));
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// SetValue(attrName, e.Value);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// return;
|
||||
// }
|
||||
#endregion
|
||||
|
||||
// if unhandled a warning is shown as a reminder
|
||||
Set(e.attributeHandle.shAttributeId, e.attributeHandle.shPrimitiveId, e.Value);
|
||||
LogWarning(string.Format("Uknown set handler for attribute '{0}'", attrName));
|
||||
|
||||
]]></RTSODynamic_Attributes_Set_Handler>
|
||||
<CTSODEC><![CDATA[ #region Declarations
|
||||
//Declare Configtime Class Variables here.
|
||||
//Variables declared in this region are available to all methods
|
||||
//in the Configtime Class.
|
||||
|
||||
|
||||
]]></CTSODEC>
|
||||
<CTSOValidate><![CDATA[ //------------------------------------------------------------------------------
|
||||
// TODO: Configtime Event - Validate
|
||||
//
|
||||
// Validate sets the warning or error text for the object.
|
||||
// It is used to check conditions that would not be checked using
|
||||
// a SetHandler, such as reporting that an object was not
|
||||
// configured, or that combinations of attributes are illegal.
|
||||
//
|
||||
// Other than calling AddWarningMessage or AddErrorMessage, Validate
|
||||
// should never modify the state of the object.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#region Example code
|
||||
// if (MyTestDefaultState)
|
||||
// {
|
||||
// //Add a warning message using the dictionay phrase ID "ObjectStillInDefaultState"
|
||||
// AddWarningMessage(GetText("ObjectStillInDefaultState"));
|
||||
//
|
||||
// //Change the status to Warning if the current status is Good
|
||||
// if (status == EPACKAGESTATUS.ePackageGood)
|
||||
// {
|
||||
// status = EPACKAGESTATUS.ePackageWarning;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (MyTestAttributeCombinationValid)
|
||||
// {
|
||||
// //Add a warning message using the dictionay phrase ID "AttributeCombinationInvalid"
|
||||
// AddWarningMessage(GetText("AttributeCombinationInvalid"));
|
||||
//
|
||||
// // Change the status to Warning if the current status is Good
|
||||
// if (status == EPACKAGESTATUS.ePackageGood)
|
||||
// {
|
||||
// status = EPACKAGESTATUS.ePackageWarning;
|
||||
// }
|
||||
// }
|
||||
#endregion
|
||||
|
||||
// By default set the object status to Good
|
||||
status = EPACKAGESTATUS.ePackageGood;
|
||||
|
||||
|
||||
// The following statement will exit validate when validating templates.
|
||||
// Place code that should be validated in templates and instances before this
|
||||
// statement. Code placed after this statement will execute in instances only.
|
||||
if ((bool)Get((short)ECOMMONPRIMITIVE.idxCommonIsTemplate, eCommonPrimitiveId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
]]></CTSOValidate>
|
||||
<CTSOInitialize><![CDATA[ //------------------------------------------------------------------------------
|
||||
// TODO: Configtime Event - Initialize
|
||||
//
|
||||
// Any custom initialization can be done here, including caching of attribute
|
||||
// values, primitive IDs etc.
|
||||
//------------------------------------------------------------------------------
|
||||
]]></CTSOInitialize>
|
||||
<CTSOMigrate><![CDATA[ //------------------------------------------------------------------------------
|
||||
// TODO: Configtime Event - Migrate
|
||||
//
|
||||
// Migrate executes when importing a template into a Galaxy that contains
|
||||
// a previous version (major) of the template. The template must be derived or
|
||||
// instantiated for migrate to execute.
|
||||
//
|
||||
// Migrate provides access to the previous versions attribute information.
|
||||
// A typical application for migrate code is to preserve attribute values
|
||||
// when an attribute name has changed (refer to the Example code below).
|
||||
//
|
||||
// To enable this event the migrate option must be configured via the Toolkit
|
||||
// Editor or in code (i.e. [ObjectAttributes.AMigrate("1","2")]).
|
||||
//
|
||||
// If no implementation is provided, the system will copy all attribute values
|
||||
// from the old object to the new one by matching the attribute names.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#region Example code
|
||||
// //Check major version of previous template
|
||||
// if (migrate.MajorVersion() == 1)
|
||||
// {
|
||||
// //Attribute "Eg_001" has been renamed to "Example_001".
|
||||
// //Transfer attribute value, lock and security classification
|
||||
// Example_001 = migrate.GetValue("Eg_001"); //Gets value
|
||||
// Example_001.Locked = migrate.GetLocked("Eg_001"); //Gets lock status
|
||||
// Example_001.Security = migrate.GetSecurity("Eg_001"); //Gets Security Classification
|
||||
//
|
||||
// //Transfer primitive values
|
||||
// SetValue("Example_001.TrendHi", migrate.GetValue("Eg_001.TrendHi"));
|
||||
// SetValue("Example_001.TrendHi", EATTRIBUTEPROPERTY.idxAttribPropLocked, migrate.GetLocked("Eg_001.TrendHi"));
|
||||
//
|
||||
// //Automatically migrate all child primitives
|
||||
// migrate.AutoMigrateChildPrimitives = true;
|
||||
// }
|
||||
|
||||
#endregion
|
||||
]]></CTSOMigrate>
|
||||
<CTSOPreValidate><![CDATA[ //------------------------------------------------------------------------------
|
||||
// TODO: Configtime Event - PreValidate
|
||||
//
|
||||
// PreValidate is called when the object is about to be validated (e.g. when
|
||||
// an edit session is ending and the object is about to be saved.)
|
||||
//
|
||||
// A primitive can modify attributes within this method.
|
||||
//
|
||||
// Note: It is often not necessary to perform any actions in OnPreValidate.
|
||||
//------------------------------------------------------------------------------
|
||||
]]></CTSOPreValidate>
|
||||
<CTSOPostCreate><![CDATA[ //------------------------------------------------------------------------------
|
||||
// TODO: Configtime Event - PostCreate
|
||||
//
|
||||
// OnPostCreate is called when an object is first created.
|
||||
//
|
||||
// One purpose for implementing this method is to insure that the initial
|
||||
// state of the primitive is valid.
|
||||
//
|
||||
// This method can be used by a Resuable Primitive to correct invalid initial
|
||||
// states that can arise when an attribute value has been overridden. If the
|
||||
// attribute has a SetHandler with validation or side effects the SetHandler
|
||||
// does not execute as overrides do not trigger SetHandlers.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#region Example code
|
||||
// // If statistics are enabled, add the Statistics virtual primitive
|
||||
// // the way the SetHandler would have done it.
|
||||
// if (StatsEnable)
|
||||
// {
|
||||
// AddPrimitive("Statistics", "Statistics1", "Statistics1");
|
||||
// }
|
||||
#endregion
|
||||
]]></CTSOPostCreate>
|
||||
<CTSODynamic_Attributes_Set_Handler><![CDATA[
|
||||
string attrName = Get(e.attributeHandle.shAttributeId, e.attributeHandle.shPrimitiveId, EATTRIBUTEPROPERTY.idxAttribPropName);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// TODO: Configtime Event - Dynamic Set Handler
|
||||
//
|
||||
// Implement set handler code for any dynamic attributes you create with set handlers
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#region Example
|
||||
// if (attrName == "MyDynamic")
|
||||
// {
|
||||
// if (e.Value > 10)
|
||||
// {
|
||||
// LogWarning(string.Format("value for {0} must be less or equal to 10", attrName));
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// SetValue(attrName, e.Value);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// return;
|
||||
// }
|
||||
#endregion
|
||||
|
||||
// if unhandled a warning is shown as a reminder
|
||||
Set(e.attributeHandle.shAttributeId, e.attributeHandle.shPrimitiveId, e.Value);
|
||||
LogWarning(string.Format("Uknown set handler for attribute '{0}'", attrName));
|
||||
|
||||
]]></CTSODynamic_Attributes_Set_Handler>
|
||||
<RTSCDEC><![CDATA[ #region Declarations
|
||||
//Declare Runtime Class Variables here.
|
||||
//Variables declared in this region are available to all methods
|
||||
//in the Runtime Class.
|
||||
|
||||
|
||||
]]></RTSCDEC>
|
||||
<RTSCGetStatusDesc><![CDATA[ //------------------------------------------------------------------------------
|
||||
// TODO: Runtime Event - GetStatusDesc
|
||||
//
|
||||
// This routine provides a String for an error code when a client requests it.
|
||||
// By default this method looks for an entry in the dictionary that has the
|
||||
// DetailedErrorCode as the PhraseID.
|
||||
//
|
||||
// You need to change this implmentation if you want to provide embedded values
|
||||
// within your messages, or you want to use string PhraseIDs instead of integer
|
||||
// PhraseIDs.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
switch (e.detailedErrorCode)
|
||||
{
|
||||
default:
|
||||
e.status = GetText((int)e.detailedErrorCode);
|
||||
break;
|
||||
}
|
||||
]]></RTSCGetStatusDesc>
|
||||
<RTSCSetScanState><![CDATA[ //------------------------------------------------------------------------------
|
||||
// TODO: Runtime Event - SetScanState
|
||||
//
|
||||
// Perform actions when the object goes on or off scan.
|
||||
//------------------------------------------------------------------------------
|
||||
]]></RTSCSetScanState>
|
||||
<RTSCInitialize><![CDATA[ //------------------------------------------------------------------------------
|
||||
// TODO: Runtime - Initialize
|
||||
//
|
||||
// Do not read or write attribute values of this primitive during Initialize
|
||||
//------------------------------------------------------------------------------
|
||||
]]></RTSCInitialize>
|
||||
<RTSCExecute><![CDATA[ //------------------------------------------------------------------------------
|
||||
// TODO: Runtime - Execute
|
||||
//
|
||||
// This is where the main logic of the object periodically executes when
|
||||
// the object is on scan.
|
||||
//
|
||||
// Read or write the attributes of this primitive using the generated
|
||||
// properties (Value, Quality).
|
||||
//------------------------------------------------------------------------------
|
||||
#region Example code
|
||||
// // The lines below both increment the value of the attribute "Attribute1" by 1
|
||||
// Example_001 ++;
|
||||
// Example_001 = Example_001 + 1;
|
||||
//
|
||||
// //Example_001 quality is set to Bad on Condition_001 being true.
|
||||
// Example_001.Quality = (Condition_001 ? DataQuality.DataQualityBad : DataQuality.DataQualityGood);
|
||||
//
|
||||
// // The attribute "ElapsedTime" contains the time elapsed since the last reset
|
||||
// ElapsedTime = GetScanTime() - TimeOfLastReset;
|
||||
//
|
||||
// // Increment the 3rd element of an array
|
||||
// FloatArray[3] ++;
|
||||
//
|
||||
// // Increment all the elements of an array
|
||||
// for( short counter = 1; counter <= FloatArray.Length; counter ++)
|
||||
// {
|
||||
// FloatArray[counter] ++;
|
||||
// }
|
||||
#endregion
|
||||
]]></RTSCExecute>
|
||||
<RTSCDynamic_Attributes_Set_Handler><![CDATA[ string attrName = Get(e.attributeHandle.shAttributeId, e.attributeHandle.shPrimitiveId, EATTRIBUTEPROPERTY.idxAttribPropName);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// TODO: Runtime Event - Dynamic Set Handler
|
||||
//
|
||||
// Implement set handler code for any dynamic attributes you create with set handlers
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// CheckpointDynamicAttributeData will update the checkpoint values for all Dynamic Attributes.
|
||||
// To recreate Dynamic Attributes and restore Dynamic Attribute values the RestoreDynamicAttributes
|
||||
// function must be called when starting up from failover (refer to the Startup method).
|
||||
|
||||
//CheckpointDynamicAttributeData();
|
||||
|
||||
#region Example
|
||||
// if (attrName == "MyDynamic")
|
||||
// {
|
||||
// if (e.Value > 10)
|
||||
// {
|
||||
// LogWarning(string.Format("value for {0} must be less or equal to 10", attrName));
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// SetValue(attrName, e.Value);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// return;
|
||||
// }
|
||||
#endregion
|
||||
|
||||
// if unhandled a warning is shown as a reminder
|
||||
Set(e.attributeHandle.shAttributeId, e.attributeHandle.shPrimitiveId, e.Value);
|
||||
LogWarning(string.Format("Uknown set handler for attribute '{0}'", attrName));
|
||||
|
||||
]]></RTSCDynamic_Attributes_Set_Handler>
|
||||
<CTSCDEC><![CDATA[ #region Declarations
|
||||
//Declare Configtime Class Variables here.
|
||||
//Variables declared in this region are available to all methods
|
||||
//in the Configtime Class.
|
||||
|
||||
|
||||
]]></CTSCDEC>
|
||||
<CTSCValidate><![CDATA[ //------------------------------------------------------------------------------
|
||||
// TODO: Configtime Event - Validate
|
||||
//
|
||||
// Validate sets the warning or error text for the object.
|
||||
// It is used to check conditions that would not be checked using
|
||||
// a SetHandler, such as reporting that an object was not
|
||||
// configured, or that combinations of attributes are illegal.
|
||||
//
|
||||
// Other than calling AddWarningMessage or AddErrorMessage, Validate
|
||||
// should never modify the state of the object.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#region Example code
|
||||
// if (MyTestDefaultState)
|
||||
// {
|
||||
// //Add a warning message using the dictionay phrase ID "ObjectStillInDefaultState"
|
||||
// AddWarningMessage(GetText("ObjectStillInDefaultState"));
|
||||
//
|
||||
// //Change the status to Warning if the current status is Good
|
||||
// if (status == EPACKAGESTATUS.ePackageGood)
|
||||
// {
|
||||
// status = EPACKAGESTATUS.ePackageWarning;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (MyTestAttributeCombinationValid)
|
||||
// {
|
||||
// //Add a warning message using the dictionay phrase ID "AttributeCombinationInvalid"
|
||||
// AddWarningMessage(GetText("AttributeCombinationInvalid"));
|
||||
//
|
||||
// // Change the status to Warning if the current status is Good
|
||||
// if (status == EPACKAGESTATUS.ePackageGood)
|
||||
// {
|
||||
// status = EPACKAGESTATUS.ePackageWarning;
|
||||
// }
|
||||
// }
|
||||
#endregion
|
||||
|
||||
// By default set the object status to Good
|
||||
status = EPACKAGESTATUS.ePackageGood;
|
||||
|
||||
|
||||
// The following statement will exit validate when validating templates.
|
||||
// Place code that should be validated in templates and instances before this
|
||||
// statement. Code placed after this statement will execute in instances only.
|
||||
if ((bool)Get((short)ECOMMONPRIMITIVE.idxCommonIsTemplate, eCommonPrimitiveId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
]]></CTSCValidate>
|
||||
<CTSCInitialize><![CDATA[ //------------------------------------------------------------------------------
|
||||
// TODO: Configtime Event - Initialize
|
||||
//
|
||||
// Any custom initialization can be done here, including caching of attribute
|
||||
// values, primitive IDs etc.
|
||||
//------------------------------------------------------------------------------
|
||||
]]></CTSCInitialize>
|
||||
<CTSCMigrate><![CDATA[ //------------------------------------------------------------------------------
|
||||
// TODO: Configtime Event - Migrate
|
||||
//
|
||||
// Migrate executes when importing a template into a Galaxy that contains
|
||||
// a previous version (major) of the template. The template must be derived or
|
||||
// instantiated for migrate to execute.
|
||||
//
|
||||
// Migrate provides access to the previous versions attribute information.
|
||||
// A typical application for migrate code is to preserve attribute values
|
||||
// when an attribute name has changed (refer to the Example code below).
|
||||
//
|
||||
// To enable this event the migrate option must be configured via the Toolkit
|
||||
// Editor or in code (i.e. [ObjectAttributes.AMigrate("1","2")]).
|
||||
//
|
||||
// If no implementation is provided, the system will copy all attribute values
|
||||
// from the old object to the new one by matching the attribute names.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#region Example code
|
||||
// //Check major version of previous template
|
||||
// if (migrate.MajorVersion() == 1)
|
||||
// {
|
||||
// //Attribute "Eg_001" has been renamed to "Example_001".
|
||||
// //Transfer attribute value, lock and security classification
|
||||
// Example_001 = migrate.GetValue("Eg_001"); //Gets value
|
||||
// Example_001.Locked = migrate.GetLocked("Eg_001"); //Gets lock status
|
||||
// Example_001.Security = migrate.GetSecurity("Eg_001"); //Gets Security Classification
|
||||
//
|
||||
// //Transfer primitive values
|
||||
// SetValue("Example_001.TrendHi", migrate.GetValue("Eg_001.TrendHi"));
|
||||
// SetValue("Example_001.TrendHi", EATTRIBUTEPROPERTY.idxAttribPropLocked, migrate.GetLocked("Eg_001.TrendHi"));
|
||||
//
|
||||
// //Automatically migrate all child primitives
|
||||
// migrate.AutoMigrateChildPrimitives = true;
|
||||
// }
|
||||
|
||||
#endregion
|
||||
]]></CTSCMigrate>
|
||||
<CTSCPreValidate><![CDATA[ //------------------------------------------------------------------------------
|
||||
// TODO: Configtime Event - PreValidate
|
||||
//
|
||||
// PreValidate is called when the object is about to be validated (e.g. when
|
||||
// an edit session is ending and the object is about to be saved.)
|
||||
//
|
||||
// A primitive can modify attributes within this method.
|
||||
//
|
||||
// Note: It is often not necessary to perform any actions in OnPreValidate.
|
||||
//------------------------------------------------------------------------------
|
||||
]]></CTSCPreValidate>
|
||||
<CTSCPostCreate><![CDATA[ //------------------------------------------------------------------------------
|
||||
// TODO: Configtime Event - PostCreate
|
||||
//
|
||||
// OnPostCreate is called when an object is first created.
|
||||
//
|
||||
// One purpose for implementing this method is to insure that the initial
|
||||
// state of the primitive is valid.
|
||||
//
|
||||
// This method can be used by a Resuable Primitive to correct invalid initial
|
||||
// states that can arise when an attribute value has been overridden. If the
|
||||
// attribute has a SetHandler with validation or side effects the SetHandler
|
||||
// does not execute as overrides do not trigger SetHandlers.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#region Example code
|
||||
// // If statistics are enabled, add the Statistics virtual primitive
|
||||
// // the way the SetHandler would have done it.
|
||||
// if (StatsEnable)
|
||||
// {
|
||||
// AddPrimitive("Statistics", "Statistics1", "Statistics1");
|
||||
// }
|
||||
#endregion
|
||||
]]></CTSCPostCreate>
|
||||
<CTSCDynamic_Attributes_Set_Handler><![CDATA[
|
||||
string attrName = Get(e.attributeHandle.shAttributeId, e.attributeHandle.shPrimitiveId, EATTRIBUTEPROPERTY.idxAttribPropName);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// TODO: Configtime Event - Dynamic Set Handler
|
||||
//
|
||||
// Implement set handler code for any dynamic attributes you create with set handlers
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#region Example
|
||||
// if (attrName == "MyDynamic")
|
||||
// {
|
||||
// if (e.Value > 10)
|
||||
// {
|
||||
// LogWarning(string.Format("value for {0} must be less or equal to 10", attrName));
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// SetValue(attrName, e.Value);
|
||||
// }
|
||||
//
|
||||
//
|
||||
// return;
|
||||
// }
|
||||
#endregion
|
||||
|
||||
// if unhandled a warning is shown as a reminder
|
||||
Set(e.attributeHandle.shAttributeId, e.attributeHandle.shPrimitiveId, e.Value);
|
||||
LogWarning(string.Format("Uknown set handler for attribute '{0}'", attrName));
|
||||
|
||||
]]></CTSCDynamic_Attributes_Set_Handler>
|
||||
<RTSOShutdown><![CDATA[ //------------------------------------------------------------------------------
|
||||
// TODO: Runtime Event - Shutdown
|
||||
//
|
||||
// Clean up dynamic allocation, release open resources, etc.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// Activate marked attributes before shutting down
|
||||
AdviseOnlyActivateAttributes();
|
||||
]]></RTSOShutdown><RTSOStartup><![CDATA[ //------------------------------------------------------------------------------
|
||||
// TODO: Runtime Event - Startup
|
||||
//
|
||||
// Cache attributes. Cache Primitive IDs of other known primitives.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// RestoreDynamicAttributes will recreate the Dynamic Attributes and restore the check pointed
|
||||
// values during failover startup. The Failover Support for Dynamic Attributes option must
|
||||
// be enabled via the Object Editor to support this function. To maintain the
|
||||
// Dynamic Attribute values the CheckpointDynamicAttributeData function must be called
|
||||
// when Dynamic Attribute values are modified (refer to the Dynamic Attribute Set Handler).
|
||||
|
||||
//RestoreDynamicAttributes();
|
||||
|
||||
m_TimeOfLastChange = GetScanTime();
|
||||
|
||||
// Execute offscan code to initialize the object in its offscan state.
|
||||
SetScanState(false);
|
||||
|
||||
// Suspend marked attributes at startup
|
||||
AdviseOnlySuspendAttributes();
|
||||
|
||||
]]></RTSOStartup><RTSCShutdown><![CDATA[ //------------------------------------------------------------------------------
|
||||
// TODO: Runtime Event - Shutdown
|
||||
//
|
||||
// Clean up dynamic allocation, release open resources, etc.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// Activate marked attributes before shutting down
|
||||
AdviseOnlyActivateAttributes();
|
||||
]]></RTSCShutdown><RTSCStartup><![CDATA[ //------------------------------------------------------------------------------
|
||||
// TODO: Runtime Event - Startup
|
||||
//
|
||||
// Cache attributes. Cache Primitive IDs of other known primitives.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// RestoreDynamicAttributes will recreate the Dynamic Attributes and restore the check pointed
|
||||
// values during failover startup. The Failover Support for Dynamic Attributes option must
|
||||
// be enabled via the Object Editor to support this function. To maintain the
|
||||
// Dynamic Attribute values the CheckpointDynamicAttributeData function must be called
|
||||
// when Dynamic Attribute values are modified (refer to the Dynamic Attribute Set Handler).
|
||||
|
||||
//RestoreDynamicAttributes();
|
||||
|
||||
// Execute offscan code to initialize the object in its offscan state.
|
||||
SetScanState(false);
|
||||
|
||||
// Suspend marked attributes at startup
|
||||
AdviseOnlySuspendAttributes();
|
||||
]]></RTSCStartup></CCData>
|
||||
<Build Attach_Runtime_Debugger="False" Attach_IDE_Debugger="False" Enable_Migrate="False" Copy_Reusable="True" Copy_Output="False" Output_Path="" Attach_Configuration_Debugger="False" />
|
||||
<Version Restart_Bootstrap="False" Version_Type="Retain" Restart_GR="False" AppendDelete_Version="Delete" Restart_IDE="False" />
|
||||
<BuildInfo>
|
||||
<OutputDir><![CDATA[..\Output\]]></OutputDir>
|
||||
<Project CreateAADEF="True">
|
||||
<FullOutputFileName><![CDATA[..\Stats\Statsobj\bin\Debug\WatchDogStats1.dll]]></FullOutputFileName>
|
||||
<OutputPath><![CDATA[..\Stats\Statsobj\bin\Debug\]]></OutputPath>
|
||||
<ProjectPath><![CDATA[..\Stats\Statsobj]]></ProjectPath>
|
||||
<ClassName>ArchestrA.Toolkit.Watchdog.Stats</ClassName>
|
||||
<DependentFiles>
|
||||
<dep>
|
||||
<name><![CDATA[WatchDogStats1RC.dll]]></name>
|
||||
<vendor><![CDATA[ArchestrA]]></vendor>
|
||||
<type>Runtime</type>
|
||||
<fileType>ComDLL</fileType>
|
||||
<def />
|
||||
</dep>
|
||||
<dep>
|
||||
<name><![CDATA[WatchDogStats1.dll]]></name>
|
||||
<vendor><![CDATA[ArchestrA]]></vendor>
|
||||
<type>Runtime, Configtime</type>
|
||||
<fileType>NETFrameworkAssembly</fileType>
|
||||
</dep>
|
||||
<dep>
|
||||
<name><![CDATA[WatchDogStats1.reg]]></name>
|
||||
<vendor><![CDATA[ArchestrA]]></vendor>
|
||||
<type>Runtime, Configtime</type>
|
||||
<fileType>MergeRegistryScript</fileType>
|
||||
</dep>
|
||||
<dep>
|
||||
<name><![CDATA[WatchDogStatsRuntime1.dll]]></name>
|
||||
<vendor><![CDATA[ArchestrA]]></vendor>
|
||||
<type>Runtime</type>
|
||||
<fileType>NETFrameworkAssembly</fileType>
|
||||
</dep>
|
||||
<dep>
|
||||
<name><![CDATA[WatchDogStatsRuntime1.reg]]></name>
|
||||
<vendor><![CDATA[ArchestrA]]></vendor>
|
||||
<type>Runtime</type>
|
||||
<fileType>MergeRegistryScript</fileType>
|
||||
</dep>
|
||||
<dep>
|
||||
<name><![CDATA[WatchDogStatsConfigtime1.dll]]></name>
|
||||
<vendor><![CDATA[ArchestrA]]></vendor>
|
||||
<type>Configtime</type>
|
||||
<fileType>NETFrameworkAssembly</fileType>
|
||||
</dep>
|
||||
<dep>
|
||||
<name><![CDATA[WatchDogStatsConfigtime1.reg]]></name>
|
||||
<vendor><![CDATA[ArchestrA]]></vendor>
|
||||
<type>Configtime</type>
|
||||
<fileType>MergeRegistryScript</fileType>
|
||||
</dep>
|
||||
<dep>
|
||||
<name><![CDATA[C:\WINDOWS\assembly\GAC_MSIL\ArchestrA.Toolkit.ArchestrAObjectSupport\1.0.0.0__f787e550f2f530ee\ArchestrA.Toolkit.ArchestrAObjectSupport.dll]]></name>
|
||||
<vendor><![CDATA[Wonderware]]></vendor>
|
||||
<type>Runtime, Configtime</type>
|
||||
<fileType>NETFrameworkAssembly</fileType>
|
||||
</dep>
|
||||
<attribute>
|
||||
<name>Reset</name>
|
||||
<run />
|
||||
</attribute>
|
||||
<FullName>WatchDogStats</FullName>
|
||||
</DependentFiles>
|
||||
</Project>
|
||||
<Project TopMost="True" CreateAADEF="True">
|
||||
<FullOutputFileName><![CDATA[bin\Debug\WatchDog1.dll]]></FullOutputFileName>
|
||||
<OutputPath><![CDATA[bin\Debug\]]></OutputPath>
|
||||
<ProjectPath><![CDATA[]]></ProjectPath>
|
||||
<ClassName>ArchestrA.Toolkit.Watchdog.WatchDog</ClassName>
|
||||
<DependentFiles>
|
||||
<dep>
|
||||
<name><![CDATA[WatchDog1RC.dll]]></name>
|
||||
<vendor><![CDATA[ArchestrA]]></vendor>
|
||||
<type>Runtime</type>
|
||||
<fileType>ComDLL</fileType>
|
||||
<def />
|
||||
</dep>
|
||||
<dep>
|
||||
<name><![CDATA[WatchDog1.dll]]></name>
|
||||
<vendor><![CDATA[ArchestrA]]></vendor>
|
||||
<type>Runtime, Configtime</type>
|
||||
<fileType>NETFrameworkAssembly</fileType>
|
||||
</dep>
|
||||
<dep>
|
||||
<name><![CDATA[WatchDog1.reg]]></name>
|
||||
<vendor><![CDATA[ArchestrA]]></vendor>
|
||||
<type>Runtime, Configtime</type>
|
||||
<fileType>MergeRegistryScript</fileType>
|
||||
</dep>
|
||||
<dep>
|
||||
<name><![CDATA[WatchdogRuntime1.dll]]></name>
|
||||
<vendor><![CDATA[ArchestrA]]></vendor>
|
||||
<type>Runtime</type>
|
||||
<fileType>NETFrameworkAssembly</fileType>
|
||||
</dep>
|
||||
<dep>
|
||||
<name><![CDATA[WatchdogRuntime1.reg]]></name>
|
||||
<vendor><![CDATA[ArchestrA]]></vendor>
|
||||
<type>Runtime</type>
|
||||
<fileType>MergeRegistryScript</fileType>
|
||||
</dep>
|
||||
<dep>
|
||||
<name><![CDATA[WatchdogConfigtime1.dll]]></name>
|
||||
<vendor><![CDATA[ArchestrA]]></vendor>
|
||||
<type>Configtime</type>
|
||||
<fileType>NETFrameworkAssembly</fileType>
|
||||
</dep>
|
||||
<dep>
|
||||
<name><![CDATA[WatchdogConfigtime1.reg]]></name>
|
||||
<vendor><![CDATA[ArchestrA]]></vendor>
|
||||
<type>Configtime</type>
|
||||
<fileType>MergeRegistryScript</fileType>
|
||||
</dep>
|
||||
<dep>
|
||||
<name><![CDATA[WatchdogEditor1.dll]]></name>
|
||||
<vendor><![CDATA[ArchestrA]]></vendor>
|
||||
<type>Editor</type>
|
||||
<fileType>NETFrameworkAssembly</fileType>
|
||||
</dep>
|
||||
<dep>
|
||||
<name><![CDATA[WatchdogEditor1.reg]]></name>
|
||||
<vendor><![CDATA[ArchestrA]]></vendor>
|
||||
<type>Editor</type>
|
||||
<fileType>MergeRegistryScript</fileType>
|
||||
</dep>
|
||||
<dep>
|
||||
<name><![CDATA[C:\WINDOWS\assembly\GAC_MSIL\ArchestrA.Toolkit.ArchestrAControlLibrary\1.0.0.0__f787e550f2f530ee\ArchestrA.Toolkit.ArchestrAControlLibrary.dll]]></name>
|
||||
<vendor><![CDATA[Wonderware]]></vendor>
|
||||
<type>Runtime, Configtime, Editor</type>
|
||||
<fileType>NETFrameworkAssembly</fileType>
|
||||
</dep>
|
||||
<dep>
|
||||
<name><![CDATA[C:\WINDOWS\assembly\GAC_MSIL\ArchestrA.Toolkit.ArchestrAObjectSupport\1.0.0.0__f787e550f2f530ee\ArchestrA.Toolkit.ArchestrAObjectSupport.dll]]></name>
|
||||
<vendor><![CDATA[Wonderware]]></vendor>
|
||||
<type>Runtime, Configtime</type>
|
||||
<fileType>NETFrameworkAssembly</fileType>
|
||||
</dep>
|
||||
<editor>WatchdogEditor1</editor>
|
||||
<attribute>
|
||||
<name>Stats_Enable</name>
|
||||
<cfg />
|
||||
</attribute>
|
||||
<attribute>
|
||||
<name>Timeout_Limit</name>
|
||||
<cfg />
|
||||
<run />
|
||||
</attribute>
|
||||
<FullName>WatchDog</FullName>
|
||||
</DependentFiles>
|
||||
</Project>
|
||||
<Project>
|
||||
<FullOutputFileName><![CDATA[..\WatchdogEditor\bin\Debug\WatchdogEditor1.dll]]></FullOutputFileName>
|
||||
<OutputPath><![CDATA[..\WatchdogEditor\bin\Debug\]]></OutputPath>
|
||||
<ProjectPath><![CDATA[..\WatchdogEditor]]></ProjectPath>
|
||||
</Project>
|
||||
<Project>
|
||||
<FullOutputFileName><![CDATA[..\WatchdogConfigtime\bin\Debug\WatchdogConfigtime1.dll]]></FullOutputFileName>
|
||||
<OutputPath><![CDATA[..\WatchdogConfigtime\bin\Debug\]]></OutputPath>
|
||||
<ProjectPath><![CDATA[..\WatchdogConfigtime]]></ProjectPath>
|
||||
</Project>
|
||||
<Project>
|
||||
<FullOutputFileName><![CDATA[..\WatchdogRuntime\bin\Debug\WatchdogRuntime1.dll]]></FullOutputFileName>
|
||||
<OutputPath><![CDATA[..\WatchdogRuntime\bin\Debug\]]></OutputPath>
|
||||
<ProjectPath><![CDATA[..\WatchdogRuntime]]></ProjectPath>
|
||||
</Project>
|
||||
<Project>
|
||||
<FullOutputFileName><![CDATA[..\Stats\StatsConfigtime\bin\Debug\WatchDogStatsConfigtime1.dll]]></FullOutputFileName>
|
||||
<OutputPath><![CDATA[..\Stats\StatsConfigtime\bin\Debug\]]></OutputPath>
|
||||
<ProjectPath><![CDATA[..\Stats\StatsConfigtime]]></ProjectPath>
|
||||
</Project>
|
||||
<Project>
|
||||
<FullOutputFileName><![CDATA[..\Stats\StatsRuntime\bin\Debug\WatchDogStatsRuntime1.dll]]></FullOutputFileName>
|
||||
<OutputPath><![CDATA[..\Stats\StatsRuntime\bin\Debug\]]></OutputPath>
|
||||
<ProjectPath><![CDATA[..\Stats\StatsRuntime]]></ProjectPath>
|
||||
</Project>
|
||||
</BuildInfo>
|
||||
</xml>
|
||||
@@ -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")]
|
||||
|
||||
@@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Dictionary>
|
||||
<Phrase_Index PhraseID="aaWatchdogMonitoredBitInputSourcePrompt">
|
||||
<Language LangID="1033">
|
||||
<VALUE>MonitoredBit.InputSource:</VALUE>
|
||||
</Language>
|
||||
</Phrase_Index>
|
||||
<Phrase_Index PhraseID="aaStats_EnablePrompt">
|
||||
<Language LangID="1033">
|
||||
<VALUE>Stats.Enable:</VALUE>
|
||||
</Language>
|
||||
</Phrase_Index>
|
||||
<Phrase_Index PhraseID="aaWatchdogStatsTimeoutCnt_HistorizedPrompt">
|
||||
<Language LangID="1033">
|
||||
<VALUE>Stats.TimeoutCnt.Historized:</VALUE>
|
||||
</Language>
|
||||
</Phrase_Index>
|
||||
<Phrase_Index PhraseID="aaTimeout_AlarmedPrompt">
|
||||
<Language LangID="1033">
|
||||
<VALUE>Timeout.Alarmed:</VALUE>
|
||||
</Language>
|
||||
</Phrase_Index>
|
||||
<Phrase_Index PhraseID="aaTimeout_LimitPrompt">
|
||||
<Language LangID="1033">
|
||||
<VALUE>Timeout.Limit:</VALUE>
|
||||
</Language>
|
||||
</Phrase_Index>
|
||||
<Phrase_Index PhraseID="aaTimeSinceChange_HistorizedPrompt">
|
||||
<Language LangID="1033">
|
||||
<VALUE>TimeSinceChange.Historized:</VALUE>
|
||||
</Language>
|
||||
</Phrase_Index>
|
||||
<Phrase_Index PhraseID="GeneralTab">
|
||||
<Language LangID="1033">
|
||||
<VALUE>General</VALUE>
|
||||
</Language>
|
||||
</Phrase_Index>
|
||||
<Phrase_Index PhraseID="aaWatchdogStatsResetPrompt">
|
||||
<Language LangID="1033">
|
||||
<VALUE>Stats.Reset:</VALUE>
|
||||
</Language>
|
||||
</Phrase_Index>
|
||||
<Phrase_Index PhraseID="aaWatchdogStatsTimeoutCntHistForceStoragePeriodPrompt">
|
||||
<Language LangID="1033">
|
||||
<VALUE>Stats.TimeoutCnt.ForceStoragePeriod:</VALUE>
|
||||
</Language>
|
||||
</Phrase_Index>
|
||||
<Phrase_Index PhraseID="aaWatchdogStatsTimeoutCntHistTrendHiPrompt">
|
||||
<Language LangID="1033">
|
||||
<VALUE>Stats.TimeoutCnt.TrendHi:</VALUE>
|
||||
</Language>
|
||||
</Phrase_Index>
|
||||
<Phrase_Index PhraseID="aaWatchdogStatsTimeoutCntHistTrendLoPrompt">
|
||||
<Language LangID="1033">
|
||||
<VALUE>Stats.TimeoutCnt.TrendLo:</VALUE>
|
||||
</Language>
|
||||
</Phrase_Index>
|
||||
<Phrase_Index PhraseID="aaWatchdogStatsTimeoutCntHistValueDeadBandPrompt">
|
||||
<Language LangID="1033">
|
||||
<VALUE>Stats.TimeoutCnt.ValueDeadBand:</VALUE>
|
||||
</Language>
|
||||
</Phrase_Index>
|
||||
<Phrase_Index PhraseID="aaWatchdogTimeoutAlarmAckMsgPrompt">
|
||||
<Language LangID="1033">
|
||||
<VALUE>Timeout.AckMsg:</VALUE>
|
||||
</Language>
|
||||
</Phrase_Index>
|
||||
<Phrase_Index PhraseID="aaWatchdogTimeoutAlarmDescAttrNamePrompt">
|
||||
<Language LangID="1033">
|
||||
<VALUE>Timeout.DescAttrName:</VALUE>
|
||||
</Language>
|
||||
</Phrase_Index>
|
||||
<Phrase_Index PhraseID="aaWatchdogTimeoutAlarmPriorityPrompt">
|
||||
<Language LangID="1033">
|
||||
<VALUE>Timeout.Priority:</VALUE>
|
||||
</Language>
|
||||
</Phrase_Index>
|
||||
<Phrase_Index PhraseID="aaWatchdogTimeSinceChangeHistForceStoragePeriodPrompt">
|
||||
<Language LangID="1033">
|
||||
<VALUE>TimeSinceChange.ForceStoragePeriod:</VALUE>
|
||||
</Language>
|
||||
</Phrase_Index>
|
||||
<Phrase_Index PhraseID="aaWatchdogTimeSinceChangeHistTrendHiPrompt">
|
||||
<Language LangID="1033">
|
||||
<VALUE>TimeSinceChange.TrendHi:</VALUE>
|
||||
</Language>
|
||||
</Phrase_Index>
|
||||
<Phrase_Index PhraseID="aaWatchdogTimeSinceChangeHistTrendLoPrompt">
|
||||
<Language LangID="1033">
|
||||
<VALUE>TimeSinceChange.TrendLo:</VALUE>
|
||||
</Language>
|
||||
</Phrase_Index>
|
||||
<Phrase_Index PhraseID="aaWatchdogTimeSinceChangeHistValueDeadBandPrompt">
|
||||
<Language LangID="1033">
|
||||
<VALUE>TimeSinceChange.ValueDeadBand:</VALUE>
|
||||
</Language>
|
||||
</Phrase_Index>
|
||||
<Phrase_Index PhraseID="AdvancedTab">
|
||||
<Language LangID="1033">
|
||||
<VALUE>Advanced</VALUE>
|
||||
</Language>
|
||||
</Phrase_Index>
|
||||
<Phrase_Index PhraseID="Timeout.Limit must be a positive number.">
|
||||
<Language LangID="1033">
|
||||
<VALUE>Timeout.Limit must be a positive number.</VALUE>
|
||||
</Language>
|
||||
</Phrase_Index>
|
||||
</Dictionary>
|
||||
@@ -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>
|
||||
/// Summary description for Watchdog
|
||||
/// </summary>
|
||||
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()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,133 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.21022</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{0E30645D-B574-41BF-B302-64FEE3C8208A}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ArchestrA.Toolkit.Watchdog</RootNamespace>
|
||||
<AssemblyName>WatchDog1</AssemblyName>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>..\Watchdog.snk</AssemblyOriginatorKeyFile>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ArchestrA.Toolkit.ArchestrAObjectSupport, Version=4.0.0.0, Culture=neutral, PublicKeyToken=f787e550f2f530ee, processorArchitecture=MSI">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Toolkit.ArchestrAObjectSupport.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArchestrA.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=23106a86e706d0ae">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Core.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Watchdog.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="AAObjectInfo.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\Watchdog.snk">
|
||||
<Link>Watchdog.snk</Link>
|
||||
</None>
|
||||
<None Include="WatchDog1.aaDCT" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 2.0 %28x86%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.0 %28x86%29</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Stats\Statsobj\Statsobj.csproj">
|
||||
<Project>{A7BA2304-935A-4DDD-80CC-E6387B2980E6}</Project>
|
||||
<Name>Statsobj</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -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")]
|
||||
@@ -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>
|
||||
/// Summary description for WatchdogConfigtime
|
||||
/// </summary>
|
||||
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;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.21022</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{9C114E5F-13AC-4864-8301-4D3B422D075F}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ArchestrA.Toolkit.Watchdog</RootNamespace>
|
||||
<AssemblyName>WatchdogConfigtime1</AssemblyName>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>..\Watchdog.snk</AssemblyOriginatorKeyFile>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ArchestrA.Toolkit.ArchestrAObjectSupport, Version=4.0.0.0, Culture=neutral, PublicKeyToken=f787e550f2f530ee, processorArchitecture=MSI">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Toolkit.ArchestrAObjectSupport.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArchestrA.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=23106a86e706d0ae">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Core.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="WatchdogConfigtime.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Service Include="{94E38DFF-614B-4cbd-B67C-F211BB35CE8B}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Watchdog\Watchdog.csproj">
|
||||
<Project>{0E30645D-B574-41BF-B302-64FEE3C8208A}</Project>
|
||||
<Name>Watchdog</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\Watchdog.snk">
|
||||
<Link>Watchdog.snk</Link>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 2.0 %28x86%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.0 %28x86%29</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -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")]
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,139 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.21022</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{B2B3A624-324D-47B1-956D-94B48B7140A6}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ArchestrA.Toolkit.Watchdog</RootNamespace>
|
||||
<AssemblyName>WatchdogEditor1</AssemblyName>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>..\Watchdog.snk</AssemblyOriginatorKeyFile>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ArchestrA.Toolkit.ArchestrAControlLibrary, Version=4.0.0.0, Culture=neutral, PublicKeyToken=f787e550f2f530ee, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Toolkit.ArchestrAControlLibrary.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArchestraEditorFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=fdcbee9982d955e0, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestraEditorFramework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="IaaEditorFormLibInterop, Version=2.0.0.0, Culture=neutral, PublicKeyToken=fdcbee9982d955e0, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>C:\Program Files\Archestra\Toolkits\AOT\bin\IaaEditorFormLibInterop.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="WatchdogEditor.cs">
|
||||
</Compile>
|
||||
<Compile Include="WatchdogEditor.Designer.cs">
|
||||
<DependentUpon>WatchdogEditor.cs</DependentUpon>
|
||||
</Compile>
|
||||
<Service Include="{94E38DFF-614B-4cbd-B67C-F211BB35CE8B}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="WatchdogEditor.resx">
|
||||
<SubType>Designer</SubType>
|
||||
<DependentUpon>WatchdogEditor.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\Watchdog.snk">
|
||||
<Link>Watchdog.snk</Link>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 2.0 %28x86%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.0 %28x86%29</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,540 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="m_ToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="aaWatchdogMonitoredBitInputSourceSecurityClass.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
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==
|
||||
</value>
|
||||
</data>
|
||||
<data name="aaWatchdogMonitoredBitInputSourceLock.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA
|
||||
CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ
|
||||
Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA
|
||||
GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2
|
||||
BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9
|
||||
/sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU
|
||||
KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg
|
||||
JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="aaStats_EnableLock.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA
|
||||
CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ
|
||||
Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA
|
||||
GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2
|
||||
BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9
|
||||
/sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU
|
||||
KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg
|
||||
JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="aaWatchdogStatsTimeoutCnt_HistorizedLock.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA
|
||||
CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ
|
||||
Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA
|
||||
GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2
|
||||
BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9
|
||||
/sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU
|
||||
KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg
|
||||
JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="aaTimeout_AlarmedLock.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA
|
||||
CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ
|
||||
Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA
|
||||
GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2
|
||||
BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9
|
||||
/sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU
|
||||
KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg
|
||||
JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="aaTimeout_LimitSecurityClass.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
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==
|
||||
</value>
|
||||
</data>
|
||||
<data name="aaTimeout_LimitLock.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA
|
||||
CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ
|
||||
Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA
|
||||
GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2
|
||||
BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9
|
||||
/sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU
|
||||
KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg
|
||||
JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="aaTimeSinceChange_HistorizedLock.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA
|
||||
CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ
|
||||
Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA
|
||||
GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2
|
||||
BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9
|
||||
/sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU
|
||||
KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg
|
||||
JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="aaWatchdogStatsResetSecurityClass.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
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==
|
||||
</value>
|
||||
</data>
|
||||
<data name="aaWatchdogStatsTimeoutCntHistForceStoragePeriodSecurityClass.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
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==
|
||||
</value>
|
||||
</data>
|
||||
<data name="aaWatchdogStatsTimeoutCntHistForceStoragePeriodLock.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA
|
||||
CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ
|
||||
Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA
|
||||
GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2
|
||||
BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9
|
||||
/sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU
|
||||
KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg
|
||||
JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="aaWatchdogStatsTimeoutCntHistTrendHiSecurityClass.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
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==
|
||||
</value>
|
||||
</data>
|
||||
<data name="aaWatchdogStatsTimeoutCntHistTrendHiLock.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA
|
||||
CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ
|
||||
Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA
|
||||
GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2
|
||||
BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9
|
||||
/sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU
|
||||
KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg
|
||||
JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="aaWatchdogStatsTimeoutCntHistTrendLoSecurityClass.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
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==
|
||||
</value>
|
||||
</data>
|
||||
<data name="aaWatchdogStatsTimeoutCntHistTrendLoLock.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA
|
||||
CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ
|
||||
Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA
|
||||
GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2
|
||||
BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9
|
||||
/sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU
|
||||
KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg
|
||||
JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="aaWatchdogStatsTimeoutCntHistValueDeadBandSecurityClass.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
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==
|
||||
</value>
|
||||
</data>
|
||||
<data name="aaWatchdogStatsTimeoutCntHistValueDeadBandLock.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA
|
||||
CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ
|
||||
Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA
|
||||
GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2
|
||||
BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9
|
||||
/sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU
|
||||
KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg
|
||||
JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="aaWatchdogTimeoutAlarmAckMsgSecurityClass.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
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==
|
||||
</value>
|
||||
</data>
|
||||
<data name="aaWatchdogTimeoutAlarmDescAttrNameLock.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA
|
||||
CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ
|
||||
Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA
|
||||
GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2
|
||||
BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9
|
||||
/sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU
|
||||
KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg
|
||||
JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="aaWatchdogTimeoutAlarmPrioritySecurityClass.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
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==
|
||||
</value>
|
||||
</data>
|
||||
<data name="aaWatchdogTimeoutAlarmPriorityLock.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA
|
||||
CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ
|
||||
Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA
|
||||
GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2
|
||||
BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9
|
||||
/sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU
|
||||
KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg
|
||||
JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="aaWatchdogTimeSinceChangeHistForceStoragePeriodSecurityClass.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
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==
|
||||
</value>
|
||||
</data>
|
||||
<data name="aaWatchdogTimeSinceChangeHistForceStoragePeriodLock.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA
|
||||
CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ
|
||||
Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA
|
||||
GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2
|
||||
BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9
|
||||
/sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU
|
||||
KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg
|
||||
JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="aaWatchdogTimeSinceChangeHistTrendHiSecurityClass.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
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==
|
||||
</value>
|
||||
</data>
|
||||
<data name="aaWatchdogTimeSinceChangeHistTrendHiLock.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA
|
||||
CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ
|
||||
Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA
|
||||
GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2
|
||||
BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9
|
||||
/sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU
|
||||
KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg
|
||||
JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="aaWatchdogTimeSinceChangeHistTrendLoSecurityClass.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
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==
|
||||
</value>
|
||||
</data>
|
||||
<data name="aaWatchdogTimeSinceChangeHistTrendLoLock.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA
|
||||
CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ
|
||||
Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA
|
||||
GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2
|
||||
BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9
|
||||
/sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU
|
||||
KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg
|
||||
JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="aaWatchdogTimeSinceChangeHistValueDeadBandSecurityClass.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
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==
|
||||
</value>
|
||||
</data>
|
||||
<data name="aaWatchdogTimeSinceChangeHistValueDeadBandLock.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALEwAA
|
||||
CxMBAJqcGAAAAWtJREFUOE+tlG1ugkAQhtuLeAkv0lNwHX97mf6wxmrVoFXUGhE/qboUxY8qiL7urLFZ
|
||||
Wws0heRNYNl5Zt6B2XsAd7FeBIxTscKE29+qU5QSZEV1cRNIoFIJV0okHjgzvD0/gBdYOg3IogRRoIFA
|
||||
GRArUFHSvJ+39b0NoRUSaD7Hl2z7CMs6grEDJhNfJJKhV0DqXyr1eCUZmEwquMg09xiNvHAgsw6QJYA2
|
||||
BGg2o6r2GI898WwYu2jA6dTHcORCNz5FAGNH0Jpp8vWhh17PFcC39vl9oGWqrtff8s1rVGsLETB594W9
|
||||
/sBFt7sTsGZrg3p9HQ1Y15Yol21ks0wEDAcet+ei09kKWEPb4LW6gqo60YDyD01AXd+hze01GxvUaitU
|
||||
KpTQwUvh7CDQsvwl6Z4CWtyepvEW8KporVhcIJ+3kcvZwcBbs0pAqkpVl3y2HRQKczxzUPbpA5mM9Xcg
|
||||
JfnXpEQ5UYL2xH7AngA3wnpl9OQ1/wAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
@@ -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")]
|
||||
@@ -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>
|
||||
/// Summary description for Watchdog
|
||||
/// </summary>
|
||||
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;
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>9.0.21022</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{FCAA2DA3-97F2-4C42-BB09-6729738D6872}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>ArchestrA.Toolkit.Watchdog</RootNamespace>
|
||||
<AssemblyName>WatchdogRuntime1</AssemblyName>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>..\Watchdog.snk</AssemblyOriginatorKeyFile>
|
||||
<FileUpgradeFlags>
|
||||
</FileUpgradeFlags>
|
||||
<UpgradeBackupLocation>
|
||||
</UpgradeBackupLocation>
|
||||
<OldToolsVersion>3.5</OldToolsVersion>
|
||||
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<RegisterForComInterop>false</RegisterForComInterop>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="ArchestrA.Toolkit.ArchestrAObjectSupport, Version=4.0.0.0, Culture=neutral, PublicKeyToken=f787e550f2f530ee, processorArchitecture=MSI">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Toolkit.ArchestrAObjectSupport.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="ArchestrA.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=23106a86e706d0ae">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>C:\Program Files\Archestra\Toolkits\AOT\bin\ArchestrA.Core.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="WatchdogRuntime.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Service Include="{94E38DFF-614B-4cbd-B67C-F211BB35CE8B}" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Watchdog\Watchdog.csproj">
|
||||
<Project>{0E30645D-B574-41BF-B302-64FEE3C8208A}</Project>
|
||||
<Name>Watchdog</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="..\Watchdog.snk">
|
||||
<Link>Watchdog.snk</Link>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -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 |
|
||||
@@ -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.
|
||||
@@ -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 |
|
||||
| --- | --- |
|
||||
| <Project name> | Code files that define the object shape and attributes |
|
||||
| <Project name>Configtime | Code files for the object’s config time (“package”) code |
|
||||
| <Project name>Editor | Code files for the custom object editor UI and code |
|
||||
| <Project name>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.
|
||||
@@ -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.
|
||||
@@ -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.
|
||||
@@ -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 (<conditions for valid value>)
|
||||
{
|
||||
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 (<conditions for valid value>)
|
||||
{
|
||||
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 “<AttributeName>.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 “<AttributeName>.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.
|
||||
@@ -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
|
||||
<Dictionary>
|
||||
<Phrase_Index PhraseID="SampleEntry">
|
||||
<Language LangID="1033">
|
||||
<VALUE>English string</VALUE>
|
||||
</Language>
|
||||
<Language LangID="1031">
|
||||
<VALUE>String translated into German</VALUE>
|
||||
</Language>
|
||||
... more <Language> elements for other languages ...
|
||||
</Phrase_Index>
|
||||
<Phrase_Index PhraseID="Entry2">
|
||||
... <Language> elements ...
|
||||
</Phrase_Index>
|
||||
</Dictionary>
|
||||
```
|
||||
|
||||
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*.
|
||||
@@ -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")
|
||||
```
|
||||
@@ -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.
|
||||
@@ -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.
|
||||
@@ -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.
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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.
|
||||
@@ -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.
|
||||
@@ -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. |
|
||||
@@ -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,
|
||||
@@ -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.
|
||||
@@ -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.
|
||||
@@ -0,0 +1,33 @@
|
||||
# CMxArray<T> 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<T> : CMxArrayBase
|
||||
```
|
||||
|
||||
## CMxArray<T> 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.
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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<bool>
|
||||
```
|
||||
|
||||
## 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
|
||||
@@ -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.
|
||||
@@ -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
|
||||
@@ -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<short>
|
||||
```
|
||||
|
||||
## 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
|
||||
@@ -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
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user