1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

added documentation and smaller fixes

This commit is contained in:
Steffen Vogel 2016-01-14 22:56:16 +01:00
parent 901ce7c707
commit 841b499902
5 changed files with 10 additions and 9 deletions

View file

@ -19,7 +19,7 @@ V ?= 2
GIT_REV=$(shell git rev-parse --short HEAD)
# Compiler and linker flags
CC = gcc
CC ?= gcc
LDLIBS = -pthread -lrt -lm -lconfig -ls2ss
CFLAGS += -std=gnu99 -Iinclude/ -I. -MMD -Wall -D_GIT_REV='"$(GIT_REV)"' -D_POSIX_C_SOURCE=200809L -D_GNU_SOURCE=1 -DV=$(V)

View file

@ -39,7 +39,7 @@
#define SYSFS_PATH "/sys"
#define PROCFS_PATH "/proc"
/* Checks */
/* Required kernel version */
#define KERNEL_VERSION_MAJ 3
#define KERNEL_VERSION_MIN 4

View file

@ -32,10 +32,10 @@
struct path
{
enum {
PATH_INVALID, /**< */
PATH_CREATED, /**< */
PATH_RUNNING, /**< */
PATH_STOPPED /**< */
PATH_INVALID, /**< Path is invalid. */
PATH_CREATED, /**< Path has been created. */
PATH_RUNNING, /**< Path is currently running. */
PATH_STOPPED /**< Path has been stopped. */
} state; /**< Path state */
struct node *in; /**< Pointer to the incoming node */
@ -78,6 +78,7 @@ struct path
struct timespec last; /**< Previous message received (old value of path::ts__recv) */
} ts;
/* Statistics */
unsigned int sent; /**< Counter for sent messages to all outgoing nodes */
unsigned int received; /**< Counter for received messages from all incoming nodes */
unsigned int invalid; /**< Counter for invalid messages */

View file

@ -93,7 +93,7 @@ static void * path_run(void *arg)
else if (recv == 0)
continue;
/** @todo Replace this timestamp by hardware timestamping */
/** @todo Replace this timestamp by hardware timestamping for node type which support it. */
p->ts.last = p->ts.recv;
p->ts.recv = time_now();
@ -125,7 +125,7 @@ static void * path_run(void *arg)
continue;
}
/* At fixed rate mode, messages are send by another thread */
/* At fixed rate mode, messages are send by another (asynchronous) thread */
if (!p->rate)
path_write(p);
}

View file

@ -230,7 +230,7 @@ int socket_read(struct node *n, struct msg *pool, int poolsize, int first, int c
/* Receive message from socket */
bytes = recvmsg(s->sd, &mhdr, 0);
if (bytes == 0)
error("Remote node %s closed the cnode_name", node_name(n));
error("Remote node %s closed the connection", node_name(n));
else if (bytes < 0)
serror("Failed recv");