mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
cleanups and some documentation
This commit is contained in:
parent
a0b9b56109
commit
58673dd3d3
5 changed files with 10 additions and 13 deletions
|
@ -53,10 +53,10 @@ extern struct list node_types;
|
|||
* @todo Add comments
|
||||
*/
|
||||
struct node_type {
|
||||
/** The unique name of this node. This must be the first member! */
|
||||
/** The unique name of this node. This must be allways the first member! */
|
||||
char *name;
|
||||
|
||||
/** Node type: layer, protocol, listen/connect */
|
||||
/** Node type */
|
||||
enum {
|
||||
BSD_SOCKET, /**< BSD Socket API */
|
||||
LOG_FILE, /**< File IO */
|
||||
|
@ -65,7 +65,7 @@ struct node_type {
|
|||
NGSI /**< NGSI 9/10 HTTP RESTful API (FIRWARE ContextBroker) */
|
||||
} type;
|
||||
|
||||
/** Parse node connection details for SOCKET type
|
||||
/** Parse node connection details.‚
|
||||
*
|
||||
* @param cfg A libconfig object pointing to the node.
|
||||
* @param n A pointer to the node structure which should be parsed.
|
||||
|
@ -81,7 +81,7 @@ struct node_type {
|
|||
*/
|
||||
char * (*print)(struct node *n);
|
||||
|
||||
/** Create new socket and connect(), bind(), accept().
|
||||
/** Opens the connection to this node.
|
||||
*
|
||||
* @param n A pointer to the node.
|
||||
* @retval 0 Success. Everything went well.
|
||||
|
@ -89,7 +89,7 @@ struct node_type {
|
|||
*/
|
||||
int (*open) (struct node *n);
|
||||
|
||||
/** Close the socket.
|
||||
/** Close the connection to this node.
|
||||
*
|
||||
* @param n A pointer to the node.
|
||||
* @retval 0 Success. Everything went well.
|
||||
|
@ -97,12 +97,13 @@ struct node_type {
|
|||
*/
|
||||
int (*close)(struct node *n);
|
||||
|
||||
/** Receive multiple messages from single datagram / packet.
|
||||
/** Receive multiple messages at once.
|
||||
*
|
||||
* Messages are received with a single recvmsg() syscall by
|
||||
* using gathering techniques (struct iovec).
|
||||
* The messages will be stored in a circular buffer / array @p m.
|
||||
* Indexes used to address @p m will wrap around after len messages.
|
||||
* Some node types might only support to receive one message at a time.
|
||||
*
|
||||
* @param n A pointer to the node where the messages should be sent to.
|
||||
* @param pool A pointer to an array of messages which should be sent.
|
||||
|
|
|
@ -132,7 +132,6 @@ int path_reset(struct path *p);
|
|||
*/
|
||||
void path_print_stats(struct path *p);
|
||||
|
||||
|
||||
/** Fills the provided buffer with a string representation of the path.
|
||||
*
|
||||
* Format: source => [ dest1 dest2 dest3 ]
|
||||
|
|
|
@ -218,14 +218,9 @@ int gtfpga_open(struct node *n)
|
|||
if (ret)
|
||||
serror("Failed to start timer");
|
||||
}
|
||||
else
|
||||
/** @todo implement UIO interrupts */
|
||||
else /** @todo implement UIO interrupts */
|
||||
error("UIO irq not implemented yet. Use 'rate' setting");
|
||||
|
||||
char buf[1024];
|
||||
gtfpga_print(n, buf, sizeof(buf));
|
||||
debug(5, "Found GTFPGA card: %s", buf);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -63,6 +63,7 @@ void log_reset()
|
|||
void log_print(const char *lvl, const char *fmt, ...)
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
log_vprint(lvl, fmt, ap);
|
||||
va_end(ap);
|
||||
|
|
|
@ -69,6 +69,7 @@ int opal_init(int argc, char *argv[], struct settings *set)
|
|||
info("Started as OPAL Asynchronous process");
|
||||
info("This is Simulator2Simulator Server (S2SS) %s (built on %s, %s)",
|
||||
VERSION, __DATE__, __TIME__);
|
||||
|
||||
opal_print_global(og);
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue