diff options
author | 2019-07-23 09:53:06 -0400 | |
---|---|---|
committer | 2019-07-31 13:20:52 +0000 | |
commit | a47a5f20a3b5bb2191d40c47fc0a9976376680c8 (patch) | |
tree | 81d8f1e8a0c198f0d3b34818df99fd9ba6f8fd1e /src/vpp/api/vpe_types.api | |
parent | 07f87546c2b29ac07ec652420c8c3aef6a7faec6 (diff) |
api papi: add alias for timestamp(datetime)/timedelta
Now that we have support for f64:
- create explicit types for timestamp(datetime)/timedelta
- update log_details to use timestamp and remove redundant string representation.
If you need the string representation, in python do str(timestamp).
If you prefer the raw f64 value, the client can pass in the
_no_type_conversion option.
Type: feature
Change-Id: I547b5fa7122d2afa12628b7db0192c23babbbae8
Signed-off-by: Paul Vinciguerra <pvinci@vinciconsulting.com>
Diffstat (limited to 'src/vpp/api/vpe_types.api')
-rw-r--r-- | src/vpp/api/vpe_types.api | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/vpp/api/vpe_types.api b/src/vpp/api/vpe_types.api index f1d6e5456cd..7bd4b29e846 100644 --- a/src/vpp/api/vpe_types.api +++ b/src/vpp/api/vpe_types.api @@ -1,3 +1,18 @@ +/* + * Copyright (c) 2015-2016 Cisco and/or its affiliates. + * Copyright (c) 2019 Vinci Consulting Corp. All Rights Reserved. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at: + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ typeonly define version { @@ -11,3 +26,17 @@ typeonly define version u8 build_metadata[17]; /* 16 + "\0" */ }; + typedef f64 timestamp; + typedef f64 timedelta; + + enum log_level { + VPE_API_LOG_LEVEL_EMERG = 0, /* emerg */ + VPE_API_LOG_LEVEL_ALERT = 1, /* alert */ + VPE_API_LOG_LEVEL_CRIT = 2, /* crit */ + VPE_API_LOG_LEVEL_ERR = 3, /* err */ + VPE_API_LOG_LEVEL_WARNING = 4, /* warn */ + VPE_API_LOG_LEVEL_NOTICE = 5, /* notice */ + VPE_API_LOG_LEVEL_INFO = 6, /* info */ + VPE_API_LOG_LEVEL_DEBUG = 7, /* debug */ + VPE_API_LOG_LEVEL_DISABLED = 8, /* disabled */ +}; |