TheAddComment Methodis used to apply a comment to a specific state of a Conditioninstance. Normally, the NodeIdof the Objectinstance is passed as the ObjectIdto the Call Service. However, some Serversdo not expose Conditioninstances in the AddressSpace. Therefore, all Serversshall also allow Clientsto call the AddComment Methodby specifying ConditionIdas the ObjectId.The Methodcannot be called with an ObjectIdof the ConditionType Node.

Signature

AddComment(

[in] ByteString EventId

[in] LocalizedText Comment

);

The parameters are defined in Table 17

Table 17– AddComment arguments

Argument

Description

EventId

EventId identifying a particular Event Notificationwhere a state was reported for a Condition.

Comment

A localized text to be applied to the Condition.

Methodresult codes in Table 18(defined in Call Service)

Table 18– AddComment result codes

Result Code

Description

Bad_MethodInvalid

The MethodIdprovided does not correspond to the ObjectIdprovided. See 10000-4for the general description of this result code.

Bad_EventIdUnknown

See Table 137for the description of this result code.

Bad_NodeIdInvalid

Used to indicate that the specified ObjectIdis not valid or that the Methodwas called on the ConditionType Node.

See 10000-4for the general description of this result code.

Comments

Commentsare added to Eventoccurrences identified via an EventId. EventIdswhere the related EventTypeis not a ConditionType (or subtype of it) and thus does not support Commentsare rejected.

A ConditionEvent– where the Comment Variablecontains this text – will be sent for the identified state. If a comment is added to a previous state (i.e. a state for which the Server has created a branch), the BranchIdand all Conditionvalues of this branch will be reported. If the comment field is NULL (both locale and text are empty) it will be ignored and any existing comments will remain unchanged. If the comment is to be reset, an empty text with a locale shall be provided.

Table 19specifies the AddressSpacerepresentation for the AddComment Method.

Table 19– AddComment Method AddressSpace definition

Attribute

Value

BrowseName

AddComment

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

HasProperty

Variable

InputArguments

Argument[]

PropertyType

Mandatory

AlwaysGeneratesEvent

ObjectType

AuditConditionCommentEventType

Defined in 5.10.4

ConformanceUnits

A & C Comment

If Auditingis supported, this Methodshall generate an Eventof AuditConditionCommentEventTypefor all invocations of the Method.