pub struct MetadataFlags(/* private fields */);Expand description
Metadata flags that control which per-tag metadata fields the reader includes in inventory responses.
Defined in the Single Tag Inventory (0x21), Get Tag Buffer (0x29), and
Asynchronous Inventory (0xAA) command specifications.
Each enabled bit requests one additional metadata field in the response. When all bits are zero the reader returns only the EPC and tag CRC.
| Bit | Value | Field | Size | Description |
|---|---|---|---|---|
| 0 | 0x0001 | Read Count | 1 byte | Number of times the tag was archived |
| 1 | 0x0002 | RSSI | 1 byte | Signal strength, signed (dBm) |
| 2 | 0x0004 | Antenna ID | 1 byte | Logic antenna number |
| 3 | 0x0008 | Frequency | 3 bytes | Frequency at archival (kHz) |
| 4 | 0x0010 | Timestamp | 4 bytes | Elapsed time from inventory start (ms) |
| 5 | 0x0020 | RFU | 2 bytes | Reserved for future use |
| 6 | 0x0040 | Protocol ID | 1 byte | Tag protocol (0x05 = Gen2) |
| 7 | 0x0080 | Data Length | 2 bytes | Tag data length (0x0000 for 0x21) |
Implementations§
Source§impl MetadataFlags
impl MetadataFlags
Sourcepub const fn read_count(self) -> bool
pub const fn read_count(self) -> bool
Whether the Read Count field is requested (bit 0).
Sourcepub const fn antenna_id(self) -> bool
pub const fn antenna_id(self) -> bool
Whether the Antenna ID field is requested (bit 2).
Sourcepub const fn protocol_id(self) -> bool
pub const fn protocol_id(self) -> bool
Whether the Protocol ID field is requested (bit 6).
Sourcepub const fn data_length(self) -> bool
pub const fn data_length(self) -> bool
Whether the Data Length field is requested (bit 7).
Sourcepub const fn with_read_count(self, en: bool) -> Self
pub const fn with_read_count(self, en: bool) -> Self
Set or clear the Read Count bit (bit 0).
Sourcepub const fn with_antenna_id(self, en: bool) -> Self
pub const fn with_antenna_id(self, en: bool) -> Self
Set or clear the Antenna ID bit (bit 2).
Sourcepub const fn with_frequency(self, en: bool) -> Self
pub const fn with_frequency(self, en: bool) -> Self
Set or clear the Frequency bit (bit 3).
Sourcepub const fn with_timestamp(self, en: bool) -> Self
pub const fn with_timestamp(self, en: bool) -> Self
Set or clear the Timestamp bit (bit 4).
Sourcepub const fn with_protocol_id(self, en: bool) -> Self
pub const fn with_protocol_id(self, en: bool) -> Self
Set or clear the Protocol ID bit (bit 6).
Sourcepub const fn with_data_length(self, en: bool) -> Self
pub const fn with_data_length(self, en: bool) -> Self
Set or clear the Data Length bit (bit 7).
Trait Implementations§
Source§impl Clone for MetadataFlags
impl Clone for MetadataFlags
Source§fn clone(&self) -> MetadataFlags
fn clone(&self) -> MetadataFlags
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MetadataFlags
impl Debug for MetadataFlags
Source§impl Default for MetadataFlags
impl Default for MetadataFlags
Source§fn default() -> MetadataFlags
fn default() -> MetadataFlags
Source§impl From<MetadataFlags> for u16
impl From<MetadataFlags> for u16
Source§fn from(value: MetadataFlags) -> Self
fn from(value: MetadataFlags) -> Self
Source§impl From<u16> for MetadataFlags
impl From<u16> for MetadataFlags
Source§impl PartialEq for MetadataFlags
impl PartialEq for MetadataFlags
Source§fn eq(&self, other: &MetadataFlags) -> bool
fn eq(&self, other: &MetadataFlags) -> bool
self and other values to be equal, and is used by ==.