1
0
Fork 0

devices must be aware of their DHCP status

This commit is contained in:
Kevin Matz 2023-05-22 09:13:03 -04:00
parent f49250a610
commit 822a3130b5
2 changed files with 16 additions and 0 deletions

View File

@ -511,6 +511,19 @@ ipAddress Device::broadcastIp() const
}
/**
* @brief Device::deviceHasDHCP
* @return
*
* The default implimentation is to return false, as the default invalid IP is static.
* \note Platform aware device types must return their DHCP status.
*/
bool Device::deviceHasDHCP() const
{
return false;
}
/**
* @brief Device::shortName
* @return

View File

@ -87,9 +87,12 @@ protected:
virtual void txArtPollReply(std::shared_ptr<pollreply_data> = nullptr);
virtual void txArtDiagData();
// OSI layer 2
virtual std::array<uint8_t, 6> deviceMac() const;
// OSI layer 3
virtual ipAddress deviceIp() const;
virtual ipAddress broadcastIp() const;
virtual bool deviceHasDHCP() const;
private:
std::weak_ptr<const std::function<void(std::shared_ptr<bufferstream>, ipAddress)>> _sender;