mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
several minor fixes
This commit is contained in:
parent
2680a067f0
commit
b2aab0b823
5 changed files with 14 additions and 13 deletions
|
@ -42,7 +42,7 @@ std::string Request::toString()
|
|||
|
||||
Request * RequestFactory::create(Session *s, const std::string &uri, Session::Method meth, unsigned long ct)
|
||||
{
|
||||
s->logger->info("Trying to find request handler for: uri={}", uri);
|
||||
s->logger->info("Lookup request handler for: uri={}", uri);
|
||||
|
||||
for (auto *rf : plugin::Registry::lookup<RequestFactory>()) {
|
||||
std::smatch mr;
|
||||
|
|
|
@ -62,7 +62,7 @@ Format * FormatFactory::make(json_t *json)
|
|||
return f;
|
||||
}
|
||||
else
|
||||
throw ConfigError(json, "Invalid format config");
|
||||
throw ConfigError(json, "node-config-format", "Invalid format config");
|
||||
}
|
||||
|
||||
Format * FormatFactory::make(const std::string &format)
|
||||
|
|
|
@ -87,7 +87,7 @@ int file_parse(struct vnode *n, json_t *json)
|
|||
|
||||
int ret;
|
||||
json_error_t err;
|
||||
json_t *json_format;
|
||||
json_t *json_format = nullptr;
|
||||
|
||||
const char *uri_tmpl = nullptr;
|
||||
const char *eof = nullptr;
|
||||
|
|
|
@ -352,7 +352,7 @@ int signal_generator_read(struct vnode *n, struct sample * const smps[], unsigne
|
|||
t->length = MIN(s->values, t->capacity);
|
||||
t->signals = &n->in.signals;
|
||||
|
||||
for (unsigned i = 0; i < MIN(s->values, t->capacity); i++) {
|
||||
for (unsigned i = 0; i < t->length; i++) {
|
||||
switch (s->type[i]) {
|
||||
case signal_generator::SignalType::CONSTANT:
|
||||
t->data[i].f = s->offset[i] + s->amplitude[i];
|
||||
|
|
|
@ -107,18 +107,19 @@ protected:
|
|||
|
||||
void usage()
|
||||
{
|
||||
std::cout << "Usage: villas-hook [OPTIONS] NAME [[PARAM1] [PARAM2] ...]" << std::endl
|
||||
std::cout << "Usage: villas-hook [OPTIONS] NAME" << std::endl
|
||||
<< " NAME the name of the hook function" << std::endl
|
||||
<< " PARAM* a string of configuration settings for the hook" << std::endl
|
||||
<< " OPTIONS is one or more of the following options:" << std::endl
|
||||
<< " -c CONFIG a JSON file containing just the hook configuration" << std::endl
|
||||
<< " -f FMT the input data format" << std::endl
|
||||
<< " -F FMT the output data format (defaults to input format)" << std::endl
|
||||
<< " -t DT the data-type format string" << std::endl
|
||||
<< " -d LVL set debug level to LVL" << std::endl
|
||||
<< " -v CNT process CNT smps at once" << std::endl
|
||||
<< " -h show this help" << std::endl
|
||||
<< " -V show the version of the tool" << std::endl << std::endl;
|
||||
<< " -c CONFIG a JSON file containing just the hook configuration" << std::endl
|
||||
<< " -f FMT the input data format" << std::endl
|
||||
<< " -F FMT the output data format (defaults to input format)" << std::endl
|
||||
<< " -t DT the data-type format string" << std::endl
|
||||
<< " -d LVL set debug level to LVL" << std::endl
|
||||
<< " -v CNT process CNT smps at once" << std::endl
|
||||
<< " -o PARAM=VALUE provide parameters for hook configuration" << std::endl
|
||||
<< " -h show this help" << std::endl
|
||||
<< " -V show the version of the tool" << std::endl << std::endl;
|
||||
|
||||
std::cout << "Supported hooks:" << std::endl;
|
||||
for (Plugin *p : Registry::lookup<HookFactory>())
|
||||
|
|
Loading…
Add table
Reference in a new issue