pub struct CondSel<'a, const M: XwSz>where
    [XwBmp; { _ }]: Sized,{ /* private fields */ }Expand description
Implementations§
source§impl<'a, const M: XwSz> CondSel<'a, M>where
    [XwBmp; { _ }]: Sized,
 
impl<'a, const M: XwSz> CondSel<'a, M>where
    [XwBmp; { _ }]: Sized,
sourcepub fn selected(&self, trg: &Bmp<M>) -> bool
 
pub fn selected(&self, trg: &Bmp<M>) -> bool
判断触发的 选择信号 是否包括此条件量
§示例
    let msk = Bmp::<8>::new(); // 8位位图
    msk.s1all(); // 掩码为0xFF
    loop {
        let res = sel.select(&msk);
        match res {
            Ok(t) => { // 信号选择器上有 **选择信号** , `t` 为 **选择信号** 的位图。
                if cond0sel.selected(&t) { // 条件量0被选择到
                }
                if cond1sel.selected(&t) { // 条件量1被选择到
                }
            },
            Err(e) => { // 等待信号选择器失败,`e` 为 `SelError`
                break;
            },
        }
    }