DebugAlg

Syntax

DebugAlgResult DebugAlg(AlgId tAlg, DebugAlgArg tArg)

Parameters

tAlg. Moniker of opened indicators calculation algorithm instance.

tArg. Operation execution parameters.

Description

The DebugAlg operation starts algorithm calculation in debugging mode.

Comments

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.

Example

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.

SOAP request:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<DebugAlg xmlns="http://www.fsight.ru/PP.SOM.Som">
<tAlg xmlns="">
  <id>S1!M!S!C1</id>
  </tAlg>
<tArg xmlns="">
  <command>Start</command>
  <state>true</state>
  </tArg>
  </DebugAlg>
  </s:Body>
  </s:Envelope>

SOAP response:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<DebugAlgResult xmlns="http://www.fsight.ru/PP.SOM.Som" xmlns:q1="http://www.fsight.ru/PP.SOM.Som" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<state xmlns="">
  <calculationState>Initialization</calculationState>
  <needUpdateStyles>1</needUpdateStyles>
  </state>
  </DebugAlgResult>
  </soapenv:Body>
  </soapenv:Envelope>

JSON request:

{
"DebugAlg" :
{
"tAlg" :
{
"id" : "S1!M!S!C1"
},
"tArg" :
{
"command" : "Start",
"state" : "true"
}
}
}

JSON response:

{
"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:

Working with Indicators Calculation Algorithm