
import icrfAnalyser;

def getTasksInfoForPrinting(taskInfo_):
    """
    :param taskInfo_: 2 a 2D list where 1st dimension is taskid
    :return:
    """

    retTaskInfo = [];
    for i in range(len(taskInfo_)):
        retTaskInfo.append(sorted(taskInfo_[i]));
    return retTaskInfo;




def getInfoEventDataFromRow(infoEventRow_):
    """

    :param infoEventRow_: one row from info events text file, as an array
    :return:
    """

    time = infoEventRow_[icrfAnalyser.EVENTS_RECORD_TIME_COLUMN];
    eventType = infoEventRow_[icrfAnalyser.EVENTS_RECORD_EVENT_TYPE_COLUMN];
    siteId = int(infoEventRow_[icrfAnalyser.EVENTS_RECORD_SITE_ID_COLUMN]);
    if (icrfAnalyser.EVENTS_RECORD_HAS_ZERO_BASED_SITE_NUMBERING == False):
        siteId -= 1;

    robotId = int(infoEventRow_[icrfAnalyser.EVENTS_RECORD_ROBOT_ID_COLUMN]);

    return (time, eventType, siteId, robotId)


