Main Page | Alphabetical List | Data Structures | File List | Globals | Related Pages

dbio.h File Reference

include file of dbio.c More...

#include "ExgMgr.h"
#include "sections.h"

Go to the source code of this file.

Functions

Err SetRecord (VoidHand RecH, void *p, ULong l, DmOpenRef DB, UInt pos, UInt Category) IO_SECTION
 Writes a record contents and attributes.

Err put_trk (GarminObject *p, UInt total, UInt current, LocalFormatID format, unsigned char size) IO_SECTION
 Callback to store tracks in the current tracks data base.

Garmin_Packet * get_next_packet (UInt current) IO_SECTION
Err put_packet (Garmin_Packet *p, UInt current) IO_SECTION
Err put_wpt (GarminObject *p, UInt total, UInt current, LocalFormatID format, unsigned char size) IO_SECTION
 stores a raw waypoint in waypoint data base.

Err put_rte (GarminObject *p, UInt total, UInt current, LocalFormatID format, unsigned char size) IO_SECTION
 Callback to store a route in the current routes data base.

GarminObject * get_next_wpt (UInt current, LocalFormatID format, unsigned char *size) IO_SECTION
 Extracts next waypoint from current wpt category and converts it to specified format.

GarminObject * get_next_trk (UInt current, LocalFormatID format, unsigned char *size, Boolean *eot) IO_SECTION
 Extracts next element of track from current data base record.

GarminObject * get_next_rte (UInt current, LocalFormatID format, unsigned char *size, Boolean *header, Boolean *eor) IO_SECTION
 Extracts next sequential route item from current route data base.

char * get_next_full_rte (UInt current) IO_SECTION
 Return next route in Furuno format.

void CleanUpTracks (void) IO_SECTION
 Cleaning of tracks.

UInt init_active_trk (void) IO_SECTION
 Creates and initialises an active track in the current track data base.

void push_active_trkpt (Custom_Trk_Point_Type trkpt) IO_SECTION
 Pushes a track point in the active track.

Err SetCategory (DmOpenRef DB, UInt index, UInt Category) IO_SECTION
 Sets a record's category and dmRecAttrDirty flag.

Err BeamReceive (ExgSocketPtr sockp, DmOpenRef DB) IO_SECTION
void InitObject (Object *op) IO_SECTION
 Initializes an object.

char * Furuno_get_next_wpt (UInt current) IO_SECTION
 Extracts next waypoint from current wpt category and converts it to Furuno format.


Detailed Description

include file of dbio.c

Author:
C. Claveleira
Date:
1999-2004

Function Documentation

void CleanUpTracks void   ) 
 

Cleaning of tracks.

Check tracks to recover unused space in case of interrupted transfers.

Returns:
nothing
Bug:
: should use d.CustTrkHdr.number

char* Furuno_get_next_wpt UInt  current  ) 
 

Extracts next waypoint from current wpt category and converts it to Furuno format.

Parameters:
current number of item (first=0)
Returns:
opinter on string in Furuno format

char* get_next_full_rte UInt  current  ) 
 

Return next route in Furuno format.

Parameters:
current number of item wanted
Returns:
pointer on string to send to gps

GarminObject* get_next_rte UInt  current,
LocalFormatID  format,
unsigned char *  size,
Boolean *  header,
Boolean *  eor
 

Extracts next sequential route item from current route data base.

The item is converted to specified format

Parameters:
current number of current item (header or waypoint, first=0)
format wanted format of route
size pointer on a byte to write returned object size
header pointer on a boolean set if item is a header
eor pointer on a boolean set if it's the last element
Returns:
pointer on converted item

GarminObject* get_next_trk UInt  current,
LocalFormatID  format,
unsigned char *  size,
Boolean *  eot
 

Extracts next element of track from current data base record.

Process each record of current category. Used as callback by gpslib

Parameters:
current index of current element (first=0)
format format of element requested
size pointer to store size of element returned
eot true if last element of current track
Returns:
pointer on element returned (Garmin format)

GarminObject* get_next_wpt UInt  current,
LocalFormatID  format,
unsigned char *  size
 

Extracts next waypoint from current wpt category and converts it to specified format.

Parameters:
current if 0, the first waypoint is returned
format wanted format of waypoint
size pointer on a byte to write returned object size
Returns:
pointer on converted waypoint

UInt init_active_trk void   ) 
 

Creates and initialises an active track in the current track data base.

The record has a particuliar name defined in ACTIVETRKNAME.

Returns:
index of record containing active track

void InitObject Object op  ) 
 

Initializes an object.

Clears the header and set version number.

Parameters:
op pointer on an object
Returns:
nothing

void push_active_trkpt Custom_Trk_Point_Type  trkpt  ) 
 

Pushes a track point in the active track.

The active track must be initialised.

Parameters:
trkpt pointer on the track point
Returns:
nothing

Err put_rte GarminObject *  p,
UInt  total,
UInt  current,
LocalFormatID  format,
unsigned char  size
 

Callback to store a route in the current routes data base.

Parameters:
p pointer on the raw object from the gps
total total count of items sent by gps
current number of current item (first=1)
format format of the object (route header or waypoint)
size size of object
Returns:
error code (0 if no error)

Err put_trk GarminObject *  p,
UInt  total,
UInt  current,
LocalFormatID  format,
unsigned char  size
 

Callback to store tracks in the current tracks data base.

Parameters:
p pointer on a raw track point or track header received from gps
total total count of items sent by gps
current current item number (first=1)
format format of the object received
size size of object
Returns:
error code (0 if no error)

Err put_wpt GarminObject *  p,
UInt  total,
UInt  current,
LocalFormatID  format,
unsigned char  size
 

stores a raw waypoint in waypoint data base.

Used as callback by gpslib

Parameters:
p pointer on a raw waypoint (as received from gps)
total total count of item sent by gps
current current item number
format format of waypoint
size size of waypoint
Returns:
0 if OK

Err SetCategory DmOpenRef  DB,
UInt  index,
UInt  Category
 

Sets a record's category and dmRecAttrDirty flag.

Parameters:
DB data base open reference
index index of the record
Category category to set the record into
Returns:
0 if OK

Err SetRecord VoidHand  RecH,
void *  p,
ULong  l,
DmOpenRef  DB,
UInt  pos,
UInt  Category
 

Writes a record contents and attributes.

Record is released on return.

Parameters:
RecH handle on the record (may be null)
p pointer on datas to put in record (if null the record is cleared)
l size of datas
DB pointer on an open data base
pos position of the record in the data base
Category category to put the record
Returns:
error code, 0 if no error


Generated on Sun Mar 13 09:36:01 2005 for GPilotS by doxygen 1.3.6