IDSpeakcomfortC  v1.5.0
Ethernet configuration

Data Structures

union  peak_mac_address
 peak MAC-48 address More...
 
union  peak_ip_address
 peak IPv4 address More...
 
struct  peak_ip_config
 peak IP configuration More...
 
struct  peak_ethernet_info
 peak Ethernet info More...
 

Enumerations

enum  peak_ethernet_status {
  PEAK_ETHERNET_STATUS_INVALID, PEAK_ETHERNET_STATUS_OK, PEAK_ETHERNET_STATUS_NOK, PEAK_ETHERNET_STATUS_SUBNET_MISMATCH,
  PEAK_ETHERNET_STATUS_INAPPLICABLE_IP
}
 peak Ethernet status More...
 

Functions

peak_access_status peak_EthernetConfig_GetAccessStatus (peak_camera_id cameraID)
 Query the ethernet configuration access status. More...
 
peak_status peak_EthernetConfig_GetInfo (peak_camera_id cameraID, peak_ethernet_info *ethernetInfo)
 Query the ethernet information. More...
 
peak_access_status peak_EthernetConfig_DHCP_GetAccessStatus (peak_camera_id cameraID)
 Query the dhcp access status. More...
 
peak_status peak_EthernetConfig_DHCP_Enable (peak_camera_id cameraID, peak_bool enabled)
 Enable/Disable dhcp. More...
 
peak_bool peak_EthernetConfig_DHCP_IsEnabled (peak_camera_id cameraID)
 Get the enabled status of dhcp. More...
 
peak_access_status peak_EthernetConfig_PersistentIP_GetAccessStatus (peak_camera_id cameraID)
 Query the persistent ip access status. More...
 
peak_status peak_EthernetConfig_PersistentIP_Set (peak_camera_id cameraID, peak_ip_config persistentIP)
 Set the persistent ip. More...
 
peak_status peak_EthernetConfig_PersistentIP_Get (peak_camera_id cameraID, peak_ip_config *persistentIP)
 Get the persistent ip. More...
 

Detailed Description

Ethernet configuration related functions and types.

Enumeration Type Documentation

◆ peak_ethernet_status

peak Ethernet status

The ethernet status defines the current status of a cameras ethernet configuration.

Enumerator
PEAK_ETHERNET_STATUS_INVALID 

Invalid ethernet status.

Use this value for the initialization of variables of type peak_ethernet_status.

PEAK_ETHERNET_STATUS_OK 

The cameras ethernet status is ok.

The ethernet configuration is operable.

PEAK_ETHERNET_STATUS_NOK 

The cameras ethernet status is not ok.

The ethernet configuration is not operable.

PEAK_ETHERNET_STATUS_SUBNET_MISMATCH 

The camera persistent IP is not in the hosts subnet.

The hosts subnet is the hosts ip address AND-ed with the hosts subnet mask.
The cameras subnet is the cameras ip address AND-ed with the cameras subnet mask.
In order to have an operable ethernet connection the hosts subnet and the cameras subnet must match.

PEAK_ETHERNET_STATUS_INAPPLICABLE_IP 

The camera IP is not applicable.

The camera ip is not applicable on the network.

Make sure that the cameras persistent ip address is not used by any other device that is connected to the same network.

Function Documentation

◆ peak_EthernetConfig_DHCP_Enable()

peak_status peak_EthernetConfig_DHCP_Enable ( peak_camera_id  cameraID,
peak_bool  enabled 
)

Enable/Disable dhcp.

Sets dhcp to enabled or disabled.

