def call_statescript(hardware, function_num):
    """
    Call a ECU StateScript method of index function_num

    :param hardware: trodes.hardware object
    :param function_num: the index of StateScript funciton defined in Trodes

    :return message: the message sent from trodes (unpacked by msgpack.unpackb) to see if the calling is successful
    """
    message = hardware.ecu_shortcut_message(function_num)
    return message