University | Singapore University of Social Science (SUSS) |
Subject | ICT259: Computer Networking |
Assignment Brief:
I would like to write an OMNET++ program where there are 5 nodes connected to a hub. The requirements are each node will send 10 messages per second to the hub. Upon receiving the message, the hub will forward the message to all nodes except the sender. I have written Hub. cc. The content of Hub. cc is as below:
#include<omnetpp.h>
class Hub: a public simple module
{
protected:
virtual void initialize();
virtual void
handleMessage(cMessage *msg);
virtual void finish();
};
Define_Module(Hub);
void Hub::handleMessage(cMessage *msg)
{
cGate *g= msg->getArrivalGate();
int i;
for(i=0;i<g->size();i++)
{
if(i!=g->getIndex())
send(msg->dup(),”out”,i);
}
}
And I have created the Hub. ned file with the content as below:
Simple Hub
{
gates:
input in[];
output out[];
}
I have created Net2.ned with contents as below:
network Net2
{ parameters:
int n_nodes;
submodules:
hub: Hub;
node[n_nodes]: Node ;
connections:
for i=0..n_nodes-1
{
node[i].out –> hub.in++;
hub.out++ –> node[i].in;
}
}
I have created omnetpp2.ini and added the following code to this file:
**.n_nodes = 5
Hire a Professional Essay & Assignment Writer for completing your Academic Assessments
Native Singapore Writers Team
- 100% Plagiarism-Free Essay
- Highest Satisfaction Rate
- Free Revision
- On-Time Delivery
Are you desperately searching for (ICT259) computer networking assignment help? then don't worry Singapore assignment help experts serve excellent help on networking assignment with absolute care. You can also hire our urgent assignment help service to get the unique solution on dissertation writing, report writing, case-study, and assignment writing and they help you in getting an outstanding grade on your assignment.
Looking for Plagiarism free Answers for your college/ university Assignments.
- ECE210 Advocacy and Collaborations with Families Assignment: Supporting Young Children Through Grief and Family-Centered Partnerships
- ACC707 Accounting and Finance Assignment: Evaluating Investment Decisions, Budgeting Strategies, and Financial Performance Analysis
- NCO201 Learn to Learn, Learn for Life TMA-01: Developing Self-Directed Learning Through the Journey of Mastering Public Speaking
- PSS219 Public Safety and Security in Singapore Group-Based Assignment: Strengthening National Resilience Through Policy Responses from the 2025 Committee of Supply Debate
- MTH240 Engineering Mathematics I Assignment: Heat Transfer, Chemical Balancing, Circuit Analysis, Signal Processing, and Matrix Theory
- Engaging Youth with IBM Skills Build Assignment: Designing Innovative Strategies for Skill Development and Career Growth
- BUS368 Innovation Management and Digital Transformation Assignment: Managing Innovation in Foldable, Trifold, and Stretchable Display Technologies
- BUS366 Assignment: Process Improvement and Recruitment Optimization Using Lean Six Sigma Methodology
- HBC203 Statistics and Data Analysis for the Social and Behavioural Sciences TMA-01: A Comparative Analysis of Workplace Wellbeing Interventions and Their Impact on Employee Productivity
- BCAF003 Business Accounting Assignment: A Comprehensive Study on Bank Reconciliation, Cash Controls, Inventory Valuation, and Financial Analysis