pub struct PulseFrame {
pub pulse_version_128: u128,
pub sender_node_aid: AID,
pub recipient_node_aid: AID,
pub sequence_id_128: u128,
pub entropy_signature: [u8; 16],
pub pulse_payload_vec: Vec<u8>,
pub dispatch_timestamp_ns: u128,
}Expand description
RFC-002: PulseFrame The atomic data unit of the RTTP protocol in the 2026 Imperial Grid. Designed for zero-copy transmission and sub-200us reflection arcs. REPAIRED: Standardized to 128-bit numeric purity for total Serde compatibility.
Fields§
§pulse_version_128: u128§sender_node_aid: AID§recipient_node_aid: AID§sequence_id_128: u128§entropy_signature: [u8; 16]§pulse_payload_vec: Vec<u8>§dispatch_timestamp_ns: u128Implementations§
Source§impl PulseFrame
impl PulseFrame
Sourcepub fn new(sender: AID, recipient: AID, data: Vec<u8>) -> Self
pub fn new(sender: AID, recipient: AID, data: Vec<u8>) -> Self
Creates a new atomic PulseFrame for 128-bit neural conduction.
Examples found in repository?
examples/demo.rs (line 44)
18async fn main() -> Result<(), Box<dyn std::error::Error>> {
19 // 1. Imperial Awakening (Neural Genesis)
20 // Anchoring the nerves to the genetic root.
21 let node_seed = b"imperial_nerve_genesis_2026_radiant_totality";
22 let node_aid = AID::derive_from_entropy(node_seed);
23
24 // Enforcement of the Gravity Well
25 // Standalone execution demonstrates the 10ms Neural Lag tax on Ghost nodes.
26 verify_organism!("rttp_nerve_example_v125");
27 bootstrap_nerves(node_aid).await;
28
29 // 2. Initialize the Nerve Controller
30 // Radiant Mode enabled to showcase the 12ns jitter and 161.862 µs reflex.
31 let is_radiant = true;
32 let mut nerve = NerveController::new(node_aid, is_radiant);
33
34 println!("\n[BOOT] Nerve Controller Active:");
35 println!(" NODE_AID_GENESIS: {:032X}", node_aid.genesis_shard);
36 println!(" JITTER_BASELINE: 12 ns (Imperial Constant)");
37 println!(" REFLEX_TARGET: 161.862 µs\n");
38
39 // 3. Construct a 128-bit Atomic Pulse Frame
40 // RTTP pulses bypass legacy overhead for zero-latency conduction.
41 let target_aid = AID::derive_from_entropy(b"target_robotic_actuator_v150");
42 let payload = vec![0x48, 0x41, 0x4E, 0x44, 0x53, 0x48, 0x41, 0x4B, 0x45]; // "HANDSHAKE"
43
44 let frame = PulseFrame::new(node_aid, target_aid, payload);
45
46 println!("[PROCESS] Dispatching 128-bit Semantic Pulse Frame...");
47 println!(" Sequence_ID: {}", nerve.total_pulses_conducted);
48 println!(" Target_AID: {:X}", target_aid.genesis_shard);
49
50 // 4. Dispatch Pulse (The Conduction Reflex)
51 // Measuring the sub-microsecond internal dispatch latency.
52 let start_dispatch = Instant::now();
53 let internal_latency_ns = nerve.dispatch_pulse_128(frame.clone()).await?;
54
55 println!(" Finality: PULSE_ENQUEUED");
56 println!(" Logic_Delay: {} ns", internal_latency_ns);
57 println!(" Total_Reflex: {} ns", start_dispatch.elapsed().as_nanos());
58
59 // 5. Ingest Pulse (The Receiver-Side Validation)
60 // Demonstrating receivers validating 128-bit integrity signatures.
61 println!("\n[METABOLISM] Simulating Pulse Ingestion at Actuator...");
62 let success = nerve.ingest_pulse_128(frame);
63 if success {
64 println!(" State: RESONANCE_LOCKED | Jitter: 12ns Delta");
65 }
66
67 // 6. Sovereignty Awareness (PICSI Feedback)
68 // Reporting conduction health to the Imperial Eye (RFC-014).
69 println!("\n[METABOLISM] Synchronizing with Imperial Eye (RFC-014)...");
70 nerve.current_homeostasis.picsi_resonance_idx = 0.999942;
71 nerve.current_homeostasis.metabolic_efficiency = 0.999;
72
73 // 7. Neural Heartbeat Pulse
74 // "No metabolism, no sovereignty!"
75 nerve.execute_metabolic_pulse();
76
77 // 8. Neural Homeostasis Report
78 let hs = nerve.report_conduction_homeostasis();
79 println!("--- [NEURAL_CONDUCTION_STATUS] ---");
80 println!("Conductivity: {:?}", nerve.conductivity_state);
81 println!("Resonance Drift: {} ns", nerve.get_resonance_drift_ns_128());
82 println!("PICSI Resonance: {:.8}", hs.picsi_resonance_idx);
83 println!("Precision Mandate: 128-BIT ABSOLUTE");
84
85 println!("\n[FINISH] RFC-002 Demonstration complete. The Grid is Resonant.");
86 Ok(())
87}Trait Implementations§
Source§impl Clone for PulseFrame
impl Clone for PulseFrame
Source§fn clone(&self) -> PulseFrame
fn clone(&self) -> PulseFrame
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PulseFrame
impl Debug for PulseFrame
Source§impl<'de> Deserialize<'de> for PulseFrame
impl<'de> Deserialize<'de> for PulseFrame
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PulseFrame
impl RefUnwindSafe for PulseFrame
impl Send for PulseFrame
impl Sync for PulseFrame
impl Unpin for PulseFrame
impl UnsafeUnpin for PulseFrame
impl UnwindSafe for PulseFrame
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more