Apollo  6.0
Open source self driving car software
base_map_node_config.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 <memory>
19 
22 
23 namespace apollo {
24 namespace localization {
25 namespace msf {
26 namespace pyramid_map {
27 
28 #define MD5LENTH 16
29 
32  public:
34  virtual ~BaseMapNodeConfig();
35 
37  // virtual BaseMapNodeConfig* alloc_new_map_node_config();
39  virtual std::shared_ptr<BaseMapNodeConfig> Clone();
43  virtual unsigned int LoadBinary(const unsigned char *buf);
48  virtual unsigned int CreateBinary(unsigned char *buf, size_t buf_size) const;
50  virtual unsigned int GetBinarySize() const;
51 
52  public:
55  unsigned char body_md5_[MD5LENTH] = {0};
56  size_t body_size_ = 0;
57  bool has_map_version_ = true;
58  bool has_body_md5_ = true;
59 };
60 
61 } // namespace pyramid_map
62 } // namespace msf
63 } // namespace localization
64 } // namespace apollo
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
MapVersion map_version_
Definition: base_map_node_config.h:54
virtual unsigned int GetBinarySize() const
Get the size of the config in bytes.
size_t body_size_
Definition: base_map_node_config.h:56
bool has_map_version_
Definition: base_map_node_config.h:57
unsigned char body_md5_[MD5LENTH]
Definition: base_map_node_config.h:55
#define MD5LENTH
Definition: base_map_node_config.h:28
MapNodeIndex node_index_
Definition: base_map_node_config.h:53
bool has_body_md5_
Definition: base_map_node_config.h:58
The map node config info.
Definition: base_map_node_config.h:31
virtual unsigned int LoadBinary(const unsigned char *buf)
Load the map node config from a binary chunk.
Definition: base_map_node_index.h:33
virtual std::shared_ptr< BaseMapNodeConfig > Clone()
Alloc a new map node config.
MapVersion
Definition: base_map_config.h:33
virtual unsigned int CreateBinary(unsigned char *buf, size_t buf_size) const
Create the binary map node config.