Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[web] Add gRPC features to provide data to the web - Part 9 of RTEA #365

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

Vinggui
Copy link
Contributor

@Vinggui Vinggui commented Sep 15, 2022

Contribution description

This PR is part of the process of breaking PR #235 into small steps, a process nominated "Road to Energy Analysis" (RTEA). These small modifications will lead to the whole improvement started on March 2022. At the end of these steps, OT-NS will be capable of precisely estimating energy consumption, collision events (channel aware), and plot all the data in real-time as the simulation progress.

At the moment, OT-NS can not estimate energy, collisions, nor transmission energy. Also, even though OT is working well in simulation, many of its recovery properties are not correctly simulated as they would happen in real devices due to its incorrect timing events at the simulated radio part.

Main modifications

This PR keeps all previous commits to reduce future rebase efforts. However, relative to the timeline of RTEA, it addresses only the following files:

  • /cmd/otns-replay/grpc_service.go
  • /dispatcher/dispatcher.go
  • /pylibs/otns/proto/visualize_grpc_pb2_grpc.py
  • /pylibs/otns/proto/visualize_grpc_pb2.py
  • /simulation/simulation.go
  • /visualize/grpc/pb/visualize_grpc.pb.go
  • /visualize/grpc/pb/visualize_grpc.proto
  • /visualize/grpc/grpcServer.go
  • /visualize/grpc/grpcStream.go
  • /visualize/grpc/grpcVisualizer.go
  • /visualize/multi/multiVisualizer.go
  • /visualize/nopVisualizer.go
  • /visualize/types.go

As a result, after this merge, OT-NS will have a gRPC that can feed energy data into a web view (available in the next steps of the RTEA).

Requirements

None (if intended to be used with current Openthread repository). But, this is a walk to the road of PR #7500 in Openthread repository that will allow all the new features in the simulation to work.

Testing procedure

Just install OTNS the same way as before, using the "OTNS=1" for the building parameter.

Roadmap

This is part 9 of the RTEA (Road to Energy Analysis) steps to PR #235 and PR #7500.

Part 1: PR #357;
Part 2: PR #8144;
Part 3: PR #359;
Part 4: PR #8152;
Part 5: PR #362;
Part 6: PR #8165;
Part 7: PR #363;
Part 8: PR #8173;
Part 9: This PR;
Part 10: PR #366;
Part 11: PR #367.

@codecov-commenter
Copy link

codecov-commenter commented Sep 15, 2022

Codecov Report

Merging #365 (8bc45b5) into main (c616148) will decrease coverage by 3.76%.
The diff coverage is 11.29%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #365      +/-   ##
==========================================
- Coverage   49.97%   46.21%   -3.77%     
==========================================
  Files          38       40       +2     
  Lines        4608     5044     +436     
==========================================
+ Hits         2303     2331      +28     
- Misses       2123     2525     +402     
- Partials      182      188       +6     
Impacted Files Coverage Δ
cli/CmdRunner.go 22.62% <0.00%> (-0.51%) ⬇️
cli/ast.go 66.66% <ø> (ø)
types/types.go 65.38% <ø> (ø)
visualize/grpc/grpcNode.go 100.00% <ø> (ø)
visualize/grpc/grpcStream.go 50.00% <0.00%> (-50.00%) ⬇️
visualize/multi/multiVisualizer.go 0.00% <0.00%> (ø)
visualize/nopVisualizer.go 50.00% <ø> (ø)
visualize/types.go 17.39% <ø> (ø)
web/site/bindata.go 99.00% <ø> (-0.01%) ⬇️
visualize/grpc/pb/visualize_grpc.pb.go 18.00% <1.92%> (-1.42%) ⬇️
... and 9 more

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