Re: Database

28 views
Skip to first unread message
Message has been deleted

MourKa

unread,
Jan 17, 2017, 8:44:28 AM1/17/17
to omn...@googlegroups.com


On Sunday, January 8, 2017 at 2:38:28 PM UTC+1, Maria Nelago Kanyama wrote:
I have two nodes. Node1 is sending data to node2. I want node2 to store the data from node1 e.g node id, packet etc in a database kind of thing. Is it possible in omnet++? And what should I change in my udpsink app?


yes it is possible
What exactly is working or not working so as to change.

did you try creating this simulation?
Message has been deleted

MourKa

unread,
Jan 17, 2017, 6:46:31 PM1/17/17
to OMNeT++ Users
May be if someone used it before can give you detailed solution. But I found this function and I am not sure if this is what you are looking for?

void UDPSink::processPacket(cPacket *pk)
{
EV_INFO
<< "Received packet: " << UDPSocket::getReceivedPacketInfo(pk) << endl;
emit
(rcvdPkSignal, pk);
delete pk;
numReceived
++;
}

if am not wrong the UDPSocket is the Source UDP socket so you can save it in array.
I would also suspect that this information is already saved as simulation result, so did you check that if the src id of each packet received at the sink is saved in vector information?

On Tuesday, January 17, 2017 at 3:09:48 PM UTC+1, Maria Nelago Kanyama wrote:

I m using the UDPBasicApp and UDPSink which receives the packets. But i want the sink to not discard the received packets but to atleast store the packets with sourceID and stuffs. What I am struggling with is "how do I create a database inet" . Do I just need to modify the UDPsink?

--
You received this message because you are subscribed to the Google Groups "OMNeT++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to omnetpp+u...@googlegroups.com.
Visit this group at https://groups.google.com/group/omnetpp.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages