C API for BALTECH SDK

§ brp_get_io_id()

BRP_LIB brp_errcode brp_get_io_id ( brp_protocol  protocol,
char **  intf_name,
brp_frame  instance_id 
)

Retrieves the instance name of the I/O-protocol of this protocol stack.

This command allows to retrieve the unique identification name of the underlying I/O protokoll in a normalized form. Usually this one can be passed to the corresponding brp_create_*() function of the I/O protokoll layer to recreate it.

char * intf_name;
struct brp_frame_t instance_id;
brp_protocol prot = brp_create_tcpip("11.22.33.44")
brp_frame_init(&instance_id);
if (brp_get_io_id(prot, &intf_name, &instance_id) == BRP_OK)
// will display: TCP/IP 11.22.33.44
printf("%s %s\n", intf_name, (char*)BRP_FRAME_PTR(&instance_id));
brp_frame_deinit(&instance_id);
Returns
BRP_ERR_OPEN_IO on invalid protocol.
Parameters
protocolprotocol handle to retrieve I/O
intf_nameinterface name
instance_idframe that will hold the name of the I/O prot instance. ATTENTION: The name contains a trailing zero-terminator to correspond to the C string convention.