Commands to handle with Terminal:

- TerminalInfoDoublePropertyId
- TerminalInfoIntegerPropertyId
- TerminalInfoStringPropertyId
This commit is contained in:
Janderson
2018-03-12 22:37:06 -03:00
parent 02774d7328
commit 8eb4bcfabe
4 changed files with 152 additions and 10 deletions
+46 -5
View File
@@ -706,33 +706,37 @@ int executeCommand()
Execute_IndicatorRelease();
break;
case 241: //ChartOpen
Execute_ChartOpen();
break;
case 242: //ChartFirst
Execute_ChartFirst();
break;
case 243: //ChartFirst
Execute_ChartNext();
break;
case 245: //ChartFirst
Execute_ChartSymbol();
break;
case 236: //ChartApplyTemplate
Execute_ChartApplyTemplate();
break;
case 252: //ChartGetString
Execute_ChartGetString();
break;
case 153: //TerminalInfoString
Execute_TerminalInfoString();
break;
case 204: //TerminalInfoInteger
Execute_TerminalInfoInteger();
break;
case 205: //TerminalInfoDouble
Execute_TerminalInfoDouble();
break;
case 132: //GetLastError
@@ -6202,6 +6206,43 @@ void Execute_TerminalInfoString()
}
}
void Execute_TerminalInfoInteger()
{
int propertyId;
if (!getIntValue(ExpertHandle, 0, propertyId, _error))
{
PrintParamError("TerminalInfoInteger", "propertyId", _error);
sendErrorResponse(ExpertHandle, -1, _error, _response_error);
return;
}
if (!sendIntResponse(ExpertHandle, TerminalInfoInteger((ENUM_TERMINAL_INFO_INTEGER)propertyId), _response_error))
{
PrintResponseError("TerminalInfoInteger", _response_error);
}
}
void Execute_TerminalInfoDouble()
{
int propertyId;
if (!getIntValue(ExpertHandle, 0, propertyId, _error))
{
PrintParamError("TerminalInfoDouble", "propertyId", _error);
sendErrorResponse(ExpertHandle, -1, _error, _response_error);
return;
}
if (!sendDoubleResponse(ExpertHandle, TerminalInfoDouble((ENUM_TERMINAL_INFO_DOUBLE)propertyId), _response_error))
{
PrintResponseError("TerminalInfoDouble", _response_error);
}
}
string ExecuteRequest_IndicatorCreate(JSONObject *jo)
{
//Symbol