Public Member Functions | Private Attributes

ACE_Flow_Spec Class Reference

Wrapper class that defines the flow spec QoS information, which is used by IntServ (RSVP) and DiffServ. More...

#include <OS_QoS.h>

List of all members.

Public Member Functions

 ACE_Flow_Spec (void)
 Default constructor.
 ACE_Flow_Spec (unsigned long token_rate, unsigned long token_bucket_size, unsigned long peak_bandwidth, unsigned long latency, unsigned long delay_variation, ACE_SERVICE_TYPE service_type, unsigned long max_sdu_size, unsigned long minimum_policed_size, int ttl, int priority)
 Constructor that initializes all the fields.
unsigned long token_rate (void) const
 Get the token rate in bytes/sec.
void token_rate (unsigned long tr)
 Set the token rate in bytes/sec.
unsigned long token_bucket_size (void) const
 Get the token bucket size in bytes.
void token_bucket_size (unsigned long tbs)
 Set the token bucket size in bytes.
unsigned long peak_bandwidth (void) const
 Get the PeakBandwidth in bytes/sec.
void peak_bandwidth (unsigned long pb)
 Set the PeakBandwidth in bytes/sec.
unsigned long latency (void) const
 Get the latency in microseconds.
void latency (unsigned long l)
 Set the latency in microseconds.
unsigned long delay_variation (void) const
 Get the delay variation in microseconds.
void delay_variation (unsigned long dv)
 Set the delay variation in microseconds.
ACE_SERVICE_TYPE service_type (void) const
 Get the service type.
void service_type (ACE_SERVICE_TYPE st)
 Set the service type.
unsigned long max_sdu_size (void) const
 Get the maximum SDU size in bytes.
void max_sdu_size (unsigned long mss)
 Set the maximum SDU size in bytes.
unsigned long minimum_policed_size (void) const
 Get the minimum policed size in bytes.
void minimum_policed_size (unsigned long mps)
 Set the minimum policed size in bytes.
int ttl (void) const
 Get the time-to-live.
void ttl (int t)
 Set the time-to-live.
int priority (void) const
 Get the priority.
void priority (int p)
 Set the priority.

Private Attributes

unsigned long token_rate_
unsigned long token_bucket_size_
unsigned long peak_bandwidth_
unsigned long latency_
unsigned long delay_variation_
ACE_SERVICE_TYPE service_type_
unsigned long max_sdu_size_
unsigned long minimum_policed_size_
int ttl_
int priority_

Detailed Description

Wrapper class that defines the flow spec QoS information, which is used by IntServ (RSVP) and DiffServ.

Definition at line 163 of file OS_QoS.h.


Constructor & Destructor Documentation

ACE_Flow_Spec::ACE_Flow_Spec ( void   ) 

Default constructor.

Definition at line 62 of file OS_QoS.cpp.

{
#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) && \
    defined (ACE_HAS_WINSOCK2_GQOS)
  this->TokenRate = 0;
  this->TokenBucketSize = 0;
  this->PeakBandwidth = 0;
  this->Latency = 0;
  this->DelayVariation = 0;
#if defined(ACE_HAS_WINSOCK2_GQOS)
  this->ServiceType = 0;
  this->MaxSduSize = 0;
  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_Flow_Spec::ACE_Flow_Spec ( unsigned long  token_rate,
unsigned long  token_bucket_size,
unsigned long  peak_bandwidth,
unsigned long  latency,
unsigned long  delay_variation,
ACE_SERVICE_TYPE  service_type,
unsigned long  max_sdu_size,
unsigned long  minimum_policed_size,
int  ttl,
int  priority 
)

Constructor that initializes all the fields.

Definition at line 18 of file OS_QoS.cpp.

{
#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
  this->TokenRate = token_rate;
  this->TokenBucketSize = token_bucket_size;
  this->PeakBandwidth = peak_bandwidth;
  this->Latency = latency;
  this->DelayVariation = delay_variation;
#if defined(ACE_HAS_WINSOCK2_GQOS)
  this->ServiceType = service_type;
  this->MaxSduSize = max_sdu_size;
  this->MinimumPolicedSize = minimum_policed_size;
#else
  ACE_UNUSED_ARG (service_type);
  ACE_UNUSED_ARG (max_sdu_size);
  ACE_UNUSED_ARG (minimum_policed_size);
#endif /* ACE_HAS_WINSOCK2_GQOS */
  ACE_UNUSED_ARG (ttl);
  ACE_UNUSED_ARG (priority);
#else

  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) */
}


