sonar/core/backends/cpp.py
def write_line(data_file, command, vector_id):
    """
    Write one line to the data file

    Args:
        data_file (list): List of commands for the data file
        command (dict): Current command to write
        vector_id (int): Index of the current test vector

    Returns:
        list: Updated data_file
    """
    if "interface" in command:
        curr_interface = include.get_interface(command["interface"]["type"])
        line = curr_interface.write_cpp(command["interface"])
        if line != "":
            data_file.append(line)
    elif "wait" in command:
        pass
    elif "signal" in command:
        # data_file.append(
        #     "signal "
        #     + str(command["signal"]["name"])
        #     + " "
        #     + str(1)
        #     + " "
        #     + str(command["signal"]["value"])
        # )
        pass
    elif "delay" in command:
        pass
    elif "display" in command:
        data_file.append(
            'display "' + str(command["display"]) + '" ' + "NULL 1" + " " + "0"
        )
    elif "call_dut" in command:
        data_file.append(
            "call_dut " + "NULL" + " " + "NULL 1 " + str(command["call_dut"])
        )
    elif "flag" in command:
        pass
    elif "timestamp" in command:
        data_file.append(
            "timestamp "
            + str(command["timestamp"])
            + " "
            + "NULL 1"
            + " "
            + str(0)
        )
    elif "macro" in command:
        if command["macro"] == "END":
            data_file.append(
                "end " + "Vector_" + str(vector_id) + " NULL 1 " + str(0)
            )
    else:
        logger.error("Unhandled packet type: %s", str(command))

    return data_file

    Write one line to the data file

    Args:
        data_file (list): List of commands for the data file
        command (dict): Current command to write
        vector_id (int): Index of the current test vector

    Returns:
        list: Updated data_file
    
Write one line to the data file
Write one line to the data file
def write_line(data_file, command, vector_id):
    if "interface" in command:
        curr_interface = include.get_interface(command["interface"]["type"])
        line = curr_interface.write_cpp(command["interface"])
        if line != "":
            data_file.append(line)
    elif "wait" in command:
        pass
    elif "signal" in command:
        pass
    elif "delay" in command:
        pass
    elif "display" in command:
        data_file.append(
            'display "' + str(command["display"]) + '" ' + "NULL 1" + " " + "0"
        )
    elif "call_dut" in command:
        data_file.append(
            "call_dut " + "NULL" + " " + "NULL 1 " + str(command["call_dut"])
        )
    elif "flag" in command:
        pass
    elif "timestamp" in command:
        data_file.append(
            "timestamp "
            + str(command["timestamp"])
            + " "
            + "NULL 1"
            + " "
            + str(0)
        )
    elif "macro" in command:
        if command["macro"] == "END":
            data_file.append(
                "end " + "Vector_" + str(vector_id) + " NULL 1 " + str(0)
            )
    else:
        logger.error("Unhandled packet type: %s", str(command))
    return data_file
def write_line ( data_file , command , vector_id ) : if "interface" in command : curr_interface = include . get_interface ( command [ "interface" ] [ "type" ] ) line = curr_interface . write_cpp ( command [ "interface" ] ) if line != "" : data_file . append ( line ) elif "wait" in command : pass elif "signal" in command : pass elif "delay" in command : pass elif "display" in command : data_file . append ( 'display "' + str ( command [ "display" ] ) + '" ' + "NULL 1" + " " + "0" ) elif "call_dut" in command : data_file . append ( "call_dut " + "NULL" + " " + "NULL 1 " + str ( command [ "call_dut" ] ) ) elif "flag" in command : pass elif "timestamp" in command : data_file . append ( "timestamp " + str ( command [ "timestamp" ] ) + " " + "NULL 1" + " " + str ( 0 ) ) elif "macro" in command : if command [ "macro" ] == "END" : data_file . append ( "end " + "Vector_" + str ( vector_id ) + " NULL 1 " + str ( 0 ) ) else : logger . error ( "Unhandled packet type: %s" , str ( command ) ) return data_file
Write one line to the data file
Write one line to the data file
"""
    Write one line to the data file

    Args:
        data_file (list): List of commands for the data file
        command (dict): Current command to write
        vector_id (int): Index of the current test vector

    Returns:
        list: Updated data_file
    """ # data_file.append( #     "signal " #     + str(command["signal"]["name"]) #     + " " #     + str(1) #     + " " #     + str(command["signal"]["value"]) # )
None
list
data_file
List of commands for the data file
List of commands for the data file
command
Current command to write
Current command to write
vector_id
Index of the current test vector
Index of the current test vector