sbgECom Library  4.0.1987-stable
C library to interface SBG Systems IMU/AHRS/INS
sbgEComCmdEthernet.h File Reference

Ethernet configuration related commands. More...

#include <sbgCommon.h>
#include <sbgECom.h>

Go to the source code of this file.

Data Structures

struct  _SbgEComEthernetConf
 

Typedefs

typedef enum _SbgEComEthernetMode SbgEComEthernetMode
 
typedef struct _SbgEComEthernetConf SbgEComEthernetConf
 

Enumerations

enum  _SbgEComEthernetMode {
  SBG_ECOM_ETHERNET_DHCP = 0 ,
  SBG_ECOM_ETHERNET_STATIC = 1
}
 

Functions

SbgErrorCode sbgEComEthernetGetConf (SbgEComHandle *pHandle, SbgEComEthernetConf *pEthernetConf)
 
SbgErrorCode sbgEComEthernetSetConf (SbgEComHandle *pHandle, const SbgEComEthernetConf *pEthernetConf)
 
SbgErrorCode sbgEComEthernetInfo (SbgEComHandle *pHandle, SbgEComEthernetConf *pEthernetConf)
 

Detailed Description

Ethernet configuration related commands.

Author
SBG Systems
Date
14 November 2016
License

The MIT license

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Typedef Documentation

◆ SbgEComEthernetMode

Enum that defines the different type of IP acquisition method.

◆ SbgEComEthernetConf

Structure that contains all Ethernet configuration or settings.

Enumeration Type Documentation

◆ _SbgEComEthernetMode

Enum that defines the different type of IP acquisition method.

Enumerator
SBG_ECOM_ETHERNET_DHCP 

The TCP/IP configuration should be acquired from a DHCP server.

SBG_ECOM_ETHERNET_STATIC 

The TCP/IP configuration is manually defined.

Function Documentation

◆ sbgEComEthernetGetConf()

SbgErrorCode sbgEComEthernetGetConf ( SbgEComHandle pHandle,
SbgEComEthernetConf pEthernetConf 
)

Get the configuration for the Ethernet interface.

Warning: this method only returns the Ethernet configuration and NOT the IP address currently used by the device. You should rather use sbgEComEthernetInfo to retrieve the current assigned IP.

Parameters
[in]pHandleA valid sbgECom handle.
[out]pEthernetConfSbgEComEthernetConf struct to hold the read configuration from the device.
Returns
SBG_NO_ERROR if the command has been executed successfully.

◆ sbgEComEthernetSetConf()

SbgErrorCode sbgEComEthernetSetConf ( SbgEComHandle pHandle,
const SbgEComEthernetConf pEthernetConf 
)

Set the configuration for the Ethernet interface.

Parameters
[in]pHandleA valid sbgECom handle.
[in]pEthernetConfSbgEComEthernetConf struct to hold the new configuration to apply.
Returns
SBG_NO_ERROR if the command has been executed successfully.

◆ sbgEComEthernetInfo()

SbgErrorCode sbgEComEthernetInfo ( SbgEComHandle pHandle,
SbgEComEthernetConf pEthernetConf 
)

Get the current assigned and used IP address as well as network information.

In opposition to sbgEComEthernetGetConf, this method will not return the Ethernet configuration. It will rather return the IP address currently used by the device.

Parameters
[in]pHandleA valid sbgECom handle.
[out]pEthernetConfSbgEComEthernetConf struct to hold the read IP settings from the device.
Returns
SBG_NO_ERROR if the command has been executed successfully.