root/ResearchApps/PHY/WARPLAB/WARPLab_SISO_MIMO2x2/M_Code/warplab_initNets.m

Revision 839, 0.7 kB (checked in by MelissaDuarte, 4 months ago)

WARPLab Release 02 April 09 2008. Release for 2x2 MIMO and improved SISO. Matlab code is modified to support MIMO. SISO now supports continuous transmission. There is one bitstream for MIMO and one bitstream for SISO. The xps project for MIMO and SISO is different but the M code is the same (The 'warplab_' functions are the same, the argument input to the functions is the only thing that changes from SISO to MIMO).

Line 
1function socketHandles = warplab_initNets(SyncIPAddr, NodeIPAddrs, NodeUDPPorts)
2
3%Prepare the magic SYNC socket
4thisSock = pnet('udpsocket', 10000);
5pnet(thisSock, 'setreadtimeout', 1);
6pnet(thisSock, 'udpconnect', SyncIPAddr, 10000);
7%SYNC port should be bigger!
8
9socketHandles = [thisSock];
10
11for n = 1:length(NodeIPAddrs)
12
13        %UDP Connections to individual nodes
14        thisSock = pnet('udpsocket', NodeUDPPorts(n));
15        if (thisSock == -1),
16                errordlg('Could not establish UDP connection.', 'Error');
17                pnet('closeall');
18                delete(hObject);
19        end
20        pnet(thisSock, 'udpconnect', warplab_int2IP(NodeIPAddrs(n)), NodeUDPPorts(n));
21        pnet(thisSock, 'setreadtimeout', 1);
22        socketHandles = [socketHandles thisSock];
23end
Note: See TracBrowser for help on using the browser.