Skip to content

Commit

Permalink
2 issues resolved.
Browse files Browse the repository at this point in the history
  • Loading branch information
ARLEONTR committed Feb 2, 2024
1 parent 1995fe5 commit 73e9338
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ def senddownbroadcast(self, eventobj: Event, whosends, sequencenumber):
destination = MessageDestinationIdentifiers.NETWORKLAYERBROADCAST
nexthop = MessageDestinationIdentifiers.LINKLAYERBROADCAST
logger.info(f"{self.componentinstancenumber} will SEND a message to {destination} over {nexthop}")
interfaceid = float('inf')
hdr = BroadcastingMessageHeader(BroadcastingMessageTypes.SIMPLEFLOOD, whosends, destination,
nexthop, sequencenumber=sequencenumber)
nexthop, interfaceid=interfaceid,sequencenumber=sequencenumber)
payload = applmsg
broadcastmessage = GenericMessage(hdr, payload)
self.send_down(Event(self, EventTypes.MFRT, broadcastmessage))
Expand Down Expand Up @@ -60,8 +61,10 @@ def on_message_from_bottom(self, eventobj: Event):
self.send_up(evt)
# Also continue flooding once
#time.sleep(random.randint(1, 3))
self.senddownbroadcast(eventobj, eventobj.eventcontent.header.messagefrom,
eventobj.eventcontent.header.sequencenumber)
event = Event(self, BroadcastingEventTypes.BROADCAST, payload)
self.senddownbroadcast(event, eventobj.eventcontent.header.messagefrom, eventobj.eventcontent.header.sequencenumber)
#self.senddownbroadcast(eventobj, eventobj.eventcontent.header.messagefrom,
# eventobj.eventcontent.header.sequencenumber)

def __init__(self, componentname, componentinstancenumber, context=None, configurationparameters=None, num_worker_threads=1, topology=None):
super().__init__(componentname, componentinstancenumber, context, configurationparameters, num_worker_threads, topology)
Expand Down
1 change: 1 addition & 0 deletions adhoccomputing/Generics.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ def emit(self, record: LogRecord) -> None:
logger = getLogger("AHC")
ch = StreamHandler()
chweb = AHCLoggingHttpHandler(host="localhost:8000", url='/logs', method='POST', secure=False)

def setAHCLogLevel(level):
logger.setLevel(level)
ch.setLevel(level)
Expand Down
2 changes: 1 addition & 1 deletion documentation/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
project = 'Ad Hoc Computing Framework'
copyright = '2024, Ertan Onur'
author = 'Ertan Onur'
release = 'v2.1.5'
release = 'v2.1.6'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[build-system]
requires = [
"setuptools>=42",
"setuptools>=61.0",
"wheel"
]
build-backend = "setuptools.build_meta"
build-backend = "setuptools.build_meta"
9 changes: 2 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,15 @@
setup(
# TODO: Fix the configs in this part
name='adhoccomputing',
version='2.1.5',
version='2.1.6',
description="Ad Hoc Computing Library",
long_description=long_description,
long_description_content_type="text/markdown",
url='https://github.com/cengwins/ahc',
author='CengWins',
author_email='[email protected]',
license='BSD 2-clause',
license='GPL V3',
packages=find_packages(),
install_requires=[
'matplotlib',
'networkx',
'setuptools',
],
project_urls={
"Bug Tracker": "https://github.com/cengwins/ahc/issues",
"Simulator Website": "https://ahc.ceng.metu.edu.tr"
Expand Down

0 comments on commit 73e9338

Please sign in to comment.