|
SimCore
Shared transport-layer plumbing for the ADR-029 Train/IL/CTC RBC simulators
|
Public Member Functions | |
| __init__ (self, log, link, unit, log_source, kind=SIM_STATUS_KIND, period_s=PERIOD_S, clock=time.monotonic, frame_size=rbc_wire.ENVELOPE_SIZE) | |
| emit (self, extra=None) | |
| tick (self, extra=None) | |
Protected Member Functions | |
| _payload (self, extra) | |
Protected Attributes | |
| _log = log | |
| _link = link | |
| _unit = unit | |
| _source = log_source | |
| _kind = kind | |
| _period = period_s | |
| _clock = clock | |
| _frame_size = frame_size | |
| float | _next = 0.0 |
Cadence + encode + log + send for one sim's status heartbeat.
Definition at line 28 of file status_report.py.
| simcore.status_report.StatusReporter.__init__ | ( | self, | |
| log, | |||
| link, | |||
| unit, | |||
| log_source, | |||
| kind = SIM_STATUS_KIND, | |||
| period_s = PERIOD_S, | |||
| clock = time.monotonic, | |||
| frame_size = rbc_wire.ENVELOPE_SIZE ) |
@param frame_size: passed straight through to rbc_wire.encode_opaque() - override if @link's own channel uses a wider fixed slot than the default ENVELOPE_SIZE (see that function's own doc).
Definition at line 31 of file status_report.py.
|
protected |
Definition at line 46 of file status_report.py.
| simcore.status_report.StatusReporter.emit | ( | self, | |
| extra = None ) |
Report now, unconditionally - use once at startup.
Definition at line 70 of file status_report.py.
| simcore.status_report.StatusReporter.tick | ( | self, | |
| extra = None ) |
Report iff PERIOD_S has elapsed since the last report.
Definition at line 77 of file status_report.py.
|
protected |
Definition at line 42 of file status_report.py.
|
protected |
Definition at line 43 of file status_report.py.
|
protected |
Definition at line 40 of file status_report.py.
|
protected |
Definition at line 37 of file status_report.py.
|
protected |
Definition at line 36 of file status_report.py.
|
protected |
Definition at line 44 of file status_report.py.
|
protected |
Definition at line 41 of file status_report.py.
|
protected |
Definition at line 39 of file status_report.py.
|
protected |
Definition at line 38 of file status_report.py.