glhal/win_xp/glgps_hal_init.cpp File Reference

Windows HAL sample code: init and basic config structure. More...

#include "glgps_hal_win_xp.h"
#include <stdlib.h>
#include <stdio.h>
#include <Winreg.h>
#include <shlobj.h>
#include "glgps_hal_gpio.h"
#include "glgps_hal_win_const.h"
#include "glgps_hal_sensors_win_xp.h"
#include <string>
#include <algorithm>
#include <windows.h>
Include dependency graph for glgps_hal_init.cpp:

Functions

void stack_repaint ()
 /file Initialization of the Windows HAL
GpsHalGpsHalCreateHal ()
 Creates HAL layer In this function the application can perform any needed initialization of the HAL.
void GpsHalInit (GpsHal *pHal)
 Initialize the HAL before first use.
void GpsHalDestroy (GpsHal *pHal)
 Destroys HAL; in this function the application can clean up the HAL as needed.
short GpsHalOpen (GpsHal *pHal)
 Opens GPS HAL.
void GpsHalClose (GpsHal *pHal)
 Closes GPS HAL This is where serial port is closed, TCXO power turned off, ASIC turned off.
void GpsHalCloseLog (GpsHal *pHal)
 The session has ended the log file can be closed.
static void GpsHalPlatfSetCfgValue (GpsHal *pHal, const plain_char *pcAttrName, const plain_char *pcValue)
 Sets the value of the parameter not recognized by the HAL config parser This the the Platform-specific parser a try.
void GpsHalSetCfgValue (GpsHal *pHal, const plain_char *pcAttrName, const plain_char *pcValue)
 Sets the value of the parameter not recognized by the GLCT config parser.

Detailed Description

Windows HAL sample code: init and basic config structure.


Function Documentation

void GpsHalClose ( GpsHal pHal)

Closes GPS HAL This is where serial port is closed, TCXO power turned off, ASIC turned off.

Parameters:
pHalHandle to HAL instance retrieved through prior call to GpsHalCreateHal().
Precondition:
pHal != NULL
GpsHal* GpsHalCreateHal ( void  )

Creates HAL layer In this function the application can perform any needed initialization of the HAL.

Returns:
valid pointer to GpsHalConfig structure, NULL in case of failure.
Remarks:
It is important to realize that the the Glct expects to be able to write hal configuration information to the address pointed to by the return value before GpsHalInit() is being called. After that, it does not attempt to interpret or change the content of memory being pointed at anymore, but blindly passes it back to the HAL implementation.
void GpsHalDestroy ( GpsHal pHal)

Destroys HAL; in this function the application can clean up the HAL as needed.

Parameters:
pHalHandle to HAL instance retrieved through prior call to GpsHalCreateHal().
Precondition:
pHal != NULL
void GpsHalInit ( GpsHal pHal)

Initialize the HAL before first use.

Prepares HAL to be opened.

short GpsHalOpen ( GpsHal pHal)

Opens GPS HAL.

This is where serial port is opened, TCXO power turned on, ASIC turned on.

Parameters:
pHalHandle to HAL instance retrieved through prior call to GpsHalCreateHal().
Return values:
0if success, non-zero otherwise
Precondition:
pHal != NULL
void GpsHalSetCfgValue ( GpsHal pHal,
const plain_char *  pcAttrName,
const plain_char *  pcValue 
)

Sets the value of the parameter not recognized by the GLCT config parser.

Parameters:
pHalHandle to HAL instance retrieved through prior call to GpsHalCreateHal().
pcAttrNameTODO: comment pcAttrName
pcValueTODO: comment pcValue
Precondition:
pHal != NULL
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines