Functions
list.c File Reference
#include <stdlib.h>
#include "wge100_camera/list.h"
#include "wge100_camera/host_netutil.h"
Include dependency graph for list.c:

Go to the source code of this file.

Functions

int wge100CamListAdd (IpCamList *ipCamList, IpCamList *newItem)
void wge100CamListDelAll (IpCamList *ipCamList)
int wge100CamListDelEntry (IpCamList *ipCamList, int index)
int wge100CamListFind (IpCamList *ipCamList, uint32_t serial)
IpCamListwge100CamListGetEntry (const IpCamList *ipCamList, int index)
int wge100CamListInit (IpCamList *ipCamList)
int wge100CamListNumEntries (const IpCamList *ipCamList)

Function Documentation

int wge100CamListAdd ( IpCamList ipCamList,
IpCamList newItem 
)

Adds a new camera to camera list ipCamList if that serial number is not already in the list.

Parameters:
ipCamListPointer to the IpCamList head
newItemPointer to an IpCamList structure that describes the new camera
Returns:
Returns CAMLIST_ADD_OK if the camera was added to the list, or CAMLIST_ADD_DUP if it was a duplicate.

Definition at line 65 of file list.c.

void wge100CamListDelAll ( IpCamList ipCamList)

Utility function to remove all entries from a camera list.

Parameters:
ipCamListPointer to the camera list head
Returns:
Returns 0 if successful.

Definition at line 191 of file list.c.

int wge100CamListDelEntry ( IpCamList ipCamList,
int  index 
)

Utility function to remove a specific element number from the camera list.

Precondition:
index must be less than the value returned by wge100CamListNumEntries().
Parameters:
ipCamListPointer to the camera list head
indexNumber of the list element to remove (0..max)
Returns:
Returns 0 if successful, -1 if index was invalid

Definition at line 146 of file list.c.

int wge100CamListFind ( IpCamList ipCamList,
uint32_t  serial 
)

Utility function to locate a camera with a particular serial number in a list.

Parameters:
ipCamListPointer to the list head
serialSerial number (not including product ID) to look for
Returns:
Returns the index of the camera, or -1 if not found

Definition at line 96 of file list.c.

IpCamList* wge100CamListGetEntry ( const IpCamList ipCamList,
int  index 
)

Utility function to return a specific element number from the camera list.

Precondition:
index must be less than the value returned by wge100CamListNumEntries(). If it is greater, then the last element in the list will be returned.
Parameters:
ipCamListPointer to the camera list head
indexNumber of the list element to returna (0..max)
Returns:
Returns a pointer to the requested list element

Definition at line 123 of file list.c.

int wge100CamListInit ( IpCamList ipCamList)

Initializes a new camera list using macros from list.h

Parameters:
ipCamListPointer to an IpCamList list element
Returns:
Always returns zero.

Definition at line 50 of file list.c.

int wge100CamListNumEntries ( const IpCamList ipCamList)

Utility function to determine the number of entries in an IpCamlist

Parameters:
ipCamListPointer to the list head to count.
Returns:
Returns the number of elements in the list

Definition at line 171 of file list.c.



wge100_camera
Author(s): Blaise Gassend, Patrick Mihelich, Eric MacIntosh, David Palchak
autogenerated on Sat Jun 8 2019 20:51:24