pub fn transfer_single<F>(
		&mut self,
		packet_id: u8,
		instruction_id: u8,
		parameter_count: usize,
		encode_parameters: F,
	) -> Result<Response<ReadBuffer, WriteBuffer>, TransferError>
	where
		F: FnOnce(&mut [u8]),
	{
		self.write_instruction(packet_id, instruction_id, parameter_count, encode_parameters)?;
		let response = self.read_status_response()?;
		crate::error::InvalidPacketId::check(response.packet_id(), packet_id).map_err(crate::ReadError::from)?;
		Ok(response)
	}
/// Write a raw instruction to a stream, and read a single raw response.
///
/// This function also checks that the packet ID of the status response matches the one from the instruction.
///
/// This is not suitable for broadcast instructions.
/// For broadcast instructions, each motor sends an individual response or no response is send at all.
/// Instead, use [`Self::write_instruction`] and [`Self::read_status_response`].
Write a raw instruction to a stream, and read a single raw response.
This function also checks that the packet ID of the status response matches the one from the instruction.

This is not suitable for broadcast instructions.
For broadcast instructions, each motor sends an individual response or no response is send at all.
Write a raw instruction to a stream and read a single raw response . This function also checks that the packet ID of the status response matches the one from the instruction . This is not suitable for broadcast instructions . For broadcast instructions each motor sends an individual response or no response is send at all .
pub fn transfer_single<F>(
		&mut self,
		packet_id: u8,
		instruction_id: u8,
		parameter_count: usize,
		encode_parameters: F,
	) -> Result<Response<ReadBuffer, WriteBuffer>, TransferError>
	where
		F: FnOnce(&mut [u8]),
	{
		self.write_instruction(packet_id, instruction_id, parameter_count, encode_parameters)?;
		let response = self.read_status_response()?;
		crate::error::InvalidPacketId::check(response.packet_id(), packet_id).map_err(crate::ReadError::from)?;
		Ok(response)
	}
pub fn transfer_single < F > ( & mut self , packet_id : u8 , instruction_id : u8 , parameter_count : usize , encode_parameters : F , ) -> Result < Response < ReadBuffer , WriteBuffer > , TransferError > where F : FnOnce ( & mut [ u8 ] ) , { self . write_instruction ( packet_id , instruction_id , parameter_count , encode_parameters ) ? ; let response = self . read_status_response ( ) ? ; crate :: error :: InvalidPacketId :: check ( response . packet_id ( ) , packet_id ) . map_err ( crate :: ReadError :: from ) ? ; Ok ( response ) }
Write a raw instruction to a stream, and read a single raw response.
Write a raw instruction to a stream and read a single raw response .
&mut self
packet_id
u8
instruction_id
u8
parameter_count
usize
encode_parameters
F
&mut self
packet_id
u8
instruction_id
u8
parameter_count
usize
encode_parameters
F