Commit 7fe41b08 authored by Florian Kaltenberger's avatar Florian Kaltenberger

moving EMOS to extras


git-svn-id: http://svn.eurecom.fr/openair4G/trunk@7222 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent 8119385a
\documentclass[10pt,a4paper]{article}
%\usepackage{epsfig,amsmath,amsfonts,url,subfigure,verbatim}
\begin{document}
\author{Florian Kaltenberger (\texttt{florian.kaltenberger@eurecom.fr})}
\title{EMOS Multiuser Measurement Manual}
\maketitle
\section{EMOS Multiuser Measurement Manual}
\subsection{Checklist}
Each user should have the following equipment
\begin{itemize}
\item Laptop
\item Power supply
\item Car power adaptor
\item GPS
\item CBMIMO1 Card (Availiable cards: 2, 6, 7, 11. Card 10 has a bad frequency response and card 12 crashes after some time)
\item 2 Batteries
\item Antennas
\item This Manual
\item Route and Time
\item Walkie Talkie
\end{itemize}
\subsection{Startup}
\begin{itemize}
\item Login using the name written on the laptop (password {\tt linux})
\item Power up the CBMIMO1 card, connect the antennas to the two outer connectors on the card, and insert it in the card slot
\item Connect the USB GPS receiver
\item Open a terminal window and change directory:\\
{\tt cd EMOS/emos\_gui}
\item Load the kernel module as root:\\
{\tt sudo make install\_cbmimo1\_softmodem\_emos}\\
(provide password {\tt linux} if asked)\\
The leds on the card should now be ``moving''
\item Start the GPS daemon as root:\\
{\tt sudo gpsd -f /dev/ttyUSB0} (provide password {\tt linux} if asked)
\item Start the GUI:\\
{\tt cd src}\\
{\tt ./emos\_gui -n4}
%Start with {\tt ./emos\_gui -nx}, where {\tt x} is the number of base station antennas.
\end{itemize}
\subsection{Operation}
\begin{itemize}
\item Turn on the GUI by clicking the ``PWR'' button.
\item Make sure, there are no error messages.
\item If the terminal can synchronize to the base station, the displays should turn on and the two rightmost leds on the card should stay on.
\item Bring the GUI into multiuser mode by pressing the ``terminal mode'' button.
\item Make sure you set the terminal number to the number indicated on your laptop.
\item Now you are ready to turn on the recorder by pressing ``record''. The terminal now waits for the base station to signal the recording flag. Upon receiving the flag, the terminal will record the estimated channel. When the recording flag goes off, the data is stored to file, the file index is increased, and the terminal goes into standby again.
\end{itemize}
\subsection{Troubleshooting}
\paragraph{Card does not synchronize}
Most probably you are in an area with no or too little signal.
\begin{itemize}
\item Make sure you stay on the measurement routes.
\item Make sure the antennas are connected correctly.
\item Check for other error messages on the GUI.
\end{itemize}
\paragraph{Channel displays do not refresh}
Most probably the card has crashed or there is a problem with the fifo.
\begin{itemize}
\item Stop recording and exit the GUI
\item Remove the kernel module:\\
{\tt cd ~/EMOS/emos\_gui}\\
{\tt sudo make remove\_cbmimo1\_emos}
\item Remove the card and the power
\item Load the kernel module as described above
\item Restart the GUI
\end{itemize}
\paragraph{No GPS data availiable}
\begin{itemize}
\item Make sure the GPS is connected correctly and that it can see the satelites (led on GPS constantly on)
\item Have you started the GPS daemon {\tt gpsd -f /dev/ttyUSB0}
\item Restart the GUI
\end{itemize}
\paragraph{GUI does not record or records permanently}
\begin{itemize}
\item Make sure you are in multiuser mode and you turned on record
\item Make sure there is enough disk space
\item Make sure that the record path (``config'' button) is set to ~/EMOS/data/
\end{itemize}
\paragraph{Computer freezes}
\begin{itemize}
\item Reboot
\end{itemize}
\end{document}
\ No newline at end of file
This diff is collapsed.
SRC = emos_dump.c dump_size.c
OBJ = emos_dump.o dump_size.o
CFLAGS += $(shell rtai-config --lxrt-cflags)
LDFLAGS = $(shell rtai-config --lxrt-ldflags) -lpthread -llxrt -lm -lgps -lforms
CFLAGS += -m32 -I$(OPENAIR1_DIR) -I$(OPENAIR2_DIR)/RRC/LITE/MESSAGES
CFLAGS += -DPHYSIM -DNODE_RG -DUSER_MODE -DPC_TARGET -DPC_DSP -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_TX=2 -DPHY_CONTEXT=1
CFLAGS += -DOPENAIR_LTE -DENABLE_FXP -DOPENAIR1 #-DDLSCH_THREAD -DULSCH_THREAD
CFLAGS += -DEMOS -DEXMIMO
all: emos_dump dump_size
$(OBJ): %.o : %.c
@echo Compiling $< ...
@$(CC) -c $(CFLAGS) -o $@ $<
emos_dump: emos_dump.c
$(CC) $(CFLAGS) $(LDFLAGS) emos_dump.c -o emos_dump
dump_size: dump_size.c
$(CC) $(CFLAGS) $(LDFLAGS) dump_size.c -o dump_size
clean:
rm -rf emos_dump dump_size
rm -rf $(OBJ)
show:
@echo $(CFLAGS)
@echo $(OBJ)
beautiful:
astyle --style=gnu -s2 $(SRC)
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#include "gps.h"
#include "SCHED/phy_procedures_emos.h"
int main(void)
{
printf("MAX_CQI_BITS = %d;\n",MAX_CQI_BITS);
printf("PHY_measurements_size = %d;\n",sizeof(PHY_MEASUREMENTS));
printf("PHY_measurements_eNb_size = %d;\n",sizeof(PHY_MEASUREMENTS_eNB));
//printf("UCI_data_t_size = %d;\n",sizeof(UCI_DATA_t));
//printf("DCI_alloc_t_size = %d;\n",sizeof(DCI_ALLOC_t));
printf("eNb_UE_stats_size = %d;\n",sizeof(LTE_eNB_UE_stats));
printf("fifo_dump_emos_UE_size = %d;\n",sizeof(fifo_dump_emos_UE));
printf("fifo_dump_emos_eNb_size = %d;\n",sizeof(fifo_dump_emos_eNB));
printf("gps_fix_t_size = %d\n",sizeof(struct gps_fix_t));
return(0);
}
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
/*! \file emod_dump.c
* \brief reads data from a fifo and dumps it to disk
* \author F. Kaltenberger, Leonardo Cardoso
* \date 2012
* \version 0.2
* \company Eurecom
* \email: florian.kaltenberger@eurecom.fr
* \note
* \warning
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <fcntl.h>
#include <signal.h>
#include <unistd.h>
#include <errno.h>
#include <math.h>
#include <time.h>
#include <gps.h>
#include <forms.h>
#include "SCHED/phy_procedures_emos.h"
#include "emos_dump.h"
int end=0;
static void endme(int dummy)
{
printf("SIGINT received\n");
end=1;
}
/*
#define TIMESTAMP_SIZE 8
#define PDU_ERRORS_SIZE 4
#define RX_RSSI_SIZE 2
#define COMPLEX16_SIZE 4
#define NO_OF_OFDM_CARRIERS 256
#define CHANNEL_BUFFER_SIZE (NB_ANTENNAS*COMPLEX16_SIZE*NO_OF_OFDM_CARRIERS+TIMESTAMP_SIZE+PDU_ERRORS_SIZE+RX_RSSI_SIZE) //in bytes
*/
#define NO_ESTIMATES_DISK 100 //No. of estimates that are aquired before dumped to disk
int main (int argc, char **argv)
{
char c, eNB_flag=0;
char *fifo2file_buffer, *fifo2file_ptr;
int fifo, counter=0, bytes;
FILE *dumpfile_id;
char dumpfile_name[1024];
time_t starttime_tmp;
struct tm starttime;
int channel_buffer_size;
time_t timer;
struct tm *now;
struct gps_data_t *gps_data = NULL;
struct gps_fix_t dummy_gps_data;
while ((c = getopt (argc, argv, "he")) != -1) {
switch (c) {
case 'e':
eNB_flag=1;
break;
case 'h':
printf("EMOS FIFO to file dump.\n");
printf("Usage: %s -h(elp) -e(NB) (default=ue)\n",argv[0]);
exit(0);
default:
break;
}
}
timer = time(NULL);
now = localtime(&timer);
memset(&dummy_gps_data,1,sizeof(struct gps_fix_t));
gps_data = gps_open("127.0.0.1","2947");
if (gps_data == NULL) {
printf("Could not open GPS\n");
//exit(-1);
}
#if GPSD_API_MAJOR_VERSION>=4
else if (gps_stream(gps_data, WATCH_ENABLE,NULL) != 0)
#else
else if (gps_query(gps_data, "w+x") != 0)
#endif
{
//sprintf(tmptxt,"Error sending command to GPS, gps_data = %x", gps_data);
printf("Error sending command to GPS\n");
//exit(-1);
}
if (eNB_flag==1)
channel_buffer_size = sizeof(fifo_dump_emos_eNB);
else
channel_buffer_size = sizeof(fifo_dump_emos_UE);
// allocate memory for NO_FRAMES_DISK channes estimations
fifo2file_buffer = malloc(NO_ESTIMATES_DISK*channel_buffer_size);
fifo2file_ptr = fifo2file_buffer;
if (fifo2file_buffer == NULL) {
printf("Cound not allocate memory for fifo2file_buffer\n");
exit(EXIT_FAILURE);
}
if ((fifo = open(CHANSOUNDER_FIFO_DEV, O_RDONLY)) < 0) {
fprintf(stderr, "Error opening the fifo\n");
exit(EXIT_FAILURE);
}
time(&starttime_tmp);
localtime_r(&starttime_tmp,&starttime);
snprintf(dumpfile_name,1024,"%s_data_%d%02d%02d_%02d%02d%02d.EMOS",
(eNB_flag==1) ? "eNB" : "UE",
1900+starttime.tm_year, starttime.tm_mon+1, starttime.tm_mday, starttime.tm_hour, starttime.tm_min, starttime.tm_sec);
dumpfile_id = fopen(dumpfile_name,"w");
if (dumpfile_id == NULL) {
fprintf(stderr, "Error opening dumpfile\n");
exit(EXIT_FAILURE);
}
signal(SIGINT, endme);
printf("starting dump, channel_buffer_size=%d ...\n",channel_buffer_size);
while (!end) {
bytes = rtf_read_all_at_once(fifo, fifo2file_ptr, channel_buffer_size);
/*
if (eNB_flag==1)
printf("eNB: count %d, frame %d, read: %d bytes from the fifo\n",counter, ((fifo_dump_emos_eNB*)fifo2file_ptr)->frame_tx,bytes);
else
printf("UE: count %d, frame %d, read: %d bytes from the fifo\n",counter, ((fifo_dump_emos_UE*)fifo2file_ptr)->frame_rx,bytes);
*/
fifo2file_ptr += channel_buffer_size;
counter ++;
if (counter == NO_ESTIMATES_DISK) {
//reset stuff
fifo2file_ptr = fifo2file_buffer;
counter = 0;
//flush buffer to disk
if (eNB_flag==1)
printf("eNB: count %d, frame %d, flushing buffer to disk\n",
counter, ((fifo_dump_emos_eNB*)fifo2file_ptr)->frame_tx);
else
printf("UE: count %d, frame %d, flushing buffer to disk\n",
counter, ((fifo_dump_emos_UE*)fifo2file_ptr)->frame_rx);
if (fwrite(fifo2file_buffer, sizeof(char), NO_ESTIMATES_DISK*channel_buffer_size, dumpfile_id) != NO_ESTIMATES_DISK*channel_buffer_size) {
fprintf(stderr, "Error writing to dumpfile\n");
exit(EXIT_FAILURE);
}
if (gps_data) {
if (gps_poll(gps_data) != 0) {
printf("problem polling data from gps\n");
} else {
printf("lat %g, lon %g\n",gps_data->fix.latitude,gps_data->fix.longitude);
}
if (fwrite(&(gps_data->fix), sizeof(char), sizeof(struct gps_fix_t), dumpfile_id) != sizeof(struct gps_fix_t)) {
printf("Error writing to dumpfile, stopping recording\n");
exit(EXIT_FAILURE);
}
} else {
printf("WARNING: No GPS data available, storing dummy packet\n");
if (fwrite(&(dummy_gps_data), sizeof(char), sizeof(struct gps_fix_t), dumpfile_id) != sizeof(struct gps_fix_t)) {
printf("Error writing to dumpfile, stopping recording\n");
exit(EXIT_FAILURE);
}
}
}
}
free(fifo2file_buffer);
fclose(dumpfile_id);
close(fifo);
return 0;
}
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#define CHANSOUNDER_FIFO_DEV "/dev/rtf3"
This diff is collapsed.
gps_trace: gps.c
gcc gps.c -Wall -g -I/usr/include/X11 -lgps -lforms -o gps_trace
read_iw: read_iw.c
gcc read_iw.c -Wall -g -o read_iw
\ No newline at end of file
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <gps.h>
#include <forms.h>
struct gps_data_t *gps_data = NULL;
struct gps_fix_t dummy_gps_data;
FILE *dumpfile_id = NULL;
void gps_data_callback(int gps_fd, void* data)
{
//char tmptxt[1024];
time_t timer;
struct tm *now;
timer = time(NULL);
//printf("GPS timer called\n");
if (gps_data) {
if (gps_poll(gps_data) != 0) {
//sprintf(tmptxt,"Error polling data from GPS, gps_data = %x", gps_data);
printf("Error polling data from GPS\n");
} else
now = localtime(&timer);
printf("%04d%02d%02d%02d%02d%02d,%g,%g\n",
now->tm_year+1900,now->tm_mon+1,now->tm_mday,now->tm_hour, now->tm_min, now->tm_sec,
//asctime(localtime(&timer)),
gps_data->fix.latitude,gps_data->fix.longitude);
}
//fl_set_timer(ob, 0.05);
//write GPS
if (gps_data) {
if (fwrite(&(gps_data->fix), sizeof(char), sizeof(struct gps_fix_t), dumpfile_id) != sizeof(struct gps_fix_t)) {
printf("Error writing to dumpfile, stopping recording\n");
}
} else {
printf("WARNING: No GPS data available, storing dummy packet\n");
if (fwrite(&(dummy_gps_data), sizeof(char), sizeof(struct gps_fix_t), dumpfile_id) != sizeof(struct gps_fix_t)) {
printf("Error writing to dumpfile, stopping recording\n");
}
}
}
void stop_gps(int sig)
{
// stop gps
if (gps_data)
fl_remove_io_callback(gps_data->gps_fd, FL_READ , &gps_data_callback);
// close the GPS
if (gps_data)
gps_close(gps_data);
fclose(dumpfile_id);
dumpfile_id = NULL;
fl_finish();
exit(0);
}
int main(int argc, char *argv[])
{
time_t timer;
char log_filename[256], date_str[128];
struct tm *now;
timer = time(NULL);
now = localtime(&timer);
// open GPS
gps_data = gps_open("127.0.0.1","2947");
if (gps_data == NULL) {
printf("Could not open GPS\n");
exit(-1);
} else if (gps_stream(gps_data, WATCH_ENABLE,NULL) != 0) {
//sprintf(tmptxt,"Error sending command to GPS, gps_data = %x", gps_data);
printf("Error sending command to GPS\n");
exit(-1);
}
strftime(date_str, 128, "%Y%m%d_%H%M%S", now);
sprintf(log_filename,"gps_trace_%s.log", date_str);
dumpfile_id = fopen(log_filename,"w");
if (dumpfile_id == NULL) {
printf("Error opening dumpfile\n");
exit(-1);
}
signal(SIGINT, stop_gps);
fl_initialize(&argc, argv, "GPS Tracer", 0, 0);
if (gps_data)
fl_add_io_callback(gps_data->gps_fd, FL_READ, &gps_data_callback, NULL);
fl_do_forms();
exit(0);
}
function [gps_data, NFrames] = load_gps_trace(filename, NFrames_max, decimation)
%
% EMOS GPS trace import filter
%
% [gps_data, NFrames] =
% load_estimates_lte(filename, NFrames_max)
%
% Parameters:
% filename - filename(s) of the EMOS data file
% NFrames_max - Maximum number of estimates. Leave it blank to get up to the
% maximum file contents
% decimation - read every 'decimation' frame
%
% Returns:
% gps_data - A structure array containing gps data
% NFrames - the number of read estimates
% Author: Florian Kaltenberger
% Copyright: Eurecom Sophia Antipolis
% Version History
% Date Version Comment
% 20120123 0.1 Created based on load_estimates
if nargin < 3
decimation = 1;
end
if nargin < 2
NFrames_max = Inf;
end
gps_data_struct = struct(...
'timestamp', double(0),...
'mode', int32(0),...
'ept',double(0),...
'latitude',double(0),...
'longitude',double(0),...
'eph',double(0),...
'altitude',double(0),...
'epv',double(0),...
'track',double(0),...
'epd',double(0),...
'speed',double(0),...
'eps',double(0),...
'climb',double(0),...
'epc',double(0));
gps_data_struct_a = cstruct(gps_data_struct,[],4);
gps_fix_t_size = gps_data_struct_a.size;
% Estimate the size of the file for a pre-allocation of memory
if ~iscell(filename)
filename = {filename};
end
NFiles = length(filename);
NFrames_file = zeros(1,NFiles);
for n=1:NFiles
if ~exist(filename{n},'file')
error('File does not exist!')
end
info_file = dir(filename{n});
NFrames_file(n) = floor(info_file.bytes/gps_fix_t_size);
if (mod(info_file.bytes,gps_fix_t_size) ~= 0)
warning('File size not a multiple of buffer size. File might be corrupt.');
end
end
NFrames = min(sum(NFrames_file), NFrames_max);
gps_data = repmat(gps_data_struct,1,NFrames);
l = 1;
for n=1:NFiles
fid = fopen(filename{n},'r');
while (~feof(fid) && (l <= min(sum(NFrames_file(1:n)),NFrames_max)))
%read GPS data
gps_data(l) = binread(fid,gps_data_struct,1,4,'l');
l=l+1;
end
fclose(fid);
end
/*******************************************************************************
OpenAirInterface
Copyright(c) 1999 - 2014 Eurecom
OpenAirInterface is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
OpenAirInterface is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with OpenAirInterface.The full GNU General Public License is
included in this distribution in the file called "COPYING". If not,
see <http://www.gnu.org/licenses/>.
Contact Information
OpenAirInterface Admin: openair_admin@eurecom.fr
OpenAirInterface Tech : openair_tech@eurecom.fr
OpenAirInterface Dev : openair4g-devel@eurecom.fr
Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
*******************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
int main(int argc, char *argv[])
{
FILE *file_id = NULL;
struct iw_struct {
char wday[8];
char mon[8];
int day;
int hour;
int min;
int sec;
int year;
char addr[32];
char dev[32];
int inactive_time;
int rx_bytes;
int rx_packets;
int tx_bytes;
int tx_packets;
int tx_retries;
int tx_failed;
int signal;
int signal_ctl0;
int signal_ctl1;
float tx_bitrate;
int tx_mcs;
int tx_bw;
char tx_gi1[32];
char tx_gi2[32];
float rx_bitrate;
int rx_mcs;
int rx_bw;
char rx_gi1[32];
char rx_gi2[32];
} iw_field;
char line[256];
int i;
if (argc < 2) {
printf("Program requires an argument (filename)\n");
return(-1);
}
file_id = fopen(argv[1],"r");
if (file_id == NULL) {
printf("Error opening file %s\n", argv[1]);
return(-1);
}
i=0;
while (~feof(file_id)) {
fgets(line, 256, file_id);
if (feof(file_id))
break;
sscanf(line,"%s %s %d %d:%d:%d GMT %d",
iw_field.wday,
iw_field.mon,
&iw_field.day,
&iw_field.hour,
&iw_field.min,
&iw_field.sec,
&iw_field.year);
fgets(line, 256, file_id);
sscanf(line,"Station %s (on %s",
iw_field.addr,
iw_field.dev);
fgets(line, 256, file_id);
sscanf(line," inactive time: %d ms",
&iw_field.inactive_time);
fgets(line, 256, file_id);
sscanf(line," rx bytes: %d",
&iw_field.rx_bytes);
fgets(line, 256, file_id);
sscanf(line," rx packets: %d",
&iw_field.rx_packets);
fgets(line, 256, file_id);
sscanf(line," tx bytes: %d",
&iw_field.tx_bytes);
fgets(line, 256, file_id);
sscanf(line," tx packets: %d",
&iw_field.tx_packets);
fgets(line, 256, file_id);
sscanf(line," tx retries: %d",
&iw_field.tx_retries);
fgets(line, 256, file_id);
sscanf(line," tx failed: %d",
&iw_field.tx_failed);
fgets(line, 256, file_id);
sscanf(line," signal: %d dBm",
&iw_field.signal);
fgets(line, 256, file_id);
sscanf(line," signal_ctl0: %d dBm",
&iw_field.signal_ctl0);
fgets(line, 256, file_id);
sscanf(line," signal_ctl1: %d dBm",
&iw_field.signal_ctl1);
fgets(line, 256, file_id);
sscanf(line," tx bitrate: %e MBit/s MCS %d %dMhz %s %s",
&iw_field.tx_bitrate,
&iw_field.tx_mcs,
&iw_field.tx_bw,
iw_field.tx_gi1,
iw_field.tx_gi2);
fgets(line, 256, file_id);
sscanf(line," rx bitrate: %e MBit/s MCS %d %dMhz %s %s",
&iw_field.rx_bitrate,
&iw_field.rx_mcs,
&iw_field.rx_bw,
iw_field.rx_gi1,
iw_field.rx_gi2);
//printf("read set %d, time %d:%d:%d\n",i,iw_field.hour,iw_field.min,iw_field.sec);
if (i==0) {
printf("num, date; inactive_time; rx_bytes; rx_packets; tx_bytes; tx_packets; tx_retries; tx_failed; signal; signal0; signal1; tx_bitrate; tx_mcs; rx_bitrate; rx_mcs\n");
}
printf("%d; %d-%s-%d %d:%d:%d; %d; %d; %d; %d; %d; %d; %d; %d; %d; %d; %e; %d; %e; %d\n",
i,
iw_field.day,
iw_field.mon,
iw_field.year,
iw_field.hour,
iw_field.min,
iw_field.sec,
iw_field.inactive_time,
iw_field.rx_bytes,
iw_field.rx_packets,
iw_field.tx_bytes,
iw_field.tx_packets,
iw_field.tx_retries,
iw_field.tx_failed,
iw_field.signal,
iw_field.signal_ctl0,
iw_field.signal_ctl1,
iw_field.tx_bitrate,
iw_field.tx_mcs,
iw_field.rx_bitrate,
iw_field.rx_mcs);
i=i+1;
}
fclose(file_id);
return (0);
}
Leonardo Cardoso <sampaio@eurecom.fr>
This diff is collapsed.
This diff is collapsed.
Basic Installation
==================
These are generic installation instructions.
The `configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a `Makefile' in each directory of the package.
It may also create one or more `.h' files containing system-dependent
definitions. Finally, it creates a shell script `config.status' that
you can run in the future to recreate the current configuration, a file
`config.cache' that saves the results of its tests to speed up
reconfiguring, and a file `config.log' containing compiler output
(useful mainly for debugging `configure').
If you need to do unusual things to compile the package, please try
to figure out how `configure' could check whether to do them, and mail
diffs or instructions to the address given in the `README' so they can
be considered for the next release. If at some point `config.cache'
contains results you don't want to keep, you may remove or edit it.
The file `configure.in' is used to create `configure' by a program
called `autoconf'. You only need `configure.in' if you want to change
it or regenerate `configure' using a newer version of `autoconf'.
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes a while. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Type `make install' to install the programs and any data files and
documentation.
4. You can remove the program binaries and object files from the
source code directory by typing `make clean'.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
this:
CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
Or on systems that have the `env' program, you can do it like this:
env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you must use a version of `make' that
supports the `VPATH' variable, such as GNU `make'. `cd' to the
directory where you want the object files and executables to go and run
the `configure' script. `configure' automatically checks for the
source code in the directory that `configure' is in and in `..'.
If you have to use a `make' that does not supports the `VPATH'
variable, you have to compile the package for one architecture at a time
in the source code directory. After you have installed the package for
one architecture, use `make distclean' before reconfiguring for another
architecture.
Installation Names
==================
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
give `configure' the option `--exec-prefix=PATH', the package will use
PATH as the prefix for installing programs and libraries.
Documentation and other data files will still use the regular prefix.
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving `configure' the
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
Optional Features
=================
Some packages pay attention to `--enable-FEATURE' options to
`configure', where FEATURE indicates an optional part of the package.
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
is something like `gnu-as' or `x' (for the X Window System). The
`README' should mention any `--enable-' and `--with-' options that the
package recognizes.
For packages that use the X Window System, `configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the `configure' options `--x-includes=DIR' and
`--x-libraries=DIR' to specify their locations.
Specifying the System Type
==========================
There may be some features `configure' can not figure out
automatically, but needs to determine by the type of host the package
will run on. Usually `configure' can figure that out, but if it prints
a message saying it can not guess the host type, give it the
`--host=TYPE' option. TYPE can either be a short name for the system
type, such as `sun4', or a canonical name with three fields:
CPU-COMPANY-SYSTEM
See the file `config.sub' for the possible values of each field. If
`config.sub' isn't included in this package, then this package doesn't
need to know the host type.
If you are building compiler tools for cross-compiling, you can also
use the `--target=TYPE' option to select the type of system they will
produce code for and the `--build=TYPE' option to select the type of
system on which you are compiling the package.
Sharing Defaults
================
If you want to set default values for `configure' scripts to share,
you can create a site shell script called `config.site' that gives
default values for variables like `CC', `cache_file', and `prefix'.
`configure' looks for `PREFIX/share/config.site' if it exists, then
`PREFIX/etc/config.site' if it exists. Or, you can set the
`CONFIG_SITE' environment variable to the location of the site script.
A warning: not all `configure' scripts look for a site script.
Operation Controls
==================
`configure' recognizes the following options to control how it
operates.
`--cache-file=FILE'
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
`--help'
Print a summary of the options to `configure', and exit.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made.
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`configure' also accepts some other, not widely useful, options.
# not a GNU package. You can remove this line, if
# have all needed files, that a GNU package needs
AUTOMAKE_OPTIONS = foreign 1.4
SUBDIRS = src
install_cbmimo1_softmodem_emos:
make fifos
insmod device_driver/openair_rf_softmodem_emos.ko ;
remove_cbmimo1_emos:
rmmod openair_rf
fifos:
@for i in `seq 0 64`;\
do \
have_rtfX=`ls /dev/ |grep -c rtf$$i`;\
if test "$$have_rtfX" == 0 ;then \
mknod -m 666 /dev/rtf$$i c 150 $$i; \
fi;\
done
default: all
all:
aclocal
autoheader
automake
autoconf
This diff is collapsed.
to compile run
./src/make_links
./configure
make
\ No newline at end of file
This diff is collapsed.
/* config.h.in. Generated from configure.in by autoheader. */
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION
This diff is collapsed.
This diff is collapsed.
AC_INIT(configure.in)
AM_CONFIG_HEADER(config.h)
AM_INIT_AUTOMAKE(emos_gui, 0.1)
AC_LANG_C
AC_PROG_CC
AM_PROG_LIBTOOL
AC_OUTPUT(Makefile src/Makefile)
This diff is collapsed.
<?xml version = '1.0'?>
<kdevelop>
<general>
<author>Leonardo Cardoso</author>
<email>sampaio@eurecom.fr</email>
<version>0.1</version>
<projectmanagement>KDevAutoProject</projectmanagement>
<primarylanguage>C</primarylanguage>
<keywords>
<keyword>C</keyword>
<keyword>Code</keyword>
</keywords>
<ignoreparts/>
<projectdirectory>.</projectdirectory>
<absoluteprojectpath>false</absoluteprojectpath>
<description/>
</general>
<kdevautoproject>
<general>
<activetarget>src/emos_gui</activetarget>
<useconfiguration>default</useconfiguration>
</general>
<run>
<mainprogram>src/emos_gui</mainprogram>
<terminal>true</terminal>
<directoryradio>executable</directoryradio>
<customdirectory>/</customdirectory>
<programargs>-n 4</programargs>
<autocompile>true</autocompile>
<envvars/>
<runarguments>
<emos_gui/>
</runarguments>
</run>
<configurations>
<optimized>
<builddir>optimized</builddir>
<ccompiler>kdevgccoptions</ccompiler>
<cxxcompiler>kdevgppoptions</cxxcompiler>
<f77compiler>kdevg77options</f77compiler>
<cflags>-O2 -g0 </cflags>
<envvars/>
<configargs/>
<topsourcedir/>
<cppflags/>
<ldflags>-lforms</ldflags>
<ccompilerbinary/>
<cxxcompilerbinary/>
<f77compilerbinary/>
<cxxflags/>
<f77flags/>
</optimized>
<debug>
<configargs>--enable-debug=full</configargs>
<builddir>debug</builddir>
<ccompiler>kdevgccoptions</ccompiler>
<cxxcompiler>kdevgppoptions</cxxcompiler>
<f77compiler>kdevg77options</f77compiler>
<cflags>-O0 -g3 </cflags>
<envvars/>
<topsourcedir/>
<cppflags/>
<ldflags/>
<ccompilerbinary/>
<cxxcompilerbinary/>
<f77compilerbinary/>
<cxxflags/>
<f77flags/>
</debug>
<default>
<envvars/>
<configargs/>
<builddir/>
<topsourcedir/>
<cppflags/>
<ldflags/>
<ccompiler>kdevgccoptions</ccompiler>
<cxxcompiler>kdevgppoptions</cxxcompiler>
<f77compiler>kdevg77options</f77compiler>
<ccompilerbinary/>
<cxxcompilerbinary/>
<f77compilerbinary/>
<cflags/>
<cxxflags/>
<f77flags/>
</default>
</configurations>
<make>
<envvars>
<envvar value="1" name="WANT_AUTOCONF_2_5" />
<envvar value="1" name="WANT_AUTOMAKE_1_6" />
</envvars>
<abortonerror>true</abortonerror>
<runmultiplejobs>false</runmultiplejobs>
<numberofjobs>1</numberofjobs>
<dontact>false</dontact>
<makebin/>
<prio>0</prio>
</make>
</kdevautoproject>
<kdevdoctreeview>
<ignoretocs>
<toc>ada</toc>
<toc>ada_bugs_gcc</toc>
<toc>bash</toc>
<toc>bash_bugs</toc>
<toc>clanlib</toc>
<toc>w3c-dom-level2-html</toc>
<toc>fortran_bugs_gcc</toc>
<toc>gnome1</toc>
<toc>gnustep</toc>
<toc>gtk</toc>
<toc>gtk_bugs</toc>
<toc>haskell</toc>
<toc>haskell_bugs_ghc</toc>
<toc>java_bugs_gcc</toc>
<toc>java_bugs_sun</toc>
<toc>kde2book</toc>
<toc>libstdc++</toc>
<toc>opengl</toc>
<toc>pascal_bugs_fp</toc>
<toc>php</toc>
<toc>php_bugs</toc>
<toc>perl</toc>
<toc>perl_bugs</toc>
<toc>python</toc>
<toc>python_bugs</toc>
<toc>qt-kdev3</toc>
<toc>ruby</toc>
<toc>ruby_bugs</toc>
<toc>sdl</toc>
<toc>stl</toc>
<toc>w3c-svg</toc>
<toc>sw</toc>
<toc>w3c-uaag10</toc>
<toc>wxwidgets_bugs</toc>
</ignoretocs>
<ignoreqt_xml>
<toc>Guide to the Qt Translation Tools</toc>
<toc>Qt Assistant Manual</toc>
<toc>Qt Designer Manual</toc>
<toc>Qt Reference Documentation</toc>
<toc>qmake User Guide</toc>
</ignoreqt_xml>
<ignoredoxygen>
<toc>KDE Libraries (Doxygen)</toc>
</ignoredoxygen>
</kdevdoctreeview>
<kdevfilecreate>
<useglobaltypes>
<type ext="c" />
<type ext="h" />
</useglobaltypes>
</kdevfilecreate>
<kdevfileview>
<groups>
<group pattern="*.h" name="Header files" />
<group pattern="*.c" name="Source files" />
<hidenonprojectfiles>false</hidenonprojectfiles>
<hidenonlocation>false</hidenonlocation>
</groups>
<tree>
<hidepatterns>*.o,*.lo,CVS</hidepatterns>
<hidenonprojectfiles>false</hidenonprojectfiles>
</tree>
</kdevfileview>
<kdevdocumentation>
<projectdoc>
<docsystem>Doxygen Documentation Collection</docsystem>
<docurl>emos_gui.tag</docurl>
</projectdoc>
</kdevdocumentation>
<substmap>
<APPNAME>emos_gui</APPNAME>
<APPNAMELC>emos_gui</APPNAMELC>
<APPNAMESC>Emos_gui</APPNAMESC>
<APPNAMEUC>EMOS_GUI</APPNAMEUC>
<AUTHOR>Leonardo Cardoso</AUTHOR>
<CFLAGS/>
<EMAIL>sampaio@eurecom.fr</EMAIL>
<LICENSE>Custom</LICENSE>
<OPT_INCS>-I/usr/include</OPT_INCS>
<OPT_LIBS>-lm</OPT_LIBS>
<VERSION>0.1</VERSION>
<YEAR>2007</YEAR>
<dest>/homes/cardoso/Devel/openairinterface/emos_ofdm/emos_gui</dest>
</substmap>
<cppsupportpart>
<filetemplates>
<interfacesuffix>.h</interfacesuffix>
<implementationsuffix>.cpp</implementationsuffix>
</filetemplates>
</cppsupportpart>
<kdevcppsupport>
<qt>
<used>false</used>
<version>3</version>
<root/>
</qt>
<codecompletion>
<includeGlobalFunctions>true</includeGlobalFunctions>
<includeTypes>true</includeTypes>
<includeEnums>true</includeEnums>
<includeTypedefs>false</includeTypedefs>
<automaticCodeCompletion>true</automaticCodeCompletion>
<automaticArgumentsHint>true</automaticArgumentsHint>
<automaticHeaderCompletion>true</automaticHeaderCompletion>
<codeCompletionDelay>250</codeCompletionDelay>
<argumentsHintDelay>400</argumentsHintDelay>
<headerCompletionDelay>250</headerCompletionDelay>
</codecompletion>
<creategettersetter>
<prefixGet/>
<prefixSet>set</prefixSet>
<prefixVariable>m_,_</prefixVariable>
<parameterName>theValue</parameterName>
<inlineGet>true</inlineGet>
<inlineSet>true</inlineSet>
</creategettersetter>
<references/>
</kdevcppsupport>
<kdevdebugger>
<general>
<programargs>-n 4</programargs>
<gdbpath/>
<dbgshell>libtool</dbgshell>
<configGdbScript/>
<runShellScript/>
<runGdbScript/>
<breakonloadinglibs>true</breakonloadinglibs>
<separatetty>true</separatetty>
<floatingtoolbar>false</floatingtoolbar>
</general>
<display>
<staticmembers>false</staticmembers>
<demanglenames>true</demanglenames>
<outputradix>10</outputradix>
</display>
</kdevdebugger>
</kdevelop>
#!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
#
# Copyright 1991 by the Massachusetts Institute of Technology
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission. M.I.T. makes no representations about the
# suitability of this software for any purpose. It is provided "as is"
# without express or implied warranty.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd=$cpprog
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd=$stripprog
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "$0: no input file specified" >&2
exit 1
else
:
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d "$dst" ]; then
instcmd=:
chmodcmd=""
else
instcmd=$mkdirprog
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f "$src" ] || [ -d "$src" ]
then
:
else
echo "$0: $src does not exist" >&2
exit 1
fi
if [ x"$dst" = x ]
then
echo "$0: no destination specified" >&2
exit 1
else
:
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d "$dst" ]
then
dst=$dst/`basename "$src"`
else
:
fi
fi
## this sed command emulates the dirname command
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-$defaultIFS}"
oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS=$oIFS
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp=$pathcomp$1
shift
if [ ! -d "$pathcomp" ] ;
then
$mkdirprog "$pathcomp"
else
:
fi
pathcomp=$pathcomp/
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd "$dst" &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename "$dst"`
else
dstfile=`basename "$dst" $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename "$dst"`
else
:
fi
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/#inst.$$#
rmtmp=$dstdir/#rm.$$#
# Trap to clean up temp files at exit.
trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
# Move or copy the file name to the temp name
$doit $instcmd "$src" "$dsttmp" &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
# Now remove or move aside any old file at destination location. We try this
# two ways since rm can't unlink itself on some systems and the destination
# file might be busy for other reasons. In this case, the final cleanup
# might fail but the new file should still install successfully.
{
if [ -f "$dstdir/$dstfile" ]
then
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
$doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
{
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
(exit 1); exit
}
else
:
fi
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
fi &&
# The final little trick to "correctly" pass the exit status to the exit trap.
{
(exit 0); exit
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
include $(OPENAIR_HOME)/common/utils/Makefile.inc
TOP_DIR = $(OPENAIR1_DIR)
bin_PROGRAMS = emos_gui
emos_gui_SOURCES = emos_gui.c emos_gui_forms.c emos_callbacks.c \
$(TOP_DIR)/PHY/CONFIG/openair_configure.c $(TOP_DIR)/PHY/CONFIG/openair_readconfigfile.c FFT.c matrix_util.c
# set the include path found by configure
INCLUDES = -I$(TOP_DIR) -I/usr/realtime/include -I/usr/include/X11 $(all_includes)
# the library search path.
emos_gui_LDFLAGS = $(all_libraries)
noinst_HEADERS = emos_gui.h emos_gui_forms.h matrix_util.h
AM_CFLAGS = -DUSER_MODE -DPC_TARGET -DPC_DSP -DNB_ANTENNAS_TXRX=2 -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TX=2 -DEMOS -DNODE_RG -DCBMIMO1 -DPHY_CONTEXT
emos_gui_LDADD = -L/usr/lib -L/usr/local/lib -L/usr/realtime/lib\
-L/usr/X11R6/lib -lm -lforms -llxrt -lpthread -lX11 -lXpm -lgps
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment