pub fn encode_priority_date_time(buf: &mut BytesMut, date: &Date, time: &Time)Expand description
Append one Priority_Array element holding a date-time: opening tag 1, the application-tagged Date and Time, closing tag 1 (twelve octets).
use bacnet_encoding::primitives::encode_priority_date_time;
use bacnet_types::primitives::{Date, Time};
use bytes::BytesMut;
let date = Date { year: 126, month: 10, day: 25, day_of_week: 7 };
let time = Time { hour: 7, minute: 30, second: 0, hundredths: 0 };
let mut buf = BytesMut::new();
encode_priority_date_time(&mut buf, &date, &time);
assert_eq!(buf.len(), 12);
assert_eq!((buf[0], buf[11]), (0x1E, 0x1F));