Skip to content

platform sdk actions

Andre Lafleur edited this page Oct 8, 2026 · 9 revisions

Receiving actions

Security Center actions instruct an entity to perform an operation, such as triggering an output relay or arming a zone. Applications can receive actions directed at entities they own or control.

For notifications that an operation occurred, see Working with Security Center events. To send actions from your application, use the methods on Engine.ActionManager. To create rules that execute actions when events occur, see Event-to-actions.

Subscribe to actions

The following partial examples assume that engine is a connected Engine field and that the methods belong to the same class. 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

ActionReceived reports only actions whose recipient is owned or controlled by your application. It does not report actions for entities managed by another application or role.

To observe activity on entities your application does not control, such as a door being unlocked, subscribe to their events instead. Your application receives an entity's events once it has loaded the entity.

Handle specific action types

Cast the Action property to specific action classes, which are defined in the Genetec.Sdk.Actions namespace:

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 Action timestamp in Coordinated Universal Time (UTC)

Action 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

The following action classes represent output, zone, intrusion area, macro, threat level, and input operations:

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

Unsubscribe from actions

In the class that subscribed to ActionReceived, remove the handler during disposal:

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

See also

Platform SDK

Plugin SDK

Workspace SDK

Media SDK

Macro SDK

Web SDK

Synergis RIO

Media Gateway

Genetec Web Player

Clone this wiki locally