Apollo  6.0
Open source self driving car software
client_common.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright 2019 The Apollo Authors. All Rights Reserved.
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 #pragma once
17 
18 #include <string>
19 #include <vector>
20 
21 #include "cyber/cyber.h"
22 #include "grpc++/grpc++.h"
23 
24 namespace apollo {
25 namespace hdmap {
26 #ifndef SYSTEM_OUTPUT_STREAM
27 #define SYSTEM_OUTPUT_STREAM stderr
28 #define SYS_STREAM SYSTEM_OUTPUT_STREAM
29 #endif
30 
31 #ifndef CLIENT_OUTPUT_STREAM
32 #define CLIENT_OUTPUT_STREAM stdout
33 #define USER_STREAM CLIENT_OUTPUT_STREAM
34 #endif
35 
36 std::vector<std::string> GetFileLines(const std::string& path);
37 inline double UnixNow() { return apollo::cyber::Time::Now().ToSecond(); }
38 } // namespace hdmap
39 } // namespace apollo
std::vector< std::string > GetFileLines(const std::string &path)
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
double ToSecond() const
convert time to second.
static Time Now()
get the current time.
double UnixNow()
Definition: client_common.h:37