Note
If dhcp is enabled the camera will not use a possibly configured persistent ip.
If dhcp is enabled and the camera fails to acquire an address from a dhcp server in the network it may fall back to a so called link-local address. Or it may get into a configuration state with an inapplicable ip address.
Whether the camera implements the link-local fall back depends on its model and firmware implementation.
Parameters
[in]cameraIDThe camera id.
[in]enabledThe desired enabled status. PEAK_TRUE for enabled, PEAK_FALSE for disabled.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_ACCESS_DENIED The dhcp feature is not accessible for write. Check the access status via peak_EthernetConfig_DHCP_GetAccessStatus.
PEAK_STATUS_ABORTED The could not be moved to the current subnet because no available IP was found. Therefore, dhcp could not be enabled.
PEAK_STATUS_CAMERA_NOT_FOUND There is no camera with the specified camera id.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.
Note
A change of the dhcp enabled status results in the camera re-connecting to the ethernet. For the system this is the same as if the camera is removed and re-attached.
This means that the camera needs to be newly discovered and the peak_camera_id changes after the dhcp status change.
Use peak_CameraList_Update() to initiate an update of the camera list.
Consider that the camera may need some time to re-connect to the ethernet.

◆ peak_EthernetConfig_DHCP_GetAccessStatus()

peak_access_status peak_EthernetConfig_DHCP_GetAccessStatus ( peak_camera_id  cameraID)

Query the dhcp access status.

Provides the current access status for the dhcp setting of the specified camera.

Note
The dhcp setting is supported only for cameras of the types PEAK_CAMERA_TYPE_UEYE_ETH and PEAK_CAMERA_TYPE_UEYE_PLUS_GEV.
The dhcp setting is available only for change if the camera is not opened.

This function implements the Access Status Query principle.

Parameters
[in]cameraIDThe camera id.
Returns
PEAK_ACCESS_READWRITE The dhcp setting is supported and currently available for change.
PEAK_ACCESS_READONLY The dhcp setting is supported but currently not available for change. Check for the camera to be not opened.
PEAK_ACCESS_GFA_LOCK The dhcp setting is not accessible because the GFA write access is enabled.
PEAK_ACCESS_NOT_SUPPORTED The dhcp setting is not supported. Check for the camera type to be PEAK_CAMERA_TYPE_UEYE_PLUS_GEV.
PEAK_ACCESS_INVALID The function failed. Call peak_Library_GetLastError to get the error code and description.

If the function indicates an error by returning PEAK_ACCESS_INVALID, these are the possible errors:

◆ peak_EthernetConfig_DHCP_IsEnabled()

peak_bool peak_EthernetConfig_DHCP_IsEnabled ( peak_camera_id  cameraID)

Get the enabled status of dhcp.

Queries whether dhcp is currently enabled or disabled.

This function implements the Enabled Status Query principle.

Parameters
[in]cameraIDThe camera id.
Returns
PEAK_TRUE The dhcp feature is currently enabled.
PEAK_FALSE The dhcp feature is currently disabled or the query failed.

◆ peak_EthernetConfig_GetAccessStatus()

peak_access_status peak_EthernetConfig_GetAccessStatus ( peak_camera_id  cameraID)

Query the ethernet configuration access status.

Provides the current access status for the ethernet configuration of the specified camera.

Note
The ethernet configuration is supported only for cameras of the types PEAK_CAMERA_TYPE_UEYE_ETH and PEAK_CAMERA_TYPE_UEYE_PLUS_GEV.
The ethernet configuration is available only for change if the camera is not opened.

This function implements the Access Status Query principle.

Parameters
[in]cameraIDThe camera id.
Returns
PEAK_ACCESS_READWRITE The ethernet configuration is supported and currently available for change.
PEAK_ACCESS_READONLY The ethernet configuration is supported but currently not available for change. Check for the camera to be not opened.
PEAK_ACCESS_GFA_LOCK The ethernet configuration is not accessible because the GFA write access is enabled.
PEAK_ACCESS_NOT_SUPPORTED The ethernet configuration is not supported. Check for the camera to be of one of the types PEAK_CAMERA_TYPE_UEYE_ETH and PEAK_CAMERA_TYPE_UEYE_PLUS_GEV.
PEAK_ACCESS_INVALID The function failed. Call peak_Library_GetLastError to get the error code and description.

If the function indicates an error by returning PEAK_ACCESS_INVALID, these are the possible errors:

◆ peak_EthernetConfig_GetInfo()

