DebugAlgResult DebugAlg(AlgId tAlg, DebugAlgArg tArg)
tAlg. Moniker of opened indicators calculation algorithm instance.
tArg. Operation execution parameters.
The DebugAlg operation starts algorithm calculation in debugging mode.
The operation starts, pauses and resumes calculation in the required time moment. It is also available to get relevant information about calculation process in an time.
To execute the operation, set moniker of opened calculation algorithm instance in the tAlg field and set operation execution parameters in the tArg field. The moniker can be obtained on executing the OpenAlg operation.
The operation results in the information about successful calculation or calculation errors and also the total calculation time and the total time spent on calculation.
Below is the example of starting indicators calculation algorithm calculation in debugging mode. The request contains opened calculation algorithm instance moniker. The current execution status is sent in the response.
{
"DebugAlg" :
{
"tAlg" :
{
"id" : "S1!M!S!C1"
},
"tArg" :
{
"command" : "Start",
"state" : "true"
}
}
}
{
"DebugAlgResult" :
{
"state" :
{
"calculationState" : "Initialization",
"needUpdateStyles" : "1"
}
}
}
public static DebugAlgResult DebugAlg(string moniker)
{
var somClient = new SomPortTypeClient(); //Proxy object for operation execution
//Operation execution parameters
var tCalc = new DebugAlg()
{
tAlg = new AlgId() { id = moniker },
tArg = new DebugAlgArg()
{
command = AlgDebugCommand.Start,
state = true
}
};
//Execute indicators calculation algorithm in debugging mode
var result = somClient.DebugAlg(tCalc);
return result;
}
See also: