Struct proj_billing::billing::sign_on_meter::SignOnMeter [] [src]

pub struct SignOnMeter<T: Read + Write> { /* fields omitted */ }

State of the billing protocol

Trait Implementations

impl<T: Read + Write> BillingProtocol<T, f64> for SignOnMeter<T>
[src]

Consumption information for billing e.g. the time of consumption and the units consumed

Information used to calculate the bill (e.g. coefficients for each in which a unit could be consumed)

returns a null Prices object

To be run on the meter. This function should check for any new prices, and then add the price of consumption to the running bill Read more

Get the server up to speed with the current billing information: a message from the device to the server.

Pay bill (run on the server) This will block until it has received the billing information from the meter (via send_billing_information) Read more

Change the way bills are calculated. This is a message sent from the server (utility company) to the meter.

Instantiate a new meter

Instantiate a new server