peak_status peak_EthernetConfig_GetInfo ( peak_camera_id  cameraID,
peak_ethernet_info *  ethernetInfo 
)

Query the ethernet information.

Provides the ethernet information for the camera which is specified by its camera id.

Parameters
[in]cameraIDThe camera id.
[out]ethernetInfoThe ethernet info.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_ACCESS_DENIED The ethernet info feature is not accessible for read. Check the access status via peak_EthernetConfig_GetAccessStatus.
PEAK_STATUS_CAMERA_NOT_FOUND There is no camera with the specified id.
PEAK_STATUS_INVALID_PARAMETER ethernetInfo is an invalid pointer.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.

◆ peak_EthernetConfig_PersistentIP_Get()

peak_status peak_EthernetConfig_PersistentIP_Get ( peak_camera_id  cameraID,
peak_ip_config *  persistentIP 
)

Get the persistent ip.

Reads the current persistent ip.

Parameters
[in]cameraIDThe camera id.
[out]persistentIPThe persistent ip.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_ACCESS_DENIED The persistent ip feature is not available for read access. Check the access status via peak_EthernetConfig_PersistentIP_GetAccessStatus.
PEAK_STATUS_CAMERA_NOT_FOUND There is no camera with the specified camera id.
PEAK_STATUS_INVALID_PARAMETER persistentIP is an invalid pointer.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.

◆ peak_EthernetConfig_PersistentIP_GetAccessStatus()

peak_access_status peak_EthernetConfig_PersistentIP_GetAccessStatus ( peak_camera_id  cameraID)

Query the persistent ip access status.

Provides the current access status for the persistent ip setting of the specified camera.

Note
The persistent ip setting is supported only for cameras of the types PEAK_CAMERA_TYPE_UEYE_ETH and PEAK_CAMERA_TYPE_UEYE_PLUS_GEV.
The persistent ip setting is available only for change if the camera is not opened.

This function implements the Access Status Query principle.

Parameters
[in]cameraIDThe camera id.
Returns
PEAK_ACCESS_READWRITE The persistent ip setting is supported and currently available for change.
PEAK_ACCESS_READONLY The persistent ip setting is supported but currently not available for change. Check for the camera to be not opened.
PEAK_ACCESS_WRITEONLY The persistent ip cannot be read from the camera, but a new IP can be assigned.
PEAK_ACCESS_GFA_LOCK The persistent ip setting is not accessible because the GFA write access is enabled.
PEAK_ACCESS_NOT_SUPPORTED The persistent ip setting is not supported. Check for the camera to be of one of the types PEAK_CAMERA_TYPE_UEYE_ETH and PEAK_CAMERA_TYPE_UEYE_PLUS_GEV.
PEAK_ACCESS_INVALID The function failed. Call peak_Library_GetLastError to get the error code and description.

If the function indicates an error by returning PEAK_ACCESS_INVALID, these are the possible errors:

◆ peak_EthernetConfig_PersistentIP_Set()

peak_status peak_EthernetConfig_PersistentIP_Set ( peak_camera_id  cameraID,
peak_ip_config  persistentIP 
)

Set the persistent ip.

Sets the persistent ip address.

Parameters
[in]cameraIDThe camera id.
[in]persistentIPThe desired persistent ip.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_ACCESS_DENIED The persistent ip feature is not accessible for write. Check the access status via peak_EthernetConfig_PersistentIP_GetAccessStatus.
PEAK_STATUS_CAMERA_NOT_FOUND There is no camera with the specified camera id.
PEAK_STATUS_INVALID_PARAMETER persistentIP is an invalid ip.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.
Note
A change of the persistent ip while dhcp is not enabled results in the camera re-connecting to the ethernet. For the system this is the same as if the camera is removed and re-attached.
This means that the camera needs to be newly discovered and the peak_camera_id changes after the persistent ip change.
Use peak_CameraList_Update() to initiate an update of the camera list.
Consider that the camera may need some time to re-connect to the ethernet.