commandutils.hpp (bec18eaf22647d31a3e9d16d9a0bb7eb04facf4b) commandutils.hpp (63c99be4ac026a326d6953d608376edb0e60007a)
1/*
2 * Copyright (c) 2018 Intel Corporation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#pragma once
1/*
2 * Copyright (c) 2018 Intel Corporation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#pragma once
18#include <iostream>
19#include <sdbusplus/bus.hpp>
20
18#include <sdbusplus/bus.hpp>
19
20#include <iostream>
21
21static constexpr bool debug = false;
22
23inline static void printRegistration(unsigned int netfn, unsigned int cmd)
24{
25 if constexpr (debug)
26 {
27 std::cout << "Registering NetFn:[0x" << std::hex << std::uppercase
28 << netfn << "], Cmd:[0x" << cmd << "]\n";

--- 26 unchanged lines hidden ---
22static constexpr bool debug = false;
23
24inline static void printRegistration(unsigned int netfn, unsigned int cmd)
25{
26 if constexpr (debug)
27 {
28 std::cout << "Registering NetFn:[0x" << std::hex << std::uppercase
29 << netfn << "], Cmd:[0x" << cmd << "]\n";

--- 26 unchanged lines hidden ---