From: baobrien Date: Mon, 5 Dec 2016 01:47:56 +0000 (+0000) Subject: Added start of TDMA work X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=9ee3a2297c0b0529e97532515479a2f155241236;p=freetel-svn-tracking.git Added start of TDMA work git-svn-id: https://svn.code.sf.net/p/freetel/code@2924 01035d8c-6547-0410-b346-abe4f91aad63 --- diff --git a/codec2-dev/src/tdma.h b/codec2-dev/src/tdma.h new file mode 100644 index 00000000..ec7f54aa --- /dev/null +++ b/codec2-dev/src/tdma.h @@ -0,0 +1,53 @@ +/*---------------------------------------------------------------------------*\ + + FILE........: tdma.h + AUTHOR......: Brady O'Brien + DATE CREATED: 18 September 2016 + + Skeletion of the API for the TDMA FSK modem + +\*---------------------------------------------------------------------------*/ + +/* + Copyright (C) 2016 Brady O'Brien + + All rights reserved. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU Lesser General Public License version 2.1, as + published by the Free Software Foundation. This program is + distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + License for more details. + + You should have received a copy of the GNU Lesser General Public License + along with this program; if not, see . +*/ + + +#include "fsk.h" +#include "freedv_vhf_framing.h" + +/* The state for an individual slot */ +enum slot_state { + rx_no_sync, /* Not synched */ + rx_sync, /* Sunk */ + tx_client, /* TX but timed from a different master */ + tx_master +}; + +/* The state of the entire TDMA modem */ +enum tdma_state { + no_sync, /* No sync */ + pilot_sync, /* Pilot modem has gotten sync, but slots haven't*/ + slot_sync, /* One or more slots are sunk */ +}; + +/* TDMA slot struct */ + +struct TDMA_SLOT { + struct FSK * fsk; /* The FSK modem for this slot */ + enum slot_state state; +}; +