36 #ifndef RCDISCOVER_WOL_H 37 #define RCDISCOVER_WOL_H 47 #include <netinet/in.h> 77 WOL(uint64_t hardware_addr, uint16_t port) noexcept;
84 WOL(std::array<uint8_t, 6> hardware_addr, uint16_t port) noexcept;
97 void send(
const std::array<uint8_t, 4>& password)
const;
108 std::vector<uint8_t>& sendbuf,
109 const std::array<uint8_t, 4> *password)
const;
114 template<u
int8_t num>
115 std::array<uint8_t, num>
toByteArray(uint64_t data) noexcept;
121 void sendImpl(
const std::array<uint8_t, 4> *password)
const;
130 #endif // RCDISCOVER_WOL_H
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.
Class for Magic Packet (Wake-on-Lan (WOL)) reset of device.
WOL(uint64_t hardware_addr, uint16_t port) noexcept
Constructor.
std::array< uint8_t, num > toByteArray(uint64_t data) noexcept
Converts a larger-than-byte data type to an array of bytes.
Socket implementation for Linux.
void sendImpl(const std::array< uint8_t, 4 > *password) const
sendImpl Actually send Magic packet with specified data.
const std::array< uint8_t, 6 > hardware_addr_
void send() const
Send Magic Packet without any data ("password").