ApplicableEventTypes Property

General info

Label

Applicable Event Types

Description

The option group for applicable OPC event types

Data type

UInt64

Type

FlagGroup

Code

656

Symbolic name

MODEL_PROP_APPLICABLEEVENTTYPES

Lua access code

inmation.model.properties.ApplicableEventTypes

Available since

1.8.1.1450

Parent classes

EventCategory

Attributes

Name Tooltip
PROP_VISIBLE The property is visible in DataStudio and can be read by the inmation APIs

Flags

Name Label Tooltip

OPC_SIMPLE_EVENT

Applies to Simple Events

If set the object applies to simple events (OPC_SIMPLE_EVENTS)

OPC_TRACKING_EVENT

Applies to Tracking Events

If set the object applies to tracking events (OPC_TRACKING_EVENTS)

OPC_CONDITION_EVENT

Applies to Condition Events

If set the object applies to condition events (OPC_CONDITION_EVENTS)

Examples

Read from or write to the ApplicableEventTypes property.

  • Lua

  • C#

-- Read from the ApplicableEventTypes
inmation.getvalue("<OBJECT FULL PATH>.ApplicableEventTypes")

-- Write to the ApplicableEventTypes
inmation.setvalue("<OBJECT FULL PATH>.ApplicableEventTypes",
    inmation.model.flags.AeEventTypesApplicable.OPC_SIMPLE_EVENT)
TcpConfig tcpcfg = new TcpConfig() { HostNameOrIp = "localhost", Port = 6512 };
SecurityCredentials sc = new SecurityCredentials() { ProfileName = "so", Password = "inmation" };
StatelessInterface sli = new StatelessInterface(tcpcfg);

// Read from the ApplicableEventTypes
Result result = sli.ReadValue(sc, new ReadItem("<OBJECT FULL PATH>.ApplicableEventTypes"));
// Write to the ApplicableEventTypes
Result result = sli.WriteValue(sc, new WriteItem(AeEventTypesApplicable.OPC_SIMPLE_EVENT, "<OBJECT FULL PATH>.ApplicableEventTypes"));

A switch-like function of the flags.

function get_flag_name(mask)
    local aeta = inmation.model.flags.AeEventTypesApplicable
    if mask & aeta.OPC_SIMPLE_EVENT == aeta.OPC_SIMPLE_EVENT then return 'OPC_SIMPLE_EVENT'
    elseif mask & aeta.OPC_TRACKING_EVENT == aeta.OPC_TRACKING_EVENT then return 'OPC_TRACKING_EVENT'
    elseif mask & aeta.OPC_CONDITION_EVENT == aeta.OPC_CONDITION_EVENT then return 'OPC_CONDITION_EVENT'
    end
end
return get_flag_name(inmation.model.flags.AeEventTypesApplicable.OPC_SIMPLE_EVENT)