4.3 Example 3: Charging a Responder
Mappers charge a responder with enough charge to fulfill an upcoming Emit request. There has to be enough Frame Charge (FC) and Byte Charge (BC) for each frame that would be generated by such a request.
The following example illustrates how a mapper would charge a responder.
Calculating required charge
A mapper is to issue a request to a responder to emit 5 Probe frames to targets on the network, and the responder is to acknowledge receipt and processing of the request. The mapper would calculate the required charge as follows.
First it would determine the necessary FC:
5 Probe frames + 1 Ack frame = 6 frames.
Each frame takes 1 FC, so 6 FC is required.
Then it would determine the necessary BC:
The required BC is the number of bytes of all the Ethernet frames for the frames to be sent. Both Ack frames and Probe frames have the following size layout:
14 bytes (Ethernet Header) + 4 bytes (Demultiplex Header) + 14 bytes (Base Header) = 32 bytes.
Because there are 6 total frames to send, the required BC can be calculated as follows:
32 bytes per frame × 6 frames = 192 bytes.
Each byte takes 1 BC, so 192 BC is required.
Thus, the total charge requirement is 6 FC and 192 BC.
Charging the responder
The mapper now charges 6 FC and 192 BC on the responder. One approach would be to send 5 unacknowledged Charge frames followed by 1 acknowledged Emit frame. The progression of charge buildup on the responder would be as follows:
|
FC |
BC |
Frame Received |
|---|---|---|
|
0 |
0 |
None (initial charge) |
|
1 |
32 |
1st Charge frame at 32 bytes |
|
2 |
64 |
2nd Charge frame at 32 bytes |
|
3 |
96 |
3rd Charge frame at 32 bytes |
|
4 |
128 |
4th Charge frame at 32 bytes |
|
5 |
160 |
5th Charge frame at 32 bytes |
|
6 |
264 |
Emit frame at 104 bytes* |
*The Emit frame is 32 bytes, plus 2 bytes for the number of EmiteeDesc entries, plus 5 EmiteeDesc entries at 14 bytes each. 32 + 2 + 5 × 14 = 104.