def get_message_idx(cask, acqtime, start_idx):
    """
    Returns index of cask channel with matching timestamp. Returns -1, if the message was not found.
    cask - cask channel
    acqtime - acquisition timestamp to search for in cask
    start_idx - starting index to search from in the list of cask messages
    """

    for i in range(start_idx, len(cask)):
        if cask[i].acqtime == acqtime:
            return i
    # Return -1 if matching time stamp is not found.
    return -1