The demo talks like anyone, in English

The demo's conversations are plain English about ordinary things: the
mesh, the meetup, a bike ride, the weather, a family dinner. The props
are gone: no poutine, smoked meat, or tuque, and Poutine Patrol and
Bixi Bandit are now Steve K. and Nico R. Our node is Alex Base. The
room, the sensors, two channels (#cycling, Family), and the regions
(south-shore, west-island, mtl-west...) have English names.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jean-Pierre MartineauandClaude Opus 5.5 committed 2026-10-16 01:45:14 -04:00
1 parent 4397bd58ec
commit 058effe42d
2 files changed
+124 -123

No files matched your search

+99 -98
View File
@@ -1,12 +1,13 @@
# SPDX-License-Identifier: Apache-2.0
"""What the people of the demo world say: the channels, the direct messages, and the room.
The conversations are in French and in English, as on the real mesh of Montréal. Each line
has a time on a virtual clock (refer to :func:`at`). The virtual clock sets "now" at
:data:`NOW_LOCAL`, a late morning on a weekday. The history writes each line at its age
before the real time of the run. Thus the ages on the screens ("12m ago") are the same at
each run. When the clock of the run is also set to that morning (the screenshots do
this), the times of day are correct too: the plan for lunch is made before lunch.
The conversations are in English, and they are about ordinary things: the mesh, a
meetup, a bike ride, the weather, a family dinner. Each line has a time on a virtual clock
(refer to :func:`at`). The virtual clock sets "now" at :data:`NOW_LOCAL`, a late morning
on a weekday. The history writes each line at its age before the real time of the run.
Thus the ages on the screens ("12m ago") are the same at each run. When the clock of the
run is also set to that morning (the screenshots do this), the times of day are correct
too: the plan for lunch is made before lunch.
The script only holds text and times. :mod:`meshterm.demo.history` turns each line into
the stored message and into the packets that our node heard when the line went over the
@@ -69,31 +70,29 @@ CHANNEL_LINES: dict[str, tuple[Line, ...]] = {
Line(
at(6, "20:12"),
"Félix",
"Nouveau répéteur à Longueuil, sur le toit de mon immeuble. Qui m'entend?",
),
Line(
at(6, "20:15"), "Poutine Patrol", "Reçu fort et clair depuis le Vieux-Longueuil, +9 dB"
"New repeater up in Longueuil, on the roof of my building. Can anyone hear it?",
),
Line(at(6, "20:15"), "Steve K.", "Loud and clear from Old Longueuil, +9 dB"),
Line(
at(6, "20:21"),
"Ana Brossard",
"Heard it from Brossard too, two hops through Mont-Royal",
),
Line(at(6, "20:24"), "Félix", "Merci! Je le laisse en test cette semaine"),
Line(at(6, "20:24"), "Félix", "Thanks! I'll leave it in test mode this week"),
Line(at(5, "21:40"), "Kim-NDG", "Anyone else getting duplicates through Oratoire tonight?"),
Line(
at(5, "21:46"),
"Jean-Seb",
"C'est normal, Oratoire et Mont-Royal s'entendent très bien. Rien de cassé.",
"That's expected, Oratoire and Mont-Royal hear each other really well. Nothing broke.",
),
Line(at(5, "21:48"), "Kim-NDG", "ok good, I thought my T-Deck was haunted 👻"),
Line(
at(4, "07:55"),
"Sam Verdun",
"Verdun-Quai est hors ligne, batterie à plat. Je monte sur le toit demain matin",
"Verdun-Quai is offline, flat battery. I'll go up on the roof tomorrow morning",
),
Line(at(3, "08:31"), "Sam Verdun", "Verdun-Quai est de retour, batterie neuve 🔋"),
Line(at(3, "08:40"), ME, "Merci Sam! Je le reçois via Mont-Royal à +3 dB"),
Line(at(3, "08:31"), "Sam Verdun", "Verdun-Quai is back with a new battery 🔋"),
Line(at(3, "08:40"), ME, "Thanks Sam! Getting it through Mont-Royal at +3 dB"),
Line(
at(2, "21:05"),
"Dave-Lachine",
@@ -101,102 +100,108 @@ CHANNEL_LINES: dict[str, tuple[Line, ...]] = {
),
Line(
at(2, "21:19"),
"Bixi Bandit",
"Riding up Berri with a node in my bag, pinging every 2 min. Zero drops so far 🚲",
"Nico R.",
"Biking up Berri with a node in my bag, pinging every 2 min. Zero drops so far 🚲",
),
Line(
at(1, "12:10"),
"Chloé L.",
"The leaves are peaking on the mountain, great day for a walk",
),
Line(at(1, "12:10"), "Chloé L.", "Les couleurs sont superbes sur le mont Royal 🍁"),
Line(
at(1, "12:25"),
"Jean-Seb",
"Et le répéteur du chalet entend tout le monde, même à travers les feuilles 😄",
"And the repeater at the chalet hears everyone, even through the trees 😄",
),
Line(at(0, "07:48"), "Noor", "Premier test depuis Saint-Laurent, quelqu'un me reçoit?"),
Line(at(0, "07:52"), "Marie-Ève", "@[Noor] reçu via Mont-Royal, +6 dB. Bienvenue!"),
Line(at(0, "07:48"), "Noor", "First test from Saint-Laurent, can anyone hear me?"),
Line(at(0, "07:52"), "Marie-Ève", "@[Noor] got you through Mont-Royal, +6 dB. Welcome!"),
Line(
at(0, "10:05"),
"Mathilde",
"Bonjour la gang! Première fois sur MeshCore, je suis à Saint-Henri 👋",
at(0, "10:05"), "Mathilde", "Hi everyone! First time on MeshCore, I'm in Saint-Henri 👋"
),
Line(at(0, "10:08"), "Marie-Ève", "Bienvenue @[Mathilde]! Tu passes par quel répéteur?"),
Line(at(0, "10:12"), "Mathilde", "Mont-Royal je pense, ou Oratoire. Comment je vérifie?"),
Line(
at(0, "10:08"),
"Marie-Ève",
"Welcome @[Mathilde]! Which repeater are you going through?",
),
Line(at(0, "10:12"), "Mathilde", "Mont-Royal I think, or Oratoire. How do I check?"),
Line(
at(0, "10:15"),
ME,
"Ton advert m'arrive en un hop via Mont-Royal, SNR +8. Trace path te montre tout",
"Your advert reaches me in one hop through Mont-Royal, SNR +8. Trace path shows it all",
),
Line(
at(0, "10:40"), "Jean-Seb", "Rappel: rencontre mesh samedi 14h au marché Jean-Talon ☕"
at(0, "10:40"),
"Jean-Seb",
"Reminder: mesh meetup Saturday at 2 pm, Jean-Talon market ☕",
),
Line(
at(0, "11:01"),
"Noor",
"@[Ruelle Verte] t'as encore la carte de couverture? On veut la voir samedi",
"@[Alex Base] do you still have the coverage map? We'd love to see it Saturday",
),
Line(
at(0, "11:04"),
ME,
"Oui! https://www.openstreetmap.org/#map=11/45.5200/-73.6400 je l'apporte imprimée",
),
Line(at(0, "11:30"), "Poutine Patrol", "J'apporte des poutines pour tout le monde 🍟"),
Line(
at(0, "11:39"), "Félix", "Longueuil ↔ Stade à +6 dB depuis la nouvelle antenne, enfin!"
"Yes! https://www.openstreetmap.org/#map=11/45.5200/-73.6400 I'll bring a printout",
),
Line(at(0, "11:30"), "Steve K.", "I'll bring a spare antenna for anyone who needs one"),
Line(at(0, "11:39"), "Félix", "Longueuil ↔ Stade at +6 dB since the new antenna, finally!"),
),
"#montreal": (
Line(
at(6, "18:40"),
"Raphaël",
"Pont Viau fermé ce soir pour des travaux, passez par Papineau",
"Pont Viau is closed tonight for roadwork, take Papineau instead",
),
Line(
at(4, "16:10"),
"Olivier.T",
"Anyone know if the Jean-Talon market is open late on Thursday?",
),
Line(at(4, "16:21"), "Marie-Ève", "Jusqu'à 18h je crois, 20h le vendredi"),
Line(at(3, "18:05"), "Olivier.T", "Bixi stations are all full downtown, good luck tonight"),
Line(at(4, "16:21"), "Marie-Ève", "Until 6 I think, and 8 on Fridays"),
Line(at(3, "18:05"), "Olivier.T", "Bike stations are all full downtown, good luck tonight"),
Line(
at(3, "20:05"),
"Jean-Seb",
"Panne de courant à Ahuntsic. Les nœuds sur batterie tiennent le coup 💪",
),
Line(
at(3, "20:13"), "Félix", "Même chose à Hochelaga, mais Stade-Olympique n'a rien senti"
"Power outage in Ahuntsic. The nodes on batteries are holding up fine 💪",
),
Line(at(3, "20:13"), "Félix", "Same in Hochelaga, but Stade-Olympique didn't even notice"),
Line(
at(1, "09:15"),
"Chloé L.",
"Neige annoncée la semaine prochaine. Rentrez vos antennes de balcon ⛄",
"Snow in the forecast next week. Time to bring in the balcony antennas ⛄",
),
Line(
at(0, "07:40"),
ME,
"Quelqu'un a vu la grue sur Saint-Denis? Elle bloque mon lien vers Stade 😑",
"Anyone seen the crane on Saint-Denis? It's blocking my link to Stade 😑",
),
Line(at(0, "07:48"), "Félix", "Haha, la grue a un meilleur SNR que nous autres"),
Line(at(0, "07:48"), "Félix", "Ha, the crane has a better SNR than the rest of us"),
Line(
at(0, "08:10"),
"Raphaël",
"La ligne orange roule au ralenti entre Henri-Bourassa et Montmorency",
"Orange line is running slow between Henri-Bourassa and Montmorency",
),
Line(at(0, "11:20"), "Kim-NDG", "Smoked meat run at noon, who's in?"),
Line(at(0, "11:24"), "Poutine Patrol", "Toujours."),
Line(at(0, "11:27"), "Sam Verdun", "Moi! On se rejoint au métro?"),
Line(
at(0, "11:20"), "Kim-NDG", "Anyone up for lunch near the Atwater market? Around 12:30"
),
Line(at(0, "11:24"), "Steve K.", "Can't today, working from home"),
Line(at(0, "11:27"), "Sam Verdun", "I'm in! Meet at the main entrance?"),
),
"#velo": (
"#cycling": (
Line(
at(5, "10:20"),
"Bixi Bandit",
"Tour du canal de Lachine dimanche 9h, départ au marché Atwater",
"Nico R.",
"Lachine Canal ride on Sunday at 9, leaving from the Atwater market",
),
Line(
at(5, "10:31"), "Dave-Lachine", "Count me in. I'll bring the T-Deck for a coverage test"
),
Line(at(5, "10:52"), "Sam Verdun", "Je serai là avec le vélo cargo 🚲"),
Line(at(5, "10:52"), "Sam Verdun", "I'll be there with the cargo bike 🚲"),
Line(
at(3, "13:30"),
"Bixi Bandit",
"Résultat du tour: 11 répéteurs entendus entre Atwater et Lachine",
"Nico R.",
"Ride results: 11 repeaters heard between Atwater and Lachine",
),
Line(
at(3, "13:42"), "Dave-Lachine", "And the Lachine repeater heard all of us. Great test!"
@@ -204,20 +209,18 @@ CHANNEL_LINES: dict[str, tuple[Line, ...]] = {
Line(
at(1, "16:20"),
"Sam Verdun",
"La piste du REV Saint-Denis est encore en travaux près de Jean-Talon",
),
Line(
at(0, "09:30"), "Bixi Bandit", "Quelqu'un pour une montée du mont Royal demain matin?"
"The Saint-Denis bike lane is still under construction near Jean-Talon",
),
Line(at(0, "09:30"), "Nico R.", "Anyone up for a ride up the mountain tomorrow morning?"),
),
"Famille": (
Line(at(4, "19:02"), "Léa", "Souper chez grand-maman dimanche, 17h"),
Line(at(4, "19:10"), ME, "Parfait, j'apporte le dessert"),
Line(at(4, "19:12"), "Léa", "N'oublie pas la tourtière de tante Jo!"),
Line(at(1, "17:41"), "Léa", "T'es où? Le souper est prêt 😄"),
Line(at(1, "17:44"), ME, "J'arrive, je suis au coin de la rue"),
Line(at(0, "08:15"), "Léa", "Il fait 2 degrés ce matin, prends ta tuque!"),
Line(at(0, "08:18"), ME, "Trop tard, je suis déjà dehors 🥶"),
"Family": (
Line(at(4, "19:02"), "Léa", "Dinner at Grandma's on Sunday, 5 pm"),
Line(at(4, "19:10"), ME, "Perfect, I'll bring dessert"),
Line(at(4, "19:12"), "Léa", "Don't forget the folding chairs!"),
Line(at(1, "17:41"), "Léa", "Where are you? Dinner's ready 😄"),
Line(at(1, "17:44"), ME, "Almost there, just around the corner"),
Line(at(0, "08:15"), "Léa", "It's 2 degrees this morning, dress warm!"),
Line(at(0, "08:18"), ME, "Too late, I'm already outside 🥶"),
),
}
@@ -227,13 +230,13 @@ DIRECT_LINES: dict[str, tuple[Line, ...]] = {
Line(
at(7, "09:12"),
"Jean-Seb",
"Peux-tu redémarrer Stade-Olympique? Il ne répond plus aux logins",
"Can you reboot Stade-Olympique? It stopped answering logins",
),
Line(at(7, "09:31"), ME, "C'est fait, il est revenu"),
Line(at(7, "09:31"), ME, "Done, it's back"),
),
"Bixi Bandit": (
Line(at(2, "17:02"), "Bixi Bandit", "Le lien vers Mont-St-Hilaire tient la route?"),
Line(at(2, "17:06"), ME, "Oui, -5 dB depuis Mont-Royal. Fragile, mais ça passe"),
"Nico R.": (
Line(at(2, "17:02"), "Nico R.", "Is the link to Mont-St-Hilaire holding up?"),
Line(at(2, "17:06"), ME, "Yes, -5 dB from Mont-Royal. Fragile, but it works"),
),
"Dave-Lachine": (
Line(
@@ -242,58 +245,56 @@ DIRECT_LINES: dict[str, tuple[Line, ...]] = {
"Can you trace me from Lachine tonight? Testing the path through Oratoire",
),
Line(at(2, "20:51"), "Dave-Lachine", "Done: 3 hops, worst link -2.5 dB at Oratoire"),
Line(at(2, "20:55"), ME, "Merci Dave!", acked=False),
Line(at(2, "20:55"), ME, "Thanks Dave!", acked=False),
),
"Marie-Ève": (
Line(at(1, "18:20"), "Marie-Ève", "Tu viens à la rencontre samedi?"),
Line(at(1, "18:31"), ME, "Oui! J'apporte deux nœuds de rechange pour les nouveaux"),
Line(at(1, "18:40"), "Marie-Ève", "Super. Je réserve une table au café du marché"),
Line(at(1, "18:44"), ME, "Parfait, à samedi 👍"),
Line(
at(0, "10:50"), "Marie-Ève", "Mathilde est nouvelle, tu peux l'aider avec son Heltec?"
),
Line(at(0, "10:53"), ME, "Bien sûr, je lui écris"),
Line(at(1, "18:20"), "Marie-Ève", "Are you coming to the meetup on Saturday?"),
Line(at(1, "18:31"), ME, "Yes! I'm bringing two spare nodes for the newcomers"),
Line(at(1, "18:40"), "Marie-Ève", "Great. I'll book a table at the café in the market"),
Line(at(1, "18:44"), ME, "Perfect, see you Saturday 👍"),
Line(at(0, "10:50"), "Marie-Ève", "Mathilde is new, could you help her set up her Heltec?"),
Line(at(0, "10:53"), ME, "Of course, I'll message her"),
),
"Mathilde": (
Line(
at(0, "10:55"),
ME,
"Salut! Marie-Ève m'a dit que tu commences. Besoin d'aide pour le Heltec?",
"Hi! Marie-Ève said you're just getting started. Need a hand with the Heltec?",
),
Line(at(0, "11:10"), "Mathilde", "Oui merci! Je ne sais pas quelle fréquence choisir"),
Line(at(0, "11:12"), ME, "910.525 MHz, BW 62.5, SF7. C'est le réglage de Montréal"),
Line(at(0, "11:20"), "Mathilde", "Ça marche! Je vois trois répéteurs maintenant 🎉"),
Line(at(0, "11:10"), "Mathilde", "Yes please! I'm not sure which frequency to use"),
Line(at(0, "11:12"), ME, "910.525 MHz, BW 62.5, SF7. That's what the Montréal mesh uses"),
Line(at(0, "11:20"), "Mathilde", "That worked! I can see three repeaters now 🎉"),
),
}
#: The board of each room, oldest post first. The room name as the sender is a notice of
#: the room admin. ``5e1d9c07`` is a member that no contact of our node names.
ROOM_LINES: dict[str, tuple[Line, ...]] = {
"Le Babillard": (
"MTL BBS": (
Line(
at(2, "19:30"),
"Jean-Seb",
"Rencontre mesh samedi 14h au café du marché Jean-Talon. Apportez vos nœuds!",
"Mesh meetup Saturday at 2 pm, at the café in the Jean-Talon market. Bring your nodes!",
),
Line(at(2, "19:50"), "Marie-Ève", "J'y serai, avec des antennes à donner"),
Line(at(2, "19:50"), "Marie-Ève", "I'll be there, with a few antennas to give away"),
Line(
at(1, "12:50"),
"Noor",
"Perdu: un Heltec V3 dans un boîtier jaune, parc La Fontaine. Récompense: une poutine",
"Lost: a Heltec V3 in a yellow case, somewhere in La Fontaine Park. Reward offered",
),
Line(at(1, "13:00"), "Poutine Patrol", "J'offre la poutine si tu le retrouves 😄"),
Line(at(1, "13:00"), "Steve K.", "I'll keep an eye out, I walk through there every day"),
Line(
at(1, "22:50"),
"Le Babillard",
"Maintenance de Mont-Royal mardi de 22h à 23h. Prévoyez des détours.",
"MTL BBS",
"Mont-Royal maintenance on Tuesday from 10 to 11 pm. Expect detours.",
),
Line(at(0, "07:50"), "5e1d9c07", "Quelqu'un a un connecteur SMA à prêter?"),
Line(at(0, "08:40"), "Félix", "Moi, passe à Hochelaga quand tu veux"),
Line(at(0, "08:50"), ME, "J'apporte le testeur d'antennes samedi"),
Line(at(0, "07:50"), "5e1d9c07", "Does anyone have an SMA adapter I could borrow?"),
Line(at(0, "08:40"), "Félix", "I do, come by Hochelaga anytime"),
Line(at(0, "08:50"), ME, "I'm bringing the antenna analyzer on Saturday"),
Line(
at(0, "10:30"), "Kim-NDG", "Slides from the last meetup are on the board, ask Jean-Seb"
),
Line(at(0, "11:25"), "Jean-Seb", "Il reste six places pour samedi"),
Line(at(0, "11:25"), "Jean-Seb", "Six spots left for Saturday"),
),
}
@@ -301,15 +302,15 @@ ROOM_LINES: dict[str, tuple[Line, ...]] = {
#: first one is a direct message, so the header shows one unread message soon after the
#: start. The age of each line is unused.
LIVE_DIRECT: tuple[tuple[float, Line], ...] = (
(6.0, Line(0.0, "Bixi Bandit", "T'as vu le record? 34 km jusqu'à Mont-St-Hilaire 🔥")),
(6.0, Line(0.0, "Nico R.", "Did you see the record? 34 km to Mont-St-Hilaire 🔥")),
)
LIVE_CHANNEL: tuple[tuple[float, str, Line], ...] = (
(
45.0,
"Public",
Line(0.0, "Chloé L.", "Quelqu'un monte au mont Royal demain pour un test de portée?"),
Line(0.0, "Chloé L.", "Anyone heading up the mountain tomorrow for a range test?"),
),
(160.0, "#montreal", Line(0.0, "Kim-NDG", "Le 80 est encore en retard sur du Parc 🙄")),
(160.0, "#montreal", Line(0.0, "Kim-NDG", "The 80 bus is late again on Parc 🙄")),
)
#: The traces that our node ran in the past days, as ``(age in minutes, target, path)``.
+25 -25
View File
@@ -111,7 +111,7 @@ _R, _C, _ROOM, _S = NODE_TYPE_REPEATER, NODE_TYPE_CHAT, NODE_TYPE_ROOM, NODE_TYP
#: Our node: the companion that the demo device is. It stands in La Petite-Patrie, near the
#: Jean-Talon market, with an antenna on the roof of a triplex.
SELF = Node("Ruelle Verte", 0x91, _C, 45.5350, -73.6030, 2.0, first_heard_days=400.0)
SELF = Node("Alex Base", 0x91, _C, 45.5350, -73.6030, 2.0, first_heard_days=400.0)
# fmt: off
#: The other nodes of the world. The repeaters stand on the high points. The companions are
@@ -133,15 +133,15 @@ NODES: tuple[Node, ...] = (
Node("Mont-St-Bruno", 0xE1, _R, 45.5530, -73.3260, 13.0, first_heard_days=280.0),
Node("Mont-St-Hilaire", 0x61, _R, 45.5490, -73.1570, 15.0, first_heard_days=45.0),
# The room servers.
Node("Le Babillard", 0x3B, _ROOM, 45.5225, -73.5840, 4.0, first_heard_days=330.0),
Node("MTL BBS", 0x3B, _ROOM, 45.5225, -73.5840, 4.0, first_heard_days=330.0),
Node("Café Mesh", 0x64, _ROOM, 45.5250, -73.5990, 3.0, first_heard_days=60.0,
quiet_hours=9 * 24.0),
# The sensors.
Node("Météo-Verdun", 0x58, _S, 45.4585, -73.5660, 3.0, first_heard_days=200.0,
Node("Verdun Weather", 0x58, _S, 45.4585, -73.5660, 3.0, first_heard_days=200.0,
talk=0.6),
Node("Lac-aux-Castors", 0x9E, _S, 45.4985, -73.5970, 4.0, first_heard_days=150.0,
Node("Beaver Lake", 0x9E, _S, 45.4985, -73.5970, 4.0, first_heard_days=150.0,
talk=0.6),
Node("Niveau-Fleuve", 0xCB, _S, 45.5110, -73.5470, 2.0, first_heard_days=110.0,
Node("River Gauge", 0xCB, _S, 45.5110, -73.5470, 2.0, first_heard_days=110.0,
talk=0.6, quiet_hours=30.0),
# The companions: the people of the mesh.
Node("Marie-Ève", 0xE6, _C, 45.5255, -73.5790, 1.0, first_heard_days=320.0,
@@ -152,12 +152,12 @@ NODES: tuple[Node, ...] = (
talk=1.2),
Node("Dave-Lachine", 0x84, _C, 45.4385, -73.6710, 2.0, first_heard_days=150.0),
Node("Kim-NDG", 0xBF, _C, 45.4735, -73.6145, 1.0, first_heard_days=260.0),
Node("Bixi Bandit", 0x94, _C, 45.5110, -73.5695, 0.0, shares_location=False,
Node("Nico R.", 0x94, _C, 45.5110, -73.5695, 0.0, shares_location=False,
first_heard_days=90.0, talk=1.3),
Node("Noor", 0x50, _C, 45.5075, -73.6880, 1.0, first_heard_days=75.0),
Node("Chloé L.", 0xC9, _C, 45.5170, -73.6060, 1.0, first_heard_days=220.0),
Node("Sam Verdun", 0x68, _C, 45.4610, -73.5690, 1.0, first_heard_days=240.0),
Node("Poutine Patrol", 0x22, _C, 45.5340, -73.5050, 1.0, first_heard_days=40.0),
Node("Steve K.", 0x22, _C, 45.5340, -73.5050, 1.0, first_heard_days=40.0),
Node("Olivier.T", 0x33, _C, 45.5455, -73.5770, 1.0, first_heard_days=180.0,
quiet_hours=50.0),
Node("Raphaël", 0x0B, _C, 45.5810, -73.7480, 1.0, first_heard_days=130.0,
@@ -178,7 +178,7 @@ NODES: tuple[Node, ...] = (
first_heard_days=3.0, talk=0.4),
Node("Wio Tracker", 0xA0, _C, 45.4650, -73.5480, 0.0, added=False,
first_heard_days=12.0, quiet_hours=20.0, talk=0.4),
Node("Station Mobile", 0xB2, _C, 45.5200, -73.5300, 0.0, shares_location=False,
Node("Mobile Node", 0xB2, _C, 45.5200, -73.5300, 0.0, shares_location=False,
added=False, first_heard_days=1.5, talk=0.4),
)
# fmt: on
@@ -479,13 +479,13 @@ class Channel:
scope: str | None = None
#: The channels of the demo device. ``Famille`` is a private channel, with a fixed secret
#: The channels of the demo device. ``Family`` is a private channel, with a fixed secret
#: that is not derived from its name.
CHANNELS: tuple[Channel, ...] = (
Channel(0, "Public", DEFAULT_PUBLIC_SECRET),
Channel(1, "#montreal", derive_secret("#montreal"), scope="mtl"),
Channel(2, "#velo", derive_secret("#velo")),
Channel(3, "Famille", hashlib.sha256(b"meshterm-demo/Famille").digest()[:16]),
Channel(2, "#cycling", derive_secret("#cycling")),
Channel(3, "Family", hashlib.sha256(b"meshterm-demo/Family").digest()[:16]),
)
#: Hashtag channels that other people of the mesh use and our device does not have. Our
@@ -498,33 +498,33 @@ FOREIGN_CHANNELS: tuple[bytes, ...] = tuple(
#: The region table of each repeater, as ``(name, parent, allows floods)`` rows, in the
#: form that :class:`~meshterm.core.region_sim.SimulatedRegionMap` takes. The island
#: carries ``mtl``, the north shore ``laval``, and the south shore ``rive-sud``. Each
#: carries ``mtl``, the north shore ``laval``, and the south shore ``south-shore``. Each
#: repeater also carries the region of the whole province.
REGION_TABLES: dict[str, list[tuple[str, str, bool]]] = {}
_ISLAND = [("qc", "*", True), ("mtl", "qc", True), ("mtl-ouest", "mtl", True)]
_ISLAND = [("qc", "*", True), ("mtl", "qc", True), ("mtl-west", "mtl", True)]
_NORTH = [("qc", "*", True), ("mtl", "qc", True), ("laval", "qc", True)]
_SOUTH = [("qc", "*", True), ("mtl", "qc", False), ("rive-sud", "qc", True)]
_SOUTH = [("qc", "*", True), ("mtl", "qc", False), ("south-shore", "qc", True)]
for _name in ("Oratoire", "Centre-Ville", "Stade-Olympique", "Verdun-Quai", "Ahuntsic"):
REGION_TABLES[_name] = _ISLAND
for _name in ("Lachine", "Pointe-Claire", "Île-Bizard"):
REGION_TABLES[_name] = [*_ISLAND, ("ouest-de-l-ile", "mtl-ouest", True)]
REGION_TABLES[_name] = [*_ISLAND, ("west-island", "mtl-west", True)]
REGION_TABLES["Laval-Chomedey"] = _NORTH
for _name in ("Longueuil", "Brossard", "Mont-St-Bruno"):
REGION_TABLES[_name] = _SOUTH
REGION_TABLES["Mont-St-Hilaire"] = [*_SOUTH, ("monteregie", "rive-sud", True)]
REGION_TABLES["Mont-St-Hilaire"] = [*_SOUTH, ("monteregie", "south-shore", True)]
# The hub of the island carries each region. Its table is too long for one reply, so the
# region editor shows how it gets the rest.
REGION_TABLES["Mont-Royal"] = [
("qc", "*", True),
("mtl", "qc", True),
("mtl-ouest", "mtl", True),
("mtl-est", "mtl", True),
("ouest-de-l-ile", "mtl-ouest", True),
("mtl-west", "mtl", True),
("mtl-east", "mtl", True),
("west-island", "mtl-west", True),
("laval", "qc", True),
("rive-sud", "qc", True),
("monteregie", "rive-sud", False),
("rive-nord", "qc", False),
("south-shore", "qc", True),
("monteregie", "south-shore", False),
("north-shore", "qc", False),
("plateau", "mtl", True),
]
@@ -534,11 +534,11 @@ REGION_TABLES["Mont-Royal"] = [
ROUTED: tuple[str, ...] = (
"Mont-Royal",
"Stade-Olympique",
"Le Babillard",
"MTL BBS",
"Marie-Ève",
"Jean-Seb",
"Dave-Lachine",
"Bixi Bandit",
"Nico R.",
"Mathilde",
)
@@ -563,5 +563,5 @@ ADMINISTERED: tuple[str, ...] = ("Mont-Royal", "Stade-Olympique")
#: The room that our node joined, and its room password (the stock password of a room
#: server, which the simulator accepts).
JOINED_ROOM = "Le Babillard"
JOINED_ROOM = "MTL BBS"
ROOM_PASSWORD = "hello"