dbpersistentaccess
Module providing a class for postgresql DB access
- class dbpersistentaccess.DbConnector(logger, conn_name)
Bases:
objectClass for handling all openburst postgresql DB accesses
- activate_rad(id_nr, team)
! activates a given rad
- connect_to_db()
Function for connecting to openburst postgresSQL DB
- deactivate_rad(id_nr, team)
! deactivates a given rad
- get_all_detections(team)
! returns all entries from the detection table
- get_all_pcl_rx(team)
! returns all pcl rx
- get_all_pcl_tx(team)
! returns all pcl tx
- get_all_pcl_tx_for_rx(team, rx)
! returns all pcl tx for given rx
- get_all_rads(team)
! returns all rads
- get_detection_statistics()
! returns statistcs of detections
- get_pcl_rx_coordinates(name)
! returns pcl rx lat,lon and alt
- get_pcl_tx_coordinates(callsign)
! returns pcl tx lat,lon and alt
- get_targets(team)
! returns all targets
- remove_all_pcl_detections(team)
! removes all pcl detections
- remove_all_rad_detections(team)
! removes all rad detections
- remove_inactive_pcl_detections(curr_time, rx_id)
! removes all pcl detections of given rx that are inactive
- remove_inactive_rad_detections(rad_id, rot_time)
! removes all detections associated to no track/plot and pd=0, or detections older than 3 times radar rotation time
- remove_inactive_replay_targets(delta_t, curr_time)
! removes replay targets that are inactive
- remove_pcl_rx_tx_detections(rx_name, tx_callsign)
! removes all PCL detections for a given rx-tx pair
- remove_rad_detections(rad_id)
! removes all rad detections
- remove_table_row(_, id_nr, table)
Function for removing row from DB table
- remove_targets(team)
! removes all targets
- trigger_pcl_rx(team)
! triggers an update of PCL rx
- trigger_rads_update(team)
Function for triggering the radar table
- trigger_targets(team)
! trigger targets
- write_pcl_dets(tup)
! adds a tuple of PCL detections to blue_live.pcl_detection
- write_pcl_rx(team, rad)
! update PCL Rx to DB
- write_pcl_tx(team, tx)
! update PCL Tx to DB
- write_rad(team, rad)
! update Active radar to DB
- write_rad_dets(tup)
! adds a tuple of detections to DB table blue_live.detection
- write_rad_max_range(rad_id, max_range, team)
Function for twriting radar maximum range
- write_targets(tup)
! inserts a tuple of target rows as batch to the db