gondola 0.12.4__tar.gz → 0.12.5__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {gondola-0.12.4 → gondola-0.12.5}/Cargo.lock +1 -1
- {gondola-0.12.4 → gondola-0.12.5}/Cargo.toml +1 -1
- {gondola-0.12.4 → gondola-0.12.5}/PKG-INFO +1 -1
- gondola-0.12.5/src/tof/panic.rs +91 -0
- {gondola-0.12.4 → gondola-0.12.5}/.gitignore +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/README.md +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/alert-manifest-test.toml +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/benches/bench.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/diesel.toml +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/publish_to_bluejay.sh +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/pyproject.toml +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/python/gondola/__init__.py +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/python/gondola/calibration.py +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/python/gondola/db.py +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/python/gondola/gaps_flight.db +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/python/gondola/io/__init__.py +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/python/gondola/reconstruction/__init__.py +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/python/gondola/tof/__init__.py +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/python/gondola/tof/analysis.py +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/python/gondola/tracker/__init__.py +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/python/gondola/tracker/analysis.py +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/python/gondola/visual/__init__.py +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/python/gondola/visual/tof.py +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/python/gondola/visual/tracker.py +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/calibration/tof.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/calibration/tracker.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/calibration.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/constants.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/database/schema.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/database.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/errors.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/events/rb_event.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/events/rb_event_header.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/events/rb_waveform.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/events/telemetry_event.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/events/tof_event.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/events/tof_hit.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/events/tracker_hit.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/events.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/io/caraspace/frame.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/io/caraspace/reader.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/io/caraspace/socket_reader.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/io/caraspace/writer.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/io/caraspace.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/io/data_source.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/io/ipbus.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/io/parsers.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/io/root_reader.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/io/serialization.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/io/streamers.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/io/telemetry_reader.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/io/tof_reader.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/io/tof_writer.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/io.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/lib.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/monitoring/cpu_moni_data.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/monitoring/heartbeats/data_sink_hb.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/monitoring/heartbeats/event_builder_hb.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/monitoring/heartbeats/master_trigger_hb.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/monitoring/heartbeats.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/monitoring/ltb_moni_data.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/monitoring/mtb_moni_data.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/monitoring/pa_moni_data.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/monitoring/pb_moni_data.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/monitoring/rb_moni_data.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/monitoring/run_statistics.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/monitoring.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/packets/bfsw_ack_packet.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/packets/gps_packet.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/packets/magnetometer.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/packets/telemetry_packet.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/packets/telemetry_packet_header.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/packets/telemetry_packet_type.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/packets/tof_packet.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/packets/tof_packet_type.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/packets/tracker.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/packets/tracker_header.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/packets.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/prelude.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/python.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/random.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/stats.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/tof/alerts.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/tof/algorithms.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/tof/analysis.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/tof/analysis_engine.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/tof/commands.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/tof/config.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/tof/cuts.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/tof/detector_status.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/tof/master_trigger/control.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/tof/master_trigger/registers.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/tof/master_trigger.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/tof/rb_paddle_id.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/tof/settings.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/tof/signal_handler.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/tof/thread_control.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/tof/tof_response.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/tof.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/tracker/strips.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/tracker.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/src/version.rs +0 -0
- {gondola-0.12.4 → gondola-0.12.5}/tests/test.rs +0 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
//! Reporting catastrophic errors throughout the TOF system
|
|
2
|
+
//! related to software crashes
|
|
3
|
+
//!
|
|
4
|
+
// The following file is part of gaps-online-software and published
|
|
5
|
+
// under the GPLv3 license
|
|
6
|
+
|
|
7
|
+
use crate::prelude::*;
|
|
8
|
+
|
|
9
|
+
/// To be sent right before a panic occurs
|
|
10
|
+
#[derive(Debug, Clone, PartialEq)]
|
|
11
|
+
#[cfg_attr(feature="pybindings", pyclass)]
|
|
12
|
+
struct PanicPacket {
|
|
13
|
+
sender : u8,
|
|
14
|
+
message : String,
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
impl PanicPacket {
|
|
18
|
+
|
|
19
|
+
pub fn new(sender : u8, message : String) -> Self {
|
|
20
|
+
Self {
|
|
21
|
+
sender : sender,
|
|
22
|
+
message : message
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/// Sent this over a newly created zmq socket.
|
|
27
|
+
/// (If any data publisher thread is active, this
|
|
28
|
+
/// might itself cause a panic, so that this works
|
|
29
|
+
/// all data publsher threads have to cease first
|
|
30
|
+
pub fn sent(&self) {
|
|
31
|
+
let bs = self.to_bytestream();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
impl Default for PanicPacket {
|
|
36
|
+
|
|
37
|
+
fn default() -> Self {
|
|
38
|
+
Self::new(0,String::from("Unknonwn panic!"))
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
impl fmt::Display for PanicPacket {
|
|
43
|
+
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
|
44
|
+
let mut repr = format!("<PanicPacket from {}\n ", self.sender);
|
|
45
|
+
repr += &self.message;
|
|
46
|
+
repr += ">";
|
|
47
|
+
write!(f, "{}", repr)
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
impl TofPackable for PanicPacket {
|
|
52
|
+
const TOF_PACKET_TYPE : TofPacketType = TofPacketType::PanicPacket;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
impl Serialization for PanicPacket {
|
|
56
|
+
const HEAD : u16 = 43690; //0xAAAA
|
|
57
|
+
const TAIL : u16 = 21845; //0x5555
|
|
58
|
+
|
|
59
|
+
fn to_bytestream(&self) -> Vec<u8> {
|
|
60
|
+
let mut stream = Vec::<u8>::new();
|
|
61
|
+
stream.extend_from_slice(&Self::HEAD.to_le_bytes());
|
|
62
|
+
stream.push(self.sender);
|
|
63
|
+
let mut payload = CRFrame::string_to_bytes(self.message.clone());
|
|
64
|
+
let pl_len = payload.len() as u16;
|
|
65
|
+
stream.extend(&pl_len.to_le_bytes());
|
|
66
|
+
stream.append(&mut payload);
|
|
67
|
+
stream.extend_from_slice(&Self::TAIL.to_le_bytes());
|
|
68
|
+
stream
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
fn from_bytestream(stream : &Vec<u8>,
|
|
72
|
+
pos : &mut usize)
|
|
73
|
+
-> Result<Self, SerializationError>{
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
let head = parse_u16(stream, pos);
|
|
77
|
+
if head != Self::HEAD {
|
|
78
|
+
error!("Decoding of HEAD failed! Got {} instead!", head);
|
|
79
|
+
return Err(SerializationError::HeadInvalid);
|
|
80
|
+
}
|
|
81
|
+
let sender = parse_u8(stream, pos);
|
|
82
|
+
let msg = parse_string(stream, pos);
|
|
83
|
+
let tail = parse_u16(stream, pos);
|
|
84
|
+
if tail != Self::HEAD {
|
|
85
|
+
error!("Decoding of HEAD failed! Got {} instead!", head);
|
|
86
|
+
return Err(SerializationError::HeadInvalid);
|
|
87
|
+
}
|
|
88
|
+
let panic = Self::new(sender, msg);
|
|
89
|
+
Ok(panic)
|
|
90
|
+
}
|
|
91
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|