Skip to content

Commit

Permalink
add uploaderState (commaai#179)
Browse files Browse the repository at this point in the history
* add uploaderState

* add time

* float
  • Loading branch information
adeebshihadeh authored Jul 14, 2021
1 parent 95d7c94 commit b87d81b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions log.capnp
Original file line number Diff line number Diff line change
Expand Up @@ -1350,6 +1350,18 @@ struct ManagerState {
}
}

struct UploaderState {
immediateQueueSize @0 :UInt32;
immediateQueueCount @1 :UInt32;
rawQueueSize @2 :UInt32;
rawQueueCount @3 :UInt32;

# stats for last successfully uploaded file
lastTime @4 :Float32; # s
lastSpeed @5 :Float32; # MB/s
lastFilename @6 :Text;
}

struct Event {
logMonoTime @0 :UInt64; # nanoseconds
valid @67 :Bool = true;
Expand Down Expand Up @@ -1400,6 +1412,7 @@ struct Event {
# systems stuff
androidLog @20 :AndroidLogEntry;
managerState @78 :ManagerState;
uploaderState @79 :UploaderState;
procLog @33 :ProcLog;
clocks @35 :Clocks;
deviceState @6 :DeviceState;
Expand Down
1 change: 1 addition & 0 deletions services.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def __init__(self, port: int, should_log: bool, frequency: float, decimation: Op
"wideRoadCameraState": (True, 20., 20),
"modelV2": (True, 20., 40),
"managerState": (True, 2., 1),
"uploaderState": (True, 0., 1),
}
service_list = {name: Service(new_port(idx), *vals) for # type: ignore
idx, (name, vals) in enumerate(services.items())}
Expand Down

0 comments on commit b87d81b

Please # to comment.