Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TSP-634 Change lan and usb address fields to have a generic name #12

Merged
merged 3 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions kic-discover/src/ethernet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub const SERVICE_NAMES: [&str; 3] = [
#[derive(Debug, Clone, Eq, PartialEq, PartialOrd, Hash, Serialize, Deserialize)]
pub struct LxiDeviceInfo {
io_type: IoType,
pub ip_addr: IpAddr,
pub instr_address: IpAddr,
pub manufacturer: String,
pub model: String,
pub serial_number: String,
Expand Down Expand Up @@ -117,7 +117,7 @@ impl LxiDeviceInfo {
if manufacturer.to_ascii_lowercase().contains("keithley") && res.0 {
let device = Self {
io_type: IoType::Lan,
ip_addr: instr_addr,
instr_address: instr_addr,
manufacturer,
model,
serial_number,
Expand Down
2 changes: 1 addition & 1 deletion kic-discover/src/instrument_discovery/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ impl From<LxiDeviceInfo> for InstrumentInfo {
serial_number: Some(lxi_info.serial_number),
firmware_rev: Some(lxi_info.firmware_revision),
address: Some(ConnectionAddr::Lan(SocketAddr::new(
lxi_info.ip_addr,
lxi_info.instr_address,
COMM_PORT,
))),
}
Expand Down
4 changes: 2 additions & 2 deletions kic-discover/src/usbtmc/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ impl Usbtmc {
if let Ok(mut instr) = tmc_instr {
let usb_info = UsbDeviceInfo {
io_type: IoType::Usb,
unique_string: instr.unique_string.clone(),
instr_address: instr.unique_string.clone(),
manufacturer,
model,
serial_number,
Expand Down Expand Up @@ -170,7 +170,7 @@ const fn model_lut(pid: u16) -> &'static str {
#[derive(Debug, Clone, Eq, PartialEq, PartialOrd, Hash, Serialize, Deserialize)]
pub struct UsbDeviceInfo {
io_type: IoType,
unique_string: String,
instr_address: String,
manufacturer: String,
model: String,
serial_number: String,
Expand Down
Loading