Transceiver52M: Rearrange socket port assignemnts

Style change for clarity only.

Signed-off-by: Thomas Tsou <tom@tsou.cc>
This commit is contained in:
Thomas Tsou 2013-11-13 22:40:44 -05:00
parent b075dd2f73
commit e1ce92599a
1 changed files with 8 additions and 4 deletions

View File

@ -113,6 +113,7 @@ Transceiver::~Transceiver()
bool Transceiver::init()
{
int d_srcport, d_dstport, c_srcport, c_dstport;
signalVector *burst;
if (!mChans) {
@ -139,10 +140,13 @@ bool Transceiver::init()
mClockSocket = new UDPSocket(mBasePort, mAddr.c_str(), mBasePort + 100);
for (size_t i = 0; i < mChans; i++) {
mDataSockets[i] = new UDPSocket(mBasePort + 2 * i + 2, mAddr.c_str(),
mBasePort + 2 * i + 102);
mCtrlSockets[i] = new UDPSocket(mBasePort + 2 * i + 1, mAddr.c_str(),
mBasePort + 2 * i + 101);
c_srcport = mBasePort + 2 * i + 1;
c_dstport = mBasePort + 2 * i + 101;
d_srcport = mBasePort + 2 * i + 2;
d_dstport = mBasePort + 2 * i + 102;
mCtrlSockets[i] = new UDPSocket(c_srcport, mAddr.c_str(), c_dstport);
mDataSockets[i] = new UDPSocket(d_srcport, mAddr.c_str(), d_dstport);
}
for (size_t i = 0; i < mChans; i++) {