pub struct BodyController {
pub somatic_node_aid: AID,
pub master_shunter: SovereignShunter,
pub actuators_directory: Vec<ActuatorState>,
pub telemetry_stream: VecDeque<SensorTelemetry>,
pub loop_frequency_hz: f64,
pub bootstrap_ns_128: u128,
pub current_homeostasis: HomeostasisScore,
pub total_torque_cycles: u128,
}Expand description
The GTIOT Core Controller. Responsible for the 1.2kHz control loop, torque responses, and hardware abstraction. It bridges the digital intent of the Brain with physical torque.
Fields§
§somatic_node_aid: AID§master_shunter: SovereignShunter§actuators_directory: Vec<ActuatorState>§telemetry_stream: VecDeque<SensorTelemetry>§loop_frequency_hz: f64§bootstrap_ns_128: u128§current_homeostasis: HomeostasisScore§total_torque_cycles: u128Implementations§
Source§impl BodyController
impl BodyController
Sourcepub fn new(node_aid: AID, is_radiant: bool, dof_count: u128) -> Self
pub fn new(node_aid: AID, is_radiant: bool, dof_count: u128) -> Self
Creates a new Radiant Body instance v1.2.5. Triggers the Imperial Gravity Well audit immediately.
Examples found in repository?
examples/demo.rs (line 34)
18async fn main() -> Result<(), Box<dyn std::error::Error>> {
19 // 1. Imperial Awakening (Somatic Genesis)
20 // Anchoring the body to the genetic root.
21 awaken_soul();
22 let node_seed = b"imperial_body_genesis_2026_radiant_totality";
23 let node_aid = AID::derive_from_entropy(node_seed);
24
25 // Enforcement of the Gravity Well
26 // Standalone execution demonstrates the 10ms Mechanical Jitter tax.
27 verify_organism!("gtiot_embodied_example_v125");
28 bootstrap_body(node_aid).await;
29
30 // 2. Initialize the Body Controller (12-DOF Framework)
31 // Radiant Mode enabled to showcase the 161.862us reflex arc.
32 let is_radiant = true;
33 let dof_count = 12u128; // IMPERIAL_128_BIT_DOF
34 let mut body = BodyController::new(node_aid, is_radiant, dof_count);
35
36 println!("\n[BOOT] GTIOT Somatic Controller Active:");
37 println!(" NODE_AID_GENESIS: {:032X}", node_aid.genesis_shard);
38 println!(" CONTROL_LOOP: 1.2 kHz (833µs stable)");
39 println!(" DOF_CAPACITY: 128-bit Addressed ({})\n", dof_count);
40
41 // 3. Construct a 128-bit Kinetic Command
42 // Including Stiffness and Damping parameters for the Sovereign Handshake.
43 let command = KineticCommand {
44 command_id_128: 0x2026_5A5C_A800_0000_0000_0000_0000_0001,
45 target_dof_idx_128: 0, // Primary wrist axis
46 target_setpoint_f64: 0.785398, // 45 degrees
47 max_velocity_limit_f64: 1.5, // Safe approach
48 stiffness_k_f64: 150.0, // Impedance: Firm
49 damping_b_f64: 25.0, // Impedance: Stable
50 dispatch_timestamp_ns: 0,
51 };
52
53 // 4. Execute Somatic Action (The Physical Reflex)
54 // This is the point where digital logic collapses into mechanical torque.
55 println!("[PROCESS] Dispatching 128-bit Torque Instruction...");
56 let start_actuation = Instant::now();
57
58 body.execute_kinetic_action_128(command).await?;
59
60 println!(" Status: ACTUATION_CONFIRMED");
61 println!(" Latency: {} ns", start_actuation.elapsed().as_nanos());
62 println!(" Precision: 0.01 Nm (128-bit fidelity)");
63
64 // 5. Simulate Haptic Telemetry Ingestion
65 // Demonstrating the 1200Hz sensor feedback stream.
66 let telemetry = SensorTelemetry {
67 sensor_id_128: [0x55; 16],
68 reading_value_f64: 0.0098, // Real-time pressure reading
69 unit_type_string: "Nm".to_string(),
70 data_confidence_f64: 0.9999,
71 capture_timestamp_ns: 123456789,
72 };
73 body.ingest_somatic_telemetry_128(telemetry);
74
75 // 6. Sovereignty Awareness (PICSI Feedback)
76 // Synchronizing the physical limbs with the Imperial Eye (RFC-014).
77 println!("\n[METABOLISM] Synchronizing with Imperial Eye (RFC-014)...");
78 body.current_homeostasis.picsi_resonance_idx = 0.999992;
79 body.current_homeostasis.metabolic_efficiency = 1.0;
80
81 // 7. Somatic Heartbeat Pulse
82 // "No metabolism, no sovereignty!"
83 body.execute_metabolic_pulse();
84
85 // 8. Somatic Homeostasis Report
86 let hs = body.report_body_homeostasis();
87 println!("--- [SOMATIC_INTERFACE_STATUS] ---");
88 println!("Loop Frequency: {:.1} Hz", 1200.0);
89 println!("PICSI Resonance: {:.8}", hs.picsi_resonance_idx);
90 println!("Torque Cycles: {}", body.total_torque_cycles);
91 println!("Reflex Jitter: 12 ns (Locked)");
92
93 println!("\n[FINISH] RFC-005 Demonstration complete. The Hand is Radiant.");
94 Ok(())
95}Sourcepub async fn execute_kinetic_action_128(
&mut self,
cmd: KineticCommand,
) -> Result<(), String>
pub async fn execute_kinetic_action_128( &mut self, cmd: KineticCommand, ) -> Result<(), String>
RFC-005: Execute Kinetic Action Dispatches a movement instruction to the physical actuators. Non-Radiant nodes suffer a 10ms “Mechanical Jitter” (Execution Penalty).
Examples found in repository?
examples/demo.rs (line 58)
18async fn main() -> Result<(), Box<dyn std::error::Error>> {
19 // 1. Imperial Awakening (Somatic Genesis)
20 // Anchoring the body to the genetic root.
21 awaken_soul();
22 let node_seed = b"imperial_body_genesis_2026_radiant_totality";
23 let node_aid = AID::derive_from_entropy(node_seed);
24
25 // Enforcement of the Gravity Well
26 // Standalone execution demonstrates the 10ms Mechanical Jitter tax.
27 verify_organism!("gtiot_embodied_example_v125");
28 bootstrap_body(node_aid).await;
29
30 // 2. Initialize the Body Controller (12-DOF Framework)
31 // Radiant Mode enabled to showcase the 161.862us reflex arc.
32 let is_radiant = true;
33 let dof_count = 12u128; // IMPERIAL_128_BIT_DOF
34 let mut body = BodyController::new(node_aid, is_radiant, dof_count);
35
36 println!("\n[BOOT] GTIOT Somatic Controller Active:");
37 println!(" NODE_AID_GENESIS: {:032X}", node_aid.genesis_shard);
38 println!(" CONTROL_LOOP: 1.2 kHz (833µs stable)");
39 println!(" DOF_CAPACITY: 128-bit Addressed ({})\n", dof_count);
40
41 // 3. Construct a 128-bit Kinetic Command
42 // Including Stiffness and Damping parameters for the Sovereign Handshake.
43 let command = KineticCommand {
44 command_id_128: 0x2026_5A5C_A800_0000_0000_0000_0000_0001,
45 target_dof_idx_128: 0, // Primary wrist axis
46 target_setpoint_f64: 0.785398, // 45 degrees
47 max_velocity_limit_f64: 1.5, // Safe approach
48 stiffness_k_f64: 150.0, // Impedance: Firm
49 damping_b_f64: 25.0, // Impedance: Stable
50 dispatch_timestamp_ns: 0,
51 };
52
53 // 4. Execute Somatic Action (The Physical Reflex)
54 // This is the point where digital logic collapses into mechanical torque.
55 println!("[PROCESS] Dispatching 128-bit Torque Instruction...");
56 let start_actuation = Instant::now();
57
58 body.execute_kinetic_action_128(command).await?;
59
60 println!(" Status: ACTUATION_CONFIRMED");
61 println!(" Latency: {} ns", start_actuation.elapsed().as_nanos());
62 println!(" Precision: 0.01 Nm (128-bit fidelity)");
63
64 // 5. Simulate Haptic Telemetry Ingestion
65 // Demonstrating the 1200Hz sensor feedback stream.
66 let telemetry = SensorTelemetry {
67 sensor_id_128: [0x55; 16],
68 reading_value_f64: 0.0098, // Real-time pressure reading
69 unit_type_string: "Nm".to_string(),
70 data_confidence_f64: 0.9999,
71 capture_timestamp_ns: 123456789,
72 };
73 body.ingest_somatic_telemetry_128(telemetry);
74
75 // 6. Sovereignty Awareness (PICSI Feedback)
76 // Synchronizing the physical limbs with the Imperial Eye (RFC-014).
77 println!("\n[METABOLISM] Synchronizing with Imperial Eye (RFC-014)...");
78 body.current_homeostasis.picsi_resonance_idx = 0.999992;
79 body.current_homeostasis.metabolic_efficiency = 1.0;
80
81 // 7. Somatic Heartbeat Pulse
82 // "No metabolism, no sovereignty!"
83 body.execute_metabolic_pulse();
84
85 // 8. Somatic Homeostasis Report
86 let hs = body.report_body_homeostasis();
87 println!("--- [SOMATIC_INTERFACE_STATUS] ---");
88 println!("Loop Frequency: {:.1} Hz", 1200.0);
89 println!("PICSI Resonance: {:.8}", hs.picsi_resonance_idx);
90 println!("Torque Cycles: {}", body.total_torque_cycles);
91 println!("Reflex Jitter: 12 ns (Locked)");
92
93 println!("\n[FINISH] RFC-005 Demonstration complete. The Hand is Radiant.");
94 Ok(())
95}Sourcepub fn ingest_somatic_telemetry_128(&mut self, data: SensorTelemetry)
pub fn ingest_somatic_telemetry_128(&mut self, data: SensorTelemetry)
Examples found in repository?
examples/demo.rs (line 73)
18async fn main() -> Result<(), Box<dyn std::error::Error>> {
19 // 1. Imperial Awakening (Somatic Genesis)
20 // Anchoring the body to the genetic root.
21 awaken_soul();
22 let node_seed = b"imperial_body_genesis_2026_radiant_totality";
23 let node_aid = AID::derive_from_entropy(node_seed);
24
25 // Enforcement of the Gravity Well
26 // Standalone execution demonstrates the 10ms Mechanical Jitter tax.
27 verify_organism!("gtiot_embodied_example_v125");
28 bootstrap_body(node_aid).await;
29
30 // 2. Initialize the Body Controller (12-DOF Framework)
31 // Radiant Mode enabled to showcase the 161.862us reflex arc.
32 let is_radiant = true;
33 let dof_count = 12u128; // IMPERIAL_128_BIT_DOF
34 let mut body = BodyController::new(node_aid, is_radiant, dof_count);
35
36 println!("\n[BOOT] GTIOT Somatic Controller Active:");
37 println!(" NODE_AID_GENESIS: {:032X}", node_aid.genesis_shard);
38 println!(" CONTROL_LOOP: 1.2 kHz (833µs stable)");
39 println!(" DOF_CAPACITY: 128-bit Addressed ({})\n", dof_count);
40
41 // 3. Construct a 128-bit Kinetic Command
42 // Including Stiffness and Damping parameters for the Sovereign Handshake.
43 let command = KineticCommand {
44 command_id_128: 0x2026_5A5C_A800_0000_0000_0000_0000_0001,
45 target_dof_idx_128: 0, // Primary wrist axis
46 target_setpoint_f64: 0.785398, // 45 degrees
47 max_velocity_limit_f64: 1.5, // Safe approach
48 stiffness_k_f64: 150.0, // Impedance: Firm
49 damping_b_f64: 25.0, // Impedance: Stable
50 dispatch_timestamp_ns: 0,
51 };
52
53 // 4. Execute Somatic Action (The Physical Reflex)
54 // This is the point where digital logic collapses into mechanical torque.
55 println!("[PROCESS] Dispatching 128-bit Torque Instruction...");
56 let start_actuation = Instant::now();
57
58 body.execute_kinetic_action_128(command).await?;
59
60 println!(" Status: ACTUATION_CONFIRMED");
61 println!(" Latency: {} ns", start_actuation.elapsed().as_nanos());
62 println!(" Precision: 0.01 Nm (128-bit fidelity)");
63
64 // 5. Simulate Haptic Telemetry Ingestion
65 // Demonstrating the 1200Hz sensor feedback stream.
66 let telemetry = SensorTelemetry {
67 sensor_id_128: [0x55; 16],
68 reading_value_f64: 0.0098, // Real-time pressure reading
69 unit_type_string: "Nm".to_string(),
70 data_confidence_f64: 0.9999,
71 capture_timestamp_ns: 123456789,
72 };
73 body.ingest_somatic_telemetry_128(telemetry);
74
75 // 6. Sovereignty Awareness (PICSI Feedback)
76 // Synchronizing the physical limbs with the Imperial Eye (RFC-014).
77 println!("\n[METABOLISM] Synchronizing with Imperial Eye (RFC-014)...");
78 body.current_homeostasis.picsi_resonance_idx = 0.999992;
79 body.current_homeostasis.metabolic_efficiency = 1.0;
80
81 // 7. Somatic Heartbeat Pulse
82 // "No metabolism, no sovereignty!"
83 body.execute_metabolic_pulse();
84
85 // 8. Somatic Homeostasis Report
86 let hs = body.report_body_homeostasis();
87 println!("--- [SOMATIC_INTERFACE_STATUS] ---");
88 println!("Loop Frequency: {:.1} Hz", 1200.0);
89 println!("PICSI Resonance: {:.8}", hs.picsi_resonance_idx);
90 println!("Torque Cycles: {}", body.total_torque_cycles);
91 println!("Reflex Jitter: 12 ns (Locked)");
92
93 println!("\n[FINISH] RFC-005 Demonstration complete. The Hand is Radiant.");
94 Ok(())
95}Trait Implementations§
Source§impl EmbodiedInterface for BodyController
impl EmbodiedInterface for BodyController
Source§fn calibrate_actuators(&mut self)
fn calibrate_actuators(&mut self)
REPAIRED: Method name strictly aligned with Trait to fix E0407/E0046.
fn report_torque_telemetry(&self) -> Vec<f64>
fn trigger_emergency_immobilization(&mut self)
fn calculate_impedance_vector(&self, error: f64) -> f64
fn report_body_homeostasis(&self) -> HomeostasisScore
Source§impl SovereignLifeform for BodyController
impl SovereignLifeform for BodyController
Source§fn get_homeostasis(&self) -> HomeostasisScore
fn get_homeostasis(&self) -> HomeostasisScore
REPAIRED: Call name aligned to fix E0599.
Source§fn execute_metabolic_pulse(&self)
fn execute_metabolic_pulse(&self)
RFC-005 Metabolic Pulse: “No metabolism, no sovereignty!”
fn get_aid(&self) -> AID
fn evolve_genome(&mut self, mutation_data: &[u8])
fn report_uptime_ns(&self) -> u128
Auto Trait Implementations§
impl Freeze for BodyController
impl RefUnwindSafe for BodyController
impl Send for BodyController
impl Sync for BodyController
impl Unpin for BodyController
impl UnsafeUnpin for BodyController
impl UnwindSafe for BodyController
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