Trait p25::data::params::PacketParams [] [src]

pub trait PacketParams {
    fn block_bytes() -> usize;
fn tail_bytes() -> usize; fn max_blocks() -> usize { ... }
fn packet_bytes() -> usize { ... }
fn blocks(bytes: usize) -> usize { ... }
fn pads(bytes: usize) -> usize { ... }
fn full_blocks(bytes: usize) -> usize { ... } }

Required Methods

Number of data bytes in a normal block.

Number of data bytes in the tail block.

Provided Methods

Maximum number of blocks in the packet, including the tail block.

Maximum number of data bytes in the packet.

Calculate the total number of data blocks (normal and tail) needed to hold the given amount of bytes.

Calculate the number of pads needed for the tail block (and possibly second-to-last block) for the given amount of bytes.

Calculate the number of normal data blocks (tail block not included) needed to hold the given amount of bytes.

Implementors