Skip to main content

evaluate_salvo_condition

Function evaluate_salvo_condition 

Source
pub fn evaluate_salvo_condition(
    term: &SalvoConditionTerm,
    port_packet_counts: &HashMap<PortName, u64>,
    ports: &HashMap<PortName, Port>,
) -> bool
Expand description

Evaluates a salvo condition term against the current port packet counts.

§Arguments

  • term - The condition term to evaluate
  • port_packet_counts - Map of port names to their current packet counts
  • ports - Map of port names to their definitions (needed for capacity checks)

§Returns

true if the condition is satisfied, false otherwise.