pub fn write_msgs(&self, msgs: &mut [PassThruMsg], timeout: u32) -> Result<usize> {
        for msg in msgs.iter_mut() {
            msg.protocol_id = self.protocol_id;
        }
        let mut num_msgs: u32 = msgs.len() as u32;
        let res = unsafe { j2534_PassThruWriteMsgs(self.device.interface.handle, self.id, msgs.as_mut_ptr(), &mut num_msgs as *mut libc::uint32_t, timeout) };
        if res != 0 {
            return Err(Error::from_code(res));
        }
        Ok(num_msgs as usize)
    }
/// Writes `msgs` to the device until all messages have been written or until the timeout has been reached. Returns the amount of message written.
/// 
/// # Arguments
/// 
/// * msgs - The array of messages to send.
/// * timeout - The amount of time in milliseconds to wait. If set to zero, queues as many messages as possible and returns immediately.
Writes `msgs` to the device until all messages have been written or until the timeout has been reached. Returns the amount of message written.
Writes ` msgs ` to the device until all messages have been written or until the timeout has been reached . Returns the amount of message written .
pub fn write_msgs(&self, msgs: &mut [PassThruMsg], timeout: u32) -> Result<usize> {
        for msg in msgs.iter_mut() {
            msg.protocol_id = self.protocol_id;
        }
        let mut num_msgs: u32 = msgs.len() as u32;
        let res = unsafe { j2534_PassThruWriteMsgs(self.device.interface.handle, self.id, msgs.as_mut_ptr(), &mut num_msgs as *mut libc::uint32_t, timeout) };
        if res != 0 {
            return Err(Error::from_code(res));
        }
        Ok(num_msgs as usize)
    }
pub fn write_msgs ( & self , msgs : & mut [ PassThruMsg ] , timeout : u32 ) -> Result < usize > { for msg in msgs . iter_mut ( ) { msg . protocol_id = self . protocol_id ; } let mut num_msgs : u32 = msgs . len ( ) as u32 ; let res = unsafe { j2534_PassThruWriteMsgs ( self . device . interface . handle , self . id , msgs . as_mut_ptr ( ) , & mut num_msgs as * mut libc :: uint32_t , timeout ) } ; if res != 0 { return Err ( Error :: from_code ( res ) ) ; } Ok ( num_msgs as usize ) }
Writes `msgs` to the device until all messages have been written or until the timeout has been reached.
Writes ` msgs ` to the device until all messages have been written or until the timeout has been reached .
&self
msgs
&mut [PassThruMsg]
timeout
u32
&self
msgs
&mut [PassThruMsg]
timeout
u32