473,661 Members | 2,431 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1411
On Jun 27, 8:09*am, "Colin J. Williams" <c...@ncf.cawro te:
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_HOS T, MYNODE_ID)
# print '[netge module] MYnode ID =',mynodeID
netdict = snmpwalk(RIB_HO ST,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=',hea rtbeat

#Send mulitcast heart beat packet of local node view of
network
sock.sendto(hea rtbeat,(MULTICA ST_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(n etdict)

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
6498
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 the other network card is used in intranet whose ipaddress is 192.168.0.1 On computer B: the network card's ipaddress is 192.168.0.2. These two computer can connect to each other.
7
7703
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 working because I can ping the multicast address and get responses from the server on the other network. I didn't think ping would work like that but as long as I have the server process running I can ping the multicast IP and get a response. The...
6
5634
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 (I'm assuming because its listening to both networks), but it seems like it just picks the default to send over. I have implemented the MulticastOption(RemoteIP, LocalIP), but it doesn't seem to be changing the interface it sends over. Here's...
2
2109
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 side, the messages are being sent correctly, but receiving side side is missingout some messages. What could be the problem and how can we solve this problem.
2
3117
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 option and then fire off a thread that calls "receiveFrom()" in a loop. This works sometimes, but other times it'll get into a funk where the "receiveFrom()" call doesn't return even though a packet trace capture (Ethereal) shows that the...
7
8449
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 joins several VLANs using virtual interfaces (i.e. eth0.xxx). It should be able to capture the UDP packets on any interfaces, so it spawns a thread for each interface specified in a config file, and for each thread it creates a socket: ...
1
4154
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")); udpClient.BeginReceive(new AsyncCallback(DoUDPReceive), this); My concern is that it seems to make exclusive use of port 4000 so I worry that in a Citrix environment, it would fail with an AddressAlreadyInUse exception like it does if you run two...
5
8913
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. I really do not undrestand what additional features the "event" keyword adds to multicast delegate. The only thing that I see as an additional feature is a "Thunder Icon" near event name in VS IDE when intellisense works;).
0
1596
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 twisted.application.internet import MulticastServer class MulticastServerUDP(DatagramProtocol): def startProtocol(self): print 'Started Listening'
0
8432
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8758
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8545
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8633
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7364
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5653
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4179
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4346
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1743
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.