pub struct EitEvent<'a> {
pub event_id: u16,
pub start_time_raw: [u8; 5],
pub duration_raw: [u8; 3],
pub running_status: u8,
pub free_ca_mode: bool,
pub descriptors: DescriptorLoop<'a>,
}Expand description
One event in the EIT.
Fields§
§event_id: u1616-bit event_id.
start_time_raw: [u8; 5]40-bit start_time: 16-bit MJD followed by 24-bit BCD UTC (HHMMSS).
duration_raw: [u8; 3]24-bit BCD duration HHMMSS.
running_status: u83-bit running_status.
free_ca_mode: boolfree_CA_mode flag.
descriptors: DescriptorLoop<'a>Descriptor loop for this event. Serializes as the typed descriptor
sequence; .raw() yields the wire bytes.
Implementations§
Source§impl EitEvent<'_>
impl EitEvent<'_>
Sourcepub fn duration(&self) -> Option<Duration>
pub fn duration(&self) -> Option<Duration>
Decode the 24-bit BCD duration (HHMMSS) to a core::time::Duration.
Returns None if the BCD nibbles are out of range. Available without the
chrono feature — a duration is a plain elapsed-seconds value.
Sourcepub fn set_duration(&mut self, duration: Duration) -> Result<()>
pub fn set_duration(&mut self, duration: Duration) -> Result<()>
Set the event duration, encoding it into the 24-bit BCD duration field.
§Errors
ValueOutOfRange if the duration
is 100 hours or longer (the HH field holds only two BCD digits).
Source§impl EitEvent<'_>
impl EitEvent<'_>
Sourcepub fn start_time(&self) -> Option<DateTime<Utc>>
pub fn start_time(&self) -> Option<DateTime<Utc>>
Decode start_time_raw (16-bit MJD + 24-bit BCD UTC) to a UTC datetime.
Returns None if the date/time fields are out of range. MJD→calendar
conversion per ETSI EN 300 468 Annex C.
Sourcepub fn set_start_time(&mut self, start_time: DateTime<Utc>) -> Result<()>
pub fn set_start_time(&mut self, start_time: DateTime<Utc>) -> Result<()>
Set the event start time, encoding it into the 40-bit start_time field.
§Errors
ValueOutOfRange if the date is
outside the representable 16-bit MJD range.
Trait Implementations§
impl<'a> Eq for EitEvent<'a>
Source§impl<'a> PartialEq for EitEvent<'a>
impl<'a> PartialEq for EitEvent<'a>
impl<'a> StructuralPartialEq for EitEvent<'a>
Source§impl<'a> Yokeable<'a> for EitEvent<'static>
impl<'a> Yokeable<'a> for EitEvent<'static>
Source§type Output = EitEvent<'a>
type Output = EitEvent<'a>
Self with the 'static replaced with 'a, i.e. Self<'a>