Skip to content

Commit 3968ee0

Browse files
committed
add: service doc
1 parent ae74d5c commit 3968ee0

1 file changed

Lines changed: 24 additions & 7 deletions

File tree

include/robotkernel/service.h

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,27 +36,44 @@
3636
#include "robotkernel/rk_type.h"
3737

3838
typedef void (*get_sd_t)(std::list<std::string>& sd_list);
39-
4039
namespace robotkernel {
41-
#ifdef EMACS
42-
}
43-
#endif
4440

4541
typedef std::vector<rk_type> service_arglist_t;
4642
typedef std::function<int(const service_arglist_t&, service_arglist_t&)> service_callback_t;
4743

44+
/**
45+
* @struct service_t
46+
* @brief A struct representing a service.
47+
*/
4848
typedef struct service {
49+
/**
50+
* @var owner
51+
* @brief The owner of the service.
52+
*/
4953
std::string owner;
54+
55+
/**
56+
* @var name
57+
* @brief The name of the service.
58+
*/
5059
std::string name;
60+
61+
/**
62+
* @var service_definition
63+
* @brief A description of the service.
64+
*/
5165
std::string service_definition;
66+
67+
/**
68+
* @var callback
69+
* @brief A callback function associated with the service.
70+
*/
5271
service_callback_t callback;
5372
} service_t;
5473

74+
5575
typedef std::map<std::pair<std::string, std::string>, service_t *> service_map_t;
5676

57-
#ifdef EMACS
58-
{
59-
#endif
6077
} // namespace robotkernel
6178

6279
#endif // ROBOTKERNEL__SERVICE_H

0 commit comments

Comments
 (0)