473,412 Members | 5,361 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

How to get a multicast to wait for all nodes?

I have a code that receives gps information from nodes and gives off
its own coordinates via radios connected by Ethernet. but the code
continues to run after receiving only 1 set of coordinates, how do i
get it to wait for multiple nodes to send before continuing
Jun 27 '08 #1
1 1395
On Jun 27, 8:09*am, "Colin J. Williams" <c...@ncf.cawrote:
Ryuke wrote:
I have a code that receives gps information from nodes and gives off
its own coordinates via radios connected by Ethernet. *but the code
continues to run after receiving only 1 set of coordinates, how do i
get it to wait for multiple nodes to send before continuing

You might provide wth significant part
of the code you have written.

Colin W.

oops. guess that's important, here's part of it

#Get local node network view data from RIB using SNMP over Ethernet
mynodeID = snmpget(RIB_HOST, MYNODE_ID)
# print '[netge module] MYnode ID =',mynodeID
netdict = snmpwalk(RIB_HOST,MIB_BASE)
netdict[MYNODE_ID] = mynodeID
print '[netge module] MyNode ID = ',netdict[MYNODE_ID]

sorted_keys = sorted(netdict)
# for key in sorted_keys: print '%s\t\t%s' % (key,netdict[key])
for c in netdict[NODE_LIST][1:]: print '[netge module] NbrNode
%d'% ord(c)

#Create heart beat data packet for multicast xfer
# gpsdata.append(time.ctime())
print '[netge module] mynode location =
',netdict[MYNODE_LOCATION]
# netdict[MYNODE_LOCATION] = ' '.join(gpsdata)
netdict[MYNODE_LOCATION] = gpsdata
print '[netge module] mynode location =
',netdict[MYNODE_LOCATION]
heartbeat = ' '.join(netdict[MYNODE_LOCATION])
print '[netge module] heartbeat=',heartbeat

#Send mulitcast heart beat packet of local node view of
network
sock.sendto(heartbeat,(MULTICAST_IP_ADDR, MULTICAST_PORT))
print '[netge module] multicast send'

#Receive mulitcast heart beat data
#ReceiveHB()
print '[netge module] multicast receive=',sock.recv(1024)

#Create KMZ file for local node view of network
# CreateKMZfile(netdict)

node = []
latitude = []
longitude = []
altitude = []
kml_nodes = ''
kml_links = ''

MAX_NUM = int(netdict[NUMBEROFNODES])
# MAX_NUM = len(netdict[NODE_LIST])
# print MAX_NUM
Jun 27 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: PHLICS_Admin | last post by:
Hi All, There are two network cards in one computer (named A) , and there is one network card in another computer(named B). On computer A: one network card is used to connect to internet, and...
7
by: Jim H | last post by:
Is there something special I need to do to send data to a multicast IP and have it go across a router? Router is a Win2000 Server connecting 2 networks via RRAS PPTP. The routing appears to be...
6
by: Tom Kent | last post by:
I have a computer with two network cards (attached to seperate networks) and I am having trouble getting my C# application to send its multicast packets on a specific one. It receives just fine...
2
by: Naveen Mukkelli | last post by:
Hi, I'm sending multicast messages UDP socket and C#. But the receiving clients are not receiving all the messages. Receiving clients are missing out some messages. When I debug the server...
2
by: Terry | last post by:
I've got a strange problem receiving multicast packets in a C# application. What's strange is that it works *sometimes* but not always. I create a socket, call bind(), set the multicast socket...
7
by: pietro.cerutti | last post by:
Hi guys, I have a daemon running on Debian and listening for multicast packets sent to 224.0.0.251:5353 (ZeroConf Multicast DNS queries). The server is plugged into a VLAN trunk with eth0 and...
1
by: Jayme.Pechan | last post by:
I was working on a multicast client and ran into a possible problem. Here is the code... udpClient = new UdpClient(4000); udpClient.JoinMulticastGroup(IPAddress.Parse("224.1.1.1"));...
5
by: AliRezaGoogle | last post by:
Hi, I have a conceptual question on Events and Multicast Delegates. Let me explain: As we know an event is a multicast delegate. What we declare as an event is inherently a multicast delegate....
0
by: Stodge | last post by:
I'm trying to get a simple multicast application working using Twisted; so far I have: from twisted.internet.protocol import DatagramProtocol from twisted.internet import reactor from...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.