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

refactor regex constants

This commit is contained in:
Steffen Vogel 2020-09-10 11:12:49 +02:00
parent 6411fc5ca7
commit 4b58305c5b
3 changed files with 4 additions and 4 deletions

View file

@ -31,7 +31,7 @@
#include <villas/super_node.hpp>
#include <villas/api/session.hpp>
#define REGEX_UUID "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}"
#define RE_UUID "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}"
namespace villas {
namespace node {

View file

@ -58,12 +58,12 @@ public:
/* Register API requests */
static char n1[] = "path/start";
static char r1[] = "/path/(" REGEX_UUID ")/start";
static char r1[] = "/path/(" RE_UUID ")/start";
static char d1[] = "start a path";
static RequestPlugin<PathActionRequest<path_start>, n1, r1, d1> p1;
static char n2[] = "path/stop";
static char r2[] = "/path/(" REGEX_UUID ")/stop";
static char r2[] = "/path/(" RE_UUID ")/stop";
static char d2[] = "stop a path";
static RequestPlugin<PathActionRequest<path_stop>, n2, r2, d2> p2;

View file

@ -54,7 +54,7 @@ public:
/* Register API request */
static char n[] = "path";
static char r[] = "/path/(" REGEX_UUID ")";
static char r[] = "/path/(" RE_UUID ")";
static char d[] = "retrieve info of a path";
static RequestPlugin<PathInfoRequest, n, r, d> p;