Skip to main content

connect_handshake

Function connect_handshake 

Source
pub fn connect_handshake(
    network: &Network,
    library_version: u16,
) -> FrankaResult<u16>
Expand description

Performs the Connect handshake and returns the server’s protocol version.

Port of the franka::connect<T, kLibraryVersion> template in src/network.h: send the request carrying the client’s UDP port, block for the reply, and map the status. kIncompatibleLibraryVersion becomes FrankaError::IncompatibleVersion, any other non-success status becomes Protocol("libfranka: Protocol error during connection attempt").

The robot and the gripper differ only in the width of the status field (u8 vs u16), so the layout chosen at connect time selects the right response struct.