use speedy::{Readable, Writable};
use crate::messages::protocol_version::ProtocolVersion;
use crate::messages::vendor_id::VendorId;
use crate::structure::guid::GuidPrefix;
#[derive(Debug, PartialEq, Readable, Writable)]
pub struct InfoSource {
pub protocol_version: ProtocolVersion,
pub vendor_id: VendorId,
pub guid_prefix: GuidPrefix,
}
#[cfg(test)]
mod tests {
use super::*;
serialization_test!( type = InfoSource,
{
info_source,
InfoSource {
protocol_version: ProtocolVersion::PROTOCOLVERSION_2_2,
vendor_id: VendorId {
vendorId: [0xFF, 0xAA]
},
guid_prefix: GuidPrefix {
entityKey: [0x01, 0x02, 0x6D, 0x3F,
0x7E, 0x07, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00]
}
},
le = [0x02, 0x02, 0xFF, 0xAA,
0x01, 0x02, 0x6D, 0x3F,
0x7E, 0x07, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00],
be = [0x02, 0x02, 0xFF, 0xAA,
0x01, 0x02, 0x6D, 0x3F,
0x7E, 0x07, 0x00, 0x00,
0x01, 0x00, 0x00, 0x00]
});
}