SELKIELogger  1.0.0
N2KClassify.c File Reference

Read N2K messages and summarise. More...

#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "SELKIELoggerBase.h"
#include "SELKIELoggerN2K.h"
#include "version.h"
Include dependency graph for N2KClassify.c:

Go to the source code of this file.

Macros

#define PGN_MAX   16777216
 Largest possible PGN value.
 
#define BUFSIZE   1024
 Allocated read buffer size.
 

Functions

int main (int argc, char *argv[])
 

Variables

int msgCount [PGN_MAX]
 

Detailed Description

Read N2K messages and summarise.

Definition in file N2KClassify.c.

Function Documentation

◆ main()

int main ( int  argc,
char *  argv[] 
)

Reads messages from file, and prints the number seen for each PGN number. Zero counts are suppressed.

Parameters
[in]argcArgument count
[in]argvArguments
Returns
-1 on error, otherwise 0

Definition at line 61 of file N2KClassify.c.

Variable Documentation

◆ msgCount

int msgCount[PGN_MAX]

Count of messages seen by PGN number

Could be smarter, but it's a relatively small amount of memory in the grand scheme of things.

Definition at line 51 of file N2KClassify.c.