@@ -278,6 +278,9 GR_ESB_Manager::GR_ESB_Manager(socexplor | |||
|
278 | 278 | { |
|
279 | 279 | this->Read_soc = new QTcpSocket(this); |
|
280 | 280 | this->Write_soc = new QTcpSocket(this); |
|
281 | this->sourceLogicalAddress=32; | |
|
282 | this->destinationLogicalAddress=254; | |
|
283 | this->destinationKey=2; | |
|
281 | 284 | } |
|
282 | 285 | |
|
283 | 286 | GR_ESB_Manager::~GR_ESB_Manager() |
@@ -351,12 +354,12 bool GR_ESB_Manager::connectBridge() | |||
|
351 | 354 | int timeout=60; |
|
352 | 355 | if(this->Read_soc->state()==QTcpSocket::UnconnectedState) |
|
353 | 356 | { |
|
354 |
this->Read_soc->connectToHost(IP,gresb_Conf[virtualLinkIndex]. |
|
|
357 | this->Read_soc->connectToHost(IP,gresb_Conf[virtualLinkIndex].Write_port); | |
|
355 | 358 | this->Read_soc->waitForConnected(30000); |
|
356 | 359 | } |
|
357 | 360 | if(this->Write_soc->state()==QTcpSocket::UnconnectedState) |
|
358 | 361 | { |
|
359 |
this->Write_soc->connectToHost(IP,gresb_Conf[virtualLinkIndex]. |
|
|
362 | this->Write_soc->connectToHost(IP,gresb_Conf[virtualLinkIndex].Read_port); | |
|
360 | 363 | this->Write_soc->waitForConnected(30000); |
|
361 | 364 | } |
|
362 | 365 | while((this->Read_soc->state()!=QTcpSocket::ConnectedState) && (this->Write_soc->state()!=QTcpSocket::ConnectedState)) |
@@ -405,9 +408,9 bool GR_ESB_Manager::sendPacket(char *pa | |||
|
405 | 408 | { |
|
406 | 409 | SPWpacket[0]=0; //Protocol = spw |
|
407 | 410 | memcpy(SPWpacket+4,packet,size); |
|
408 | SPWpacket[1]=size & 0x0FF; | |
|
411 | SPWpacket[1]=(size>>16) & 0x0FF; | |
|
409 | 412 | SPWpacket[2]=(size>>8) & 0x0FF; |
|
410 |
SPWpacket[3]= |
|
|
413 | SPWpacket[3]=size & 0x0FF; | |
|
411 | 414 | } |
|
412 | 415 | this->handleMutex->lock(); |
|
413 | 416 | result = ((size+4) == this->Write_soc->write(SPWpacket,size+4)); |
General Comments 0
You need to be logged in to leave comments.
Login now