1 /*
2  * Copyright 2023 The Android Open Source Project
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 #include "SessionValueEntry.h"
18 
19 #include <sstream>
20 
21 namespace aidl {
22 namespace google {
23 namespace hardware {
24 namespace power {
25 namespace impl {
26 namespace pixel {
27 
dump(std::ostream & os) const28 std::ostream &SessionValueEntry::dump(std::ostream &os) const {
29     auto timeNow = std::chrono::steady_clock::now();
30     os << "ID.Min.Act(" << idString;
31     if (votes) {
32         UclampRange uclampRange;
33         votes->getUclampRange(uclampRange, timeNow);
34         os << ", " << uclampRange.uclampMin;
35         os << "-" << uclampRange.uclampMax;
36     } else {
37         os << ", votes nullptr";
38     }
39     os << ", " << isActive;
40     return os;
41 }
42 
43 }  // namespace pixel
44 }  // namespace impl
45 }  // namespace power
46 }  // namespace hardware
47 }  // namespace google
48 }  // namespace aidl
49