Hi all,
Does anyone know how to read the hostInfo value that is passed into the drvAsynIPPortConfigure function ?
Basically, I have this in my startup script:
epicsEnvSet("IPADDR", "192.168.50.2")
epicsEnvSet("IPPORT", "65535")
drvAsynIPPortConfigure("L0", "$(IPADDR):$(IPPORT) UDP", 0, 0, 1)
And in my c++ code:
status = pasynOctetSyncIO->connect(address_info.c_str(), 0, &pasynUserOctet_, NULL); // where address_info is the portName
So, I tried following the steps inside asynRecord.c:
asynInterface *pasynInterface;
pasynInterface = pasynManager->findInterface(pasynUserOctet_, asynCommonType, 1);
void *asynOptionPvt;
asynOption *pasynOption;
pasynOption = (asynOption *) pasynInterface->pinterface;
asynOptionPvt = pasynInterface->drvPvt;
char hostbuff[100];
getOption(asynOptionPvt, pasynUserOctet_, "hostInfo", hostbuff, 100 );
std::cout << pasynUserOctet_->errorMessage << std::endl;
But I received the message error:
192.168.50.2:65535 UDP: Link already open!
Thanks in advance.
--
Douglas Araujo