Skip to content

EventTypeInfo

Record in Oadm.Sdk.Events · Oadm.Sdk.dll

An event a source can publish. Id is stable and unique (“oadm.device-triggers.<id>”); DisplayName names the event in plain language (“Blur detected”), for a stateful event its “on” state; Group groups the picker of the rule dialog (“Image Health”).

public sealed record EventTypeInfo(string Id, string DisplayName, string Group, EventKind Kind, EventScope Scope = Device, IReadOnlyList<EventField>? Fields = null)

Guide: Event rules

Parameters

  • Id: Stable, unique id.
  • DisplayName: The event in plain words; for an on and off event its on state.
  • Group: The group in the event list of the rule dialog.
  • Kind: One-shot or on and off.
  • Scope: Per device or for the server.
  • Fields: The data fields a condition can filter on.
IReadOnlyList<EventField> DataFields { get; }

EventTypeInfo.Fields, never null.

string? Description { get; init; }

One short sentence for the rule dialog (optional).

IReadOnlyList<Guid>? DeviceIds { get; init; }

The devices that can send this event now (a device trigger’s devices); null = any managed device. A source that sets it raises IDynamicEventSource.EventTypesChanged when the devices change. Dashboards offers only these.

string DisplayName { get; init; }

The event in plain words; for an on and off event its on state.

IReadOnlyList<EventField>? Fields { get; init; }

The data fields a condition can filter on.

Guid? FixedDeviceId { get; init; }

Optional (SDK 0.10.0): the one device this event belongs to, for an event of an object that sits on one device (a reader on its camera). Null: the user chooses the device. Dashboards then asks for no device, takes this one for its value and follows it when it changes: raise IDynamicEventSource.EventTypesChanged then. Group checks treat it like a chosen device. Only for EventScope.Device; set EventTypeInfo.DeviceIds to the same device for other readers of the type.

IReadOnlyList<string> Folders { get; }

EventTypeInfo.Path, else EventTypeInfo.Group alone; never empty.

string Group { get; init; }

The group in the event list of the rule dialog.

string Id { get; init; }

Stable, unique id.

EventKind Kind { get; init; }

One-shot or on and off.

string? OwnerScopeKey { get; init; }

The ICallContext.DeviceScopeKey of the owner of the object behind this type (a device trigger or a compliance check of a device group, "all" for one of all devices); null = owned by nobody (every user who sees the devices may see it). SDK 0.4.0: a page that lists event types to users (Dashboards) hides the types of another owner, also on devices both can see.

IReadOnlyList<string>? Path { get; init; }

Optional (SDK 0.10.0): the folders of the event in the event tree of the rule dialog, top first (["Certificates", "EST server"], ["Devices", "Any device"]). Null or empty: one folder, EventTypeInfo.Group. A name that starts with its last folder (“Any device: unreachable” in “Any device”) shows without it there. At most 4 folders, none blank: the host drops another path (a load error) and uses EventTypeInfo.Group; without a path and a group the folder is “Other”.

EventScope Scope { get; init; }

Per device or for the server.

string? SplitField { get; init; }

Optional (SDK 0.10.0): the name of the EventFieldType.Choice field whose value makes separate values of one event, for an event sent once per part (per area of a reader). Dashboards then keeps the latest value per choice and asks for one, by its text; the field itself is no value to show. A rule keeps checking it as any field. Every event of the type carries this field, also the “off” of an on and off event. Null, or no such Choice field: one value. Raise IDynamicEventSource.EventTypesChanged when EventField.Values change.