/* * Copyright(c) 2020 ZettaScale Technology and others * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v. 2.0 which is available at * http://www.eclipse.org/legal/epl-2.0, or the Eclipse Distribution License * v. 1.0 which is available at * http://www.eclipse.org/org/documents/edl-v10.php. * * SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause */ #ifndef DDSI_CFGUNITS_H #define DDSI_CFGUNITS_H static const struct cfgunit cfgunits[] = { UNIT("bandwidth", DESCRIPTION( "

The unit must be specified explicitly. Recognised units: " "Xb/s, Xbps for bits/s or XB/s, XBps for " "bytes/s; where X is an optional prefix: k for 103, " "Ki for 210, M for 106, Mi for 220, " "G for 109, Gi for 230.

"), PATTERN( "0|(\\d+(\\.\\d*)?([Ee][\\-+]?\\d+)?|\\.\\d+([Ee][\\-+]?\\d+)?) *([kMG]i?)?[Bb][p/]s")), UNIT("duration", DESCRIPTION( "

The unit must be specified explicitly. Recognised units: ns, us, ms, " "s, min, hr, day.

"), PATTERN( "0|(\\d+(\\.\\d*)?([Ee][\\-+]?\\d+)?|\\.\\d+([Ee][\\-+]?\\d+)?) *([num]?s|min|hr|day)")), UNIT("duration_inf", DESCRIPTION( "

Valid values are finite durations with an explicit unit or the " "keyword 'inf' for infinity. Recognised units: ns, us, ms, s, min, hr, " "day.

"), PATTERN( "inf|0|(\\d+(\\.\\d*)?([Ee][\\-+]?\\d+)?|\\.\\d+([Ee][\\-+]?\\d+)?) *([num]?s|min|hr|day)")), UNIT("memsize", DESCRIPTION( "

The unit must be specified explicitly. Recognised units: B (bytes), " "kB & KiB (210 bytes), MB & MiB (220 bytes), GB & " "GiB (230 bytes).

"), PATTERN( "0|(\\d+(\\.\\d*)?([Ee][\\-+]?\\d+)?|\\.\\d+([Ee][\\-+]?\\d+)?) *([kMG]i?)?B")), END_MARKER }; #endif /* DDSI_CFGUNITS_H */