Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include enums to the P4InfoConstants.java file #203

Open
Yi-Tseng opened this issue Mar 10, 2021 · 0 comments
Open

Include enums to the P4InfoConstants.java file #203

Yi-Tseng opened this issue Mar 10, 2021 · 0 comments

Comments

@Yi-Tseng
Copy link
Collaborator

Now we can use the serializale_enums from the p4info file to generate constants, here is anexample of serializable_enums:

type_info {
  serializable_enums {
    key: "BridgedMdType_t"
    value {
      underlying_type {
        bitwidth: 8
      }
      members {
        name: "INVALID"
        value: "\000"
      }
      members {
        name: "INGRESS_TO_EGRESS"
        value: "\001"
      }
      members {
        name: "EGRESS_MIRROR"
        value: "\002"
      }
      members {
        name: "INGRESS_MIRROR"
        value: "\003"
      }
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant