diff options
author | vishal <vishal@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-12-14 13:53:41 +0000 |
---|---|---|
committer | vishal <vishal@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-12-14 13:53:41 +0000 |
commit | f7f41f9587d049f8bf971d895012fceddf7ff453 (patch) | |
tree | 85018ac5b34c1668c5326b4a6c4e38b137c04269 | |
parent | a4b3a568e5e038dff4e9d47f1feff9b0fffcf3b2 (diff) | |
download | ATCD-f7f41f9587d049f8bf971d895012fceddf7ff453.tar.gz |
*** empty log message ***
-rw-r--r-- | ChangeLog-99b | 8 | ||||
-rw-r--r-- | ace/OS.h | 51 | ||||
-rw-r--r-- | ace/OS.i | 109 |
3 files changed, 108 insertions, 60 deletions
diff --git a/ChangeLog-99b b/ChangeLog-99b index a8bd0bebcbb..f41865993c2 100644 --- a/ChangeLog-99b +++ b/ChangeLog-99b @@ -1,3 +1,11 @@ +Tue Dec 14 07:49:58 1999 Vishal Kachroo <vishal@cs.wustl.edu> + + * ace/OS.i: + * ace/OS.h: Extended the ACE_Flow_Spec and ACE_QoS classes to + accommodate the use of such classes for non-Win32 + platforms. These changes are motivated by the new ACE QoS + classes that will soon be included with ACE. + Mon Dec 13 16:23:22 1999 Nanbor Wang <nanbor@cs.wustl.edu> * ace/Malloc.{h,cpp}: Made print_alignment_info available for all @@ -5254,44 +5254,60 @@ public: // Constructor that initializes all the fields. // = Get/set the token rate in bytes/sec. - u_long token_rate (void); + u_long token_rate (void) const; void token_rate (u_long tr); // = Get/set the token bucket size in bytes. - u_long token_bucket_size (void); + u_long token_bucket_size (void) const; void token_bucket_size (u_long tbs); // = Get/set the PeakBandwidth in bytes/sec. - u_long peak_bandwidth (void); + u_long peak_bandwidth (void) const; void peak_bandwidth (u_long pb); // = Get/set the latency in microseconds. - u_long latency (void); + u_long latency (void) const; void latency (u_long l); // = Get/set the delay variation in microseconds. - u_long delay_variation (void); + u_long delay_variation (void) const; void delay_variation (u_long dv); // = Get/set the service type. - ACE_SERVICE_TYPE service_type (void); + ACE_SERVICE_TYPE service_type (void) const; void service_type (ACE_SERVICE_TYPE st); // = Get/set the maximum SDU size in bytes. - u_long max_sdu_size (void); + u_long max_sdu_size (void) const; void max_sdu_size (u_long mss); // = Get/set the minimum policed size in bytes. - u_long minimum_policed_size (void); + u_long minimum_policed_size (void) const; void minimum_policed_size (u_long mps); // = Get/set the time-to-live. - int ttl (void); + int ttl (void) const; void ttl (int t); // = Get/set the priority. - int priority (void); + int priority (void) const; void priority (int p); + +#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) +#else +private: + u_long token_rate_; + u_long token_bucket_size_; + u_long peak_bandwidth_; + u_long latency_; + u_long delay_variation_; + ACE_SERVICE_TYPE service_type_; + u_long max_sdu_size_; + u_long minimum_policed_size_; + int ttl_; + int priority_; +#endif + }; #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) @@ -5305,16 +5321,25 @@ class ACE_Export ACE_QoS // information, which is used by IntServ (RSVP) and DiffServ. public: // = Get/set the flow spec for data sending. - ACE_Flow_Spec sending_flowspec (void); + ACE_Flow_Spec sending_flowspec (void) const; void sending_flowspec (const ACE_Flow_Spec &fs); // = Get/set the flow spec for data receiving. - ACE_Flow_Spec receiving_flowspec (void); + ACE_Flow_Spec receiving_flowspec (void) const; void receiving_flowspec (const ACE_Flow_Spec &fs); // = Get/set the provider specific information. - iovec provider_specific (void); + iovec provider_specific (void) const; void provider_specific (const iovec &ps); + +#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) +#else +private: + + ACE_Flow_Spec sending_flowspec_; + ACE_Flow_Spec receiving_flowspec_; +#endif + }; class ACE_Export ACE_QoS_Params @@ -4668,7 +4668,6 @@ ACE_Flow_Spec::ACE_Flow_Spec (u_long token_rate, int ttl, int priority) { - ACE_UNUSED_ARG (priority); #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) this->TokenRate = token_rate; this->TokenBucketSize = token_bucket_size; @@ -4685,16 +4684,20 @@ ACE_Flow_Spec::ACE_Flow_Spec (u_long token_rate, ACE_UNUSED_ARG (minimum_policed_size); #endif /* ACE_HAS_WINSOCK2_GQOS */ ACE_UNUSED_ARG (ttl); + ACE_UNUSED_ARG (priority); #else - ACE_UNUSED_ARG (token_rate); - ACE_UNUSED_ARG (token_bucket_size); - ACE_UNUSED_ARG (peak_bandwidth); - ACE_UNUSED_ARG (latency); - ACE_UNUSED_ARG (delay_variation); - ACE_UNUSED_ARG (service_type); - ACE_UNUSED_ARG (max_sdu_size); - ACE_UNUSED_ARG (minimum_policed_size); - ACE_UNUSED_ARG (ttl); + + this->token_rate_ = token_rate; + this->token_bucket_size_ = token_bucket_size; + this->peak_bandwidth_ = peak_bandwidth; + this->latency_ = latency; + this->delay_variation_ = delay_variation; + this->service_type_ = service_type; + this->max_sdu_size_ = max_sdu_size; + this->minimum_policed_size_ = minimum_policed_size; + this->ttl_ = ttl; + this->priority_ = priority; + #endif /* defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) */ } @@ -4713,16 +4716,28 @@ ACE_Flow_Spec::ACE_Flow_Spec (void) this->MinimumPolicedSize = 0; #endif /* ACE_HAS_WINSOCK2_GQOS */ #else + + this->token_rate_ = 0; + this->token_bucket_size_ = 0; + this->peak_bandwidth_ = 0; + this->latency_ = 0; + this->delay_variation_ = 0; + this->service_type_ = 0; + this->max_sdu_size_ = 0; + this->minimum_policed_size_ = 0; + this->ttl_ = 0; + this->priority_ = 0; + #endif /* defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) */ } ACE_INLINE u_long -ACE_Flow_Spec::token_rate (void) +ACE_Flow_Spec::token_rate (void) const { #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) return this->TokenRate; #else - ACE_NOTSUP_RETURN (0); + return this->token_rate_; #endif /* ACE_HAS_WINSOCK2 */ } @@ -4732,17 +4747,17 @@ ACE_Flow_Spec::token_rate (u_long tr) #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) this->TokenRate = tr; #else - ACE_UNUSED_ARG (tr); + this->token_rate_ = tr; #endif /* ACE_HAS_WINSOCK2 */ } ACE_INLINE u_long -ACE_Flow_Spec::token_bucket_size (void) +ACE_Flow_Spec::token_bucket_size (void) const { #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) return this->TokenBucketSize; #else - ACE_NOTSUP_RETURN (0); + return this->token_bucket_size_; #endif /* ACE_HAS_WINSOCK2 */ } @@ -4752,17 +4767,17 @@ ACE_Flow_Spec::token_bucket_size (u_long tbs) #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) this->TokenBucketSize = tbs; #else - ACE_UNUSED_ARG (tbs); + this->token_bucket_size_ = tbs; #endif /* ACE_HAS_WINSOCK2 */ } ACE_INLINE u_long -ACE_Flow_Spec::peak_bandwidth (void) +ACE_Flow_Spec::peak_bandwidth (void) const { #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) return this->PeakBandwidth; #else - ACE_NOTSUP_RETURN (0); + return this->peak_bandwidth_; #endif /* ACE_HAS_WINSOCK2 */ } @@ -4772,17 +4787,17 @@ ACE_Flow_Spec::peak_bandwidth (u_long pb) #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) this->PeakBandwidth = pb; #else - ACE_UNUSED_ARG (pb); + this->peak_bandwidth_ = pb; #endif /* ACE_HAS_WINSOCK2 */ } ACE_INLINE u_long -ACE_Flow_Spec::latency (void) +ACE_Flow_Spec::latency (void) const { #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) return this->Latency; #else - ACE_NOTSUP_RETURN (0); + return this->latency_; #endif /* ACE_HAS_WINSOCK2 */ } @@ -4792,17 +4807,17 @@ ACE_Flow_Spec::latency (u_long l) #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) this->Latency = l; #else - ACE_UNUSED_ARG (l); + this->latency_ = l; #endif /* ACE_HAS_WINSOCK2 */ } ACE_INLINE u_long -ACE_Flow_Spec::delay_variation (void) +ACE_Flow_Spec::delay_variation (void) const { #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) return this->DelayVariation; #else - ACE_NOTSUP_RETURN (0); + return this->delay_variation_; #endif /* ACE_HAS_WINSOCK2 */ } ACE_INLINE void @@ -4811,18 +4826,18 @@ ACE_Flow_Spec::delay_variation (u_long dv) #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) this->DelayVariation = dv; #else - ACE_UNUSED_ARG (dv); + this->delay_variation_ = dv; #endif /* ACE_HAS_WINSOCK2 */ } ACE_INLINE ACE_SERVICE_TYPE -ACE_Flow_Spec::service_type (void) +ACE_Flow_Spec::service_type (void) const { #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) && \ defined (ACE_HAS_WINSOCK2_GQOS) return this->ServiceType; #else - ACE_NOTSUP_RETURN (0); + return this->service_type_; #endif /* ACE_HAS_WINSOCK2 */ } @@ -4833,18 +4848,18 @@ ACE_Flow_Spec::service_type (ACE_SERVICE_TYPE st) defined (ACE_HAS_WINSOCK2_GQOS) this->ServiceType = st; #else - ACE_UNUSED_ARG (st); + this->service_type_ = st; #endif /* ACE_HAS_WINSOCK2 */ } ACE_INLINE u_long -ACE_Flow_Spec::max_sdu_size (void) +ACE_Flow_Spec::max_sdu_size (void) const { #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) && \ defined (ACE_HAS_WINSOCK2_GQOS) return this->MaxSduSize; #else - ACE_NOTSUP_RETURN (0); + return this->max_sdu_size_; #endif /* ACE_HAS_WINSOCK2 */ } @@ -4855,18 +4870,18 @@ ACE_Flow_Spec::max_sdu_size (u_long mss) defined (ACE_HAS_WINSOCK2_GQOS) this->MaxSduSize = mss; #else - ACE_UNUSED_ARG (mss); + this->max_sdu_size_ = mss; #endif /* ACE_HAS_WINSOCK2 */ } ACE_INLINE u_long -ACE_Flow_Spec::minimum_policed_size (void) +ACE_Flow_Spec::minimum_policed_size (void) const { #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) && \ defined (ACE_HAS_WINSOCK2_GQOS) return this->MinimumPolicedSize; #else - ACE_NOTSUP_RETURN (0); + return this->minimum_policed_size_; #endif /* ACE_HAS_WINSOCK2 */ } @@ -4877,18 +4892,18 @@ ACE_Flow_Spec::minimum_policed_size (u_long mps) defined (ACE_HAS_WINSOCK2_GQOS) this->MinimumPolicedSize = mps; #else - ACE_UNUSED_ARG (mps); + this->minimum_policed_size_ = mps; #endif /* ACE_HAS_WINSOCK2 */ } ACE_INLINE int -ACE_Flow_Spec::ttl (void) +ACE_Flow_Spec::ttl (void) const { #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) && \ defined (ACE_HAS_WINSOCK2_GQOS) ACE_NOTSUP_RETURN (-1); #else - ACE_NOTSUP_RETURN (-1); + return this->ttl_; #endif /* ACE_HAS_WINSOCK2 */ } @@ -4900,18 +4915,18 @@ ACE_Flow_Spec::ttl (int t) ACE_UNUSED_ARG (t); // TBD... #else - ACE_UNUSED_ARG (t); + this->ttl_ = t; #endif /* ACE_HAS_WINSOCK2 */ } ACE_INLINE int -ACE_Flow_Spec::priority (void) +ACE_Flow_Spec::priority (void) const { #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) && \ defined (ACE_HAS_WINSOCK2_GQOS) ACE_NOTSUP_RETURN (-1); #else - ACE_NOTSUP_RETURN (-1); + return this->priority_; #endif /* ACE_HAS_WINSOCK2 */ } @@ -4923,17 +4938,17 @@ ACE_Flow_Spec::priority (int p) ACE_UNUSED_ARG (p); // TBD... #else - ACE_UNUSED_ARG (p); + this->priority_ = p; #endif /* ACE_HAS_WINSOCK2 */ } ACE_INLINE ACE_Flow_Spec -ACE_QoS::sending_flowspec (void) +ACE_QoS::sending_flowspec (void) const { #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) return (ACE_Flow_Spec &) this->SendingFlowspec; #else - ACE_NOTSUP_RETURN (ACE_Flow_Spec ()); + return this->sending_flowspec_; #endif /* ACE_HAS_WINSOCK2 */ } @@ -4943,17 +4958,17 @@ ACE_QoS::sending_flowspec (const ACE_Flow_Spec &fs) #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) this->SendingFlowspec = (FLOWSPEC) fs; #else - ACE_UNUSED_ARG (fs); + this->sending_flowspec_ = fs; #endif /* ACE_HAS_WINSOCK2 */ } ACE_INLINE ACE_Flow_Spec -ACE_QoS::receiving_flowspec (void) +ACE_QoS::receiving_flowspec (void) const { #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) return (ACE_Flow_Spec &) this->ReceivingFlowspec; #else - ACE_NOTSUP_RETURN (ACE_Flow_Spec ()); + return receiving_flowspec_; #endif /* ACE_HAS_WINSOCK2 */ } @@ -4963,12 +4978,12 @@ ACE_QoS::receiving_flowspec (const ACE_Flow_Spec &fs) #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) this->ReceivingFlowspec = (FLOWSPEC) fs; #else - ACE_UNUSED_ARG (fs); + this->receiving_flowspec_ = fs; #endif /* ACE_HAS_WINSOCK2 */ } ACE_INLINE iovec -ACE_QoS::provider_specific (void) +ACE_QoS::provider_specific (void) const { #if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) return (iovec &) this->ProviderSpecific; |