com.impinj.stp

## Class StpApi.AntennaConfig.Builder

- java.lang.Object
- - com.google.protobuf.AbstractMessageLite.Builder<BuilderType>
  - - com.google.protobuf.AbstractMessage.Builder<BuilderType>
    - - com.google.protobuf.GeneratedMessage.Builder<StpApi.AntennaConfig.Builder>
      - - com.impinj.stp.StpApi.AntennaConfig.Builder

- All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, StpApi.AntennaConfigOrBuilder, java.lang.Cloneable
  Enclosing class:
    StpApi.AntennaConfig

      public static final class StpApi.AntennaConfig.Builder
      extends com.google.protobuf.GeneratedMessage.Builder<StpApi.AntennaConfig.Builder>
      implements StpApi.AntennaConfigOrBuilder

  Protobuf type `Impinj.STP.AntennaConfig` An antenna's RF, timing, and Gen 2 behavior parameters.

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `StpApi.AntennaConfig` | `build()`
    `StpApi.AntennaConfig` | `buildPartial()`
    `StpApi.AntennaConfig.Builder` | `clear()`
    `StpApi.AntennaConfig.Builder` | `clearAntennaID()` The 1-based ID of the reader antenna.
    `StpApi.AntennaConfig.Builder` | `clearEnableAdaptiveTagPopulationEstimate()` Indicates whether the tag_population_estimate in the AntennaConfig should be updated with the actual number of tags seen.
    `StpApi.AntennaConfig.Builder` | `clearEnableQueryAtUCycleEnd()` Indicates whether a query should be used instead of a query adjust for the flush queries at the end of the round.
    `StpApi.AntennaConfig.Builder` | `clearEnableQueryForQDecrease()` Indicates whether a query should be used instead of a query adjust when the reader wishes to decrease the Q value during the round.
    `StpApi.AntennaConfig.Builder` | `clearEnableQueryForQIncrease()` Indicates whether a query should be used instead of a query adjust when the reader wishes to increase the Q value during the round.
    `StpApi.AntennaConfig.Builder` | `clearGen2Mode()`
    `StpApi.AntennaConfig.Builder` | `clearGen2Session()`
    `StpApi.AntennaConfig.Builder` | `clearInventorySearchMode()`
    `StpApi.AntennaConfig.Builder` | `clearMaximumDwellTime()` Maximum time to dwell on the antenna in milliseconds.
    `StpApi.AntennaConfig.Builder` | `clearMinimumDwellTime()` Minimum time to dwell on the antenna in milliseconds.
    `StpApi.AntennaConfig.Builder` | `clearReceiveSensitivity()` Receive sensitivity in cdBm.
    `StpApi.AntennaConfig.Builder` | `clearTagPopulationEstimate()` optional bool tag_population_check = 9 [default = true];
    `StpApi.AntennaConfig.Builder` | `clearTransmitPower()` Transmit power in cdBm.
    `StpApi.AntennaConfig.Builder` | `clone()`
    `int` | `getAntennaID()` The 1-based ID of the reader antenna.
    `StpApi.AntennaConfig` | `getDefaultInstanceForType()`
    `static com.google.protobuf.Descriptors.Descriptor` | `getDescriptor()`
    `com.google.protobuf.Descriptors.Descriptor` | `getDescriptorForType()`
    `boolean` | `getEnableAdaptiveTagPopulationEstimate()` Indicates whether the tag_population_estimate in the AntennaConfig should be updated with the actual number of tags seen.
    `boolean` | `getEnableQueryAtUCycleEnd()` Indicates whether a query should be used instead of a query adjust for the flush queries at the end of the round.
    `boolean` | `getEnableQueryForQDecrease()` Indicates whether a query should be used instead of a query adjust when the reader wishes to decrease the Q value during the round.
    `boolean` | `getEnableQueryForQIncrease()` Indicates whether a query should be used instead of a query adjust when the reader wishes to increase the Q value during the round.
    `StpApi.Gen2Mode` | `getGen2Mode()`
    `StpApi.Gen2Session` | `getGen2Session()`
    `StpApi.InventorySearchMode` | `getInventorySearchMode()`
    `int` | `getMaximumDwellTime()` Maximum time to dwell on the antenna in milliseconds.
    `int` | `getMinimumDwellTime()` Minimum time to dwell on the antenna in milliseconds.
    `int` | `getReceiveSensitivity()` Receive sensitivity in cdBm.
    `int` | `getTagPopulationEstimate()` optional bool tag_population_check = 9 [default = true];
    `int` | `getTransmitPower()` Transmit power in cdBm.
    `boolean` | `hasAntennaID()` The 1-based ID of the reader antenna.
    `boolean` | `hasEnableAdaptiveTagPopulationEstimate()` Indicates whether the tag_population_estimate in the AntennaConfig should be updated with the actual number of tags seen.
    `boolean` | `hasEnableQueryAtUCycleEnd()` Indicates whether a query should be used instead of a query adjust for the flush queries at the end of the round.
    `boolean` | `hasEnableQueryForQDecrease()` Indicates whether a query should be used instead of a query adjust when the reader wishes to decrease the Q value during the round.
    `boolean` | `hasEnableQueryForQIncrease()` Indicates whether a query should be used instead of a query adjust when the reader wishes to increase the Q value during the round.
    `boolean` | `hasGen2Mode()`
    `boolean` | `hasGen2Session()`
    `boolean` | `hasInventorySearchMode()`
    `boolean` | `hasMaximumDwellTime()` Maximum time to dwell on the antenna in milliseconds.
    `boolean` | `hasMinimumDwellTime()` Minimum time to dwell on the antenna in milliseconds.
    `boolean` | `hasReceiveSensitivity()` Receive sensitivity in cdBm.
    `boolean` | `hasTagPopulationEstimate()` optional bool tag_population_check = 9 [default = true];
    `boolean` | `hasTransmitPower()` Transmit power in cdBm.
    `protected com.google.protobuf.GeneratedMessage.FieldAccessorTable` | `internalGetFieldAccessorTable()`
    `boolean` | `isInitialized()`
    `StpApi.AntennaConfig.Builder` | `mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)`
    `StpApi.AntennaConfig.Builder` | `mergeFrom(com.google.protobuf.Message other)`
    `StpApi.AntennaConfig.Builder` | `mergeFrom(StpApi.AntennaConfig other)`
    `StpApi.AntennaConfig.Builder` | `setAntennaID(int value)` The 1-based ID of the reader antenna.
    `StpApi.AntennaConfig.Builder` | `setEnableAdaptiveTagPopulationEstimate(boolean value)` Indicates whether the tag_population_estimate in the AntennaConfig should be updated with the actual number of tags seen.
    `StpApi.AntennaConfig.Builder` | `setEnableQueryAtUCycleEnd(boolean value)` Indicates whether a query should be used instead of a query adjust for the flush queries at the end of the round.
    `StpApi.AntennaConfig.Builder` | `setEnableQueryForQDecrease(boolean value)` Indicates whether a query should be used instead of a query adjust when the reader wishes to decrease the Q value during the round.
    `StpApi.AntennaConfig.Builder` | `setEnableQueryForQIncrease(boolean value)` Indicates whether a query should be used instead of a query adjust when the reader wishes to increase the Q value during the round.
    `StpApi.AntennaConfig.Builder` | `setGen2Mode(StpApi.Gen2Mode value)`
    `StpApi.AntennaConfig.Builder` | `setGen2Session(StpApi.Gen2Session value)`
    `StpApi.AntennaConfig.Builder` | `setInventorySearchMode(StpApi.InventorySearchMode value)`
    `StpApi.AntennaConfig.Builder` | `setMaximumDwellTime(int value)` Maximum time to dwell on the antenna in milliseconds.
    `StpApi.AntennaConfig.Builder` | `setMinimumDwellTime(int value)` Minimum time to dwell on the antenna in milliseconds.
    `StpApi.AntennaConfig.Builder` | `setReceiveSensitivity(int value)` Receive sensitivity in cdBm.
    `StpApi.AntennaConfig.Builder` | `setTagPopulationEstimate(int value)` optional bool tag_population_check = 9 [default = true];
    `StpApi.AntennaConfig.Builder` | `setTransmitPower(int value)` Transmit power in cdBm.

    - ### Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

      `addRepeatedField, clearField, getAllFields, getField, getFieldBuilder, getParentForChildren, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, isClean, markClean, mergeUnknownFields, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields`

    - ### Methods inherited from class com.google.protobuf.AbstractMessage.Builder

      `findInitializationErrors, getInitializationErrorString, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException`

    - ### Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder

      `addAll, newUninitializedMessageException`

    - ### Methods inherited from class java.lang.Object

      `equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface com.google.protobuf.MessageOrBuilder

      `findInitializationErrors, getAllFields, getField, getInitializationErrorString, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField`

- - ### Method Detail

    - #### getDescriptor

          public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()

    - #### internalGetFieldAccessorTable

          protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()

      Specified by:
        `internalGetFieldAccessorTable` in class `com.google.protobuf.GeneratedMessage.Builder<StpApi.AntennaConfig.Builder>`

    - #### clear

          public StpApi.AntennaConfig.Builder clear()

      Specified by:
        `clear` in interface `com.google.protobuf.Message.Builder`
      Specified by:
        `clear` in interface `com.google.protobuf.MessageLite.Builder`
      Overrides:
        `clear` in class `com.google.protobuf.GeneratedMessage.Builder<StpApi.AntennaConfig.Builder>`

    - #### clone

          public StpApi.AntennaConfig.Builder clone()

      Specified by:
        `clone` in interface `com.google.protobuf.Message.Builder`
      Specified by:
        `clone` in interface `com.google.protobuf.MessageLite.Builder`
      Overrides:
        `clone` in class `com.google.protobuf.GeneratedMessage.Builder<StpApi.AntennaConfig.Builder>`

    - #### getDescriptorForType

          public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()

      Specified by:
        `getDescriptorForType` in interface `com.google.protobuf.Message.Builder`
      Specified by:
        `getDescriptorForType` in interface `com.google.protobuf.MessageOrBuilder`
      Overrides:
        `getDescriptorForType` in class `com.google.protobuf.GeneratedMessage.Builder<StpApi.AntennaConfig.Builder>`

    - #### getDefaultInstanceForType

          public StpApi.AntennaConfig getDefaultInstanceForType()

      Specified by:
        `getDefaultInstanceForType` in interface `com.google.protobuf.MessageLiteOrBuilder`
      Specified by:
        `getDefaultInstanceForType` in interface `com.google.protobuf.MessageOrBuilder`

    - #### build

          public StpApi.AntennaConfig build()

      Specified by:
        `build` in interface `com.google.protobuf.Message.Builder`
      Specified by:
        `build` in interface `com.google.protobuf.MessageLite.Builder`

    - #### buildPartial

          public StpApi.AntennaConfig buildPartial()

      Specified by:
        `buildPartial` in interface `com.google.protobuf.Message.Builder`
      Specified by:
        `buildPartial` in interface `com.google.protobuf.MessageLite.Builder`

    - #### mergeFrom

          public StpApi.AntennaConfig.Builder mergeFrom(com.google.protobuf.Message other)

      Specified by:
        `mergeFrom` in interface `com.google.protobuf.Message.Builder`
      Overrides:
        `mergeFrom` in class `com.google.protobuf.AbstractMessage.Builder<StpApi.AntennaConfig.Builder>`

    - #### mergeFrom

          public StpApi.AntennaConfig.Builder mergeFrom(StpApi.AntennaConfig other)

    - #### isInitialized

          public final boolean isInitialized()

      Specified by:
        `isInitialized` in interface `com.google.protobuf.MessageLiteOrBuilder`
      Overrides:
        `isInitialized` in class `com.google.protobuf.GeneratedMessage.Builder<StpApi.AntennaConfig.Builder>`

    - #### mergeFrom

          public StpApi.AntennaConfig.Builder mergeFrom(com.google.protobuf.CodedInputStream input,
                                                        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                 throws java.io.IOException

      Specified by:
        `mergeFrom` in interface `com.google.protobuf.Message.Builder`
      Specified by:
        `mergeFrom` in interface `com.google.protobuf.MessageLite.Builder`
      Overrides:
        `mergeFrom` in class `com.google.protobuf.AbstractMessage.Builder<StpApi.AntennaConfig.Builder>`
      Throws:
        `java.io.IOException`

    - #### hasAntennaID

          public boolean hasAntennaID()

      The 1-based ID of the reader antenna.
      Specified by:
        `hasAntennaID` in interface `StpApi.AntennaConfigOrBuilder`

    - #### getAntennaID

          public int getAntennaID()

      The 1-based ID of the reader antenna.
      Specified by:
        `getAntennaID` in interface `StpApi.AntennaConfigOrBuilder`

    - #### setAntennaID

          public StpApi.AntennaConfig.Builder setAntennaID(int value)

      The 1-based ID of the reader antenna.

    - #### clearAntennaID

          public StpApi.AntennaConfig.Builder clearAntennaID()

      The 1-based ID of the reader antenna.

    - #### hasGen2Mode

          public boolean hasGen2Mode()

      Specified by:
        `hasGen2Mode` in interface `StpApi.AntennaConfigOrBuilder`

    - #### getGen2Mode

          public StpApi.Gen2Mode getGen2Mode()

      Specified by:
        `getGen2Mode` in interface `StpApi.AntennaConfigOrBuilder`

    - #### setGen2Mode

          public StpApi.AntennaConfig.Builder setGen2Mode(StpApi.Gen2Mode value)

    - #### clearGen2Mode

          public StpApi.AntennaConfig.Builder clearGen2Mode()

    - #### hasInventorySearchMode

          public boolean hasInventorySearchMode()

      Specified by:
        `hasInventorySearchMode` in interface `StpApi.AntennaConfigOrBuilder`

    - #### getInventorySearchMode

          public StpApi.InventorySearchMode getInventorySearchMode()

      Specified by:
        `getInventorySearchMode` in interface `StpApi.AntennaConfigOrBuilder`

    - #### setInventorySearchMode

          public StpApi.AntennaConfig.Builder setInventorySearchMode(StpApi.InventorySearchMode value)

    - #### clearInventorySearchMode

          public StpApi.AntennaConfig.Builder clearInventorySearchMode()

    - #### hasGen2Session

          public boolean hasGen2Session()

      Specified by:
        `hasGen2Session` in interface `StpApi.AntennaConfigOrBuilder`

    - #### getGen2Session

          public StpApi.Gen2Session getGen2Session()

      Specified by:
        `getGen2Session` in interface `StpApi.AntennaConfigOrBuilder`

    - #### setGen2Session

          public StpApi.AntennaConfig.Builder setGen2Session(StpApi.Gen2Session value)

    - #### clearGen2Session

          public StpApi.AntennaConfig.Builder clearGen2Session()

    - #### hasTransmitPower

          public boolean hasTransmitPower()

      Transmit power in cdBm.
      Specified by:
        `hasTransmitPower` in interface `StpApi.AntennaConfigOrBuilder`

    - #### getTransmitPower

          public int getTransmitPower()

      Transmit power in cdBm.
      Specified by:
        `getTransmitPower` in interface `StpApi.AntennaConfigOrBuilder`

    - #### setTransmitPower

          public StpApi.AntennaConfig.Builder setTransmitPower(int value)

      Transmit power in cdBm.

    - #### clearTransmitPower

          public StpApi.AntennaConfig.Builder clearTransmitPower()

      Transmit power in cdBm.

    - #### hasReceiveSensitivity

          public boolean hasReceiveSensitivity()

      Receive sensitivity in cdBm. If not specified, no RSSI filtering is done.
      Specified by:
        `hasReceiveSensitivity` in interface `StpApi.AntennaConfigOrBuilder`

    - #### getReceiveSensitivity

          public int getReceiveSensitivity()

      Receive sensitivity in cdBm. If not specified, no RSSI filtering is done.
      Specified by:
        `getReceiveSensitivity` in interface `StpApi.AntennaConfigOrBuilder`

    - #### setReceiveSensitivity

          public StpApi.AntennaConfig.Builder setReceiveSensitivity(int value)

      Receive sensitivity in cdBm. If not specified, no RSSI filtering is done.

    - #### clearReceiveSensitivity

          public StpApi.AntennaConfig.Builder clearReceiveSensitivity()

      Receive sensitivity in cdBm. If not specified, no RSSI filtering is done.

    - #### hasTagPopulationEstimate

          public boolean hasTagPopulationEstimate()

      optional bool tag_population_check = 9 [default = true];
      Specified by:
        `hasTagPopulationEstimate` in interface `StpApi.AntennaConfigOrBuilder`

    - #### getTagPopulationEstimate

          public int getTagPopulationEstimate()

      optional bool tag_population_check = 9 [default = true];
      Specified by:
        `getTagPopulationEstimate` in interface `StpApi.AntennaConfigOrBuilder`

    - #### setTagPopulationEstimate

          public StpApi.AntennaConfig.Builder setTagPopulationEstimate(int value)

      optional bool tag_population_check = 9 [default = true];

    - #### clearTagPopulationEstimate

          public StpApi.AntennaConfig.Builder clearTagPopulationEstimate()

      optional bool tag_population_check = 9 [default = true];

    - #### hasMinimumDwellTime

          public boolean hasMinimumDwellTime()

      Minimum time to dwell on the antenna in milliseconds. A value of 0 indicates no minimum.
      Specified by:
        `hasMinimumDwellTime` in interface `StpApi.AntennaConfigOrBuilder`

    - #### getMinimumDwellTime

          public int getMinimumDwellTime()

      Minimum time to dwell on the antenna in milliseconds. A value of 0 indicates no minimum.
      Specified by:
        `getMinimumDwellTime` in interface `StpApi.AntennaConfigOrBuilder`

    - #### setMinimumDwellTime

          public StpApi.AntennaConfig.Builder setMinimumDwellTime(int value)

      Minimum time to dwell on the antenna in milliseconds. A value of 0 indicates no minimum.

    - #### clearMinimumDwellTime

          public StpApi.AntennaConfig.Builder clearMinimumDwellTime()

      Minimum time to dwell on the antenna in milliseconds. A value of 0 indicates no minimum.

    - #### hasMaximumDwellTime

          public boolean hasMaximumDwellTime()

      Maximum time to dwell on the antenna in milliseconds. A value of 0 indicates no maximum.
      Specified by:
        `hasMaximumDwellTime` in interface `StpApi.AntennaConfigOrBuilder`

    - #### getMaximumDwellTime

          public int getMaximumDwellTime()

      Maximum time to dwell on the antenna in milliseconds. A value of 0 indicates no maximum.
      Specified by:
        `getMaximumDwellTime` in interface `StpApi.AntennaConfigOrBuilder`

    - #### setMaximumDwellTime

          public StpApi.AntennaConfig.Builder setMaximumDwellTime(int value)

      Maximum time to dwell on the antenna in milliseconds. A value of 0 indicates no maximum.

    - #### clearMaximumDwellTime

          public StpApi.AntennaConfig.Builder clearMaximumDwellTime()

      Maximum time to dwell on the antenna in milliseconds. A value of 0 indicates no maximum.

    - #### hasEnableQueryForQIncrease

          public boolean hasEnableQueryForQIncrease()

      Indicates whether a query should be used instead of a query adjust when the reader wishes to increase the Q value during the round.
      Specified by:
        `hasEnableQueryForQIncrease` in interface `StpApi.AntennaConfigOrBuilder`

    - #### getEnableQueryForQIncrease

          public boolean getEnableQueryForQIncrease()

      Indicates whether a query should be used instead of a query adjust when the reader wishes to increase the Q value during the round.
      Specified by:
        `getEnableQueryForQIncrease` in interface `StpApi.AntennaConfigOrBuilder`

    - #### setEnableQueryForQIncrease

          public StpApi.AntennaConfig.Builder setEnableQueryForQIncrease(boolean value)

      Indicates whether a query should be used instead of a query adjust when the reader wishes to increase the Q value during the round.

    - #### clearEnableQueryForQIncrease

          public StpApi.AntennaConfig.Builder clearEnableQueryForQIncrease()

      Indicates whether a query should be used instead of a query adjust when the reader wishes to increase the Q value during the round.

    - #### hasEnableQueryForQDecrease

          public boolean hasEnableQueryForQDecrease()

      Indicates whether a query should be used instead of a query adjust when the reader wishes to decrease the Q value during the round.
      Specified by:
        `hasEnableQueryForQDecrease` in interface `StpApi.AntennaConfigOrBuilder`

    - #### getEnableQueryForQDecrease

          public boolean getEnableQueryForQDecrease()

      Indicates whether a query should be used instead of a query adjust when the reader wishes to decrease the Q value during the round.
      Specified by:
        `getEnableQueryForQDecrease` in interface `StpApi.AntennaConfigOrBuilder`

    - #### setEnableQueryForQDecrease

          public StpApi.AntennaConfig.Builder setEnableQueryForQDecrease(boolean value)

      Indicates whether a query should be used instead of a query adjust when the reader wishes to decrease the Q value during the round.

    - #### clearEnableQueryForQDecrease

          public StpApi.AntennaConfig.Builder clearEnableQueryForQDecrease()

      Indicates whether a query should be used instead of a query adjust when the reader wishes to decrease the Q value during the round.

    - #### hasEnableQueryAtUCycleEnd

          public boolean hasEnableQueryAtUCycleEnd()

      Indicates whether a query should be used instead of a query adjust for the flush queries at the end of the round.
      Specified by:
        `hasEnableQueryAtUCycleEnd` in interface `StpApi.AntennaConfigOrBuilder`

    - #### getEnableQueryAtUCycleEnd

          public boolean getEnableQueryAtUCycleEnd()

      Indicates whether a query should be used instead of a query adjust for the flush queries at the end of the round.
      Specified by:
        `getEnableQueryAtUCycleEnd` in interface `StpApi.AntennaConfigOrBuilder`

    - #### setEnableQueryAtUCycleEnd

          public StpApi.AntennaConfig.Builder setEnableQueryAtUCycleEnd(boolean value)

      Indicates whether a query should be used instead of a query adjust for the flush queries at the end of the round.

    - #### clearEnableQueryAtUCycleEnd

          public StpApi.AntennaConfig.Builder clearEnableQueryAtUCycleEnd()

      Indicates whether a query should be used instead of a query adjust for the flush queries at the end of the round.

    - #### hasEnableAdaptiveTagPopulationEstimate

          public boolean hasEnableAdaptiveTagPopulationEstimate()

      Indicates whether the tag_population_estimate in the AntennaConfig should be updated with the actual number of tags seen.
      Specified by:
        `hasEnableAdaptiveTagPopulationEstimate` in interface `StpApi.AntennaConfigOrBuilder`

    - #### getEnableAdaptiveTagPopulationEstimate

          public boolean getEnableAdaptiveTagPopulationEstimate()

      Indicates whether the tag_population_estimate in the AntennaConfig should be updated with the actual number of tags seen.
      Specified by:
        `getEnableAdaptiveTagPopulationEstimate` in interface `StpApi.AntennaConfigOrBuilder`

    - #### setEnableAdaptiveTagPopulationEstimate

          public StpApi.AntennaConfig.Builder setEnableAdaptiveTagPopulationEstimate(boolean value)

      Indicates whether the tag_population_estimate in the AntennaConfig should be updated with the actual number of tags seen.

    - #### clearEnableAdaptiveTagPopulationEstimate

          public StpApi.AntennaConfig.Builder clearEnableAdaptiveTagPopulationEstimate()

      Indicates whether the tag_population_estimate in the AntennaConfig should be updated with the actual number of tags seen.