Member Function Documentation

unsigned long ACE_Flow_Spec::delay_variation ( void   )  const

Get the delay variation in microseconds.

Definition at line 173 of file OS_QoS.cpp.

{
#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
  return this->DelayVariation;
#else
  return this->delay_variation_;
#endif /* ACE_HAS_WINSOCK2 */
}

void ACE_Flow_Spec::delay_variation ( unsigned long  dv  ) 

Set the delay variation in microseconds.

Definition at line 182 of file OS_QoS.cpp.

{
#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
  this->DelayVariation = dv;
#else
  this->delay_variation_ = dv;
#endif /* ACE_HAS_WINSOCK2 */
}

void ACE_Flow_Spec::latency ( unsigned long  l  ) 

Set the latency in microseconds.

Definition at line 163 of file OS_QoS.cpp.

{
#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
  this->Latency = l;
#else
  this->latency_ = l;
#endif /* ACE_HAS_WINSOCK2 */
}

unsigned long ACE_Flow_Spec::latency ( void   )  const

Get the latency in microseconds.

Definition at line 153 of file OS_QoS.cpp.

{
#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
  return this->Latency;
#else
  return this->latency_;
#endif /* ACE_HAS_WINSOCK2 */
}

unsigned long ACE_Flow_Spec::max_sdu_size ( void   )  const

Get the maximum SDU size in bytes.

Definition at line 214 of file OS_QoS.cpp.

{
#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) && \
    defined (ACE_HAS_WINSOCK2_GQOS)
  return this->MaxSduSize;
#else
  return this->max_sdu_size_;
#endif /* ACE_HAS_WINSOCK2 */
}

void ACE_Flow_Spec::max_sdu_size ( unsigned long  mss  ) 

Set the maximum SDU size in bytes.

Definition at line 225 of file OS_QoS.cpp.

{
#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) && \
    defined (ACE_HAS_WINSOCK2_GQOS)
  this->MaxSduSize = mss;
#else
  this->max_sdu_size_ = mss;
#endif /* ACE_HAS_WINSOCK2 */
}

void ACE_Flow_Spec::minimum_policed_size ( unsigned long  mps  ) 

Set the minimum policed size in bytes.

Definition at line 247 of file OS_QoS.cpp.

{
#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) && \
    defined (ACE_HAS_WINSOCK2_GQOS)
  this->MinimumPolicedSize = mps;
#else
  this->minimum_policed_size_ = mps;
#endif /* ACE_HAS_WINSOCK2 */
}

unsigned long ACE_Flow_Spec::minimum_policed_size ( void   )  const

Get the minimum policed size in bytes.

Definition at line 236 of file OS_QoS.cpp.

{
#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) && \
    defined (ACE_HAS_WINSOCK2_GQOS)
  return this->MinimumPolicedSize;
#else
  return this->minimum_policed_size_;
#endif /* ACE_HAS_WINSOCK2 */
}

unsigned long ACE_Flow_Spec::peak_bandwidth ( void   )  const

Get the PeakBandwidth in bytes/sec.

Definition at line 133 of file OS_QoS.cpp.

{
#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
  return this->PeakBandwidth;
#else
  return this->peak_bandwidth_;
#endif /* ACE_HAS_WINSOCK2 */
}

void ACE_Flow_Spec::peak_bandwidth ( unsigned long  pb  ) 

Set the PeakBandwidth in bytes/sec.

Definition at line 143 of file OS_QoS.cpp.

{
#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
  this->PeakBandwidth = pb;
#else
  this->peak_bandwidth_ = pb;
#endif /* ACE_HAS_WINSOCK2 */
}

int ACE_Flow_Spec::priority ( void   )  const

Get the priority.

Definition at line 281 of file OS_QoS.cpp.

{
#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) && \
    defined (ACE_HAS_WINSOCK2_GQOS)
  ACE_NOTSUP_RETURN (-1);
#else
  return this->priority_;
#endif /* ACE_HAS_WINSOCK2 */
}

void ACE_Flow_Spec::priority ( int  p  ) 

Set the priority.

Definition at line 292 of file OS_QoS.cpp.

