sonar/core/backends/include.py
def replace_signals(interface, action, command, target_string, indent, args):
    """
    This function performs duplication and text replacement for $$signals

    Args:
        interface (???): An interface
        action (dict):
        command (str): The string in which to replace signals
        target_string (str): The preceding string to append this block to
        indent (str): String to add as leading indent for each line
        args (dict): The order of interface arguments as a function of language

    Returns:
        str: The updated target_string
    """
    for signal_type, signal in interface.signals.items():
        if signal_type in action["signals"]:
            command_copy = copy.deepcopy(command)
            command_copy = command_copy.replace("$$signal", signal_type)
            command_copy = command_copy.replace(
                "$$size", str(int(signal.size))
            )
            if "$$i" in command_copy:
                idx = str(args[signal_type])
                command_copy = command_copy.replace("$$i", idx)
            target_string = replace_block(
                target_string, command_copy, interface, indent
            )
    return target_string

    This function performs duplication and text replacement for $$signals

    Args:
        interface (???): An interface
        action (dict):
        command (str): The string in which to replace signals
        target_string (str): The preceding string to append this block to
        indent (str): String to add as leading indent for each line
        args (dict): The order of interface arguments as a function of language

    Returns:
        str: The updated target_string
    
This function performs duplication and text replacement for $$signals
This function performs duplication and text replacement for $$signals
def replace_signals(interface, action, command, target_string, indent, args):
    for signal_type, signal in interface.signals.items():
        if signal_type in action["signals"]:
            command_copy = copy.deepcopy(command)
            command_copy = command_copy.replace("$$signal", signal_type)
            command_copy = command_copy.replace(
                "$$size", str(int(signal.size))
            )
            if "$$i" in command_copy:
                idx = str(args[signal_type])
                command_copy = command_copy.replace("$$i", idx)
            target_string = replace_block(
                target_string, command_copy, interface, indent
            )
    return target_string
def replace_signals ( interface , action , command , target_string , indent , args ) : for signal_type , signal in interface . signals . items ( ) : if signal_type in action [ "signals" ] : command_copy = copy . deepcopy ( command ) command_copy = command_copy . replace ( "$$signal" , signal_type ) command_copy = command_copy . replace ( "$$size" , str ( int ( signal . size ) ) ) if "$$i" in command_copy : idx = str ( args [ signal_type ] ) command_copy = command_copy . replace ( "$$i" , idx ) target_string = replace_block ( target_string , command_copy , interface , indent ) return target_string
This function performs duplication and text replacement for $$signals
This function performs duplication and text replacement for $$signals
"""
    This function performs duplication and text replacement for $$signals

    Args:
        interface (???): An interface
        action (dict):
        command (str): The string in which to replace signals
        target_string (str): The preceding string to append this block to
        indent (str): String to add as leading indent for each line
        args (dict): The order of interface arguments as a function of language

    Returns:
        str: The updated target_string
    """
The updated target_string
The updated target_string
str
interface
None
action
None
command
The string in which to replace signals
The string in which to replace signals
target_string
The preceding string to append this block to
The preceding string to append this block to
indent
String to add as leading indent for each line
String to add as leading indent for each line
args
The order of interface arguments as a function of language
The order of interface arguments as a function of language