Skip to content

Commit

Permalink
feat(open62541-server-template): add argument description for utility…
Browse files Browse the repository at this point in the history
… functions
  • Loading branch information
FlorianDue authored and FlorianDue committed Sep 6, 2024
1 parent 86fb4c7 commit fbcada9
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions deps/template/include/swap_it.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,17 @@

/*
* Method Arguments:
* UA_Server *server: the server instance
* UA_MethodCallback callback: callback of for the service method
* UA_Boolean default_behavior: boolean that determines wheter a default information
* model will be instantiated based on the json configuration
* UA_Boolean *running: running variable from the server's main function
* UA_Boolean register_agent: Boolean that determines wheter the Asset should register itself in a device registry
* UA_String registry_url: URL of the Device Regsitry instance the Asset should register itself in.
* Argument has the form ip:port => 0.0.0.0:4840
* */
* UA_Server *server: the server instance
* UA_ByteString json json configuration of the server
* UA_MethodCallback callback: callback of for the service method
* UA_Boolean default_behavior: boolean that determines whether a default information
* model will be instantiated based on the json configuration
* UA_Boolean *running: running variable from the server's main function
* UA_Boolean register_agent_in_registry: Boolean that determines whether the Asset should register itself in a device registry
* UA_service_server_interpreter *swap_server Empty structure that stores the interpreted json configuration. The stucture is filled
* when interpreting the json config within the function and can then be used for the function
* clear_swap_server
*/

UA_StatusCode UA_server_swap_it(UA_Server *server,
UA_ByteString json,
Expand All @@ -35,6 +37,13 @@ UA_StatusCode UA_server_swap_it(UA_Server *server,
UA_Boolean register_agent_in_registry,
UA_service_server_interpreter *swap_server);

/*
* UA_service_server_interpreter *server_info Filled structure from the function UA_server_swap_it
* UA_Boolean unregister Boolean value that determines whether the server should
* unregister itself from the device registry
* UA_Server *server the server instance
*/

void clear_swap_server(UA_service_server_interpreter *server_info, UA_Boolean unregister, UA_Server *server);

#endif //SWAP_TEMPLATE_UTILITY_FUNCTION_SWAP_IT_H

0 comments on commit fbcada9

Please sign in to comment.