The AddComment Method is used to apply a comment to a specific state of a Condition instance. Normally, the NodeId of the Object instance is passed as the ObjectId to the Call Service. However, some Servers do not expose Condition instances in the AddressSpace. Therefore, all Servers shall also allow Clients to call the AddComment Method by specifying ConditionId as the ObjectId. The Method cannot be called with an ObjectId of the ConditionType Node.
Signature
AddComment(
[in] ByteString EventId
[in] LocalizedText Comment
);
The parameters are defined in Table 1515
Table 1515 – AddComment arguments
|
Argument |
Description |
|
EventId |
EventId identifying a particular Event Notification where a state was reported for a Condition. |
|
Comment |
A localized text that shall be applied to the Condition. |
Method result codes in Table 1616 (defined in Call Service)
Table 1616 – AddComment result codes
|
Result Code |
Description |
|
Bad_MethodInvalid |
The MethodId provided does not correspond to the ObjectId provided. See 10000-4 for the general description of this result code. |
|
Bad_EventIdUnknown |
See Table 137137 for the description of this result code. |
|
Bad_NodeIdInvalid |
Used to indicate that the specified ObjectId is not valid or that the Method was called on the ConditionType Node. See 10000-4 for the general description of this result code. |
|
Bad_InvalidArgument |
The Comment string provided exceeds the allowed length for the comment or is invalid in some other manner. |
Comments
Comments are added to Event occurrences identified via an EventId. EventIds where the related EventType is not a ConditionType (or subtype of it) and thus does not support Comments are rejected.
If the Comment field is NULL (both locale and text are empty) it shall be ignored, and any existing comments will remain unchanged, and an error (Bad_InvalidArgument) shall be returned. To reset the Comment an empty text with a locale shall be provided.
A ConditionEvent with all Condition values, where the Comment Variable contains the added text, will be sent for the \state identified by the EventId. If a comment is added to a previous state (i.e. a state for which the Server has created a branch), the BranchId and all Condition values of this branch will be sent.
Table 1717 specifies the AddressSpace representation for the AddComment Method.
Table 1717 – AddComment Method AddressSpace definition
|
Attribute |
Value |
||||
|
BrowseName |
AddComment |
||||
|
References |
NodeClass |
BrowseName |
DataType |
TypeDefinition |
ModellingRule |
|
HasProperty |
InputArguments |
Argument[] |
PropertyType |
Mandatory |
|
|
AlwaysGeneratesEvent |
ObjectType |
AuditConditionCommentEventType |
Defined in 5.10.4 |
||
|
ConformanceUnits |
|||||
|
A & C Comment |
|||||
If Auditing is supported, this Method shall generate an Event of AuditConditionCommentEventType for all invocations of the Method.