Class for Magic Packet (Wake-on-Lan (WOL)) reset of device.
More...
#include <wol.h>
|
void | send () const |
| Send Magic Packet without any data ("password"). More...
|
|
void | send (const std::array< uint8_t, 4 > &password) const |
| Send Magic Packet with data ("password"). More...
|
|
| WOL (uint64_t hardware_addr, uint16_t port) noexcept |
| Constructor. More...
|
|
| WOL (std::array< uint8_t, 6 > hardware_addr, uint16_t port) noexcept |
| Constructor. More...
|
|
| ~WOL ()=default |
|
|
std::vector< uint8_t > & | appendMagicPacket (std::vector< uint8_t > &sendbuf, const std::array< uint8_t, 4 > *password) const |
| Appends a magic packet to a data buffer. More...
|
|
void | sendImpl (const std::array< uint8_t, 4 > *password) const |
| sendImpl Actually send Magic packet with specified data. More...
|
|
template<uint8_t num> |
std::array< uint8_t, num > | toByteArray (uint64_t data) noexcept |
| Converts a larger-than-byte data type to an array of bytes. More...
|
|
Class for Magic Packet (Wake-on-Lan (WOL)) reset of device.
Definition at line 62 of file wol.h.
Definition at line 68 of file wol.h.
rcdiscover::WOL::WOL |
( |
uint64_t |
hardware_addr, |
|
|
uint16_t |
port |
|
) |
| |
|
noexcept |
Constructor.
- Parameters
-
hardware_addr | MAC-address of device |
port | destination UDP port |
Definition at line 49 of file wol.cc.
rcdiscover::WOL::WOL |
( |
std::array< uint8_t, 6 > |
hardware_addr, |
|
|
uint16_t |
port |
|
) |
| |
|
noexcept |
Constructor.
- Parameters
-
hardware_addr | MAC-address of device |
port | destination UDP port |
Definition at line 54 of file wol.cc.
rcdiscover::WOL::~WOL |
( |
| ) |
|
|
default |
std::vector< uint8_t > & rcdiscover::WOL::appendMagicPacket |
( |
std::vector< uint8_t > & |
sendbuf, |
|
|
const std::array< uint8_t, 4 > * |
password |
|
) |
| const |
|
private |
Appends a magic packet to a data buffer.
- Parameters
-
sendbuf | buffer to which the magic packet is appended (is modified) |
password | Magic Packet password (null if no such password should be included |
- Returns
- reference to input sendbuf
Definition at line 69 of file wol.cc.
void rcdiscover::WOL::send |
( |
| ) |
const |
Send Magic Packet without any data ("password").
Definition at line 59 of file wol.cc.
void rcdiscover::WOL::send |
( |
const std::array< uint8_t, 4 > & |
password | ) |
const |
Send Magic Packet with data ("password").
- Parameters
-
Definition at line 64 of file wol.cc.
void rcdiscover::WOL::sendImpl |
( |
const std::array< uint8_t, 4 > * |
password | ) |
const |
|
private |
sendImpl Actually send Magic packet with specified data.
- Parameters
-
password | data to send (null if non) |
Definition at line 106 of file wol.cc.
template<uint8_t num>
std::array< uint8_t, num > rcdiscover::WOL::toByteArray |
( |
uint64_t |
data | ) |
|
|
privatenoexcept |
Converts a larger-than-byte data type to an array of bytes.
Definition at line 96 of file wol.cc.
const std::array<uint8_t, 6> rcdiscover::WOL::hardware_addr_ |
|
private |
uint16_t rcdiscover::WOL::port_ |
|
private |
The documentation for this class was generated from the following files: