SendMessage

SendMessage 1:

This method sends a message.

Syntax

METHOD SendMessage : HRESULT
VAR_INPUT
    eventClass     : GUID;
    nEventId       : UDINT;
    eSeverity      : TcEventSeverity;
    ipSourceInfo   : I_TcSourceInfo := 0; // optional
    nTimeStamp     : ULINT := 0; // set 0 to get the current time automatically
    ipArguments    : I_TcArguments := 0; // optional
END_VAR

SendMessage 2: Inputs

Name

Type

Description

eventClass

GUID

GUID of the event class

nEventId

UDINT

ID of the event

eSeverity

TcEventSeverity

Severity of the event

ipSourceInfo

I_TcSourceInfo

Interface pointer to the source information.

This information is optional. An instance of the type FB_TcSourceInfo can be specified here. If nothing (NULL) is transferred, standard source information is generated.

nTimeStamp

ULINT

0: Current timestamp is used.

> 0: External timestamp in 100 nanoseconds since January 1st, 1601 (UTC)

ipArguments

I_TcArguments

Interface pointer to arguments of the event.

This information is optional. An instance of the type FB_TcArguments can be specified here.

SendMessage 3: Return value

Name

Type

Description

SendMessage

HRESULT

Returns S_OK if the method call was successful, otherwise an HRESULT as the error code.