Note: Goby version 1 (shown here) is now considered obsolete. Please use version 2 for new projects, and consider upgrading old projects.

Goby Underwater Autonomy Project  Series: 1.1, revision: 163, released on 2013-02-06 14:23:27 -0500
acomms/libqueue/queue_constants.h
00001 // copyright 2009 t. schneider tes@mit.edu
00002 // 
00003 // this file is part of goby-acomms, a collection of libraries for acoustic underwater networking
00004 //
00005 // This program is free software: you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License as published by
00007 // the Free Software Foundation, either version 3 of the License, or
00008 // (at your option) any later version.
00009 //
00010 // This software is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU General Public License
00016 // along with this software.  If not, see <http://www.gnu.org/licenses/>.
00017 
00018 #ifndef QueueConstants20091205H
00019 #define QueueConstants20091205H
00020 
00021 #include "goby/util/time.h"
00022 #include "goby/acomms/acomms_constants.h"
00023 
00024 namespace goby
00025 {
00026     namespace acomms
00027     {
00028         // smallest allowed id - 0 is reserved for non-existent message
00029         const unsigned MIN_ID = 1;
00030         // largest allowed id 
00031         const unsigned MAX_ID = 1 << HEAD_DCCL_ID_SIZE;
00032         
00033         const unsigned MULTIMESSAGE_MASK = 1 << 7;
00034         const unsigned BROADCAST_MASK = 1 << 6;
00035         const unsigned VAR_ID_MASK = 0xFF ^ MULTIMESSAGE_MASK ^ BROADCAST_MASK;
00036 
00037         // number of bytes used to store the size of the following user frame
00038         const unsigned USER_FRAME_NEXT_SIZE_BYTES = 1;
00039         
00040         // how old an on_demand message can be before re-encoding
00041         const boost::posix_time::time_duration ON_DEMAND_SKEW = boost::posix_time::seconds(1);    
00042     }
00043 }
00044 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends