Buttplug sex toy control library
at dev 35 lines 928 B view raw
1// Buttplug Rust Source Code File - See https://buttplug.io for more info. 2// 3// Copyright 2016-2024 Nonpolynomial Labs LLC. All rights reserved. 4// 5// Licensed under the BSD 3-Clause license. See LICENSE file in the project root 6// for full license information. 7 8mod test_device; 9 10mod test_device_comm_manager; 11 12use buttplug_server::device::hardware::HardwareCommand; 13use std::time::Duration; 14pub use test_device::{TestDevice, TestDeviceChannelHost, TestHardwareEvent}; 15 16pub use test_device_comm_manager::{ 17 //new_bluetoothle_test_device, 18 TestDeviceCommunicationManagerBuilder, 19 TestDeviceIdentifier, 20}; 21 22#[allow(dead_code)] 23pub async fn check_test_recv_value( 24 timeout: &Duration, 25 receiver: &mut TestDeviceChannelHost, 26 command: HardwareCommand, 27) { 28 assert_eq!( 29 tokio::time::timeout(*timeout, receiver.receiver.recv()) 30 .await 31 .expect("No messages received") 32 .expect("Test"), 33 command 34 ); 35}