Flow descriptions by origin stations. More...
#include <station_base.h>
Public Member Functions | |
void | AddFlow (StationID origin, StationID via, uint amount) |
Add some flow from "origin", going via "via". | |
void | PassOnFlow (StationID origin, StationID via, uint amount) |
Pass on some flow, remembering it as invalid, for later subtraction from locally consumed flow. | |
void | FinalizeLocalConsumption (StationID self) |
Subtract invalid flows from locally consumed flow. |
Flow descriptions by origin stations.
Definition at line 87 of file station_base.h.
void FlowStatMap::AddFlow | ( | StationID | origin, | |
StationID | via, | |||
uint | flow | |||
) |
Add some flow from "origin", going via "via".
origin | Origin of the flow. | |
via | Next hop. | |
flow | Amount of flow to be added. |
Definition at line 4133 of file station_cmd.cpp.
void FlowStatMap::FinalizeLocalConsumption | ( | StationID | self | ) |
Subtract invalid flows from locally consumed flow.
self | ID of own station. |
Definition at line 4168 of file station_cmd.cpp.
References FlowStat::ChangeShare(), and FlowStat::GetShare().
void FlowStatMap::PassOnFlow | ( | StationID | origin, | |
StationID | via, | |||
uint | flow | |||
) |
Pass on some flow, remembering it as invalid, for later subtraction from locally consumed flow.
This is necessary because we can't have negative flows and we don't want to sort the flows before adding them up.
origin | Origin of the flow. | |
via | Next hop. | |
flow | Amount of flow to be passed. |
Definition at line 4151 of file station_cmd.cpp.
References FlowStat::AppendShare().