示例#1
0
void Process::restart()
{
    bool changed = false;
    if (mPath.compare(getTaskDefinition().getFirst()) != 0)
        changed = true;

    if (getTaskDefinition().getSecondList().size() != mArguments.size())
        changed = true;

    if (!changed)
    {
        int index = 0;
        for (QStringList::Iterator it = mArguments.begin(); it != mArguments.end(); it++)
        {
            if (it->compare(getTaskDefinition().getSecondList().at(index)) != 0)
            {
                changed = true;
                break;
            }
            index++;
        }
    }

    if (changed)
    {
        LOG_WARNING() << "Task definition for the process " << getTaskDefinition().getName() << " changed since the last execution. Restarting with the previous "
                      << "path and arguments. To use the new Values, stop and run the Simulation.";
    }

    restartProcess();
}
void NodeInstanceView::handleChrash()
{
    int elaspsedTimeSinceLastCrash = m_lastCrashTime.restart();

    if (elaspsedTimeSinceLastCrash > 2000)
        restartProcess();
    else
        emit  qmlPuppetCrashed();
}
示例#3
0
void NodeInstanceView::handleChrash()
{
    int elaspsedTimeSinceLastCrash = m_lastCrashTime.restart();

    if (elaspsedTimeSinceLastCrash > 2000)
        restartProcess();
    else
        emit qmlPuppetCrashed();

    emitCustomNotification(QStringLiteral("puppet crashed"));
}
void ConnectionClient::restartProcessIfTimerIsNotResettedAndSocketIsEmpty()
{
    if (isAliveTimerResetted) {
        isAliveTimerResetted = false;
        return; // Already reset, but we were scheduled after.
    }

    if (localSocket.bytesAvailable() > 0)
        return; // We come first, the incoming data was not yet processed.

    restartProcess();
}
示例#5
0
/*
 * Delete current process, i.e. remove from runningList, free the Cell, 
 * and switch process. Free the stack too.
 */
void deleteProcess()
{
	struct processDescriptor* process = (struct processDescriptor*)
		 removeCell(&runningList, getIndex(&runningList, 0));
	LOG("Deleting process : ");
	LOG_INT((int) process->pid);
	LOG_CONT("\n");
	free2M(process->map.baseAddress);
	if(process->baseAddress) /* If stored in kernel memory*/
	{
		kfree(process->baseAddress);
	}
	kfree(process);
	struct processDescriptor* next = 
		(struct processDescriptor *) getIndex(&runningList, 0)->element;
	restartProcess(&(next->processState));
}
示例#6
0
void NodeInstanceView::importsChanged(const QList<Import> &/*addedImports*/, const QList<Import> &/*removedImports*/)
{
    restartProcess();
}
示例#7
0
void NodeInstanceView::rootNodeTypeChanged(const QString &/*type*/, int /*majorVersion*/, int /*minorVersion*/)
{
    restartProcess();
}
void NodeInstanceView::customNotification(const AbstractView *view, const QString &identifier, const QList<ModelNode> &, const QList<QVariant> &)
{
    if (view && identifier == QStringLiteral("reset QmlPuppet"))
        restartProcess();
}