Skip to main content

AbstractMessage

Short summary

An abstract Message implementation to provide basic funtionallity. Does use TcEvents and wraps them to be compatible with the CNM framework and OpModeHandler.

AccessAbstractFinalExtendsImplements
YesNoCNM_AbstractObject.ObjectCNM_MessageInterfaces.IMessage, CNM_MessageInterfaces.IMessageDto, CNM_AssertionInterfaces.IAssertCallBack

UML Diagram

Parameters

none

Properties

className

Type: CNM_AbstractObject.ClassName

This abstract property returns the class name of the concrete object,

dto

Type: CNM_MessageInterfaces.IMessageDto

This property returns the dto of the message containing the data.

event

Type: Global.TcEventEntry

This property returns the TwinCAT event via eventclass, event id and severity.

id

Type: DINT

This property returns the ID of the event.

messageService

Type: CNM_MessageInterfaces.IMessageService

This property returns the injected service if it was set before, otherwise a globally shared message service.

messageServiceProvider

Type: CNM_MessageInterfaces.IMessageServiceProvider

This property returns the messageServiceProvider of the concrete class.

source

Type: Tc2_System.T_MaxString

This property returns the source of the event.

state

Type: CNM_MessageInterfaces.MessageConfirmationState

This property reurns the state of the alarm.

stopCategory

Type: CNM_MessageInterfaces.AlarmStopCategory

This property contains the stop catagory of the alarm.

userlevel

Type: DWORD

This property returns the required userlevel for confirmation of the event.

Methods

assertionWasWrong

This method is called if an assertion was FALSE

invoke

Invokes the action associated with this interface.

Abstract methods

throw

  • Return type: VOID

This method throws/sends the message and sends it to the associated message service to be handled.

Code

Declaration

FUNCTION_BLOCK ABSTRACT AbstractMessage
EXTENDS CNM_AbstractObject.Object
IMPLEMENTS CNM_MessageInterfaces.IMessage, CNM_MessageInterfaces.IMessageDto, CNM_AssertionInterfaces.IAssertCallBack
VAR
(*event data of the message*)
myEvent :Tc3_EventLogger.Global.TcEventEntry;
END_VAR