AudioScience HPI Version_4.24.1
|
The HPI Network object contains a series of parameters which are addressed using Uniform Resource Identifiers (URIs).
An example of a URI is "hpi://subsys/network/ip/enabled" which points to the HPI network parameter "enabled".
The function HPI_Object_UriToHandle() should be used to translate a URI into an HPI parameter handle. The parameter handle can then be used for set (write) or get (read) operations using HPI_Object_SetValue() and HPI_Object_GetValue().
The list of supported datatypes is as follows:
A 32 bit integer.
4 byte IP4 address
hpi://subsystem/network/enabled |
Enable network traffic and device discovery |
hpi://subsystem/network/ip/address |
Set the IP address of the network interface to use |
hpi://subsystem/network/ip/mask |
Set the network IP mask |
hpi://subsystem/network/ip/udp/broadcast_enabled |
Enable UDP broadcast discovery |
hpi://subsystem/network/ip/udp/unicast_enabled |
Enable UDP unicast discovery |
hpi://subsystem/network/ip/adapter_address_add |
Explicitly add an IP address to the HPIUDP list of discovered devices |
URI | hpi://subsystem/network/enabled |
Description | Enable network traffic and device discovery. off(0) : no network traffic will be generated or recieved on(1) : network traffic is allowed, periodic discovery packets may be sent The usual sequence would be to set up other hpiconfig options, and then call this function to start UDP running with the configured options. |
Type | integer / entity_type_int / C99 type int32_t |
Count | 1 |
Attributes | read/write |
Default | 0 |
Added in version | 3.05.16 |
Example | hpi_handle_t h; int netEnabled; err = HPI_Object_UriToHandle("hpi://subsystem/network/enabled", &h); err = HPI_Object_GetValue(h, entity_type_int, 1, &netEnabled, sizeof(netEnabled) ); netEnabled = 1; err = HPI_Object_SetValue(h, entity_type_int, 1, &netEnabled, sizeof(netEnabled)); |
URI | hpi://subsystem/network/ip/address |
Description | Set the IP address of the network interface to use |
Type | IPv4 address / entity_type_ip4_address / C99 type int32_t |
Count | 1 |
Attributes | read/write |
Default | none |
Added in version | 3.05.16 |
Example | hpi_handle_t h; struct in_addr ip_adr; err = HPI_Object_UriToHandle("hpi://subsystem/network/ip/address", &h); err = HPI_Object_GetValue(h, entity_type_ip4_address, 1, &ip_adr.s_addr, sizeof(ip_adr.s_addr)); ip_adr.s_addr = inet_addr("192.168.1.113"); err = HPI_Object_SetValue(h, entity_type_ip4_address, 1, &ip_adr.s_addr, sizeof(ip_adr.s_addr)); |
URI | hpi://subsystem/network/ip/mask |
Description | Set the network IP mask |
Type | IPv4 address / entity_type_ip4_address / C99 type int32_t |
Count | 1 |
Attributes | read/write |
Default | none |
Added in version | 3.05.16 |
Example | hpi_handle_t h; struct in_addr ip_adr; err = HPI_Object_UriToHandle("hpi://subsystem/network/ip/mask", &h); err = HPI_Object_GetValue(h, entity_type_ip4_address, 1, &ip_adr.s_addr, sizeof(ip_adr.s_addr)); ip_adr.s_addr = inet_addr("192.168.1.113"); err = HPI_Object_SetValue(h, entity_type_ip4_address, 1, &ip_adr.s_addr, sizeof(ip_adr.s_addr)); |
URI | hpi://subsystem/network/ip/udp/broadcast_enabled |
Description | Enable UDP broadcast discovery. Controls whether or not the HPIUDP module periodically sends broadcast UDP packets to discover AudioScience network devices. By default the broadcast discovery method is enabled. |
Type | integer / entity_type_int / C99 type int32_t |
Count | 1 |
Attributes | read/write |
Default | 1 |
Added in version | 3.05.16 |
Example | hpi_handle_t h; int udpBroadcastEnabled; err = HPI_Object_UriToHandle("hpi://subsystem/network/ip/udp/broadcast_enabled", &h); err = HPI_Object_GetValue(h, entity_type_int, 1, &udpBroadcastEnabled, sizeof(udpBroadcastEnabled) ); udpBroadcastEnabled = 1; err = HPI_Object_SetValue(h, entity_type_int, 1, &udpBroadcastEnabled, sizeof(udpBroadcastEnabled)); |
URI | hpi://subsystem/network/ip/udp/unicast_enabled |
Description | Enable UDP unicast discovery.When the unicast option is enabled the HPIUDP module will periodically send a packet to each "known" adapter to verify that it is still alive. By default this option is disabled. Using hpi_subsystem_network_ip_adapter_address_add will automatically turn this feature on. |
Type | integer / entity_type_int / C99 type int32_t |
Count | 1 |
Attributes | read/write |
Default | 0 |
Added in version | 3.05.16 |
Example | hpi_handle_t h; int udpUnicastEnabled; err = HPI_Object_UriToHandle("hpi://subsystem/network/ip/udp/unicast_enabled", &h); err = HPI_Object_GetValue(h, entity_type_int, 1, &udpUnicastEnabled, sizeof(udpUnicastEnabled) ); udpUnicastEnabled = 1; err = HPI_Object_SetValue(h, entity_type_int, 1, &udpUnicastEnabled, sizeof(udpUnicastEnabled)); |
URI | hpi://subsystem/network/ip/adapter_address_add |
Description | Explicitly add an IP address to the HPIUDP list of discovered devices. This call will cause the specified IP to be probed once to confirm it's presence. Additionally, if hpi_subsystem_network_ip_udp_unicast_enabled is false, it will be enabled. |
Type | IPv4 address / entity_type_ip4_address / C99 type int32_t |
Count | 1 |
Attributes | write |
Default | none |
Added in version | 3.05.16 |
Example | hpi_handle_t h; struct in_addr ip_adr; err = HPI_Object_UriToHandle("hpi://subsystem/network/ip/adapter_address_add", &h); ip_adr.s_addr = inet_addr("192.168.1.113"); err = HPI_Object_SetValue(h, entity_type_ip4_address, 1, &ip_adr.s_addr, sizeof(ip_adr.s_addr)); |