Commit d7ae00b15747065afde13c0c2c56d07456ff1bc0
1 parent
ee0307fb
Exists in
master
and in
1 other branch
Remove a pasta inutilizada 'xml' e cria arquivo de log
Showing
11 changed files
with
12 additions
and
407 deletions
Show diff stats
Makefile
... | ... | @@ -9,7 +9,7 @@ FLAGS=-g |
9 | 9 | LIBS= `pkg-config --cflags jlibcpp` \ |
10 | 10 | `pkg-config --libs jlibcpp` -lpython2.7 -llavid_base -llavid_io |
11 | 11 | |
12 | -INCLUDES=-I /usr/include/python2.7 -I util/src/include -I tradutor/src/include -I xml/src/include \ | |
12 | +INCLUDES=-I /usr/include/python2.7 -I util/src/include -I tradutor/src/include \ | |
13 | 13 | -I extratorCC/src/include -I extratorSRT/src/include -I monitorPCR/src/include -I codificador/src/include \ |
14 | 14 | -I input/src/include -I demux/src/include -I servico/src/include -I synchronizer/src/include -I mixer/src/include \ |
15 | 15 | -I recognize/src/include -I extratorTXT/src/include |
... | ... | @@ -53,10 +53,6 @@ extratorTXT_exception.o |
53 | 53 | monitorPCRObjs = \ |
54 | 54 | monitor_pcr.o |
55 | 55 | |
56 | -xmlObjs = \ | |
57 | -receiveXml.o \ | |
58 | -readXml.o | |
59 | - | |
60 | 56 | codificadorObjs = \ |
61 | 57 | crc32.o \ |
62 | 58 | inmanagementdata.o \ |
... | ... | @@ -105,7 +101,6 @@ extratorCCObjsPre = $(addprefix extratorCC/src/,$(extratorCCObjs) ) |
105 | 101 | codificadorObjsPre = $(addprefix codificador/src/,$(codificadorObjs) ) |
106 | 102 | inputObjsPre = $(addprefix input/src/,$(inputObjs) ) |
107 | 103 | demuxObjsPre = $(addprefix demux/src/,$(demuxObjs) ) |
108 | -xmlObjsPre = $(addprefix xml/src/,$(xmlObjs) ) | |
109 | 104 | servicoObjsPre = $(addprefix servico/src/,$(servicoObjs) ) |
110 | 105 | synchronizerObjsPre = $(addprefix synchronizer/src/,$(synchronizerObjs) ) |
111 | 106 | mixerObjsPre = $(addprefix mixer/src/,$(mixerObjs) ) |
... | ... | @@ -114,7 +109,7 @@ monitorPCRObjsPre = $(addprefix monitorPCR/src/,$(monitorPCRObjs) ) |
114 | 109 | recognizeObjsPre = $(addprefix recognize/src/,$(recognizeObjs) ) |
115 | 110 | extratorTXTObjsPre = $(addprefix extratorTXT/src/,$(extratorTXTObjs) ) |
116 | 111 | |
117 | -OBJECTS=$(utilObjsPre) $(tradutorObjsPre) $(extratorCCObjsPre) $(extratorTXTObjsPre) $(codificadorObjsPre) $(inputObjsPre) $(demuxObjsPre) $(xmlObjsPre) $(servicoObjsPre) $(synchronizerObjsPre) $(mixerObjsPre) $(extratorSRTObjsPre) $(monitorPCRObjsPre) $(recognizeObjsPre) main.o | |
112 | +OBJECTS=$(utilObjsPre) $(tradutorObjsPre) $(extratorCCObjsPre) $(extratorTXTObjsPre) $(codificadorObjsPre) $(inputObjsPre) $(demuxObjsPre) $(servicoObjsPre) $(synchronizerObjsPre) $(mixerObjsPre) $(extratorSRTObjsPre) $(monitorPCRObjsPre) $(recognizeObjsPre) main.o | |
118 | 113 | |
119 | 114 | all: user_config libras |
120 | 115 | ... | ... |
data/configuracoes.xml
... | ... | @@ -1,20 +0,0 @@ |
1 | -<?xml version="1.0" encoding="utf-8"?> | |
2 | -<gerador> | |
3 | - <pid>99</pid> | |
4 | - <resolucao>1920x1080</resolucao> | |
5 | - <posicoes> | |
6 | - <DPH>170</DPH> | |
7 | - <DPV>220</DPV> | |
8 | - <DFW>640</DFW> | |
9 | - <DFH>270</DFH> | |
10 | - </posicoes> | |
11 | - <versao>2</versao> | |
12 | - <pidCC>278</pidCC> | |
13 | - <entrada tipo="Texto"> | |
14 | - <porta input="IP">12345</porta> | |
15 | - </entrada> | |
16 | - <saida tipo="IP"> | |
17 | - <ip>150.165.132.145</ip> | |
18 | - <porta>4001</porta> | |
19 | - </saida> | |
20 | -</gerador> |
data/runningoption.xml
servico/src/serviceWindowGeneration.cpp
... | ... | @@ -59,7 +59,7 @@ void ServiceWindowGeneration::finalizouSincronizacao() { |
59 | 59 | char ServiceWindowGeneration::getRunningOption() { |
60 | 60 | char option; |
61 | 61 | if(!option){ |
62 | - int file_d = open("vlibras_user/vlibras-core/data/runningoption.xml", O_RDONLY); | |
62 | + int file_d = open("vlibras_user/vlibras-core/runningoption.xml", O_RDONLY); | |
63 | 63 | int cont = read(file_d, &option, 1); |
64 | 64 | close(file_d); |
65 | 65 | } | ... | ... |
util/src/logger.cpp
xml/src/include/readXml.h
... | ... | @@ -1,49 +0,0 @@ |
1 | -/* | |
2 | - * File: lerXml.h | |
3 | - * Author: felipe | |
4 | - * | |
5 | - * Created on 29 de Março de 2010, 15:52 | |
6 | - */ | |
7 | - | |
8 | -#ifndef _LERXML_H | |
9 | -#define _LERXML_H | |
10 | - | |
11 | -#include <string> | |
12 | -#include "jxmlparser.h" | |
13 | - | |
14 | -using namespace std; | |
15 | -using namespace jcommon; | |
16 | - | |
17 | -class ReadXml { | |
18 | -private: | |
19 | - string pid, resolucao, DPH, DPV, DFW, DFH, versao, pidCC, porta, tipo, portaOut, ip; | |
20 | - XmlDocument doc; | |
21 | - bool regrasCarregadas; | |
22 | - XmlElement *inicioRegraAtual; | |
23 | - int profundidadeRegraAtual; | |
24 | - int contZerado; | |
25 | - vector < XmlElement * > *rulesAtual; | |
26 | - | |
27 | -public: | |
28 | - ReadXml(); | |
29 | - virtual ~ReadXml(); | |
30 | - | |
31 | - int getPid(); | |
32 | - int getDPH(); | |
33 | - int getDPV(); | |
34 | - int getDFW(); | |
35 | - int getDFH(); | |
36 | - int getVersao(); | |
37 | - int getPidCC(); | |
38 | - string getTipo(); | |
39 | - int getPorta(); | |
40 | - string getResolucao(); | |
41 | - int getPortaOut(); | |
42 | - string getIp(); | |
43 | - | |
44 | - void Leitura(); | |
45 | - int setProfundidade(int p); | |
46 | -}; | |
47 | - | |
48 | -#endif /* _LERXML_H */ | |
49 | - |
xml/src/include/receiveXml.h
... | ... | @@ -1,22 +0,0 @@ |
1 | -#ifndef _RECEIVE_H_ | |
2 | -#define _RECEIVE_H_ | |
3 | - | |
4 | -#include "jthread.h" | |
5 | - | |
6 | -class ReceiveXml: public jthread::Thread { | |
7 | -private: | |
8 | - int flag; | |
9 | - | |
10 | -public: | |
11 | - static const int MAX_CC_MSG = 1316; | |
12 | - | |
13 | - ReceiveXml(); | |
14 | - virtual ~ReceiveXml(); | |
15 | - | |
16 | - int GetFlagControle(); | |
17 | - void SetFlagControle(int k); | |
18 | - void Run(); | |
19 | - | |
20 | -}; | |
21 | - | |
22 | -#endif | |
23 | 0 | \ No newline at end of file |
xml/src/readXml.cpp
... | ... | @@ -1,245 +0,0 @@ |
1 | -/* | |
2 | - * File: lerXml.cpp | |
3 | - * Author: felipe | |
4 | - * | |
5 | - * Created on 29 de Março de 2010, 15:52 | |
6 | - */ | |
7 | - | |
8 | -#include <iostream> | |
9 | -#include <stdio.h> | |
10 | -#include <math.h> | |
11 | -#include <sstream> | |
12 | -#include <fstream> | |
13 | - | |
14 | -#include "readXml.h" | |
15 | -#include <algorithm> | |
16 | - | |
17 | -ReadXml::ReadXml() { | |
18 | - regrasCarregadas = false; | |
19 | - profundidadeRegraAtual = 0; | |
20 | - inicioRegraAtual = NULL; | |
21 | - rulesAtual = new vector < XmlElement *> (); | |
22 | -} | |
23 | - | |
24 | -ReadXml::~ReadXml() { | |
25 | - rulesAtual->clear(); | |
26 | - delete rulesAtual; | |
27 | -} | |
28 | - | |
29 | -void ReadXml::Leitura() { | |
30 | - string str; | |
31 | - XmlElement * tmp; | |
32 | - XmlAttribute * atr; | |
33 | - | |
34 | - //arq = fopen("/home/felipe/Python/arquivo_dados.txt", "w"); | |
35 | - XmlDocument doc("vlibras_user/vlibras-core/data/configuracoes.xml"); | |
36 | - | |
37 | - if (!doc.LoadFile()) { | |
38 | - printf("Erro ao carregar o XML das aplicacoes -> %s\n", doc.ErrorDesc()); | |
39 | - | |
40 | - } | |
41 | - | |
42 | - XmlElement *xml = doc.RootElement()->FirstChildElement("pid"); | |
43 | - pid = xml->GetText(); | |
44 | - //cout << "pid: " << pid << endl; | |
45 | - | |
46 | - xml = xml->NextSiblingElement(); | |
47 | - resolucao = xml->GetText(); | |
48 | - | |
49 | - //cout << "Resolucao: " << resolucao << endl; | |
50 | - | |
51 | - xml = xml->NextSiblingElement(); | |
52 | - | |
53 | - tmp = xml->FirstChildElement(); | |
54 | - DPH = tmp->GetText(); | |
55 | - | |
56 | - //cout << "DPH: " << DPH << endl; | |
57 | - | |
58 | - tmp = tmp->NextSiblingElement(); | |
59 | - DPV = tmp->GetText(); | |
60 | - | |
61 | - //cout << "DPV: " << DPV << endl; | |
62 | - | |
63 | - tmp = tmp->NextSiblingElement(); | |
64 | - DFW = tmp->GetText(); | |
65 | - | |
66 | - //cout << "DFW: " << DFW << endl; | |
67 | - | |
68 | - tmp = tmp->NextSiblingElement(); | |
69 | - DFH = tmp->GetText(); | |
70 | - | |
71 | - //cout << "DFH: " << DFH << endl; | |
72 | - | |
73 | - xml = xml->NextSiblingElement(); | |
74 | - versao = xml->GetText(); | |
75 | - | |
76 | - //cout << "Versao: " << versao << endl; | |
77 | - | |
78 | - xml = xml->NextSiblingElement(); | |
79 | - str = xml->Value(); | |
80 | - | |
81 | - if (str.compare("pidCC") == 0) { | |
82 | - pidCC = xml->GetText(); | |
83 | - //cout << "PidCC: " << pidCC << endl; | |
84 | - xml = xml->NextSiblingElement(); | |
85 | - } | |
86 | - str = xml->Value(); | |
87 | - atr = xml->FirstAttribute(); | |
88 | - tipo = atr->Value(); | |
89 | - | |
90 | - if (tipo.compare("MPEG-2 TS") == 0) { | |
91 | - //cout << "Tipo: " << tipo << endl; | |
92 | - | |
93 | - tmp = xml->FirstChildElement(); | |
94 | - atr = tmp->FirstAttribute(); | |
95 | - tipo = atr->Value(); | |
96 | - porta = tmp->GetText(); | |
97 | - //cout << "Porta: " << porta << endl; | |
98 | - //cout << "Tipo: " << tipo << endl; | |
99 | - | |
100 | - } | |
101 | - | |
102 | - if (tipo.compare("RAW") == 0) { | |
103 | - | |
104 | - tmp = xml->FirstChildElement(); | |
105 | - | |
106 | - porta = tmp->GetText(); | |
107 | - //cout << "Porta: " << porta << endl; | |
108 | - //cout << "Tipo: " << tipo << endl; | |
109 | - | |
110 | - } | |
111 | - | |
112 | - //cout << "Tipo: " << tipo << endl; | |
113 | - | |
114 | - xml = xml->NextSiblingElement(); | |
115 | - tmp = xml->FirstChildElement(); | |
116 | - ip = tmp->GetText(); | |
117 | - | |
118 | - //cout << "IP: " << ip << endl; | |
119 | - | |
120 | - tmp = tmp->NextSiblingElement(); | |
121 | - portaOut = tmp->GetText(); | |
122 | - | |
123 | - //cout << "Porta: " << portaOut << endl; | |
124 | -} | |
125 | - | |
126 | -int ReadXml::getPid() { | |
127 | - stringstream st; | |
128 | - int p; | |
129 | - | |
130 | - st << pid << endl; | |
131 | - st >> p; | |
132 | - | |
133 | - return p; | |
134 | -} | |
135 | - | |
136 | -int ReadXml::getDPH() { | |
137 | - stringstream st; | |
138 | - int p; | |
139 | - | |
140 | - st << DPH << endl; | |
141 | - st >> p; | |
142 | - | |
143 | - return p; | |
144 | -} | |
145 | - | |
146 | -int ReadXml::getDPV() { | |
147 | - stringstream st; | |
148 | - int p; | |
149 | - | |
150 | - st << DPV << endl; | |
151 | - st >> p; | |
152 | - | |
153 | - return p; | |
154 | -} | |
155 | - | |
156 | -int ReadXml::getDFW() { | |
157 | - stringstream st; | |
158 | - int p; | |
159 | - | |
160 | - st << DFW << endl; | |
161 | - st >> p; | |
162 | - | |
163 | - return p; | |
164 | -} | |
165 | - | |
166 | -int ReadXml::getDFH() { | |
167 | - stringstream st; | |
168 | - int p; | |
169 | - | |
170 | - st << DFH << endl; | |
171 | - st >> p; | |
172 | - | |
173 | - return p; | |
174 | -} | |
175 | - | |
176 | -int ReadXml::getVersao() { | |
177 | - stringstream st; | |
178 | - int p; | |
179 | - | |
180 | - st << versao << endl; | |
181 | - st >> p; | |
182 | - | |
183 | - return p; | |
184 | -} | |
185 | - | |
186 | -int ReadXml::getPidCC() { | |
187 | - stringstream st; | |
188 | - int p; | |
189 | - | |
190 | - st << pidCC << endl; | |
191 | - st >> p; | |
192 | - | |
193 | - return p; | |
194 | -} | |
195 | - | |
196 | -int ReadXml::getPorta() { | |
197 | - stringstream st; | |
198 | - int p; | |
199 | - //cout << "Porta convertida: " << porta << endl; | |
200 | - st << porta << endl; | |
201 | - st >> p; | |
202 | - | |
203 | - //cout << "Porta convertida: " << p << endl; | |
204 | - return p; | |
205 | -} | |
206 | - | |
207 | -string ReadXml::getTipo() { | |
208 | - return tipo; | |
209 | -} | |
210 | - | |
211 | -string ReadXml::getResolucao() { | |
212 | - return resolucao; | |
213 | -} | |
214 | - | |
215 | -int ReadXml::getPortaOut() { | |
216 | - stringstream st; | |
217 | - int p; | |
218 | - | |
219 | - st << portaOut << endl; | |
220 | - st >> p; | |
221 | - | |
222 | - return p; | |
223 | -} | |
224 | - | |
225 | -string ReadXml::getIp() { | |
226 | - return ip; | |
227 | -} | |
228 | - | |
229 | -int ReadXml::setProfundidade(int p){ | |
230 | - profundidadeRegraAtual = p; | |
231 | - | |
232 | -} | |
233 | - | |
234 | -/* | |
235 | - * aplicarRule - metodo para aplicar a regra correta para a sequencia | |
236 | - * atual de glosas | |
237 | - * | |
238 | - * Params: | |
239 | - * frase - vetor contendo a frase completa | |
240 | - * posInicial - indicacao do inicio do trecho onde a regra sera aplicada | |
241 | - * | |
242 | - * Ultima modificacao: 17/03/2011 | |
243 | - */ | |
244 | - | |
245 | - |
xml/src/receiveXml.cpp
... | ... | @@ -1,54 +0,0 @@ |
1 | -#include <iostream> | |
2 | -#include <fstream> | |
3 | -#include "receiveXml.h" | |
4 | - | |
5 | -#include "jdatagramsocket.h" | |
6 | - | |
7 | -using namespace std; | |
8 | -using namespace jsocket; | |
9 | - | |
10 | -ReceiveXml::ReceiveXml() { | |
11 | - flag = 0; | |
12 | - | |
13 | -} | |
14 | - | |
15 | -ReceiveXml::~ReceiveXml() { | |
16 | - | |
17 | -} | |
18 | - | |
19 | -int ReceiveXml::GetFlagControle() { | |
20 | - return flag; | |
21 | -} | |
22 | - | |
23 | -void ReceiveXml::SetFlagControle(int k) { | |
24 | - flag = k; | |
25 | -} | |
26 | - | |
27 | -void ReceiveXml::Run() { | |
28 | - | |
29 | - int porta = 1234, readed; | |
30 | - unsigned char buffer[100000]; | |
31 | - | |
32 | - DatagramSocket * r_socket = new DatagramSocket(porta); | |
33 | - printf(" => Servidor ligado aguardado pacote...\n"); | |
34 | - while (1) { | |
35 | - readed = r_socket->Receive((char*) buffer, 1); | |
36 | - | |
37 | - if (buffer[0] == 1) { | |
38 | - | |
39 | - readed = r_socket->Receive((char*) buffer, 100000); | |
40 | - flag = 1; | |
41 | - | |
42 | - ofstream os("vlibras_user/vlibras-core/data/configuracoes.xml", ios::binary); | |
43 | - os.write((char*) buffer, readed); | |
44 | - } | |
45 | - if (buffer[0] == 2) { | |
46 | - //printf("Aki: %d", buffer[0]); | |
47 | - flag = 2; | |
48 | - } | |
49 | - } | |
50 | - | |
51 | - r_socket->Close(); | |
52 | - | |
53 | - delete r_socket; | |
54 | -} |