Skip to content
Snippets Groups Projects

Document code using doxygen style comment blocks

Merged Francesco Pham requested to merge mrfrank/eddie:devel into main
Files
22
@@ -21,26 +21,58 @@ private:
@@ -21,26 +21,58 @@ private:
public:
public:
 
/**
 
* EddieEndpoint constructor
 
* @param port Port number to assign to the node
 
* @param ip IP address that is assigned to the node, this IP address will be the same used to
 
* register the node's resources into the resource directory.
 
*/
explicit EddieEndpoint(const std::string& port = "5683", const std::string& ip = "");
explicit EddieEndpoint(const std::string& port = "5683", const std::string& ip = "");
~EddieEndpoint();
~EddieEndpoint();
 
/**
 
* @return The client used by the node for coap communication
 
*/
CoapClient* get_client();
CoapClient* get_client();
 
/**
 
* @return The server that hosts and serves the added resources.
 
*/
CoapServer* get_server();
CoapServer* get_server();
/* get resource directory */
/**
 
* Discover a resource directory in the network by sending a multicast CoAP request and listening for response.
 
* @return 0 on success, -1 if no resource directory was found or an error occurred sending the request.
 
*/
int discover_rd();
int discover_rd();
 
/**
 
* Get the vector of resources that are retrieved from the resource directory
 
* @return Vector of Link that contains details information about the available resources in the network.
 
*/
std::vector<Link> get_resources_from_rd();
std::vector<Link> get_resources_from_rd();
 
/**
 
* Add a resource into the server
 
* @param resource The resource containing paths, attributes and REST handlers.
 
* @return 0 on success, a negative integer otherwise.
 
*/
int add_resource(EddieResource *resource);
int add_resource(EddieResource *resource);
 
/**
 
* Start server I/O processing loop
 
* @param blocking True to block until the server quits, False to run the server loop in a separate thread.
 
* @return 0 on success, a negative integer otherwise.
 
*/
int start_server(bool blocking = false);
int start_server(bool blocking = false);
int stop_server();
int stop_server();
/* publish resources into resource directory */
/**
 
* Register the resources, previously added, in the resource directory.
 
* @return 0 on success, -1 on error
 
*/
int publish_resources();
int publish_resources();
};
};
Loading