feat: F4.6g5 the switch and NAT tables and "Pakete verwerfen", measured against Java's
ViewersRun takes the rows of Java's viewers from the firmware: a switch's table, a home router's NAT table, each after its reset, and the frames "Pakete verwerfen" drops while it is held. The core writes a frame as Java does and resets the NAT's dynamic entries; the room sends both tables as views, drops while any client holds the button, and sends the dropped frames, begun anew with each start, with the clock their times of day are written from; the editor opens a table with a tap on a switch or home router and holds "Pakete verwerfen" in its toolbar, which now wraps on a phone. This completes F4.6. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -206,6 +206,20 @@ const FROM_JAVA: Readonly<Record<string, string>> = {
|
||||
'gnutella.networkTab': 'peertopeeranwendung_msg29',
|
||||
'gnutella.leave': 'peertopeeranwendung_msg30',
|
||||
'gnutella.leaveHint': 'peertopeeranwendung_msg31',
|
||||
'tables.satTitle': 'guievents_msg8',
|
||||
'tables.mac': 'guievents_msg9',
|
||||
'tables.port': 'guievents_msg10',
|
||||
'tables.lastUpdate': 'guievents_msg27',
|
||||
'tables.satReset': 'guievents_msg28',
|
||||
'tables.natTitle': 'guievents_msg29',
|
||||
'tables.protocol': 'guievents_msg30',
|
||||
'tables.wanAddress': 'guievents_msg31',
|
||||
'tables.portMapping': 'guievents_msg32',
|
||||
'tables.lanAddress': 'guievents_msg33',
|
||||
'tables.lanPort': 'guievents_msg34',
|
||||
'tables.natReset': 'guievents_msg36',
|
||||
'tables.portNumber': 'sw_switchfirmware_msg1',
|
||||
'drop.hold': 'simulation_control_drop_packets',
|
||||
'personalFirewall.hint': 'firewall_msg2',
|
||||
'personalFirewall.port': 'firewall_msg3',
|
||||
'personalFirewall.allSenders': 'firewall_msg4',
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
// A simulation time as Java's viewers write the wall clock: HH:mm:ss, and
|
||||
// with milliseconds for the dropped frames (Lauscher.formatTimestamp), in the
|
||||
// viewer's time zone.
|
||||
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { timeOfDay } from '../src/simulation/timeOfDay.js';
|
||||
|
||||
describe('a time of day', () => {
|
||||
it('pads hours, minutes, seconds and milliseconds as Java does', () => {
|
||||
const clock = new Date(2026, 9, 3, 7, 5, 3, 4).getTime();
|
||||
expect(timeOfDay(clock, 0)).toBe('07:05:03');
|
||||
expect(timeOfDay(clock, 0, true)).toBe('07:05:03.004');
|
||||
expect(timeOfDay(clock, 56_996 + 3_600_000 * 15, true)).toBe('22:06:00.000');
|
||||
expect(timeOfDay(clock, 96, true)).toBe('07:05:03.100');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user