diff options
author | Hanoh Haim <hhaim@cisco.com> | 2016-12-25 14:50:14 +0200 |
---|---|---|
committer | Hanoh Haim <hhaim@cisco.com> | 2016-12-25 14:50:31 +0200 |
commit | dc66a3a82aab2ce41aa6ded38087e02b1eeb9493 (patch) | |
tree | 6d9eb5a917f613c6cc7862ae2316abeb181c7f12 /src/tw_cfg.h | |
parent | c25e1862e21807ee2d4f1f356e5a6970fd598edf (diff) |
add a way to change tw configuration
Signed-off-by: Hanoh Haim <hhaim@cisco.com>
Diffstat (limited to 'src/tw_cfg.h')
-rw-r--r-- | src/tw_cfg.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/src/tw_cfg.h b/src/tw_cfg.h new file mode 100644 index 00000000..4e5c19f6 --- /dev/null +++ b/src/tw_cfg.h @@ -0,0 +1,64 @@ +#ifndef CTW_CFG_H +#define CTW_CFG_H + +/* + Hanoh Haim + Cisco Systems, Inc. +*/ + +/* +Copyright (c) 2015-2015 Cisco Systems, Inc. + +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. +*/ + +#include <yaml-cpp/yaml.h> +#include <stdint.h> +#include <stdio.h> +#include <vector> +#include <string> + + + +struct CTimerWheelYamlInfo { +public: + CTimerWheelYamlInfo(){ + reset(); + } + + + void reset(){ + m_info_exist =false; + m_buckets=1024; + m_levels=3; + m_bucket_time_usec=20.0; + } + + bool m_info_exist; /* file exist ?*/ + uint32_t m_buckets; + uint32_t m_levels; + double m_bucket_time_usec; + + +public: + void Dump(FILE *fd); + bool Verify(std::string & err); + +}; + +void operator >> (const YAML::Node& node, CTimerWheelYamlInfo & mac_info); + + + + +#endif |