pub struct PointPacket {
pub seq: u32,
pub retransmitted: bool,
pub group: u8,
pub last: bool,
pub run_id: u8,
pub first_index: u32,
pub channels: ChannelMask,
pub t0: u64,
pub has_time: bool,
/* private fields */
}Expand description
一个点包:一组(group)连续若干个 CONV 时刻的采样点。
每个点包含该组通道掩码中每一路的一个 14 bit 码值(16 bit 有符号存放); 该组开启时间字时,每个点还带有时刻、来源编号和无效标志。
Fields§
§seq: u32包序号(两组共用,ACK / NACK 按它进行)。
retransmitted: bool是否为重传副本。
group: u8组号 0 或 1。
last: bool是否为该组本次运行的最后一包(可以不含点)。
run_id: u8运行编号(每次 START 加 1,8 bit)。
first_index: u32本次运行中该组在本包之前已输出的点数。
channels: ChannelMask本包包含的通道(每个点按序号从小到大排列)。
t0: u64本包第一个点的时刻,单位 T/64(T = 采样周期),自采样时间基准启动起计,52 bit。
has_time: bool每个点是否带时间字。
Implementations§
Source§impl PointPacket
impl PointPacket
Sourcepub fn decode(b: &[u8]) -> Result<PointPacket>
pub fn decode(b: &[u8]) -> Result<PointPacket>
解析一个 POINTS 数据报。
Trait Implementations§
Source§impl Clone for PointPacket
impl Clone for PointPacket
Source§fn clone(&self) -> PointPacket
fn clone(&self) -> PointPacket
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PointPacket
impl RefUnwindSafe for PointPacket
impl Send for PointPacket
impl Sync for PointPacket
impl Unpin for PointPacket
impl UnwindSafe for PointPacket
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more