Exemple #1
0
def dump_to_p4_P4ActionSelector(self, hlir):
    optional_attributes = {}
    selection_key = self.selection_key.dump_to_p4(hlir)
    if self.selection_mode is not None:
        optional_attributes["selection_mode"] = self.selection_mode
    if self.selection_type is not None:
        optional_attributes["selection_type"] = self.selection_type
    g_action_selector = p4_action_selector(
        hlir, self.name, filename=self.filename, lineno=self.lineno, selection_key=selection_key, **optional_attributes
    )
    g_action_selector._pragmas = self._pragmas.copy()
Exemple #2
0
def dump_to_p4_P4ActionSelector(self, hlir):
    optional_attributes = {}
    selection_key = self.selection_key.dump_to_p4(hlir)
    if self.selection_mode is not None:
        optional_attributes["selection_mode"] = self.selection_mode
    if self.selection_type is not None:
        optional_attributes["selection_type"] = self.selection_type
    g_action_selector = p4_action_selector(hlir,
                                           self.name,
                                           filename=self.filename,
                                           lineno=self.lineno,
                                           selection_key=selection_key,
                                           **optional_attributes)
    g_action_selector._pragmas = self._pragmas.copy()