Network Diagnosis
From DSL
[edit] Methods: Diagnosis
- void setNodeDiagType(int nodeHandle, int type)
void setNodeDiagType(String nodeId, int type)
Sets the diagnostic type of a specified node.
The available diagnostic node types are enumerated in the NodeDiagType inner class.
- int getNodeDiagType(int nodeHandle)
int getNodeDiagType(String nodeId)
Returns the diagnostic type of a specified node.
The available diagnostic node types are enumerated in the NodeDiagType inner class.
- string getNodeDescription(int nodeHandle)
string getNodeDescription(String nodeId)
Return the description of the node. SMILEException is thrown when specified node is invalid.
- void setNodeDescription(int nodeHandle, String description)
void setNodeDescription(String nodeId, String description)
Set the description of the node. SMILEExceptionis thrown when specified node is invalid.
- String getNodeQuestion(int nodeHandle)
String getNodeQuestion(String nodeId)
Return the (possibly empty) question associated with observation node. SMILEExceptionis thrown when specified node is invalid.
- void setNodeQuestion(int nodeHandle, String question)
void setNodeQuestion(String nodeId, String question)
Set the (possibly empty) question for observation node. SMILEExceptionis thrown when specified node is invalid.
- String getOutcomeFix(int nodeHandle, int outcomeIndex)
String getOutcomeFix(String nodeId, int outcomeIndex)
String getOutcomeFix(int nodeHandle, String outcomeId)
String getOutcomeFix(String nodeId, String outcomeId)
Returns the (possibly empty) repair/treatment information for fault outcome. SMILEExceptionis thrown when specified node or outcome is invalid.
- void setOutcomeFix(int nodeHandle, int outcomeIndex, String treatment)
void setOutcomeFix(String nodeId, int outcomeIndex, String treatment)
void setOutcomeFix(int nodeHandle, String outcomeId, String treatment)
void setOutcomeFix(String nodeId, String outcomeId, String treatment)
Sets the repair/treatment information for the fault outcome. Unlike outcome identifier, the outcome label can be empty; otherwise it must be unique in the network. SMILEExceptionis thrown when specified node or outcome are invalid.
- String getOutcomeDescription(int nodeHandle, int outcomeIndex)
String getOutcomeDescription(String nodeId, int outcomeIndex)
String getOutcomeDescription(int nodeHandle, String outcomeId)
String getOutcomeDescription(String nodeId, String outcomeId)
Returns the description of the outcome. SMILEException is thrown when specified node or outcome is invalid.
- void setOutcomeDescription(int nodeHandle, int outcomeIndex, String description)
void setOutcomeDescription(String nodeId, int outcomeIndex, String description)
void setOutcomeDescription(int nodeHandle, String outcomeId, String description)
void setOutcomeDescription(String nodeId, String outcomeId, String description)
Sets the description of the outcome. SMILEExceptionis thrown when specified node or outcome is invalid.
- String getOutcomeLabel(int nodeHandle, int outcomeIndex)
String getOutcomeLabel(String nodeId, int outcomeIndex)
String getOutcomeLabel(int nodeHandle, String outcomeId)
String getOutcomeLabel(String nodeId, String outcomeId)
Returns the label of the outcome. Unlike outcome identifier, the outcome label can be empty; otherwise it must be unique in the network. SMILEException is thrown when specified node or outcome is invalid.
- bool setOutcomeLabel(int nodeHandle, int outcomeIndex, String label)
bool setOutcomeLabel(String nodeId, int outcomeIndex, String label)
bool setOutcomeLabel(int nodeHandle, String outcomeId, String label)
bool setOutcomeLabel(String nodeId, String outcomeId, String label)
Sets the label of the outcome. Unlike outcome identifier, the outcome label can be empty; otherwise it must be unique in the network. SMILEException is thrown when specified node, outcome or label are invalid.
- bool isFaultOutcome(int nodeHandle, int outcomeIndex)
bool isFaultOutcome(String nodeId, int outcomeIndex)
bool isFaultOutcome(int nodeHandle, String outcomeId)
bool isFaultOutcome(String nodeId, String outcomeId)
Returns true if given outcome is marked as fault. SMILEException is thrown when specified node or outcome is invalid.
- void setFaultOutcome(int nodeHandle, int outcomeIndex, bool fault)
void setFaultOutcome(String nodeId, int outcomeIndex, bool fault)
void setFaultOutcome(int nodeHandle, String outcomeId, bool fault)
void setFaultOutcome(String nodeId, String outcomeId, bool fault)
Marks/clears the fault flag for outcome. SMILEException is thrown when specified node or outcome is invalid.
- int getDefaultOutcome(int nodeHandle)
int getDefaultOutcome(String nodeId)
String getDefaultOutcomeId(int nodeHandle)
String getDefaultOutcomeId(String nodeId)
Returns the index/identifier of default outcome of given node, -1/null if theres no default outcome. SMILEException is thrown when specified node is invalid.
Default outcomes are used to instantiate observations when DiagNetwork object is created.
- void setDefaultOutcome(int nodeHandle, int defOutcome)
void setDefaultOutcome(String nodeId, int defOutcome)
void setDefaultOutcome(int nodeHandle, String defOutcomeId)
void setDefaultOutcome(String nodeId, String defOutcomeId)
Sets the default outcome of given node. Pass -1/null as 2nd parameter to reset the default outcome. SMILEException is thrown when specified node or outcome is invalid.
Default outcomes are used to instantiate observations when DiagNetwork object is created.
[edit] Methods: User Properties
Network and nodes can have associated user properties, which are name/value string pairs. A designate class UserProperty with a get/set API is used to represent these pairs. Please note that property names starting with DSL_ are reserved for internal use by SMILE. Property name must start with a letter and must contain only letters, digits or underscores (the same rules are applied to node identifiers).
The UserProperty class has two constructors:
UserProperty() UserProperty(String name, String value)
and the following methods:
String getName() String getValue() void setName(name) void setValue(value)
- UserProperty[] GetUserProperties()
Get user properties for the network. If there are no properties, an empty array is returned.
- void SetUserProperties(UserProperty[] properties)
Set user properties for the network. Pass empty array to clear the properties. SmileException is thrown when there are duplicated property names or property name is invalid.
- UserProperty[] GetNodeUserProperties(int nodeHandle)
UserProperty[] GetNodeUserProperties(string nodeId)
Get user properties for the specified. If there are no properties, an empty array is returned. SmileException is thrown when specified node is invalid.
- void SetNodeUserProperties(int nodeHandle, UserProperty[] properties)
void SetNodeUserProperties(string nodeId, UserProperty[] properties)
Set user properties for given node. Pass empty array to clear the properties. SmileException is thrown when specified node is invalid, there are duplicated property names or property name is invalid.
