Implemented all
This commit is contained in:
@@ -46,4 +46,10 @@ mod tests {
|
||||
};
|
||||
assert_eq!(calculate_checksum(test_msg.telegram_length, test_msg.message_identifier, test_msg.function_code, test_msg.data_address, test_msg.data_length, &test_msg.data), 0x8D);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_received_message_wrapping_add_from_bytes() {
|
||||
let checksum = calculate_checksum(0x06, MessageIdentifier::Request, FunctionCode::VirtualWRITE, 0x2323, 0x01, &[0xB6]);
|
||||
assert_eq!(checksum, 0x05);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user