Skip to content

platform sdk actions

Andre Lafleur edited this page Feb 1, 2026 · 2 revisions

Receiving actions

The Security Center SDK allows applications to receive actions directed at entities. Actions are commands that tell an entity to do something, such as triggering an output relay or arming a zone.

Action subscription

Subscribe to actions using Engine.ActionReceived:

private void Initialize()
{
    engine.ActionReceived += OnActionReceived;
}

private void OnActionReceived(object sender, ActionReceivedEventArgs e)
{
    Console.WriteLine($"Action received: {e.ActionType} at {e.Timestamp}");
    Console.WriteLine($"Recipient: {e.Action.Recipient}");
}

Action routing

Actions are received when:

  • The target entity is loaded in the engine's entity cache
  • Your application has subscribed to ActionReceived

The ActionReceived event notifies you when actions are directed at entities you have loaded. This is used for monitoring what actions are being executed in the system.

Handling specific action types

Cast the Action property to specific action classes:

private void OnActionReceived(object sender, ActionReceivedEventArgs e)
{
    switch (e.ActionType)
    {
        case ActionType.TriggerOutput:
            var triggerAction = e.Action as TriggerOutputAction;
            Console.WriteLine($"Output behavior: {triggerAction?.OutputBehavior}");
            break;
        case ActionType.ArmZone:
            var armAction = e.Action as ArmZoneAction;
            Console.WriteLine($"Arming zone: {armAction?.Recipient}");
            break;
    }
}

ActionReceivedEventArgs properties

Property Type Description
ActionType ActionType The type of action received
Action Action The action object with details
Timestamp DateTime When the action was triggered (UTC)

Action object properties

The Action base class provides:

Property Type Description
Type ActionType The action type
Recipient Guid Target entity GUID
AllRecipients IEnumerable<Guid> All target entity GUIDs (for multi-recipient actions)
Schedule Guid Associated schedule GUID
SourceEvent Event The event that triggered this action (if applicable)

Action types

Commonly used action classes:

Class Description
TriggerOutputAction Trigger an output relay
ArmZoneAction Arm a zone
DisarmZoneAction Disarm a zone
ArmIntrusionAreaAction Arm an intrusion area
DisarmIntrusionAreaAction Disarm an intrusion area
ExecuteMacroAction Execute a macro
SetThreatLevelAction Set threat level
BypassInputAction Bypass an input
UnbypassInputAction Remove input bypass

Loading entities to receive actions

You only receive actions for entities loaded in the engine's entity cache. See Subscribing to events for details on loading entities.

Unsubscribing from actions

Remove action handlers during disposal:

protected override void Dispose(bool disposing)
{
    if (disposing)
    {
        engine.ActionReceived -= OnActionReceived;
    }
    base.Dispose(disposing);
}

Platform SDK

Plugin SDK

Workspace SDK

Media SDK

Macro SDK

Web SDK

Media Gateway

Genetec Web Player

Clone this wiki locally