Class RegisterInfo

java.lang.Object
io.github.zhh2001.jp4.pipeline.RegisterInfo

public final class RegisterInfo extends Object
Read-only metadata for one P4 register array, derived from P4Info. Construction is internal to P4Info.fromBytes(byte[]) and friends; users obtain instances through P4Info.register(String).

The register's per-cell P4DataTypeSpec is intentionally not exposed on this value type; v1.4 surfaces register cell data as raw Bytes on the read path, matching the convention DigestEvent uses for P4Data. Typed register payloads are a future v1.x topic.

Instances are constructed once during P4Info parsing and are immutable thereafter; safe to share across threads.

Since:
1.4.0
  • Method Details

    • name

      public String name()
      Fully-qualified register name, e.g. "MyIngress.flow_counters".
    • id

      public int id()
      P4Runtime numeric id assigned by p4c.
    • size

      public long size()
      Number of cells in the register array; the cell at Index is the user-addressable target on a Read or Write of RegisterEntry.
    • toString

      public String toString()
      Overrides:
      toString in class Object