00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef PHY_EMPTY_HH_
00023 # define PHY_EMPTY_HH_
00024
00025 # include <wipal/phy/phy.hh>
00026
00027 namespace wpl
00028 {
00029
00030
00031 namespace phy
00032 {
00033 template <class B> struct empty_time;
00034 template <class B> struct empty_header;
00035 }
00036
00037
00038 namespace tool
00039 {
00040
00041 template <class B>
00042 struct types< phy::empty_time<B> >
00043 {
00044 struct impl_type {};
00045 };
00046
00047 template <class B>
00048 struct types< phy::empty_header<B> >
00049 {
00050 typedef phy::empty_time<bottom> time_type;
00051 };
00052
00053 }
00054
00055
00056 namespace phy
00057 {
00058
00059
00060
00061
00062
00069 template <class Bottom = tool::bottom>
00070 struct empty_time: WP_INHERIT(public time, empty_time<Bottom>)
00071 {
00072 typedef WP_GET_EXACT(Bottom, empty_time<Bottom>) exact_type;
00073 typedef WP_TYPE(impl_type, exact_type) impl_type;
00074
00075 impl_type get_impl() const;
00076 exact_type& increment(tool::microseconds microseconds);
00077 };
00078
00079
00080
00081
00082
00083
00089 template <class Bottom = tool::bottom>
00090 struct empty_header: WP_INHERIT(public header, empty_header<Bottom>)
00091 {
00092 typedef WP_GET_EXACT(Bottom, empty_header<Bottom>) exact_type;
00093 typedef WP_TYPE(time_type, exact_type) time_type;
00094
00095 size_t len_impl(size_t, bool) const;
00096 time_type time_get_impl(bool) const;
00097 void time_set_impl(const time_type&, bool);
00098
00099 template <class S1, class S2>
00100 static bool
00101 eq_time(const pkt::packet<S1>& lhs,
00102 const pkt::packet<S2>& rhs,
00103 const unsigned prec,
00104 const tool::end::endianness phy_end);
00105 };
00106
00107 }
00108
00109 }
00110
00111 # include "empty.hxx"
00112
00113 #endif // ! PHY_EMPTY_HH_