Mobil_surveillance_system 1
Data Structures | Defines | Typedefs | Functions
GPSpacket.h File Reference

GPSpacket conatainer header file. More...

Go to the source code of this file.

Data Structures

struct  tUTC_time
 Type of UTC time. More...
struct  tPosition_LLA
 Type of the position. More...
struct  tGPSInfo
 Type of GPS packets. More...
struct  tGPSInfoArray
 Type of array of GPS packets. More...

Defines

#define DEFINE_TBOOLEAN
#define GPSINFO_ARRAY_SIZE   16
 the size of the tGPSInfoArray type in tGPSInfo type
#define GPS_INFO_QUEU_SIZE   100
 maximum size of the GPSInfo packets queue
#define UTC_TIME_SIZE   5
#define POSITION_LLA_SIZE   11
#define GPSINFO_SIZE   16

Typedefs

typedef unsigned char tBoolean

Functions

void GPSpacket_initGPSInfoArray (tGPSInfoArray *pGPSInfoArray)
void GPSpacket_clearGPSInofArray (tGPSInfoArray *pGPSInfoArray)
tGPSInfoGPSpacket_getGPSInfoArray (tGPSInfoArray *pGPSInfoArray)
void GPSpacket_pushGPSInfoArray (tGPSInfoArray *pGPSInfoArray, tGPSInfo *pGPSInfo)
tGPSInfo GPSpacket_popGPSInfoArray (tGPSInfoArray *pGPSInfoArray)

Detailed Description

GPSpacket conatainer header file.

This file contains the definitons of the tUTC_time, tPosition_LLA, tGPSInfo, tGPSInfoArray types. The file also contains the prototypes of the GPSpackets unit functions.

Definition in file GPSpacket.h.


Define Documentation

#define UTC_TIME_SIZE   5

Definitions of the sizes of my own types, because the function sizeof won't work propery when the size of the struct is an odd number.

Definition at line 37 of file GPSpacket.h.


Typedef Documentation

typedef unsigned char tBoolean

bool type defination

Definition at line 23 of file GPSpacket.h.


Function Documentation

void GPSpacket_clearGPSInofArray ( tGPSInfoArray pGPSInfoArray)
Parameters:
pGPSInfoArray

Definition at line 29 of file GPSpacket.c.

{
    unsigned int uiIdx;
    tGPSInfo tGPSInfoBlank = {'\0'};
    for(uiIdx = 0; uiIdx < pGPSInfoArray->uiIdx; uiIdx++){

        pGPSInfoArray->GPSInfoArray[uiIdx] = tGPSInfoBlank;

    }
    
    pGPSInfoArray->uiIdx = 0;
    pGPSInfoArray->uiCurrentSize = 1;
}
tGPSInfo* GPSpacket_getGPSInfoArray ( tGPSInfoArray pGPSInfoArray)
Parameters:
pGPSInfoArray
Returns:

Definition at line 46 of file GPSpacket.c.

{
    return pGPSInfoArray->GPSInfoArray;
}
void GPSpacket_initGPSInfoArray ( tGPSInfoArray pGPSInfoArray)
Parameters:
pGPSInfoArray

Definition at line 11 of file GPSpacket.c.

{
    unsigned int uiIdx;
    tGPSInfo tGPSInfoBlank = {'\0'};
    for(uiIdx = 0; uiIdx < 15; uiIdx++){

        pGPSInfoArray->GPSInfoArray[uiIdx] = tGPSInfoBlank;

    }

    pGPSInfoArray->uiIdx = 0;
    pGPSInfoArray->uiCurrentSize = 1;
    
}
tGPSInfo GPSpacket_popGPSInfoArray ( tGPSInfoArray pGPSInfoArray)
Parameters:
pGPSInfoArray,:
Returns:

Definition at line 63 of file GPSpacket.c.

{
    pGPSInfoArray->uiCurrentSize--;
    return pGPSInfoArray->GPSInfoArray[--pGPSInfoArray->uiIdx];
}
void GPSpacket_pushGPSInfoArray ( tGPSInfoArray pGPSInfoArray,
tGPSInfo pGPSInfo 
)
Parameters:
pGPSInfoArray
pGPSInfo

Definition at line 54 of file GPSpacket.c.

{
    pGPSInfoArray->GPSInfoArray[pGPSInfoArray->uiIdx++] =  *pGPSInfo;
    pGPSInfoArray->uiCurrentSize++;
}
 All Data Structures Files Functions Variables Typedefs Enumerations Defines