Interface ISession
A representation of an on-going/active session. Each session is handling a single model.
Namespace: AppDrillCore.Session
Assembly: AppDrillCore.dll
Syntax
public interface ISession
Methods
DiscardSymptomData(String)
Discard the data for the given symptom. Call this function to clear the data associated with the given symptom. This is needed when you want GetCommonFailures()/GetCommonTests() to not contain the data associated with this symptom.
Declaration
bool DiscardSymptomData(string symptomId)
Parameters
Type | Name | Description |
---|---|---|
System.String | symptomId |
Returns
Type | Description |
---|---|
System.Boolean | true upon success, false upon failure |
GetCalculatedProbabilityOfFailure(String)
Declaration
double GetCalculatedProbabilityOfFailure(string failureId)
Parameters
Type | Name | Description |
---|---|---|
System.String | failureId |
Returns
Type | Description |
---|---|
System.Double |
GetCommonFailures()
Get a list of failures that are common to all symptoms added by RefreshSymptomData(String). The common failures are the intersection of all failures from all symptoms.
Declaration
List<Failure> GetCommonFailures()
Returns
Type | Description |
---|---|
List<Failure> | A list of failures sorted by probability |
GetCommonTests()
Get a list of tests that are common to all symptoms added by RefreshSymptomData(String). The common tests are the intersection of all tests from all symptoms.
Declaration
List<Test> GetCommonTests()
Returns
Type | Description |
---|---|
List<Test> | A list of tests sorted by rank |
GetComponentForFailure(String)
Get a component associated with the failure ID.
Declaration
Component GetComponentForFailure(string failureId)
Parameters
Type | Name | Description |
---|---|---|
System.String | failureId |
Returns
Type | Description |
---|---|
Component | The component, or null if not found |
GetCorrectiveActions(String)
Get a list of corrective actions available for the specified failure.
Declaration
List<CorrectiveAction> GetCorrectiveActions(string failureId)
Parameters
Type | Name | Description |
---|---|---|
System.String | failureId | The failure ID to match |
Returns
Type | Description |
---|---|
List<CorrectiveAction> | A list of corrective actions, or null if unable to retrieve |
GetFailuresBySymptomId(String)
Get a list of failures for the given symptom ID.
Declaration
List<Failure> GetFailuresBySymptomId(string symptomId)
Parameters
Type | Name | Description |
---|---|---|
System.String | symptomId |
Returns
Type | Description |
---|---|
List<Failure> | A list of failures sorted by probability |
GetSymptoms()
Get a list of symptoms available for the model associated with the session.
Declaration
List<Symptom> GetSymptoms()
Returns
Type | Description |
---|---|
List<Symptom> | A list of symptoms, or null if unable to retrieve |
GetTestRank(String)
Declaration
double GetTestRank(string testId)
Parameters
Type | Name | Description |
---|---|---|
System.String | testId |
Returns
Type | Description |
---|---|
System.Double |
GetTestsBySymptomId(String)
Get a list of tests for the given symptom ID.
Declaration
List<Test> GetTestsBySymptomId(string symptomId)
Parameters
Type | Name | Description |
---|---|---|
System.String | symptomId |
Returns
Type | Description |
---|---|
List<Test> | A list of tests sorted by rank |
RefreshSymptomData(String)
Refresh the data available for the given symptom. When this function is called for the first time for a given symptom ID, all the data associated with the symptom is going to be retrieved from the server, and stored locally. After one or more test results come in through SetTestResult(String, TestResult), this function should be called again in order to refresh the data by yet again contacting the server and getting up-to-date data associated with the symptom and the tests.
Declaration
bool RefreshSymptomData(string symptomId)
Parameters
Type | Name | Description |
---|---|---|
System.String | symptomId |
Returns
Type | Description |
---|---|
System.Boolean | true upon success, false on failure |
SetTestResult(String, TestResult)
Set a result for a given test. Once a test has been updated, RefreshSymptomData(String) should be called in order to update the data with the latest state from the server.
Declaration
bool SetTestResult(string testId, TestResult result)
Parameters
Type | Name | Description |
---|---|---|
System.String | testId | The test to update |
TestResult | result | The test result |
Returns
Type | Description |
---|---|
System.Boolean | true if the test was found and updated with the new state, false otherwise |