Skip to content

Commit

Permalink
s/StatusV2/ExtendedStatus/g
Browse files Browse the repository at this point in the history
  • Loading branch information
mkeeter committed Jun 27, 2023
1 parent dde54df commit 7f8c8c4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions drv/transceivers-server/src/udp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ impl ServerImpl {
final_payload_len,
)
}
HostRequest::StatusV2(modules) => {
HostRequest::ExtendedStatus(modules) => {
ringbuf_entry!(Trace::Status(modules));
let mask = LogicalPortMask::from(modules);
let (num_status_bytes, result) = self.get_status_v2(mask, out);
Expand Down Expand Up @@ -868,33 +868,33 @@ impl ServerImpl {
.filter(|&p| desired_result.success().is_set(p))
.map(|p| p.as_mask())
{
let mut status = StatusV2::empty();
let mut status = ExtendedStatus::empty();
if (mod_status.power_enable & mask.0) != 0 {
status |= StatusV2::ENABLED;
status |= ExtendedStatus::ENABLED;
}
if (!mod_status.resetl & mask.0) != 0 {
status |= StatusV2::RESET;
status |= ExtendedStatus::RESET;
}
if (mod_status.lpmode_txdis & mask.0) != 0 {
status |= StatusV2::LOW_POWER_MODE;
status |= ExtendedStatus::LOW_POWER_MODE;
}
if (!mod_status.modprsl & mask.0) != 0 {
status |= StatusV2::PRESENT;
status |= ExtendedStatus::PRESENT;
}
if (!mod_status.intl_rxlosl & mask.0) != 0 {
status |= StatusV2::INTERRUPT;
status |= ExtendedStatus::INTERRUPT;
}
if (mod_status.power_good & mask.0) != 0 {
status |= StatusV2::POWER_GOOD;
status |= ExtendedStatus::POWER_GOOD;
}
if (mod_status.power_good_timeout & mask.0) != 0 {
status |= StatusV2::FAULT_POWER_TIMEOUT;
status |= ExtendedStatus::FAULT_POWER_TIMEOUT;
}
if (mod_status.power_good_fault & mask.0) != 0 {
status |= StatusV2::FAULT_POWER_LOST;
status |= ExtendedStatus::FAULT_POWER_LOST;
}
if !(self.disabled & mask).is_empty() {
status |= StatusV2::DISABLED_BY_SP;
status |= ExtendedStatus::DISABLED_BY_SP;
}
count +=
hubpack::serialize(&mut out[count..], &status.bits()).unwrap();
Expand Down

0 comments on commit 7f8c8c4

Please sign in to comment.