The history method
For displaying incoming connection speed (rx_speed
) as a bar graph, we'll need another animation. Since it contains a 26-frame animation, the rx_bar.tga
image from the cFosSpeed
"Liquid Crystal" skin lends itself particularly well to this.
Keep in mind though that the parameter here may change very rapidly, which could cause the animation to behave slightly erratically. So, we'll have to smooth things out a bit. This can be accomplished with the history
method. Not only does it offer a number of ways for displaying the progression of a value (consult our skin definition reference
for a more detailed description), but it can also be used to calculate and display the arithmetic mean of the values a parameter assumes over any given time period.
You may have noticed there is no bitmap
but a hdisp1
entry instead. This is because the history
method can handle multiple display sections for rendering value
progression. These are defined as hdisp1,...,hdispN
and can be used to create effects like the scrolling bar graphs of the cFos
"Modern" skin or the moving fish-shaped packets of the cFosSpeed
"Default" skin. For this bar graph, however, only one such section is needed. It should be given its own name though (to distinguish it from regular disp
sections). Note that there is no need to enter a value
here, because the value in the history
section will be used for this section as well.
values define the range of the rx_speed parameter, which is best thought of as the percentage of available bandwidth.
Again, adding a similar display for the speed (tx_speed
) of outgoing connections can be done simply by copying the previous sections, changing disp
entries, and applying the same color transformation as for the tx_packet
Next step: Adding text sectionsThe animation method The text method Index