1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
//! Integration tests for IgtlClient helper methods
//!
//! These tests verify the convenience methods for query and streaming control.
// NOTE: These tests are disabled because the helper methods (request_capability,
// start_tracking, stop_tracking) have not yet been implemented on SyncIgtlClient.
// They will be re-enabled when the helper methods are added.
/*
#[test]
#[ignore = "Helper methods not yet implemented"]
fn test_helper_methods_compile() {
// This test ensures the helper methods compile correctly
// Actual integration testing requires a running server
// TODO: Implement helper methods on SyncIgtlClient
fn _test_request_capability(client: &mut SyncIgtlClient) {
let _capability = client.request_capability().unwrap();
}
fn _test_start_tracking(client: &mut SyncIgtlClient) {
let _ack = client.start_tracking(50, "RAS").unwrap();
}
fn _test_stop_tracking(client: &mut SyncIgtlClient) {
client.stop_tracking().unwrap();
}
}
#[test]
#[ignore = "Helper methods not yet implemented"]
fn test_helper_method_signatures() {
// Verify method signatures match expected types
// TODO: Implement helper methods on SyncIgtlClient
use openigtlink_rust::protocol::types::{CapabilityMessage, RtsTDataMessage};
fn _check_types(client: &mut SyncIgtlClient) {
// request_capability returns CapabilityMessage
let _cap: CapabilityMessage = client.request_capability().unwrap();
// start_tracking returns RtsTDataMessage
let _rts: RtsTDataMessage = client.start_tracking(50, "RAS").unwrap();
// stop_tracking returns ()
let _unit: () = client.stop_tracking().unwrap();
}
}
#[test]
#[ignore = "Helper methods not yet implemented"]
fn test_coordinate_name_handling() {
// Test that coordinate names are properly handled
// (compilation test only, no server required)
// TODO: Implement helper methods on SyncIgtlClient
fn _test_various_coordinates(client: &mut SyncIgtlClient) {
// Common anatomical coordinate systems
let _ = client.start_tracking(50, "RAS"); // Right-Anterior-Superior
let _ = client.start_tracking(50, "LPS"); // Left-Posterior-Superior
let _ = client.start_tracking(50, "IJK"); // Image indices
// Short name
let _ = client.start_tracking(50, "A");
// Long name (will be truncated to 32 bytes in StartTDataMessage)
let _ = client.start_tracking(50, "VeryLongCoordinateSystemNameThatExceeds32Characters");
}
}
#[test]
#[ignore = "Helper methods not yet implemented"]
fn test_resolution_values() {
// Test various resolution (update interval) values
// (compilation test only, no server required)
// TODO: Implement helper methods on SyncIgtlClient
fn _test_various_resolutions(client: &mut SyncIgtlClient) {
// High frequency (120 Hz)
let _ = client.start_tracking(8, "RAS");
// Medium frequency (60 Hz)
let _ = client.start_tracking(16, "RAS");
// Standard frequency (30 Hz)
let _ = client.start_tracking(33, "RAS");
// Low frequency (10 Hz)
let _ = client.start_tracking(100, "RAS");
// Very low frequency (1 Hz)
let _ = client.start_tracking(1000, "RAS");
}
}
*/