{
#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) && \
    defined (ACE_HAS_WINSOCK2_GQOS)
  ACE_UNUSED_ARG (p);
  // TBD...
#else
  this->priority_ = p;
#endif /* ACE_HAS_WINSOCK2 */
}

ACE_SERVICE_TYPE ACE_Flow_Spec::service_type ( void   )  const

Get the service type.

Definition at line 192 of file OS_QoS.cpp.

{
#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) && \
    defined (ACE_HAS_WINSOCK2_GQOS)
  return this->ServiceType;
#else
  return this->service_type_;
#endif /* ACE_HAS_WINSOCK2 */
}

void ACE_Flow_Spec::service_type ( ACE_SERVICE_TYPE  st  ) 

Set the service type.

Definition at line 203 of file OS_QoS.cpp.

{
#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) && \
    defined (ACE_HAS_WINSOCK2_GQOS)
  this->ServiceType = st;
#else
  this->service_type_ = st;
#endif /* ACE_HAS_WINSOCK2 */
}

void ACE_Flow_Spec::token_bucket_size ( unsigned long  tbs  ) 

Set the token bucket size in bytes.

Definition at line 123 of file OS_QoS.cpp.

{
#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
  this->TokenBucketSize = tbs;
#else
  this->token_bucket_size_ = tbs;
#endif /* ACE_HAS_WINSOCK2 */
}

unsigned long ACE_Flow_Spec::token_bucket_size ( void   )  const

Get the token bucket size in bytes.

Definition at line 113 of file OS_QoS.cpp.

{
#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
  return this->TokenBucketSize;
#else
  return this->token_bucket_size_;
#endif /* ACE_HAS_WINSOCK2 */
}

void ACE_Flow_Spec::token_rate ( unsigned long  tr  ) 

Set the token rate in bytes/sec.

Definition at line 103 of file OS_QoS.cpp.

{
#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
  this->TokenRate = tr;
#else
  this->token_rate_ = tr;
#endif /* ACE_HAS_WINSOCK2 */
}

unsigned long ACE_Flow_Spec::token_rate ( void   )  const

Get the token rate in bytes/sec.

Definition at line 93 of file OS_QoS.cpp.

{
#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0)
  return this->TokenRate;
#else
  return this->token_rate_;
#endif /* ACE_HAS_WINSOCK2 */
}

void ACE_Flow_Spec::ttl ( int  t  ) 

Set the time-to-live.

Definition at line 269 of file OS_QoS.cpp.

{
#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) && \
    defined (ACE_HAS_WINSOCK2_GQOS)
  ACE_UNUSED_ARG (t);
  // TBD...
#else
  this->ttl_ = t;
#endif /* ACE_HAS_WINSOCK2 */
}

int ACE_Flow_Spec::ttl ( void   )  const

Get the time-to-live.

Definition at line 258 of file OS_QoS.cpp.

{
#if defined (ACE_HAS_WINSOCK2) && (ACE_HAS_WINSOCK2 != 0) && \
    defined (ACE_HAS_WINSOCK2_GQOS)
  ACE_NOTSUP_RETURN (-1);
#else
  return this->ttl_;
#endif /* ACE_HAS_WINSOCK2 */
}


Member Data Documentation

unsigned long ACE_Flow_Spec::delay_variation_ [private]

Definition at line 252 of file OS_QoS.h.

unsigned long ACE_Flow_Spec::latency_ [private]

Definition at line 251 of file OS_QoS.h.

unsigned long ACE_Flow_Spec::max_sdu_size_ [private]

Definition at line 254 of file OS_QoS.h.

unsigned long ACE_Flow_Spec::minimum_policed_size_ [private]

Definition at line 255 of file OS_QoS.h.

unsigned long ACE_Flow_Spec::peak_bandwidth_ [private]

Definition at line 250 of file OS_QoS.h.

int ACE_Flow_Spec::priority_ [private]

Definition at line 257 of file OS_QoS.h.

Definition at line 253 of file OS_QoS.h.

unsigned long ACE_Flow_Spec::token_bucket_size_ [private]

Definition at line 249 of file OS_QoS.h.

unsigned long ACE_Flow_Spec::token_rate_ [private]

Definition at line 248 of file OS_QoS.h.

int ACE_Flow_Spec::ttl_ [private]

Definition at line 256 of file OS_QoS.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines