PL::Server class
-
class Server : public virtual PL::Lockable
Server class.
Subclassed by PL::ModbusServer, PL::NetworkServer, PL::StreamServer
Public Functions
-
Server()
Creates a server.
-
virtual esp_err_t Enable() = 0
Enables the server.
- Returns:
error code
-
virtual esp_err_t Disable() = 0
Disables the server.
- Returns:
error code
-
virtual bool IsEnabled() = 0
Checks if the server is enabled.
- Returns:
true if the server is enabled
-
std::string GetName()
Gets the server name.
- Returns:
name
-
void SetName(const std::string &name)
Sets the server name.
- Parameters:
name – name
-
virtual esp_err_t Lock(TickType_t timeout = portMAX_DELAY) = 0
Locks the object.
- Parameters:
timeout – timeout in FreeRTOS ticks
- Returns:
error code
-
virtual esp_err_t Unlock() = 0
Unlocks the object.
- Returns:
error code
-
Server()