CreateAlarm

Creates an instance that implements ITcAlarm.

Syntax

virtual HRESULT TCOMAPI CreateAlarm (GUID eventClass, UDINT eventId, GUID severity, BOOL32 bWithConfirmation, ITcSourceInfo ipSourceInfo, ITcAlarm pipAlarm)

Parameter

Name

Type

Description

eventClass

REFERENCE TO GUID

Reference to the GUID of the event class.

eventId

REFERENCE TO UDINT

Reference to the ID of the event.

severity

REFERENCE TO TcEventSeverity

Reference to the severity of an event.

bWithConfirmation

BOOL32

Defines whether the alarm requires mandatory confirmation.

ipSourceInfo

ITcSourceInfo

Pointer to the ITcSourceInfo interface.

pipAlarm

ITcAlarm

Pointer to an ITcAlarm pointer.

CreateAlarm 1: Return value

Type

Description

HRESULT

Returns S_OK if a new alarm was successfully created.

Returns ERROR_ALREADY_EXISTS if the alarm already exists.

In case of error an HRESULT is returned as the error code.