这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@captv89
Copy link
Owner

@captv89 captv89 commented May 5, 2025

Implement simultaneous NMEA 0183 and NMEA 2000 protocol support with the following changes:

  • Add protocol selection with --protocol flag (nmea0183, nmea2000, or both)
  • Implement separate WebSocket and TCP servers for each protocol
  • Add NMEA 2000 PGN support with new server implementations
  • Update web interface to show both protocols side by side
  • Add documentation for viewing TCP data using terminal tools
  • Improve CLI options with protocol-specific port configuration

The simulator now supports running both protocols simultaneously by default, while maintaining backward compatibility with single protocol operation.

Implement simultaneous NMEA 0183 and NMEA 2000 protocol support with the following changes:

- Add protocol selection with --protocol flag (nmea0183, nmea2000, or both)
- Implement separate WebSocket and TCP servers for each protocol
- Add NMEA 2000 PGN support with new server implementations
- Update web interface to show both protocols side by side
- Add documentation for viewing TCP data using terminal tools
- Improve CLI options with protocol-specific port configuration

The simulator now supports running both protocols simultaneously by default,
while maintaining backward compatibility with single protocol operation.
@captv89 captv89 requested a review from Copilot May 5, 2025 22:56
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds parallel support for NMEA protocols by enabling simultaneous operation of NMEA 0183 and NMEA 2000. Key changes include:

  • Introducing a new --protocol flag along with protocol-specific port configurations.
  • Implementing separate WebSocket and TCP servers for NMEA 2000 with associated PGN encoding/simulation.
  • Updating the web interface, CLI, and documentation to reflect dual protocol support.

Reviewed Changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pkg/nmea2000/simulator.go Implements the NMEA 2000 simulator simulation loop and messaging.
pkg/nmea2000/pgn/types.go Adds definitions for NMEA 2000 PGNs.
pkg/nmea2000/pgn/encoder.go Provides encoding functions for various NMEA 2000 PGN messages.
pkg/network/websocket2000.go Introduces a WebSocket server for NMEA 2000 clients with proper routing.
pkg/network/web/index.html Updates the UI to allow viewing both NMEA 0183 and NMEA 2000 data side by side.
pkg/network/tcp2000.go Implements a TCP server for streaming NMEA 2000 messages.
pkg/network/server.go Defines the NMEA2000Server interface and updates server configuration.
coverage.html Adds viewport meta for improved responsiveness in the coverage report.
cmd/nmeasim/main.go Integrates protocol selection, sets up servers for both protocols, and handles graceful shutdowns.
README.md Revises documentation to outline support for simultaneous protocol operation.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@captv89 captv89 merged commit 6ba15c6 into main May 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants