Methods
The available plugin methods, including description of how the default plugin class implements each method, are:
getScadaPointId
java.lang.String getScadaPointId(MspObject obj)
This method is used to extract SCADA Point ID from the incoming MultiSpeak message.
Parameters:
obj - MultiSpeak object
Returns:
SCADA Point ID
Default implementation:
Returns value of the objectID attribute if not empty, otherwise value of the objectName element
getScadaPointId
java.lang.String getScadaPointId(ScadaTag tag)
This method is used to extract SCADA Point ID from the incoming tag-related MultiSpeak message.
Parameters:
tag - ScadaTag object
Returns:
SCADA Point ID
Default implementation:
Returns value of the scadaPointID element
getStatus
StatusIdentifiers getStatus(final ScadaStatus status);
This method is used to extract device status value from the MultiSpeak device status update message.
Parameters:
status - ScadaStatus object
Returns:
MultiSpeak device status value
Default implementation:
Returns value of the status element.
getQualityCodes
java.util.List<java.lang.String> getQualityCodes(ScadaStatus status)
This method is used to extract quality values from MultiSpeak status update message.
Parameters:
status - ScadaStatus object
Returns:
list of MultiSpeak quality values
Default implementation:
Returns value of the quality element
getQualityCodes
java.util.List<java.lang.String> getQualityCodes(ScadaAnalog analog)
This method is used to extract quality values from MultiSpeak analog update message.
Parameters:
analog - ScadaAnalog object
Returns:
list of MultiSpeak quality values
Default implementation:
Returns value of the quality element
processChangeCounter
int processChangeCounter(StatusPoint point, int changeCounter)
This method is used to process SCADA change counter value.
Parameters:
point - SCADA status point
changeCounter - new change counter value for the SCADA status point
Returns:
Number of device operations, which occurred since the last processed update
Default implementation:
Assumes that change counter value received from SCADA is cumulative (total number of times device has changed state since some point in the past). Number of device operations is calculated as the difference between previous and current SCADA change counter values
getTagId
java.lang.String getTagId(ScadaTag tag)
This method is used to extract value from the tag update message, which is then used to populate external id of the corresponding condition in NMS. This value has to uniquely identify the tag in NMS.
Parameters:
tag - ScadaTag object
Returns:
SCADA tag id
Default implementation:
Returns value of the objectID attribute
setTagId
void setTagId(ScadaTag tag, java.lang.String tagId)
This method is used during synchronization process to set tag id value in the tag update message, which is later extracted by the getTagId method.
Parameters:
tag - ScadaTag object to be updated
tagId - SCADA tag id
Default implementation:
Sets value of objectID attribute
getTagType
java.lang.String getTagType(ScadaTag tag)
This method is used to extract SCADA tag type from tag update message. This value is then used to determine corresponding NMS condition class.
Parameters :
tag - ScadaTag object
Returns:
SCADA tag type
Default implementation:
Returns value of the tagType element
getTagData
java.util.Map<java.lang.String,java.lang.Object> getTagData(ScadaTag tag)
This method is used to extract additional tag data fields from tag message.
Parameters:
tag - ScadaTag object
Returns:
Map <tag field name -> tag field value>
Default implementation:
Returns map with a single entry ('text', value of the tagReason element)
getUserName
java.lang.String getUserName(ScadaTag tag)
Extracts operator username from tag update message.
Parameters:
tag - ScadaTag object
Returns:
SCADA operator username
Default implementation:
Returns value of the userName element
getAction
Action getAction(ScadaTag tag)
This method is used to extract action from tag update message. Action determines if the request is to place a new tag, update an existing tag or remove an existing tag.
Parameters:
tag - ScadaTag object
Returns:
action
Default implementation:
Returns value of the verb attribute
setAction
void setAction(ScadaTag tag, Action action)
This method is used during synchronization process to set action value in the tag update message, which is later extracted by the getAction method.
Parameters:
tag - ScadaTag object to be updated
action - action
Default implementation:
Sets value of the verb attribute
buildScadaPointId
java.lang.String buildScadaPointId(com.splwg.oms.common.intersys.Handle nmsDeviceHandle, java.lang.String nmsDeviceAlias, int phase)
throws java.lang.IllegalArgumentException
This method is used to construct SCADA point id for status of an NMS device.
Parameters:
nmsDeviceHandle - NMS device handle
nmsDeviceAlias - NMS device alias
phase - phase
Returns:
SCADA point id or null if not supported
Throws:
java.lang.IllegalArgumentException - SCADA point id cannot be constructed for the given arguments
Default implementation:
Returns null
parseScadaPointId
ParsedSCADAPointId parseScadaPointId(java.lang.String scadaPointId)
throws java.lang.IllegalArgumentException
Parse SCADA point id.
Parameters:
scadaPointId - SCADA point id
Returns:
ParsedSCADAPountId object
Throws:
java.lang.IllegalArgumentException - if scadaPointId cannot be parsed
Default implementation:
Populates NMS device id in ParsedSCADAPointId with scadaPointId argument.
generateControl
ScadaControl generateControl(ExpectedAction action)
This method is used to create ScadaControl object based on information from the EXPECTED_ACTIONS table.
Parameters:
action - row from EXPECTED_ACTIONS table
Returns:
ScadaControl object or null is controls are not supported
Default implementation:
Returns null
isScadaPoint
boolean isScadaPoint(final MspObject obj)
This method is used to determine if obj is a SCADA-telemetered point. Currently this method gets invoked only for status points.
Parameters:
obj - MultiSpeak object
Returns:
true if obj is a SCADA-telemetered point, otherwise false
Default implementation:
Returns true