00001 /*------------------------------------------------------------------------ 00002 *--------------------- RT-WMP -------------------- 00003 *------------------------------------------------------------------------ 00004 * V7.0B 11/05/10 00005 * 00006 * 00007 * File: ./src/core/include/queues.h 00008 * Authors: Danilo Tardioli 00009 * ---------------------------------------------------------------------- 00010 * Copyright (C) 2000-2010, Universidad de Zaragoza, SPAIN 00011 * 00012 * Contact Addresses: Danilo Tardioli dantard@unizar.es 00013 * 00014 * RT-WMP is free software; you can redistribute it and/or modify it 00015 * under the terms of the GNU General Public License as published by the 00016 * Free Software Foundation; either version 2, or (at your option) any 00017 * later version. 00018 * 00019 * RT-WMP is distributed in the hope that it will be useful, but 00020 * WITHOUT ANY WARRANTY; without even the implied warranty of 00021 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00022 * General Public License for more details. 00023 * 00024 * You should have received a copy of the GNU General Public License 00025 * distributed with RT-WMP; see file COPYING. If not, write to the 00026 * Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 00027 * 02111-1307, USA. 00028 * 00029 * As a special exception, if you link this unit with other files to 00030 * produce an executable, this unit does not by itself cause the 00031 * resulting executable to be covered by the GNU General Public License. 00032 * This exception does not however invalidate any other reasons why the 00033 * executable file might be covered by the GNU Public License. 00034 * 00035 *----------------------------------------------------------------------*/ 00036 00037 00038 00039 00040 #ifndef QUEUES_H_ 00041 #define QUEUES_H_ 00042 00043 #include "config/compiler.h" 00044 #include "core/interface/Msg.h" 00045 #include "core/include/queue_core.h" 00046 00047 00048 void wmp_queue_init(int rx_nelems, int tx_nelems, int max_msg_size, int num_ports); 00049 void wmp_queue_free(void); 00050 00051 int wmp_queue_tx_inspect(void); 00052 int wmp_queue_tx_get_len(void); 00053 int wmp_queue_tx_get_size(void); 00054 00055 int wmp_queue_rx_get_size(void); 00056 int wmp_queue_rx_get_len(void); 00057 int wmp_queue_rx_push_received(Msg * p); 00058 int wmp_queue_rx_push_part(longMsg_t * p); 00059 int wmp_queue_rx_get_elem_size(int id); 00060 int wmp_queue_rx_get_elem_priority(int id); 00061 int wmp_queue_rx_get_elem_source(int id); 00062 char * wmp_queue_rx_get_elem_data(int id); 00063 void wmp_queue_rx_set_elem_done(int id); 00064 int wmp_queue_rx_get_room(void); 00065 00066 int wmp_queue_tx_pop_part(longMsg_t ** p); 00067 void wmp_queue_tx_pop_part_done(int id); 00068 int wmp_queue_tx_get_count(void); 00069 int wmp_queue_tx_get_head_age(void); 00070 int wmp_queue_tx_get_head_dest(void); 00071 int wmp_queue_tx_get_head_id(void); 00072 int wmp_queue_tx_get_elem_age(int id); 00073 int wmp_queue_tx_get_elem_dest(int id); 00074 int wmp_queue_tx_get_elem_priority(int id); 00075 int wmp_queue_tx_get_elem_burst(int id); 00076 int wmp_queue_tx_reschedule(void); 00077 int wmp_queue_tx_confirm(void); 00078 00079 int wmp_queue_tx_get_elem_port(int id); 00080 void wmp_queue_tx_drop_elem(int id); 00081 void wmp_queue_tx_get_last_popped_info(int * age, int *port, int * priority); 00082 int wmp_queue_tx_get_elem_rescheduled(int id); 00083 void wmp_queue_tx_drop_next(void); 00084 00085 int getNumOfElementInRXUCQueue(void); 00086 int getNumOfElementInTXUCQueue(void); 00087 int getNumOfFreePositionsInTXUCQueue(void); 00088 00089 char getHighestPriorityInTxUCQueue(void); 00090 unsigned int getHighestPriorityAgeInTxUCQueue(void); 00091 unsigned int popUCMsgToSend(Msg * p); 00092 00093 00094 00095 #endif /*QUEUES_H_*/ 00096 00097 00098