Hermes
 All Data Structures Files Functions Variables Macros Pages
AIS.c File Reference
#include "../h/Marine/AIS.h"
#include "../h/Utilities/Utilities.h"
#include "../h/SessionParameters.h"
#include <funcapi.h>
#include <access/htup_details.h>
#include <utils/builtins.h>
Include dependency graph for AIS.c:

Macros

#define BITS_PER_BYTE   8
 
#define NMEA_MAX   91
 
#define AIS_SHIPNAME_MAXLEN   20
 
#define AIS_NR_FIELDS   7
 

Functions

int32 computeAISChecksum (const char *ais)
 
PGDLLEXPORT Datum computeAISChecksumV1 (PG_FUNCTION_ARGS)
 
 PG_FUNCTION_INFO_V1 (computeAISChecksumV1)
 
bool isAuxiliaryMMSI (int32 mmsi)
 
PGDLLEXPORT Datum isAuxiliaryMMSIV1 (PG_FUNCTION_ARGS)
 
 PG_FUNCTION_INFO_V1 (isAuxiliaryMMSIV1)
 
static int fields (const char *ais, char *field[])
 
static size_t bits (const char *data_payload, char buf[], size_t buf_size)
 
static uint64 ubits (char buf[], unsigned int start, unsigned int width)
 
static int64 sbits (char buf[], unsigned int start, unsigned int width)
 
static char * uchars (char bitvec[], unsigned int start, int count, bool xml)
 
PGDLLEXPORT Datum decodeAISXML (PG_FUNCTION_ARGS)
 
 PG_FUNCTION_INFO_V1 (decodeAISXML)
 
PGDLLEXPORT Datum decodeAIS (PG_FUNCTION_ARGS)
 
 PG_FUNCTION_INFO_V1 (decodeAIS)
 
PGDLLEXPORT Datum decodeAISPositionReport (PG_FUNCTION_ARGS)
 
 PG_FUNCTION_INFO_V1 (decodeAISPositionReport)
 
PGDLLEXPORT Datum decodeAISStaticData (PG_FUNCTION_ARGS)
 
 PG_FUNCTION_INFO_V1 (decodeAISStaticData)
 

Macro Definition Documentation

#define AIS_NR_FIELDS   7
#define AIS_SHIPNAME_MAXLEN   20
#define BITS_PER_BYTE   8

Referenced by ubits().

#define NMEA_MAX   91

Function Documentation

static size_t bits ( const char *  data_payload,
char  buf[],
size_t  buf_size 
)
static

References i(), and j.

Referenced by decodeAIS(), decodeAISPositionReport(), decodeAISStaticData(), and decodeAISXML().

Here is the call graph for this function:

int32 computeAISChecksum ( const char *  ais)

References i().

Referenced by computeAISChecksumV1().

Here is the call graph for this function:

PGDLLEXPORT Datum computeAISChecksumV1 ( PG_FUNCTION_ARGS  )

References computeAISChecksum().

Here is the call graph for this function:

PGDLLEXPORT Datum decodeAIS ( PG_FUNCTION_ARGS  )

References AIS_NR_FIELDS, bits(), fields(), and ubits().

Here is the call graph for this function:

PGDLLEXPORT Datum decodeAISPositionReport ( PG_FUNCTION_ARGS  )

References AIS_NR_FIELDS, bits(), fields(), sbits(), and ubits().

Here is the call graph for this function:

PGDLLEXPORT Datum decodeAISStaticData ( PG_FUNCTION_ARGS  )

References AIS_NR_FIELDS, AIS_SHIPNAME_MAXLEN, bits(), fields(), i(), ubits(), and uchars().

Here is the call graph for this function:

PGDLLEXPORT Datum decodeAISXML ( PG_FUNCTION_ARGS  )
static int fields ( const char *  ais,
char *  field[] 
)
static
bool isAuxiliaryMMSI ( int32  mmsi)

Referenced by decodeAISXML(), and isAuxiliaryMMSIV1().

PGDLLEXPORT Datum isAuxiliaryMMSIV1 ( PG_FUNCTION_ARGS  )

References isAuxiliaryMMSI().

Here is the call graph for this function:

PG_FUNCTION_INFO_V1 ( computeAISChecksumV1  )
PG_FUNCTION_INFO_V1 ( isAuxiliaryMMSIV1  )
PG_FUNCTION_INFO_V1 ( decodeAISXML  )
PG_FUNCTION_INFO_V1 ( decodeAIS  )
PG_FUNCTION_INFO_V1 ( decodeAISPositionReport  )
PG_FUNCTION_INFO_V1 ( decodeAISStaticData  )
static int64 sbits ( char  buf[],
unsigned int  start,
unsigned int  width 
)
static

References ubits().

Referenced by decodeAISPositionReport(), and decodeAISXML().

Here is the call graph for this function:

static uint64 ubits ( char  buf[],
unsigned int  start,
unsigned int  width 
)
static

References BITS_PER_BYTE, i(), and width().

Referenced by decodeAIS(), decodeAISPositionReport(), decodeAISStaticData(), decodeAISXML(), sbits(), and uchars().

Here is the call graph for this function:

static char* uchars ( char  bitvec[],
unsigned int  start,
int  count,
bool  xml 
)
static

References i(), j, and ubits().

Referenced by decodeAISStaticData(), and decodeAISXML().

Here is the call graph for this function: