Commit b4039a57 authored by vlad_burin's avatar vlad_burin
Browse files

Added ability to start training classifiers

--HG--
branch : NeuralInterfacesDebug
parent 8fca6f5ae9d4
......@@ -463,6 +463,12 @@ int Rpc_StopChannel(int server_index, int channel_index, int timeout)
return ProcessSimpleCommand("StopChannel", server_index, channel_index, timeout, request, response);
}
int Rpc_StartTraining(int server_index, int channel_index, int timeout)
{
RDK::USerStorageXML request, response;
return ProcessSimpleCommand("StartTraining", server_index, channel_index, timeout, request, response);
}
int Rpc_GetNumChannels(int server_index, int &results, int timeout)
{
RDK::USerStorageXML request,response;
......
......@@ -85,6 +85,8 @@ int Rpc_StartChannel(int server_index, int channel_index, int timeout);
int Rpc_StopChannel(int server_index, int channel_index, int timeout);
int Rpc_StartTraining(int server_index, int channel_index, int timeout);
int Rpc_ResetChannel(int server_index, int channel_index, int timeout);
int Rpc_GetNumChannels(int server_index, int &results, int timeout);
......
......@@ -213,3 +213,15 @@ void RdkQTcpClientWidget::onPushButtonPingClick()
std::cerr<<"onPushButtonTestClick sum: "<<sum;
}
*/
void RdkQTcpClientWidget::on_pushButtonStartTraining_clicked()
{
const char* serverAnswer=NULL;
int res=Rpc_StartTraining(0, ui->lineEditChannelIndex->text().toInt(), 60000);
if(WriteLogError(res))
{
serverAnswer=Rpc_GetServerAnswerDebug(0);
if(serverAnswer != NULL && ui->checkBoxWriteServerResponse->isChecked())
ui->plainTextEditLog->appendPlainText(QString(serverAnswer));
}
}
......@@ -40,6 +40,8 @@ private slots:
void onPushButtonLoadConfigClick();
void on_pushButtonStartTraining_clicked();
private:
Ui::RdkQTcpClientWidget *ui;
std::map<int, QString> Errors;
......
......@@ -183,6 +183,13 @@
</item>
</layout>
</item>
<item>
<widget class="QPushButton" name="pushButtonStartTraining">
<property name="text">
<string>Start Training</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBoxWriteServerResponse">
<property name="cursor">
......
......@@ -115,6 +115,10 @@ bool URpcDecoderCommon::IsCmdSupported(const UEPtr<URpcCommand> &command) const
{
return true;
}
if(cmd == "StartTraining")
{
return true;
}
else
if(cmd == "RegisterMetadataReceiver")
{
......@@ -364,6 +368,12 @@ const char* URpcDecoderCommon::RemoteCall(const char *request, int &return_value
GetApplication()->PauseChannel(channel_index);
return_value=0;
}
if(cmd == "StartTraining")
{
std::stringstream ss;
Model_SetComponentPropertyValue("TPyClassifierTrainer", "StartTraining", "1");
return_value=0;
}
else
if(cmd == "RegisterMetadataReceiver")
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment