public static int GetCommandId(Int64 ix, int id)
{
try
{
lock (getInstance(ix).syncLock)
{
if (getInstance(ix).commandRequests[id].CommandWaiting)
{
return (int) getInstance(ix).commandRequests[id].Command;
}
else
{
LOG.Error(Error.ERROR_NO_COMMAND.ToString());
return -1;
}
}
}
catch (Exception e)
{
LOG.Error(e);
return -1;
}
}