pub struct MtbMoniData {
pub tiu_busy_len: u32,
pub tiu_status: u8,
pub daq_queue_len: u16,
pub temp: u16,
pub rb_lost_rate: u8,
pub rate: u16,
pub lost_rate: u16,
pub vccint: u16,
pub vccbram: u16,
pub vccaux: u16,
}
Expand description
Monitoring the MTB
Fields§
§tiu_busy_len: u32
§tiu_status: u8
tiu_status[0] = emu_mode tiu_status[1] = use_aux_link tiu_status[2] = tiu_bad tiu_status[3] = bsy_stuck tiu_status[4] = ignore_bsy
daq_queue_len: u16
§temp: u16
§rb_lost_rate: u8
Unfortunatly at this point we only have a single byte left
rate: u16
§lost_rate: u16
§vccint: u16
§vccbram: u16
§vccaux: u16
Implementations§
Source§impl MtbMoniData
impl MtbMoniData
pub fn new() -> Self
pub fn get_tiu_emulation_mode(&self) -> bool
pub fn get_tiu_use_aux_link(&self) -> bool
pub fn get_tiu_bad(&self) -> bool
pub fn get_tiu_busy_stuck(&self) -> bool
pub fn get_tiu_ignore_busy(&self) -> bool
Sourcepub fn get_fpga_temp(&self) -> f32
pub fn get_fpga_temp(&self) -> f32
Convert ADC temp from adc values to Celsius
Trait Implementations§
Source§impl Clone for MtbMoniData
impl Clone for MtbMoniData
Source§fn clone(&self) -> MtbMoniData
fn clone(&self) -> MtbMoniData
Returns a copy 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 moreSource§impl Debug for MtbMoniData
impl Debug for MtbMoniData
Source§impl Default for MtbMoniData
impl Default for MtbMoniData
Source§impl Display for MtbMoniData
impl Display for MtbMoniData
Source§impl From<&MtbMoniData> for TofPacket
impl From<&MtbMoniData> for TofPacket
Source§fn from(moni: &MtbMoniData) -> TofPacket
fn from(moni: &MtbMoniData) -> TofPacket
Converts to this type from the input type.
Source§impl FromRandom for MtbMoniData
impl FromRandom for MtbMoniData
fn from_random() -> Self
Source§impl MoniData for MtbMoniData
impl MoniData for MtbMoniData
Source§fn get_board_id(&self) -> u8
fn get_board_id(&self) -> u8
Monitoring data is always tied to a specific
board. This might not be its own board, but
maybe the RB the data was gathered from
This is an unique identifier for the
monitoring data
Source§impl MoniSeries<MtbMoniData> for MtbMoniDataSeries
impl MoniSeries<MtbMoniData> for MtbMoniDataSeries
fn get_data(&self) -> &HashMap<u8, VecDeque<MtbMoniData>>
fn get_data_mut(&mut self) -> &mut HashMap<u8, VecDeque<MtbMoniData>>
fn get_max_size(&self) -> usize
Source§fn get_var_for_board(&self, varname: &str, rb_id: &u8) -> Option<Vec<f32>>
fn get_var_for_board(&self, varname: &str, rb_id: &u8) -> Option<Vec<f32>>
Get a certain variable, but only for a single board
Source§fn get_board_ids(&self) -> Vec<u8>
fn get_board_ids(&self) -> Vec<u8>
A list of boards in this series
fn get_last_moni(&self, board_id: u8) -> Option<T>
Source§impl Packable for MtbMoniData
impl Packable for MtbMoniData
const PACKET_TYPE: PacketType = PacketType::MonitorMtb
Source§fn pack(&self) -> TofPacketwhere
Self: Serialization,
fn pack(&self) -> TofPacketwhere
Self: Serialization,
Wrap myself in a TofPacket
Source§impl PartialEq for MtbMoniData
impl PartialEq for MtbMoniData
Source§impl Serialization for MtbMoniData
impl Serialization for MtbMoniData
Source§const SIZE: usize = 24usize
const SIZE: usize = 24usize
The SIZE is the size of the serialized
bytestream INCLUDING 4 bytes for head
and tail bytes. In case the struct does
NOT HAVE a fixed size, SIZE will be 0
(so default value of the trait
const HEAD: u16 = 43_690u16
const TAIL: u16 = 21_845u16
Source§fn to_bytestream(&self) -> Vec<u8>
fn to_bytestream(&self) -> Vec<u8>
Encode a serializable to a bytestream
Source§fn from_bytestream(
stream: &Vec<u8>,
pos: &mut usize,
) -> Result<Self, SerializationError>
fn from_bytestream( stream: &Vec<u8>, pos: &mut usize, ) -> Result<Self, SerializationError>
Decode a serializable from a bytestream
Source§fn verify_fixed(
stream: &Vec<u8>,
pos: &mut usize,
) -> Result<(), SerializationError>
fn verify_fixed( stream: &Vec<u8>, pos: &mut usize, ) -> Result<(), SerializationError>
Verify that the serialized representation of the struct has the
correct size, including header + footer. Read more
Source§fn from_tofpacket(packet: &TofPacket) -> Result<Self, SerializationError>where
Self: Sized,
fn from_tofpacket(packet: &TofPacket) -> Result<Self, SerializationError>where
Self: Sized,
Decode a serializable directly from a TofPacket
fn from_slice(
_slice: &[u8],
_start_pos: usize,
) -> Result<Self, SerializationError>where
Self: Sized,
impl Copy for MtbMoniData
impl StructuralPartialEq for MtbMoniData
Auto Trait Implementations§
impl Freeze for MtbMoniData
impl RefUnwindSafe for MtbMoniData
impl Send for MtbMoniData
impl Sync for MtbMoniData
impl Unpin for MtbMoniData
impl UnwindSafe for MtbMoniData
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoSql for T
impl<T> IntoSql for T
Source§fn into_sql<T>(self) -> Self::Expression
fn into_sql<T>(self) -> Self::Expression
Convert
self
to an expression for Diesel’s query builder. Read moreSource§fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression
Convert
&self
to an expression for Diesel’s query builder. Read more