00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef WIFI_TIMESTAMP_HH_
00023 # define WIFI_TIMESTAMP_HH_
00024
00025 # include <boost/array.hpp>
00026
00027 extern "C"
00028 {
00029 # include <inttypes.h>
00030 }
00031
00032 # include <ostream>
00033
00034 namespace wifi
00035 {
00036
00038 struct timestamp
00039 {
00040 enum { size = 8 };
00041
00043 timestamp();
00044
00046 timestamp(uint32_t hi, uint32_t lo);
00047
00049
00050 bool operator == (const timestamp&) const;
00051 bool operator != (const timestamp&) const;
00052 bool operator < (const timestamp&) const;
00054
00056 std::ostream& print(std::ostream&) const;
00057
00058 private:
00059 typedef boost::array<uint8_t, size> digits_t;
00060
00061 digits_t digits_;
00062 };
00063
00065 std::ostream&
00066 operator << (std::ostream&, const timestamp&);
00067
00068 }
00069
00070 # include "timestamp.hxx"
00071
00072 #endif // ! WIFI_TIMESTAMP_HH_