Skip to content

Commit

Permalink
Doc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
fhunleth committed Jul 21, 2020
1 parent eb69475 commit 12285b2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -449,11 +449,12 @@ implementation may not actually affect power use. To use it, implement the
`VintageNet.PowerManager` behaviour and register the implementation in your
`config.exs`.

Additionally, if VintageNet is not having any luck with a network interface, it
may invoke power management to turn the network interface off and on. How this
works is dependent on the power management implementation. The VintageNet power
management code supports mandatory minimum on and off times to prevent damage to
hardware and also minimize pointless power cycling of hardware.
Additionally, VintageNet runs a watchdog-like service for network devices that
supply `VintageNet.PowerManager` implementations. If the watchdog is not pet
within the timeout period (user-specified and defaults to 60 seconds),
VintageNet powers the device off and and on. The VintageNet power management
code supports mandatory minimum on and off times to prevent damage to hardware
and also minimize pointless power cycling of hardware.

While many network devices are fairly reliable and powering off and on seems
unnecessary, it can save a trip to the field or a full device reboot.
Expand Down
7 changes: 7 additions & 0 deletions docs/cookbook.md
Original file line number Diff line number Diff line change
Expand Up @@ -354,4 +354,11 @@ Then add the following to your `config.exs`:
config :vintage_net, power_managers: [{MyPowerManager, ifname: "wlan0"}]
```

VintageNet determines whether devices are ok by use of a watchdog. VintageNet
and its technology implementations pet the watchdog by calling
`VintageNet.PowerManager.PMControl.pet_watchdog/1`. This may be insufficient for
your application. Options include calling that function in your code regularly
or modifying the `:watchdog_timeout` in the power manager spec in your
`config.exs`.

See `VintageNet.PowerManager` for details.

0 comments on commit 12285b2

Please sign in to comment.