Functions | Variables
sbgInterface.c File Reference
#include <sbgCommon.h>
#include "sbgInterface.h"
Include dependency graph for sbgInterface.c:

Go to the source code of this file.

Functions

void sbgInterfaceNameSet (SbgInterface *pInterface, const char *pName)
 
const char * sbgInterfaceTypeGetAsString (const SbgInterface *pInterface)
 
void sbgInterfaceZeroInit (SbgInterface *pHandle)
 

Variables

static const char * gInterfaceType []
 

Function Documentation

◆ sbgInterfaceNameSet()

void sbgInterfaceNameSet ( SbgInterface pInterface,
const char *  pName 
)

Define the interface name as a NULL terminated C string.

This method make sure that the provided string will always fit within the allocated name buffer.

If the interface name you would like to set is too long, only the end of the string will be kept.

Parameters
[in]pInterfaceInterface instance
[in]pNameThe interface name to set as a NULL terminated C string

Definition at line 61 of file sbgInterface.c.

◆ sbgInterfaceTypeGetAsString()

const char* sbgInterfaceTypeGetAsString ( const SbgInterface pInterface)

Returns the interface as string.

Parameters
[in]pInterfaceInterface instance
Returns
The interface type.

Definition at line 46 of file sbgInterface.c.

◆ sbgInterfaceZeroInit()

void sbgInterfaceZeroInit ( SbgInterface pHandle)

Initialize an interface instance to zero.

Parameters
[in]pHandleHandle on an allocated interface to initialize to zero.

Definition at line 24 of file sbgInterface.c.

Variable Documentation

◆ gInterfaceType

const char* gInterfaceType[]
static
Initial value:
=
{
[SBG_IF_TYPE_UNKNOW] = "unknown",
[SBG_IF_TYPE_SERIAL] = "serial",
[SBG_IF_TYPE_ETH_UDP] = "eth UDP",
[SBG_IF_TYPE_ETH_TCP_IP] = "eth TCP",
[SBG_IF_TYPE_FILE] = "file"
}
#define SBG_IF_TYPE_FILE
Definition: sbgInterface.h:50
#define SBG_IF_TYPE_ETH_UDP
Definition: sbgInterface.h:48
#define SBG_IF_TYPE_SERIAL
Definition: sbgInterface.h:47
#define SBG_IF_TYPE_ETH_TCP_IP
Definition: sbgInterface.h:49
#define SBG_IF_TYPE_UNKNOW
Definition: sbgInterface.h:46

Definition at line 11 of file sbgInterface.c.



sbg_driver
Author(s): SBG Systems
autogenerated on Sat Sep 3 2022 02:53:36