Skip to main content

handle_ip_address

Function handle_ip_address 

Source
pub fn handle_ip_address(
    info: &DeviceHandleInfo,
) -> Result<Option<String>, LJMError>
Expand description

Converts the signed IPv4 bits in LabJack handle info to dotted decimal text.

LJM reports the address as an i32; its bits are reinterpreted as u32, so addresses at or above 128.0.0.0 (negative as i32) convert correctly.

§Arguments

§Returns

The address, or None when LJM reports 0 (no IP address).

§Errors

Never returns an error. The Result return type is kept for callers that use ?.