/**************************************************************************** * Signal Sink Module for the Real-time BBC Codec/Modem * **************************************************************************** * William L. Bahn * * Academy Center for Information Security * * Department of Computer Science * * United States Air Force Academy * * USAFA, CO 80840 * **************************************************************************** * FILE:............ sink.h * * DATE CREATED:.... 08 SEP 07 * * DATE MODIFIED:... 08 SEP 07 * **************************************************************************** * * REVISION HISTORY * **************************************************************************** * * DESCRIPTION * * This module supports the signal sink for both the TX and the RX * */ #ifndef SINKdotH #define SINKdotH //------------------------------------------------------------------------ // REQUIRED INCLUDES //------------------------------------------------------------------------ #include "config.h" #include "dirtyd.h" //------------------------------------------------------------------------ // STRUCTURE DECLARATIONS //------------------------------------------------------------------------ typedef struct SINK SINK; //------------------------------------------------------------------------ // STRUCTURE DEFINITIONS //------------------------------------------------------------------------ // NOTE: Normally the structure definition would be in the *.c file to make // the structure members inaccessible to outside functions except through // public function calls. But for the real-time code it has been decided // to make the structure members directly visible to the functions that // manipulate them. struct SINK { FILE *fp; int streaming; DWORD samples; DWORD sample_size_bytes; DWORD sample_limit; BYTE *v; size_t buffer_size; }; //------------------------------------------------------------------------ // PUBLIC FUNCTION PROTOTYPES //------------------------------------------------------------------------ SINK *SINK_Del(SINK *p); SINK *SINK_New(CONFIG *config, DWORD *errcode); void SINK_Purge(CONFIG *config, SINK *p); //------------------------------------------------------------------------ #endif