// $Id: pdinrs_buffer_config.h,v 1.5 2005/04/02 03:07:26 pdi Exp $
//*****************************************************************************
// Copyright 1998022 Stonie R. Cooper, Licensed under the auspices of GPLv3,
// See top-level copyright disclaimer (COPYRIGHT) and license (LICENSE)
// File:   stream_config.h    
// Author: Stonie R. Cooper
//         stonie.cooper@planetarydata.com                                           
// Revision Record:                                                           
//         Rewritten: 20050114 by Stonie R. Cooper
//                  - created file
//        Revision: 19981004.2126UTC by Stonie R. Cooper
//                  - renaming file and adding return codes
//*****************************************************************************

//*****************************************************************************
// This header file defines the configuration structures for the stream 
// manager.
//*****************************************************************************

#ifndef PDINRS_BUFFER_CONFIG_H
#define PDINRS_BUFFER_CONFIG_H

// include file listing - PDI derivated                                

#include <pdinrs.h>

#define  UNKNOWN_CARD      0
#define  ET_SERIAL_CARD    1
#define  PDI_SANGOMA       2
#define  BLIND_CHAR_DEVICE 3
#define  UDP               4
#define  RECORDING         5

#define  COMTECH           0

#define  NOVRA             0
#define  PENTAMEDIA        1
#define  LINUXTV           2

typedef enum {MAIN, DEMOD, BUFFER, STREAM, UNK} modetype;

typedef struct 
{
	char                label[81];
	char                monitorBlind;
  char                monitorPort[(MAXLINESIZE)];
  char                demodFrequency[(MAXLINESIZE)];
  char                demodCodeRate[(MAXLINESIZE)];
  char                demodDataRate[(MAXLINESIZE)];
  char                sweepReaquisitionTime[(MAXLINESIZE)];
  char                sweepWidthRange[(MAXLINESIZE)];
  char                differentialDecoderEnable[(MAXLINESIZE)];
  char                descramblerEnable[(MAXLINESIZE)];
  char                bitErrorRateThreshold[(MAXLINESIZE)];
  unsigned char       demodulatorType;
  char                receiveAisDataInhibit[(MAXLINESIZE)];
  char                groupLinkAddress[(MAXLINESIZE)];
  unsigned int        localLinkAddress;
  char                demodulatorSpectrumRotation[(MAXLINESIZE)];
  char                lnbLowCurrentThreshold[(MAXLINESIZE)];
  char                lnbHighCurrentThreshold[(MAXLINESIZE)];
  char                reedSolomonDecoderEnable[(MAXLINESIZE)];
  char                reedSolomonIValue[(MAXLINESIZE)];
  log_type            demodLog;
  log_type            demodErrorLog;
	char                serialCardType;
	char                serialCardSubType;
  char                highSpeedDataPortName[(MAXLINESIZE)];
  char                router[(MAXLINESIZE)];
  unsigned char       highSpeedDataPort;
  char                bufferFile[(MAXLINESIZE)];
  unsigned int   maxBufferSize;
  unsigned short int  hsspTimeOut;
  log_type            bufferLog;
  log_type            bufferErrorLog;
  user_interface_type *ui;
  restart_type        *restart;
  restart_type        *loggermutex;
  receiver_type       *demod;
  replayType          *replay;
} StreamConfigType;

int pdinrs_buffer_config(const char *file, 
		                     StreamConfigType *streamConfig,
												 const char *label);

#endif
