unsigned short int delay_stats[AC_QUEUES][MAX_DELAY/GRANULARITY];
-struct ac_stats {
+/*struct ac_stats[AC_QUEUES] {
unsigned long int min_trans_time;
unsigned long int sum_trans_time;
struct timespec recv_timestamp;
struct timespec send_timestamp;
-};
+};*/
struct send_endpoint {
int ac;
};
#define MSEC (1000*1000)
-#define MBIT (1000*1000)
-#define KBIT 1000
+#define Mbit (1000*1000)
+#define Kbit 1000
-struct send_endpoint epoint[] = {
- { .ac = AC_VO, .period_nsec=20*MSEC, .bandwidth_bps = 32*KBIT },
-/* { .ac = AC_VI, .period_nsec=20*MSEC, .bandwidth_bps = 1*MBIT }, */
+struct send_endpoint sepoint[] = {
+ { .ac = AC_VO, .period_nsec=200*MSEC, .bandwidth_bps = 34*Kbit },
+ { .ac = AC_VI, .period_nsec=25*MSEC, .bandwidth_bps = 480*Kbit },
+ { .ac = AC_BE, .period_nsec=40*MSEC, .bandwidth_bps = 300*Kbit },
+ { .ac = AC_BK, .period_nsec=40*MSEC, .bandwidth_bps = 300*Kbit },
+// { .ac = AC_VI, .period_nsec=17*MSEC, .bandwidth_bps = 675*Kbit },
};
-unsigned int nr_epoints = sizeof(epoint)/sizeof(*epoint);
+
+unsigned int nr_sepoints = sizeof(sepoint)/sizeof(*sepoint);
void stopper()
{
/*if (trans_time_nsec < min_trans_time)
min_trans_time = trans_time_nsec;*/
- printf("seqn= %lu tos= %d start= %lu(s).%lu(ns)"\
+ /*printf("seqn= %lu tos= %d start= %lu(s).%lu(ns)"\
"stop= %lu(s).%lu(ns)\n trans_time = %lums\n",\
msg.seqn, msg.tos, send_timestamp.tv_sec,\
send_timestamp.tv_nsec,recv_timestamp.tv_sec,\
- recv_timestamp.tv_nsec, trans_time_msec);
+ recv_timestamp.tv_nsec, trans_time_msec); */
}
}
sendpoints.epoint[AC_VO].period_nsec = 300000;
*/
- /*sendpoints.epoint[AC_BE].ac = AC_BE;
- sendpoints.epoint[AC_BE].period_nsec = 760000;
-
- sendpoints.epoint[AC_BK].ac = AC_BK;
- sendpoints.epoint[AC_BK].period_nsec = 757000;
-
- sendpoints.epoint[AC_VI].ac = AC_VI;
- sendpoints.epoint[AC_VI].period_nsec = 9908000;
-
- sendpoints.epoint[AC_VO].ac = AC_VO;
- sendpoints.epoint[AC_VO].period_nsec = 90000000;
- */
-
- epoint[0].ac = AC_BE;
- epoint[0].period_nsec = 1000000;
-/* sendpoints.nr_epoints = 1; */
if (signal(SIGTERM, stopper) == SIG_ERR) {
perror("Error in signal registration");
}
/* create sendpoints */
- for (i = 0; i < nr_epoints; i++) {
- rc = pthread_create(&thread, &attr, sender, (void*) &epoint[i]);
+ for (i = 0; i < nr_sepoints; i++) {
+ rc = pthread_create(&thread, &attr, sender, (void*) &sepoint[i]);
if (rc) {
printf("Error while creating sender %d\n",rc);
return 1;