#![no_std]
#![forbid(unsafe_code)]
#![deny(missing_docs)]
#![deny(
clippy::panic,
clippy::unwrap_used,
clippy::expect_used,
clippy::todo,
clippy::unimplemented,
clippy::indexing_slicing,
clippy::exit
)]
#![warn(clippy::pedantic)]
#![cfg_attr(test, allow(clippy::unwrap_used, clippy::panic, clippy::expect_used, clippy::indexing_slicing))]
#![allow(clippy::module_name_repetitions, clippy::must_use_candidate, clippy::missing_errors_doc)]
#![allow(clippy::doc_markdown)]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![doc = include_str!("../README.md")]
#[cfg(feature = "std")]
extern crate std;
pub mod attention;
pub mod crc;
mod error;
mod file;
#[cfg(feature = "std")]
#[cfg_attr(docsrs, doc(cfg(feature = "std")))]
pub mod io;
pub mod message;
mod obis;
mod profile;
mod seq;
mod server_id;
pub mod sim;
mod status;
pub mod tl;
pub mod transport;
mod tree;
mod value;
pub use crc::CrcCheck;
pub use error::{Error, Result};
pub use file::SmlFile;
pub use message::{
Attention, Body, CloseRequest, CloseResponse, GetListRequest, GetListResponse, GetProcParameterRequest,
GetProcParameterResponse, GetProfileListResponse, GetProfileRequest, ListEntries, ListEntry, Message,
Messages, OpenRequest, OpenResponse, ParseOptions, SetProcParameterRequest, readout_with,
};
pub use obis::Obis;
pub use profile::{
GetProfilePackResponse, ProfileColumn, ProfileColumns, ProfilePeriod, ProfilePeriods, ProfileValue,
ProfileValues,
};
pub use seq::{Element, Seq, SeqIter};
pub use server_id::ServerId;
pub use status::{Direction, StatusWord};
pub use tl::{Kind, Reader, Writer};
pub use transport::{Decoder, encode_frame};
pub use tree::{NameList, PeriodEntries, PeriodEntry, ProcParValue, Register, Tree, Trees, TupelEntry};
pub use value::{Quantity, SmlValue, Time, Unit};
pub fn messages(payload: &[u8]) -> Messages<'_> {
Messages::new(payload, ParseOptions::default())
}
pub fn readout(payload: &[u8]) -> Result<GetListResponse<'_>> {
readout_with(payload, ParseOptions::default())
}
const _: () = {
const fn send_sync<T: Send + Sync>() {}
send_sync::<Error>();
send_sync::<SmlFile<'static>>();
send_sync::<Message<'static>>();
send_sync::<Messages<'static>>();
send_sync::<GetListResponse<'static>>();
send_sync::<ListEntries<'static>>();
send_sync::<Tree<'static>>();
send_sync::<Decoder<[u8; 8]>>();
send_sync::<Reader<'static>>();
send_sync::<Writer<'static>>();
send_sync::<ParseOptions>();
send_sync::<Quantity>();
send_sync::<ServerId<'static>>();
};