MCPcopy
hub / github.com/smittix/intercept / get_status

Method get_status

intercept_agent.py:671–694  ·  view source on GitHub ↗

Get overall agent status.

(self)

Source from the content-addressed store, hash-verified

669 )
670
671 def get_status(self) -> dict:
672 """Get overall agent status."""
673 # Build running modes with device info for multi-SDR tracking
674 running_modes_detail = {}
675 for mode, info in self.running_modes.items():
676 params = info.get('params', {})
677 running_modes_detail[mode] = {
678 'started_at': info.get('started_at'),
679 'device': params.get('device', params.get('device_index', 0)),
680 }
681
682 status = {
683 'running_modes': list(self.running_modes.keys()),
684 'running_modes_detail': running_modes_detail, # Include device info per mode
685 'uptime': time.time() - _start_time,
686 'push_enabled': config.push_enabled,
687 'push_connected': push_client is not None and push_client.running,
688 'gps': gps_manager.is_running,
689 }
690 # Include GPS position if available
691 gps_pos = gps_manager.position
692 if gps_pos:
693 status['gps_position'] = gps_pos
694 return status
695
696 # Modes that use RTL-SDR devices
697 SDR_MODES = {'adsb', 'sensor', 'pager', 'ais', 'acars', 'dsc', 'rtlamr', 'listening_post'}

Callers 2

_start_wifiMethod · 0.45
do_GETMethod · 0.45

Calls 3

itemsMethod · 0.80
getMethod · 0.80
keysMethod · 0.80

Tested by

no test coverage detected