Home Libraries Author Links

msgtimestamp.hpp

Go to the documentation of this file.
00001 /* ***** BEGIN LICENSE BLOCK *****
00002  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00003  *
00004  * The contents of this file are subject to the Mozilla Public License Version
00005  * 1.1 (the "License"); you may not use this file except in compliance with
00006  * the License. You may obtain a copy of the License at
00007  * http://www.mozilla.org/MPL/
00008  *
00009  * Software distributed under the License is distributed on an "AS IS" basis,
00010  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00011  * for the specific language governing rights and limitations under the
00012  * License.
00013  *
00014  * The Original Code is the SysToMath C++ Libraries package (LibStmCpp).
00015  *
00016  * The Initial Developer of the Original Code is
00017  * Tom Michaelis, SysToMath.
00018  * Portions created by the Initial Developer are Copyright (C) 2003-2006
00019  * the Initial Developer. All Rights Reserved.
00020  *
00021  * Contributor(s):
00022  *
00023  * Alternatively, the contents of this file may be used under the terms of
00024  * either the GNU General Public License Version 2 or later (the "GPL"), or
00025  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00026  * in which case the provisions of the GPL or the LGPL are applicable instead
00027  * of those above. If you wish to allow use of your version of this file only
00028  * under the terms of either the GPL or the LGPL, and not to allow others to
00029  * use your version of this file under the terms of the MPL, indicate your
00030  * decision by deleting the provisions above and replace them with the notice
00031  * and other provisions required by the GPL or the LGPL. If you do not delete
00032  * the provisions above, a recipient may use your version of this file under
00033  * the terms of any one of the MPL, the GPL or the LGPL.
00034  *
00035  * ***** END LICENSE BLOCK ***** */
00036 
00037 /******************************************************************************
00038  *                            First Release 2003-03-15
00039  ******************************************************************************/
00040 
00041 
00079 #ifndef STM_TOOLAIDS_MSGTIMESTAMP_HPP
00080 #define STM_TOOLAIDS_MSGTIMESTAMP_HPP
00081 
00082 
00083 // Include header files for implementation.
00084 #include <stm/toolaids/impl/xmsgtimestamp.hpp>
00085 
00086 
00087 // Include MsgTimestamp base class template implementation.
00088 #include <stm/toolaids/impl/xmsgtimestamp.hpp>
00089 
00090 
00091 namespace stm
00092 {
00093 
00094 
00095 namespace tools
00096 {
00097 
00098 
00103 
00104 
00105 class MsgTimestamp : private local::xMsgTimestamp
00106 {
00107 public:
00109     enum
00110     {
00111         Invalid      = MsgTimestampImpl::Invalid,
00112         Udp          = MsgTimestampImpl::Udp,
00113         Fpga         = MsgTimestampImpl::Fpga
00114     };
00115 
00117     MsgTimestamp ();
00118 
00120     void assign
00121     (
00122         word bfn,
00123         dword boardTimeSec,
00124         word boardTimeMs,
00125         dword seqNo
00126     );
00127 
00129     void assign
00130     (
00131         word bfn,
00132         byte slot,
00133         word chip,
00134         bool hsTadsib = false
00135     );
00136 
00138     bool valid () const;
00139 
00142     bool isUdp () const;
00143 
00145     //  timing data, else false.
00146     bool isFpga () const;
00147 
00149     byte status () const;
00150 
00152     word bfn () const;
00153 
00156     byte slot () const;
00157 
00160     word chip () const;
00161 
00164     dword boardTimeSec () const;
00165 
00168     word boardTimeMs () const;
00169 
00172     dword seqNo () const;
00173 
00176     bool hsTadsib () const;
00177 };
00178 
00179 
00183 }  // namespace tools.
00184 
00185 
00186 }  // namespace stm.
00187 
00188 
00189 // Include inline implementation.
00190 #include <stm/toolaids/impl/xmsgtimestamp.hpp>
00191 
00192 
00193 #endif  // STM_TOOLAIDS_MSGTIMESTAMP_HPP

© Copyright Tom Michaelis 2002-2007

Distributed under the SysToMath Software License (See the accompanying file license.txt or a copy at www.SysToMath.com).