Movensys.AlarmHelper.Core 1.0.1

dotnet add package Movensys.AlarmHelper.Core --version 1.0.1
                    
NuGet\Install-Package Movensys.AlarmHelper.Core -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Movensys.AlarmHelper.Core" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Movensys.AlarmHelper.Core" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="Movensys.AlarmHelper.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Movensys.AlarmHelper.Core --version 1.0.1
                    
#r "nuget: Movensys.AlarmHelper.Core, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#addin nuget:?package=Movensys.AlarmHelper.Core&version=1.0.1
                    
Install Movensys.AlarmHelper.Core as a Cake Addin
#tool nuget:?package=Movensys.AlarmHelper.Core&version=1.0.1
                    
Install Movensys.AlarmHelper.Core as a Cake Tool

Movensys.AlarmHelper.Core

This is a function for alarm developed by the Movensys Application Team.

Features

  • Enum-based API – strongly-typed, zero magic strings
  • Two operating modes (Manage each alarm code individually, Pack active alarms into a 16-bit word array for fast PLC transfer)
  • CRUD helpers – Insert, Clear, AllClear, Contains, GetActiveAlarms, GetHistory
  • Real-time events – AlarmInserted / AlarmCleared for UI binding or logging
  • Json file support – manage alarm parameters and troubleshooting via external .json files

Quick Start

1 Define your enums

using Movensys.AlarmHelper.Core.Definitions;

enum AlarmCode
{
    OverHeat = 0,
    ServoError,
    LimitExceeded,
    SensorFail
}

enum AlarmLevel
{
    Warning,
    Error,
    Critical
}

2 Per‑code tracking with CodeAlarm

using Movensys.AlarmHelper.Core.AlarmTypes;

var alarm = new CodeAlarm<AlarmCode, AlarmLevel>();

// raise an alarm
alarm.Insert(AlarmCode.OverHeat);

// query
if (alarm.Contains(AlarmCode.OverHeat))
    Console.WriteLine("🔥 OverHeat active");

// clear
alarm.Clear(AlarmCode.OverHeat);

3 PLC‑friendly bitmap with WordAlarm

using Movensys.AlarmHelper.Core.AlarmTypes;

var plcAlarm = new WordAlarm<AlarmCode, AlarmLevel>();
plcAlarm.Insert(AlarmCode.SensorFail);

// build 16‑bit word array → send to PLC
ushort[] words = plcAlarm.GetWordArray();
PlcApi.WriteWords(0x1000, words);

4 Generic handling via BaseAlarm

BaseAlarm<AlarmCode, AlarmLevel> generic = new WordAlarm<AlarmCode, AlarmLevel>();

generic.Insert(AlarmCode.LimitExceeded);

// WordAlarm‑specific API when you really need it
if (generic is WordAlarm<AlarmCode, AlarmLevel> wa)
{
    ushort[] buf = wa.GetWordArray();
    /* … */
}

Tip

  • Batch operations – call AllClear() before system start‑up to guarantee a clean slate.
  • Cleared alarm history – After the application starts, call GetHistory() to review cleared alarm records.
  • UI binding – subscribe to AlarmInserted / AlarmCleared and push updates to your MVVM ObservableCollection.
  • Option strings – Use the Option string in AlarmParam to tag alarms with device‑specific directives (e.g., LED RED Blink) so your controller can run LED patterns when that option text appears in an active alarm.

Release History

may 30, 2025 - 1.0.1 ver<br> initial public release: CodeAlarm, WordAlarm, troubleshooting localization.<br>

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Framework net45 is compatible.  net451 is compatible.  net452 is compatible.  net46 is compatible.  net461 is compatible.  net462 is compatible.  net463 was computed.  net47 is compatible.  net471 is compatible.  net472 is compatible.  net48 is compatible.  net481 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 84 5/30/2025